[
  {
    "path": ".claude/skills/java-tdd-guide/SKILL.md",
    "content": "---\nname: java-tdd-guide\ndescription: Bernard Ladenthin's personal Java Test-Driven Development skill — version 1.0.0 — Red → Green → Refactor workflow with project-independent conventions\n---\n\n# Java TDD Skill — Test-Driven Development\n\n**Author:** Bernard Ladenthin  \n**Version:** 1.0.0  \n**License:** Apache 2.0  \n\nThis is a personal, reusable Java TDD guide for use across multiple projects. All examples are generic and project-independent. Project-specific patterns and constants are documented separately in each project's CLAUDE.md.\n\n---\n\n## TDD Workflow — Red → Green → Refactor\n\nFollow the **Red → Green → Refactor** cycle rigorously. Every new behaviour must be covered by a failing test *before* the production code is written.\n\n### 1 — Red (failing test first)\nWrite one test that precisely describes the next desired behaviour. The test must compile but **must fail** when run. Do not write any production code yet.\n\n### 2 — Green (minimum production code)\nWrite the smallest change to production code that makes the failing test pass. Do not add code that is not driven by a test.\n\n### 3 — Refactor\nImprove the implementation and the test code without changing observable behaviour. All tests must stay green.\n\nRepeat for each behaviour increment.\n\n---\n\n## Test File Structure\n\n### File Header — Apache 2.0 License\n\nEvery test file **must** start with the formatter-off block enclosing the Apache 2.0 license header:\n\n```java\n// @formatter:off\n/**\n * Copyright <YEAR> <Author> <email>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// @formatter:on\npackage com.example.foo;\n```\n\n- The `// @formatter:off` / `// @formatter:on` pair wraps **only** the license block.\n- The year must match the file creation year (not the current year).\n\n---\n\n## Test Framework Stack\n\n| Concern | Mandatory choice |\n|---|---|\n| Runner | JUnit 4 (`@Test`, `@Before`, `@Rule`) |\n| Parameterized | `@RunWith(DataProviderRunner.class)` + `@UseDataProvider` (only when the class has at least one `@UseDataProvider` method) |\n| Assertions | Hamcrest only — `assertThat(actual, is(equalTo(expected)))` |\n| Mocking | Mockito — `mock()`, `when()`, `verify()`, `ArgumentCaptor` |\n| Temp files | `@Rule public TemporaryFolder folder = new TemporaryFolder()` |\n\n**Never use:**\n- `assertEquals`, `assertTrue`, `assertFalse`, `assertNotNull` from `org.junit.Assert`\n- TestNG or JUnit 5\n\n---\n\n## Class Layout\n\n```java\n@RunWith(DataProviderRunner.class)   // only when @UseDataProvider is present\npublic class FooTest {\n\n    // shared, constructed-once immutable fields\n    private final Bar bar = new Bar();\n    private final BazHelper helper = new BazHelper();\n\n    // mocks that must be fresh per test — declare field here, initialize in @Before\n    private Logger mockLogger;\n\n    @Before\n    public void setUp() {\n        mockLogger = mock(Logger.class);\n    }\n    // Omit @Before entirely when it does no meaningful work.\n```\n\nOmit `@RunWith` if no data providers are used. Omit empty `@Before` methods.\n\n---\n\n## Test Method Naming\n\nPattern: **`methodUnderTest_inputOrCondition_expectedBehavior`**\n\n```\nfoo_emptyInput_returnsNull\nbar_validArgumentsGiven_returnsExpected\nbaz_negativeValue_throwsException\ninterrupt_queueNotEmpty_waitedForDuration\ntoString_whenCalled_containsClassNameAndIdentityHash\n```\n\n**Rules:**\n- All three segments are **required**, separated by underscores.\n- Use camelCase within each segment.\n- Exception tests end with `_throwsException` or `_exceptionThrown`.\n- No-op/smoke tests: `_noExceptionThrown`.\n- `toString` tests: describe exact content (identity hash or structured format).\n- Logging assertions: include `_logged` or `_logsError`.\n\n---\n\n## Test Body — AAA Structure\n\nEvery test body **must** follow Arrange / Act / Assert with explicit section comments:\n\n```java\n@Test\npublic void methodName_conditionGiven_expectedResult() {\n    // arrange\n    Foo sut = new Foo(42);\n\n    // act\n    String result = sut.bar();\n\n    // assert\n    assertThat(result, is(equalTo(\"expected\")));\n}\n```\n\n### `// pre-assert` — two valid positions\n\n**1. Before `// act`** — assert a precondition or input invariant:\n\n```java\n// arrange\nString input = \"test-value\";\n\n// pre-assert\nassertThat(input, not(emptyString()));\n\n// act\nString result = sut.process(input);\n\n// assert\nassertThat(result, is(equalTo(\"expected\")));\n```\n\n**2. Between `// act` and `// assert`** — null-guard before accessing result fields:\n\n```java\n// act\nFooResult result = sut.compute();\n\n// pre-assert\nassertThat(result, is(notNullValue()));\n\n// assert\nassertThat(result.getValue(), is(equalTo(expected)));\n```\n\n**Rules:**\n- Do **not** use `Objects.requireNonNull(...)` in tests; use `// pre-assert` with `assertThat(x, is(notNullValue()))` instead.\n- The `// arrange` section may be omitted only when there is genuinely nothing to arrange.\n- Keep the act to a **single method call** whenever possible.\n\n---\n\n## Editor Folds — Mandatory Grouping\n\nTests within a class **must** be grouped using editor fold regions, one fold per method/feature under test:\n\n```java\n// <editor-fold defaultstate=\"collapsed\" desc=\"methodName\">\n@Test\npublic void methodName_caseA_resultA() { ... }\n\n@Test\npublic void methodName_caseB_resultB() { ... }\n// </editor-fold>\n```\n\n**Rules:**\n- The `desc` attribute equals the method name (or a short feature label).\n- `defaultstate=\"collapsed\"` is **mandatory** on every fold.\n- All tests for the same method go inside a single fold.\n- Tests for different methods **must** be in different folds.\n- Order folds logically (simple cases first, edge cases and exceptions last).\n\n---\n\n## Assertions — Hamcrest Style\n\nAll assertions use Hamcrest `assertThat`:\n\n```java\n// equality\nassertThat(result, is(equalTo(expected)));\n\n// null / not null\nassertThat(result, is(nullValue()));\nassertThat(result, is(notNullValue()));\n\n// boolean\nassertThat(flag, is(true));\nassertThat(flag, is(false));\n\n// negation\nassertThat(result, is(not(equalTo(unexpected))));\n\n// strings\nassertThat(message, containsString(\"substring\"));\nassertThat(message, matchesPattern(\"Regex\\\\d+\"));\nassertThat(output, not(emptyOrNullString()));\n\n// collections\nassertThat(list, hasSize(3));\nassertThat(list, is(empty()));\nassertThat(list, hasItems(\"a\", \"b\"));\n\n// numbers / comparable\nassertThat(index, is(lessThan(colonIndex)));\nassertThat(waitTime, is(greaterThan(minExpected)));\n\n// type\nassertThat(obj, instanceOf(Foo.class));\n```\n\n**Imports:**\n```java\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;   // when many matchers are used\n// or specific imports when only a few are needed\n```\n\n---\n\n## Exception Testing\n\n### Pattern A — Simple (no message check)\n\n```java\n@Test(expected = IllegalArgumentException.class)\npublic void foo_nullInput_throwsException() {\n    // act\n    sut.foo(null);\n}\n```\n\n### Pattern B — With message verification (try/catch/fail)\n\n```java\n@Test\npublic void foo_invalidInput_throwsException() {\n    try {\n        // act\n        sut.foo(\"invalid\");\n        fail(\"Expected IllegalArgumentException\");\n    } catch (IllegalArgumentException e) {\n        // assert\n        assertThat(e.getMessage(), containsString(\"expected error text\"));\n    }\n}\n```\n\nImport for `fail()`:\n```java\nimport static org.junit.Assert.fail;\n```\n\n---\n\n## Data Providers (Parameterized Tests)\n\n### Centralized Pattern\n\nAll data providers belong in a centralized `CommonDataProvider` class. Each provider follows this pattern:\n\n```java\n// 1. Constant for the provider name\npublic final static String DATA_PROVIDER_MY_CASES = \"myCases\";\n\n// 2. Javadoc linking to which test it serves\n/** For {@link FooTest}. */\n@DataProvider\npublic static Object[][] myCases() {\n    return new Object[][] {\n        { inputA, expectedA },\n        { inputB, expectedB },\n    };\n}\n```\n\n### Consuming a data provider\n\n```java\n@RunWith(DataProviderRunner.class)\npublic class FooTest {\n\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_MY_CASES, location = CommonDataProvider.class)\n    public void foo_inputGiven_returnsExpected(String input, String expected) {\n        // arrange\n        Foo sut = new Foo();\n\n        // act\n        String result = sut.bar(input);\n\n        // assert\n        assertThat(result, is(equalTo(expected)));\n    }\n}\n```\n\n### Enum-based providers\n\n```java\n@DataProvider\npublic static Object[][] allEnumValues() {\n    return transformFlatToObjectArrayArray(MyEnum.values());\n}\n```\n\n### Cartesian product providers\n\n```java\n@DataProvider\npublic static Object[][] typeAndSize() {\n    return mergeMany(types(), sizes());\n}\n```\n\n---\n\n## Named Constants — DRY, No Magic Literals\n\nEvery semantic value must be a named `public static final` or `private static final` constant with Javadoc.\n\n**Rules:**\n- Every string, number, or flag literal that carries meaning **must** be a named constant.\n- Constants belong at the class level, before constructors and methods.\n- Name constants by their **meaning or role**, not the raw value.\n- Each constant must have **Javadoc** explaining what it represents and why.\n- Derived values must be computed from source constants, never duplicated.\n- Radix values (`16`, `10`, `2`) should be referenced through helper constants, never as bare integers.\n\n**Bad:**\n```java\nreturn new BigInteger(\"FFFFFFFFFFFFFFFF\", 16);\nif (batchSize > 256) { ... }\n```\n\n**Good:**\n```java\n/**\n * The maximum valid size for batch processing.\n * Chosen based on performance testing with typical workloads.\n */\npublic static final int MAX_BATCH_SIZE = 256;\n\n/**\n * The hex value for all 64 bits set.\n * Derived from {@link #MAX_BATCH_SIZE} — do not duplicate the literal.\n */\npublic static final String MAX_VALUE_HEX = \"FF\".repeat(8);\n\nif (batchSize > MAX_BATCH_SIZE) { ... }\n```\n\n---\n\n## Logger Injection — Constructor Over Setter\n\nWhen a class uses an SLF4J `Logger` and tests need to inject a mock logger, prefer **constructor-based injection**.\n\n**Pattern — two constructors:**\n\n```java\npublic class MyService {\n    private final Logger logger;\n\n    // Production constructor — creates its own logger\n    public MyService(Config config) {\n        this(config, LoggerFactory.getLogger(MyService.class));\n    }\n\n    // Test constructor — accepts an injected logger\n    @VisibleForTesting\n    MyService(Config config, Logger logger) {\n        this.config = config;\n        this.logger = logger;\n    }\n}\n```\n\n**Rules:**\n- The `logger` field should be `private final`.\n- The production constructor delegates to the test constructor (or vice versa) — never duplicate initialization.\n- The `@VisibleForTesting` constructor has package-private visibility.\n- A `setLogger` method is a last resort — only if constructor injection is infeasible.\n\n**Test usage:**\n```java\nLogger mockLogger = mock(Logger.class);\nMyService service = new MyService(config, mockLogger);\n```\n\n---\n\n## Null Safety — JSpecify Annotations\n\nUse **JSpecify** `@Nullable` annotation for optional values; `@NonNull` is the default (no annotation needed).\n\n```java\nimport org.jspecify.annotations.Nullable;\n\npublic @Nullable String getOptional() { return null; }\n\n// Array null annotations — place between type and brackets\nprivate byte @Nullable [] buffer;           // array itself may be null\npublic byte @NonNull [] getBuffer() { }     // array is guaranteed non-null\n```\n\n**Compiler enforcement:**\nA static checker (e.g., NullAway) enforces null safety at compile time. Missing `@Nullable` on a nullable return or field causes a **compilation failure**.\n\n---\n\n## @VisibleForTesting Annotation\n\nMark package-private or protected members that are only exposed for testing:\n\n```java\n@VisibleForTesting\nstatic Duration AWAIT_DURATION = Duration.ofSeconds(20);\n\n@VisibleForTesting\nfinal ExecutorService executor = Executors.newFixedThreadPool(4);\n```\n\nTests may modify `@VisibleForTesting` static fields to shorten wait times or adjust test-specific behaviour.\n\n---\n\n## Mocking & Logger Verification\n\n### Capturing and asserting log output\n\n```java\nArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);\nverify(logger, times(1)).info(captor.capture());\nList<String> arguments = captor.getAllValues();\nassertThat(arguments.get(0), is(equalTo(\"Initialized.\")));\n```\n\n### Verifying no interaction\n\n```java\nverify(logger, never()).error(anyString());\n```\n\n### Verifying with argument matchers\n\n```java\nverify(logger).error(contains(\"expectedSubstring\"));\nverify(mockLogger, times(1)).info(eq(\"Message\"), eq(expectedValue));\n```\n\n**Imports:**\n```java\nimport static org.mockito.Mockito.*;\nimport static org.mockito.ArgumentMatchers.*;\n```\n\n---\n\n## Randomness — Always Fixed Seeds\n\nAll `Random` instances in tests **must** use a fixed seed:\n\n```java\nprivate final Random random = new Random(1337);\n```\n\nNever use `new Random()` (unseeded). Document the seed's significance when it matters:\n\n```java\n/** This random produces bits: 1, 0, 1, 0 — useful for testing boundary cases. */\nprivate final Random random = new Random(1);\n```\n\n---\n\n## TemporaryFolder / File System Tests\n\nUse `TemporaryFolder` for tests that create files and directories:\n\n```java\n@Rule\npublic TemporaryFolder folder = new TemporaryFolder();\n\n@Test\npublic void testFileHandling() throws IOException {\n    // arrange\n    File tempFile = folder.newFile(\"data.txt\");\n    File subdir = folder.newFolder(\"output\");\n    \n    // use Files NIO for writing\n    Files.writeString(tempFile.toPath(), \"content\");\n    \n    // act / assert\n    // ...\n}\n```\n\n**Rules:**\n- Always use `folder.newFile(...)` and `folder.newFolder(...)` — never create manually.\n- Cleanup is automatic when the test completes.\n\n---\n\n## Records & Immutability\n\nUse Java `record` for immutable value objects:\n\n```java\npublic record MyValue(@NonNull String name, int count) {\n    // compact constructor for validation\n    public MyValue {\n        Objects.requireNonNull(name);\n    }\n}\n```\n\n**Rules:**\n- `Objects.requireNonNull()` is **valid in production code** (not in tests).\n- Mark immutable classes with `@Immutable` annotation when appropriate.\n- For records containing mutable third-party types, suppress the Error Prone warning:\n\n```java\n@Immutable\npublic record Container(\n    @SuppressWarnings(\"Immutable\") MutableObject obj,\n    @NonNull String name\n) { }\n```\n\n---\n\n## Concurrency Conventions\n\n```java\n// Thread-safe counters\nprivate final AtomicLong hits = new AtomicLong();\nprivate final AtomicInteger stateCounter = new AtomicInteger();\n\n// Work queue\nprivate final LinkedBlockingQueue<byte[]> workQueue;\n\n// Thread pool — never raw Thread\nprivate final ExecutorService executor = Executors.newFixedThreadPool(4);\n\n// Shutdown synchronisation\nprivate final CountDownLatch shutdownLatch = new CountDownLatch(1);\n```\n\n### Async/Concurrent Tests\n\nUse `CountDownLatch` + `ExecutorService` + `Future` for coordinating async tests:\n\n```java\n@Test\npublic void asyncOperation_serverSendsData_clientReceives() throws Exception {\n    // arrange\n    int port = findFreePort();\n    ExecutorService executorService = Executors.newCachedThreadPool();\n    CountDownLatch serverStarted = new CountDownLatch(1);\n\n    Future<Void> serverFuture = executorService.submit(() -> {\n        try (ServerSocket serverSocket = new ServerSocket(port)) {\n            serverStarted.countDown();                // signal ready\n            try (Socket client = serverSocket.accept();\n                 DataOutputStream out = new DataOutputStream(client.getOutputStream())) {\n                out.write(data);\n            }\n        }\n        return null;\n    });\n\n    serverStarted.await();                            // wait for server to be ready\n\n    // act\n    String result = connectAndFetch(port);\n\n    // assert\n    assertThat(result, is(equalTo(expected)));\n\n    serverFuture.get(5, TimeUnit.SECONDS);            // ensure server completed cleanly\n    executorService.shutdown();\n}\n\nprivate static int findFreePort() throws IOException {\n    try (ServerSocket s = new ServerSocket(0)) {\n        return s.getLocalPort();\n    }\n}\n```\n\n---\n\n## Equals / HashCode / ToString Contract Tests\n\nUse a generic contract test helper with four instances (two for value A, two for value B):\n\n```java\n// arrange\nFoo a1 = new Foo(valueA);\nFoo a2 = new Foo(valueA);  // same data, different reference\nFoo b1 = new Foo(valueB);\nFoo b2 = new Foo(valueB);\n\n// assert — A != B\nEqualHashCodeToStringTestHelper helper = new EqualHashCodeToStringTestHelper(a1, a2, b1, b2);\nhelper.assertEqualsHashCodeToStringAIsDifferentToB();\n\n// OR — A == B (same semantic content)\nhelper.assertEqualsHashCodeToStringAIsEqualToB();\n```\n\nFor `toString()` tests verifying default object identity format:\n```java\nassertThat(output, matchesPattern(\"ClassName@\\\\p{XDigit}+\"));\n```\n\nFor `toString()` tests verifying structured content:\n```java\nassertThat(output, is(equalTo(\"Foo{name=bar, count=42}\")));\n```\n\n---\n\n## Import Style\n\nGroup imports in this order (no blank lines within groups, blank line between groups):\n\n1. Standard Java (`java.*`, `javax.*`)\n2. Third-party libraries (alphabetical)\n3. Project classes (`com.example.*`)\n4. Static imports (last, alphabetical)\n\n```java\nimport java.io.IOException;\nimport java.util.List;\n\nimport org.junit.Test;\nimport org.mockito.Mock;\n\nimport com.example.foo.Foo;\nimport com.example.foo.Bar;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\n```\n\nPrefer **specific static imports** over wildcard when used 1–2 times. Use wildcard for Hamcrest matchers when many are used:\n```java\nimport static org.hamcrest.Matchers.*;\n```\n\n---\n\n## Array & Collection Assertions\n\n### Do NOT use for-loops in assertions\n\n**Problem:** For-loop iteration in assertions reduces readability.\n\n```java\n// ❌ BAD — uses for-loop\nfor (int i = 0; i < expected.length; i++) {\n    assertThat(result[i], is(equalTo(expected[i])));\n}\n```\n\n**Solution:** Compare entire arrays directly.\n\n```java\n// ✅ GOOD — compare whole array\nassertThat(result, is(expected));\n```\n\n### Exception: iterating over all enum values is allowed\n\nWhen verifying behaviour for **every value of an enum**, iterating via `EnumType.values()` is preferred. It ensures new enum constants are automatically covered:\n\n```java\n@Test\npublic void process_allEnumValues_succeeds() {\n    for (MyEnum value : MyEnum.values()) {\n        String result = sut.process(value);\n        assertThat(result, not(emptyString()));\n    }\n}\n```\n\n### Pattern for zero-padded arrays\n\n```java\n@Test\npublic void decode_shorterInput_leftPaddedWithZeros() {\n    // arrange\n    byte[] original = {0x01, 0x02, 0x03};\n    final int targetLength = 20;\n    final int paddingLength = targetLength - original.length;\n    byte[] expectedPadding = new byte[paddingLength];\n\n    // act\n    byte[] result = decoder.decode(original, targetLength);\n\n    // assert\n    assertThat(Arrays.copyOfRange(result, 0, paddingLength), is(expectedPadding));\n    assertThat(Arrays.copyOfRange(result, paddingLength, targetLength), is(original));\n}\n```\n\n---\n\n## Constants Within a Fold (DRY)\n\nWhen the same literal appears in **two or more tests in the same fold**, extract it as a `private static final` constant:\n\n```java\n// ✅ GOOD — one definition, both variants derived from it\nprivate static final String CUSTOM_HEX = \"FF\";\n\nsut.value = CUSTOM_HEX.toUpperCase();  // \"FF\"\nsut.value = CUSTOM_HEX.toLowerCase();  // \"ff\"\nassertThat(result, is(equalTo(new BigInteger(CUSTOM_HEX, 16))));\n```\n\n```java\n// ❌ BAD — same literal repeated\nsut.value = \"FF\";\nsut.value = \"ff\";\nassertThat(result, is(equalTo(BigInteger.valueOf(255))));\n```\n\n**Rule:** Constants belong to their fold. Do **not** share a constant between different folds even when values coincide — tests for different methods should remain logically independent.\n\n---\n\n## Preserving Existing Comments\n\nWhen modifying existing test code (fixing bugs, applying guide compliance):\n\n- **Keep all existing inline comments** that are correct and descriptive.\n- **Only remove a comment** if it is factually wrong, misleading, or describes deleted code.\n- **Add new comments** where added code is not self-explanatory.\n\nExample — correct preservation:\n```java\n// arrange\nString address = createAddress();\n\n// Server socket binds        ← existing comment preserved\nServerSocket socket = new ServerSocket(port);\n\n// act\nString result = sut.process(address);\n\n// assert\nassertThat(result, not(emptyString()));\n```\n\n**Goal:** Minimize the diff to only lines that actually need changing.\n\n---\n\n## Anti-Patterns — What NOT To Do\n\n| Anti-pattern | Correct alternative |\n|---|---|\n| `assertEquals(expected, actual)` | `assertThat(actual, is(equalTo(expected)))` |\n| `assertTrue(condition)` | `assertThat(condition, is(true))` |\n| `Assert.assertNotNull(x)` | `assertThat(x, is(notNullValue()))` |\n| `Objects.requireNonNull(x)` as guard in test | `// pre-assert` with `assertThat(x, is(notNullValue()))` |\n| Unseeded `new Random()` | `new Random(fixedSeed)` |\n| Hard-coded address/constant strings | Use project-specific static constants |\n| Missing `// arrange / act / assert` | Add the section comments always |\n| Missing editor fold | Wrap each method group in `<editor-fold>` |\n| Non-conforming test name like `testme()` | Rename to `methodName_condition_expectation()` |\n| Empty `@Before` method | Remove it entirely |\n| `@RunWith(DataProviderRunner.class)` without `@UseDataProvider` | Remove the `@RunWith` |\n| For-loop iteration in assertions | Compare entire array at once — **exception:** `for (MyEnum v : MyEnum.values())` is allowed |\n| Magic numbers like `result[9]` | Use `final int` constants: `result[targetLength - 1]` |\n| Removing existing correct comments during fixes | Preserve comments; only remove factually wrong ones |\n\n---\n\n## Test Anatomy — Complete Reference Example\n\n```java\n// @formatter:off\n/**\n * Copyright 2025 Your Name your.name@example.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// @formatter:on\npackage com.example.foo;\n\nimport java.io.IOException;\nimport java.util.List;\n\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport org.junit.runner.RunWith;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\n\n@RunWith(DataProviderRunner.class)\npublic class FooTest {\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n\n    private Bar bar;\n\n    @Before\n    public void setUp() {\n        bar = new Bar();\n    }\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"someMethod\">\n    @Test\n    public void someMethod_validInputGiven_returnsExpectedResult() {\n        // arrange\n        Foo sut = new Foo();\n\n        // act\n        String result = sut.someMethod(\"validInput\");\n\n        // assert\n        assertThat(result, is(equalTo(\"expectedResult\")));\n    }\n\n    @Test(expected = IllegalArgumentException.class)\n    public void someMethod_nullGiven_throwsException() {\n        // arrange\n        Foo sut = new Foo();\n\n        // act\n        sut.someMethod(null);\n    }\n\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_MY_CASES, location = CommonDataProvider.class)\n    public void someMethod_parameterizedInput_returnsExpected(String input, String expected) {\n        // arrange\n        Foo sut = new Foo();\n\n        // act\n        String result = sut.someMethod(input);\n\n        // assert\n        assertThat(result, is(equalTo(expected)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toString\">\n    @Test\n    public void toString_whenCalled_containsClassNameAndIdentityHash() {\n        // arrange\n        Foo sut = new Foo();\n\n        // act\n        String output = sut.toString();\n\n        // assert\n        assertThat(output, not(emptyOrNullString()));\n        assertThat(output, matchesPattern(\"Foo@\\\\p{XDigit}+\"));\n    }\n    // </editor-fold>\n}\n```\n\n---\n\n## Completeness Checklist\n\nBefore submitting code:\n\n- [ ] At least one test was written and failed **before** the production code was written.\n- [ ] Every production behaviour is covered by at least one test.\n- [ ] All tests pass: `./mvnw test` (or equivalent for your project).\n- [ ] Compilation is clean (no null-safety errors).\n- [ ] Every test class has the Apache 2.0 license header wrapped in `@formatter:off/on`.\n- [ ] Test method names follow the `method_condition_expected` three-segment pattern.\n- [ ] Every test body has `// arrange`, `// act`, `// assert` comments.\n- [ ] All tests for the same method/feature are inside a single `<editor-fold defaultstate=\"collapsed\">` block.\n- [ ] No `assertEquals` / `assertTrue` / `assertFalse` / `assertNotNull` anywhere.\n- [ ] Exception tests with message assertions use `try { ...; fail(...); } catch`.\n- [ ] All `Random` instances use a fixed seed.\n- [ ] Data providers are added to `CommonDataProvider` (or project equivalent), not inlined in test classes.\n- [ ] `@RunWith(DataProviderRunner.class)` is present **only** when `@UseDataProvider` is used.\n- [ ] Empty `@Before` methods are removed.\n- [ ] All nullable fields/returns in new production code are annotated with `@Nullable`.\n- [ ] Array nullable annotations follow the `byte @Nullable []` placement convention.\n- [ ] Logger in new production classes is `private final` with constructor injection (or setter as last resort).\n- [ ] `@VisibleForTesting` is applied to any member exposed solely for tests.\n- [ ] Async tests use `CountDownLatch` + `ExecutorService` + `Future`; no raw `Thread` or polling with `Thread.sleep`.\n- [ ] Async socket tests use `findFreePort()` and project-specific timeout constants — no magic port numbers.\n- [ ] Nested concrete implementations of abstract classes are private static inner classes inside the test class.\n- [ ] `Objects.requireNonNull()` is used only in production code, never in tests.\n- [ ] Multi-line expected strings use Java text blocks (`\"\"\" ... \"\"\"`).\n- [ ] Records with mutable third-party fields use `@SuppressWarnings(\"Immutable\")` on the specific field.\n- [ ] Behaviour injection in production constructors uses functional interfaces (`Consumer<T>`, `Function<T,R>`) rather than subclassing.\n- [ ] Existing correct inline comments in modified test code are preserved — only removed if factually wrong or describing deleted code.\n\n---\n\n## Project-Specific Extensions\n\nEach project may define additional conventions beyond this generic guide. Refer to your project's CLAUDE.md or supplementary guide files for:\n\n- Custom marker annotations (e.g., `@OpenCLTest`, `@ToStringTest`, `@AwaitTimeTest`)\n- Static test data constants (e.g., known addresses, keys, fixtures)\n- Project-specific helper classes and test utilities\n- Database or library-specific test patterns (LMDB, OpenCL, WebSocket, ZMQ, etc.)\n- Configuration POJO naming conventions (e.g., C-prefix)\n- Custom domain exceptions\n"
  },
  {
    "path": ".claude/skills/tdd/SKILL.md",
    "content": "---\nname: tdd\ndescription: Test-Driven Development workflow for BitcoinAddressFinder — delegates to the generic Java TDD skill and adds project-specific context\n---\n\n# TDD — Test-Driven Development for BitcoinAddressFinder\n\nYou are working on **BitcoinAddressFinder** (group `net.ladenthin`, Java 21, Maven).\n\n## Generic Java TDD Guide\n\nFollow all conventions from the generic Java TDD skill (`.claude/skills/java-tdd-guide/SKILL.md`). That guide covers:\n\n- Red → Green → Refactor workflow\n- File headers (Apache 2.0 license)\n- Test framework stack (JUnit 4, DataProviderRunner, Hamcrest, Mockito)\n- Test naming, AAA structure, editor folds\n- Assertions (Hamcrest only), exception testing\n- Data providers, named constants, DRY\n- Logger injection (constructor over setter)\n- Null safety (JSpecify + NullAway)\n- Records, immutability, concurrency\n- Import style, anti-patterns, completeness checklist\n\n## Project-Specific Supplements\n\nFor BitcoinAddressFinder-specific conventions, also follow:\n\n- **`CODE_WRITING_GUIDE.md`** — BitHelper radix constants, C-prefix configuration POJOs, custom domain exceptions, graceful shutdown (Interruptable), lambda callbacks\n- **`TEST_WRITING_GUIDE.md`** — Marker annotations (@AwaitTimeTest, @ToStringTest, @OpenCLTest), timing/await tests, static address constants (StaticKey, P2PKH, P2SH, P2WPKH), platform assumptions, LMDB/OpenCL test patterns, producer test helpers, socket test utilities\n\n## Package\n\n```\nnet.ladenthin.bitcoinaddressfinder\n```\n\n## Build & Test\n\n```bash\n./mvnw compile       # compile (NullAway enforced)\n./mvnw test          # run all tests\n./mvnw test -Dnet.ladenthin.bitcoinaddressfinder.disableLMDBTest=true  # skip LMDB tests\n```\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where the package manifests are located.\n# Please see the documentation for all configuration options:\n# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file\n\nversion: 2\nupdates:\n  - package-ecosystem: \"maven\" # See documentation for possible values\n    directory: \"/\" # Location of package manifests\n    schedule:\n      interval: \"weekly\"\n"
  },
  {
    "path": ".github/workflows/assembly.yml",
    "content": "name: build assembly\n\non:\n  push:\n    branches:\n      - main\n      - 'releases/*'\n  pull_request:\n    branches:\n      - '*'\n\nenv:\n  javaversion: '21'\n  javadistribution: 'temurin'\n\njobs:\n  build:\n\n    runs-on: 'ubuntu-latest'\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up JDK ${{ env.javaversion }} ${{ env.javadistribution }}\n      uses: actions/setup-java@v4\n      with:\n        java-version: ${{ env.javaversion }}\n        distribution: ${{ env.javadistribution }}\n        cache: maven\n    - name: Build with Maven\n      run: mvn -B \"-Dnet.ladenthin.bitcoinaddressfinder.disableLMDBTest=false\" --update-snapshots test package assembly:single --file pom.xml\n\n    - name: Archive binary\n      uses: actions/upload-artifact@v4\n      with:\n        name: jar binaries\n        path: target/*.jar\n    - name: Upload Surefire Reports and JVM Crash Logs\n      if: always()\n      uses: actions/upload-artifact@v4\n      with:\n        name: surefire-and-crash-logs\n        path: |\n          target/surefire-reports/**\n          hs_err_pid*.log\n"
  },
  {
    "path": ".github/workflows/claude-code-review.yml",
    "content": "name: Claude Code Review\n\non:\n  pull_request:\n    types: [opened, synchronize, ready_for_review, reopened]\n    # Optional: Only run on specific file changes\n    # paths:\n    #   - \"src/**/*.ts\"\n    #   - \"src/**/*.tsx\"\n    #   - \"src/**/*.js\"\n    #   - \"src/**/*.jsx\"\n\njobs:\n  claude-review:\n    # Optional: Filter by PR author\n    # if: |\n    #   github.event.pull_request.user.login == 'external-contributor' ||\n    #   github.event.pull_request.user.login == 'new-developer' ||\n    #   github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'\n\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: read\n      issues: read\n      id-token: write\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 1\n\n      - name: Run Claude Code Review\n        id: claude-review\n        uses: anthropics/claude-code-action@v1\n        with:\n          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n          plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'\n          plugins: 'code-review@claude-code-plugins'\n          prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'\n          # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md\n          # or https://code.claude.com/docs/en/cli-reference for available options\n\n"
  },
  {
    "path": ".github/workflows/claude.yml",
    "content": "name: Claude Code\n\non:\n  issue_comment:\n    types: [created]\n  pull_request_review_comment:\n    types: [created]\n  issues:\n    types: [opened, assigned]\n  pull_request_review:\n    types: [submitted]\n\njobs:\n  claude:\n    if: |\n      (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||\n      (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||\n      (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||\n      (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: read\n      issues: read\n      id-token: write\n      actions: read # Required for Claude to read CI results on PRs\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 1\n\n      - name: Run Claude Code\n        id: claude\n        uses: anthropics/claude-code-action@v1\n        with:\n          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n\n          # This is an optional setting that allows Claude to read CI results on PRs\n          additional_permissions: |\n            actions: read\n\n          # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.\n          # prompt: 'Update the pull request description to include a summary of changes.'\n\n          # Optional: Add claude_args to customize behavior and configuration\n          # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md\n          # or https://code.claude.com/docs/en/cli-reference for available options\n          # claude_args: '--allowed-tools Bash(gh pr:*)'\n\n"
  },
  {
    "path": ".github/workflows/codeql.yml",
    "content": "name: \"CodeQL\"\n\non:\n  push:\n    branches: [ \"main\" ]\n  pull_request:\n    branches: [ \"main\" ]\n  schedule:\n    - cron: \"12 1 * * 0\"\n\nenv:\n  javaversion: '21'\n  javadistribution: 'temurin'\n\njobs:\n  analyze:\n    name: Analyze\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n\n    strategy:\n      fail-fast: false\n      matrix:\n        language: [ java ]\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: Set up JDK ${{ env.javaversion }} ${{ env.javadistribution }}\n        uses: actions/setup-java@v4\n        with:\n          java-version: ${{ env.javaversion }}\n          distribution: ${{ env.javadistribution }}\n\n      - name: Initialize CodeQL\n        uses: github/codeql-action/init@v3\n        with:\n          languages: ${{ matrix.language }}\n          queries: +security-and-quality\n\n      - name: Autobuild\n        uses: github/codeql-action/autobuild@v3\n\n      - name: Perform CodeQL Analysis\n        uses: github/codeql-action/analyze@v3\n        with:\n          category: \"/language:${{ matrix.language }}\"\n"
  },
  {
    "path": ".github/workflows/coverage.yml",
    "content": "name: code coverage\n\non:\n  push:\n    branches:\n      - main\n      - 'releases/*'\n  pull_request:\n    branches:\n      - '*'\n\nenv:\n  javaversion: '21'\n  javadistribution: 'temurin'\n\njobs:\n  build:\n\n    runs-on: 'ubuntu-latest'\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up JDK ${{ env.javaversion }} ${{ env.javadistribution }}\n      uses: actions/setup-java@v4\n      with:\n        java-version: ${{ env.javaversion }}\n        distribution: ${{ env.javadistribution }}\n        cache: maven\n    - name: Build with Maven\n      run: mvn -B \"-Dnet.ladenthin.bitcoinaddressfinder.disableLMDBTest=true\" --update-snapshots test package jacoco:report --file pom.xml\n    - name: Upload Surefire Reports and JVM Crash Logs\n      if: always()\n      uses: actions/upload-artifact@v4\n      with:\n        name: surefire-and-crash-logs\n        path: |\n          target/surefire-reports/**\n          hs_err_pid*.log\n    # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive\n    - name: Update dependency graph\n      uses: advanced-security/maven-dependency-submission-action@0b9cd8f382c5d2016fa77ebf8a0f2804452fefef\n\n    # https://github.com/marketplace/actions/coveralls-github-action\n    - name: Coveralls GitHub Action\n      uses: coverallsapp/github-action@v2\n      with:\n        github-token: ${{ secrets.COVERALLS_TOKEN }}\n        file: target/site/jacoco/jacoco.xml\n        format: jacoco\n\n    # https://github.com/codecov/codecov-action\n    - name: Codecov GitHub Action\n      uses: codecov/codecov-action@v5\n      with:\n        token: ${{ secrets.CODECOV_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/matrixci.yml",
    "content": "name: matrix CI\n\non:\n  push:\n    branches:\n      - main\n      - 'releases/*'\n  pull_request:\n    branches:\n      - '*'\n\njobs:\n  build:\n\n    strategy:\n      # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast\n      fail-fast: false\n      # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs\n      matrix:\n        # https://github.com/actions/setup-java#supported-distributions\n        javaversion: [ '21' ]\n        # disabled for now for performance reason: javadistribution: ['adopt', 'adopt-openj9', 'corretto', 'dragonwell', 'liberica', 'microsoft', 'temurin', 'zulu'] # internally 'adopt-hotspot' is the same as 'adopt'\n        javadistribution: ['temurin']\n        # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources\n        # disabled for now for performance reason: os: [macos-latest, ubuntu-latest, windows-latest]\n        os: [windows-latest]\n        exclude:\n          - javadistribution: 'microsoft'\n            os: 'macos-latest'\n          - javadistribution: 'dragonwell'\n            os: 'macos-latest'\n\n    runs-on: ${{ matrix.os }}\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up JDK ${{ matrix.javaversion }} ${{ matrix.javadistribution }}\n      uses: actions/setup-java@v4\n      with:\n        java-version: ${{ matrix.javaversion }}\n        distribution: ${{ matrix.javadistribution }}\n        cache: maven\n    - name: Build with Maven\n      run: mvn -B --no-transfer-progress \"-Dnet.ladenthin.bitcoinaddressfinder.disableLMDBTest=false\" test --file pom.xml\n    - name: Upload Surefire Reports and JVM Crash Logs\n      if: always()\n      uses: actions/upload-artifact@v4\n      with:\n        name: surefire-reports-${{ matrix.os }}-${{ matrix.javadistribution }}-java${{ matrix.javaversion }}\n        path: |\n            target/surefire-reports/**\n            hs_err_pid*.log\n"
  },
  {
    "path": ".gitignore",
    "content": "# Compiled class file\r\n*.class\r\n\r\n# Log file\r\n*.log\r\n\r\n# BlueJ files\r\n*.ctxt\r\n\r\n# Mobile Tools for Java (J2ME)\r\n.mtj.tmp/\r\n\r\n# Package Files #\r\n*.jar\r\n*.war\r\n*.nar\r\n*.ear\r\n*.zip\r\n*.tar.gz\r\n*.rar\r\n\r\n# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml\r\nhs_err_pid*\r\n\r\n/target/\r\n/bin/\r\n\r\n# IDEA files\r\n/.idea/\r\n*.iml\r\n\r\n# Eclipse files\r\n.classpath\r\n.project\r\n.settings\r\n\r\n# Netbeans files\r\nnbactions.xml\r\n"
  },
  {
    "path": ".mvn/jvm.config",
    "content": "--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED\n--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED\n--add-opens  jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED\n--add-opens  jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED\n"
  },
  {
    "path": "CLAUDE.md",
    "content": "# CLAUDE.md — BitcoinAddressFinder\r\n\r\nThis document provides guidance for AI assistants working on the BitcoinAddressFinder codebase.\r\n\r\n---\r\n\r\n## Project Overview\r\n\r\n**BitcoinAddressFinder** is a high-performance, open-source tool for scanning Bitcoin and altcoin private keys and checking whether the derived addresses have balances. It supports 100+ cryptocurrencies and uses both CPU (Java) and GPU (OpenCL) key generation strategies.\r\n\r\n- **Group ID:** `net.ladenthin`\r\n- **Artifact ID:** `bitcoinaddressfinder`\r\n- **Version:** 1.5.0\r\n- **Java:** 21\r\n- **License:** Apache 2.0\r\n- **Author:** Bernard Ladenthin (Copyright 2017–2025)\r\n- **Main class:** `net.ladenthin.bitcoinaddressfinder.cli.Main`\r\n\r\n---\r\n\r\n## Build System\r\n\r\nThe project uses **Maven** (minimum 3.6.3) with a Maven Wrapper.\r\n\r\n### Common Commands\r\n\r\n```bash\r\n# Compile only\r\n./mvnw compile\r\n\r\n# Run all tests\r\n./mvnw test\r\n\r\n# Build fat JAR with all dependencies\r\n./mvnw package -P assembly\r\n\r\n# Build without tests\r\n./mvnw package -DskipTests\r\n\r\n# Generate coverage report\r\n./mvnw test jacoco:report\r\n\r\n# Skip LMDB-specific tests (useful when LMDB native libs unavailable)\r\n./mvnw test -Dnet.ladenthin.bitcoinaddressfinder.disableLMDBTest=true\r\n```\r\n\r\n### JVM / Compiler Flags\r\n\r\nTests run with `-Xmx2g -Xms1g` and several `--add-opens` / `--add-exports` to allow LMDB and internal module access. These are configured in `pom.xml` (`<argLine>`) and `.mvn/jvm.config`.\r\n\r\n**Error Prone** static analysis with **NullAway** is active at compile time:\r\n- All code in `net.ladenthin` packages must carry proper `@Nullable` / `@NonNull` annotations.\r\n- Compilation will fail on potential null-pointer issues unless annotated.\r\n\r\n---\r\n\r\n## Project Structure\r\n\r\n```\r\nBitcoinAddressFinder/\r\n├── src/\r\n│   ├── main/\r\n│   │   ├── java/net/ladenthin/bitcoinaddressfinder/\r\n│   │   │   ├── cli/                  # CLI entry point (Main.java)\r\n│   │   │   ├── configuration/        # Config POJOs (C-prefixed)\r\n│   │   │   ├── keyproducer/          # Key generation strategies\r\n│   │   │   ├── persistence/          # Persistence abstraction + LMDB impl\r\n│   │   │   ├── opencl/               # OpenCL device/platform wrappers\r\n│   │   │   ├── eckey/                # Secp256k1 ECC utilities\r\n│   │   │   └── *.java                # Core domain classes\r\n│   │   └── resources/\r\n│   │       ├── *.cl / *.h            # OpenCL kernels and headers\r\n│   │       └── simplelogger.properties\r\n│   └── test/\r\n│       └── java/net/ladenthin/bitcoinaddressfinder/\r\n│           └── *.java                # JUnit 4 tests\r\n├── examples/                         # Sample JSON configs and run scripts\r\n│   ├── config_*.json\r\n│   ├── run_*.bat\r\n│   ├── logbackConfiguration.xml\r\n│   ├── addresses/                    # Sample address files\r\n│   └── secrets/                      # Sample secrets files\r\n├── helper/                           # Utility scripts (address scraping, wallet ops)\r\n├── .github/workflows/                # CI/CD pipelines\r\n├── pom.xml\r\n├── .mvn/jvm.config\r\n└── README.md\r\n```\r\n\r\n---\r\n\r\n## Core Architecture\r\n\r\n### Producer–Consumer Pattern\r\n\r\nThe central design separates **key production** from **address checking**:\r\n\r\n```\r\n[Producers] → LinkedBlockingQueue<byte[]> → [ConsumerJava]\r\n```\r\n\r\n- **`Producer` (interface)** — generates private keys and pushes them to the queue.\r\n- **`Consumer` (interface)** — reads keys from the queue, derives addresses, and checks the LMDB database.\r\n- **`Finder`** — orchestrates producers and consumers, manages thread pools, and handles shutdown.\r\n\r\n### Key Components\r\n\r\n| Class | Role |\r\n|---|---|\r\n| `cli/Main.java` | Entry point; parses args, loads config, starts `Finder` |\r\n| `Finder.java` | Orchestrator; starts/stops producers and consumer |\r\n| `ProducerJava.java` | CPU-based key generator using `KeyProducer` strategies |\r\n| `ProducerOpenCL.java` | GPU-accelerated key generator via JOCL |\r\n| `ProducerJavaSecretsFiles.java` | Reads keys from a secrets file |\r\n| `ConsumerJava.java` | Derives addresses, queries LMDB, logs hits |\r\n| `PublicKeyBytes.java` | Public key representation and address derivation |\r\n| `KeyUtility.java` | Cryptographic helpers (record class) |\r\n| `OpenCLContext.java` | OpenCL context setup and kernel management |\r\n| `OpenClTask.java` | Executes a batch of key operations on the GPU |\r\n| `AddressFilesToLMDB.java` | Imports address files into LMDB database |\r\n| `LMDBToAddressFile.java` | Exports LMDB database to address files |\r\n| `NetworkParameterFactory.java` | Creates BitcoinJ `NetworkParameters` for 100+ coins |\r\n| `SeparatorFormat.java` | Parses address file formats (various separators) |\r\n| `Shutdown.java` | Graceful shutdown logic with 30-second timeout |\r\n\r\n### Key Producer Strategies (`keyproducer/`)\r\n\r\n| Class | Strategy |\r\n|---|---|\r\n| `KeyProducerJavaRandom` | `SecureRandom` private key generation |\r\n| `KeyProducerJavaIncremental` | Sequential range scanning |\r\n| `KeyProducerJavaBip39` | BIP39 mnemonic phrase derivation |\r\n| `KeyProducerJavaSocket` | TCP socket input |\r\n| `KeyProducerJavaWebSocket` | WebSocket server input |\r\n| `KeyProducerJavaZmq` | ZeroMQ message broker input |\r\n\r\n### Configuration Classes (`configuration/`)\r\n\r\nAll configuration POJOs are prefixed with `C`:\r\n\r\n| Class | Purpose |\r\n|---|---|\r\n| `CConfiguration` | Root config object |\r\n| `CCommand` | Command enum: `Find`, `AddressFilesToLMDB`, `LMDBToAddressFile`, `OpenCLInfo` |\r\n| `CFinder` | Finder-level settings |\r\n| `CConsumerJava` | Consumer settings |\r\n| `CProducer` | Abstract producer settings |\r\n| `CProducerJava` | Java producer settings |\r\n| `CProducerOpenCL` | OpenCL producer settings |\r\n| `CProducerJavaSecretsFiles` | Secrets file producer settings |\r\n| `CKeyProducerJava*` | Per-strategy key producer settings |\r\n| `CLMDBConfigurationReadOnly/Write` | LMDB database config |\r\n\r\n### Persistence Layer (`persistence/`)\r\n\r\n- `Persistence` interface abstracts database operations.\r\n- `LMDBPersistence` implements high-performance O(1) address lookups using LMDB.\r\n- `PersistenceUtils` provides helper methods.\r\n\r\n### Helper Classes (Validation & Utilities)\r\n\r\nHelper classes encapsulate single-responsibility validation and utility logic, improving testability and separation of concerns:\r\n\r\n| Class | Purpose | Injection Pattern |\r\n|---|---|---|\r\n| `PrivateKeyValidator` | Non-static validation of private keys against secp256k1 constraints | Created in constructors where needed; no external dependencies |\r\n| `KeyUtility` (record) | Cryptographic utilities requiring network/buffer context | Injected as dependency into producers/consumers |\r\n| `ByteBufferUtility` | ByteBuffer conversion utilities | Passed as constructor parameter |\r\n\r\n**Design Pattern: Static to Helper Migration**\r\n\r\nCertain utility methods that were previously static (e.g., key range validation) have been refactored into dedicated helper classes as non-static instance methods. This improves:\r\n- **Testability**: Instances are easier to mock in tests\r\n- **Clarity**: Dependencies are explicit\r\n- **Extensibility**: Future subclasses can override behavior\r\n\r\nExample: `PrivateKeyValidator` contains the following methods (formerly static in `KeyUtility`):\r\n- `getMaxPrivateKeyForBatchSize(int batchSizeInBits)`\r\n- `isInvalidWithBatchSize(BigInteger, BigInteger)`\r\n- `isOutsidePrivateKeyRange(BigInteger)`\r\n- `returnValidPrivateKey(BigInteger)`\r\n- `replaceInvalidPrivateKeys(BigInteger[])`\r\n\r\nCallers instantiate `PrivateKeyValidator` directly (stateless) or receive it via dependency injection where appropriate.\r\n\r\n---\r\n\r\n## Configuration Format\r\n\r\nThe tool is driven entirely by JSON configuration files. The `CCommand` enum selects the operation mode.\r\n\r\nExample (find with 8 CPU producers):\r\n```json\r\n{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"producers\": [\r\n      {\r\n        \"producerJava\": {\r\n          \"threads\": 8,\r\n          \"keyProducers\": [{ \"keyProducerJavaRandom\": {} }]\r\n        }\r\n      }\r\n    ],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": { \"lmdbDirectory\": \"/path/to/lmdb\" }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nSee `examples/config_*.json` for all configuration variants.\r\n\r\n---\r\n\r\n## Testing\r\n\r\n### Frameworks\r\n\r\n- **JUnit 4** (4.13.2) — test runner\r\n- **Hamcrest** (3.0) — matchers\r\n- **Mockito** (5.22.0) — mocking\r\n- **junit-dataprovider** (1.13.1) — data-driven tests\r\n\r\n### Conventions\r\n\r\n- Tests use forked JVMs (1 fork, no reuse) for isolation.\r\n- Test timeout: 60 seconds per test.\r\n- Base/utility test classes: `LMDBBase`, `BIP39DataProvider`, `TestTimeProvider`, `KeyProducerTestUtility`.\r\n- LMDB tests can be skipped with system property:\r\n  ```\r\n  -Dnet.ladenthin.bitcoinaddressfinder.disableLMDBTest=true\r\n  ```\r\n- Test ratio is approximately 1.7:1 (test lines to source lines). New code should have corresponding tests.\r\n\r\n---\r\n\r\n## Code Conventions\r\n\r\n### Null Safety\r\n\r\n- Use **JSpecify** annotations: `@Nullable` (from `org.jspecify.annotations`) for optional values, `@NonNull` is the default.\r\n- **NullAway** enforces null safety at compile time for the entire `net.ladenthin` package tree. Unannotated code will cause compilation errors.\r\n\r\n### Naming\r\n\r\n- Configuration POJOs: prefix `C` (e.g., `CProducerJava`, `CKeyProducerJavaRandom`).\r\n- Producer implementations: suffix with type (e.g., `ProducerJava`, `ProducerOpenCL`).\r\n- Key producer strategies: `KeyProducerJava<Strategy>` pattern.\r\n\r\n### Annotations\r\n\r\n- `@VisibleForTesting` — marks package-private or protected members exposed only for testing.\r\n- `@ToStringTest` — marks fields that should be verified in `toString()` tests.\r\n- `@Nullable` / implicit `@NonNull` from JSpecify.\r\n\r\n### License Headers\r\n\r\nAll source files must include the Apache 2.0 license header. See any existing source file for the exact template. Use `// @formatter:off` / `// @formatter:on` around the header to exclude it from auto-formatting.\r\n\r\n### Error Handling\r\n\r\nUse custom domain exceptions rather than generic ones:\r\n- `KeyProducerIdNullException`\r\n- `KeyProducerIdIsNotUniqueException`\r\n- `KeyProducerIdUnknownException`\r\n- `NoMoreSecretsAvailableException`\r\n- `PrivateKeyTooLargeException`\r\n- `UnknownSecretFormatException`\r\n\r\n### Concurrency\r\n\r\n- `LinkedBlockingQueue<byte[]>` for producer → consumer communication.\r\n- `ExecutorService` / `ThreadPoolExecutor` for thread pool management.\r\n- `AtomicLong` for thread-safe statistics counters.\r\n- `CountDownLatch` for shutdown synchronization.\r\n- Do not introduce raw `Thread` usage; use executor services.\r\n\r\n### Records\r\n\r\nSome utility classes are implemented as Java `record` types (e.g., `KeyUtility`). Prefer records for immutable value objects.\r\n\r\n---\r\n\r\n## OpenCL / GPU Code\r\n\r\nOpenCL kernels live in `src/main/resources/` as `.cl` and `.h` files:\r\n\r\n| File | Purpose |\r\n|---|---|\r\n| `inc_ecc_secp256k1custom.cl` | Elliptic curve scalar multiplication |\r\n| `inc_hash_sha256.cl` | SHA-256 (ported from hashcat) |\r\n| `inc_hash_ripemd160.cl` | RIPEMD-160 (ported from hashcat) |\r\n| `inc_defines.h` | Common preprocessor defines |\r\n| `inc_platform.cl` | Platform-specific abstractions |\r\n| `inc_types.h` | OpenCL type definitions |\r\n\r\nGPU code is bound through JOCL (`jocl` 2.0.6). `OpenCLBuilder` constructs the platform/device hierarchy; `OpenCLContext` manages kernel compilation and execution; `OpenClTask` processes a batch of keys on the GPU.\r\n\r\n---\r\n\r\n## CI/CD Pipelines (`.github/workflows/`)\r\n\r\n| Workflow | Trigger | Purpose |\r\n|---|---|---|\r\n| `assembly.yml` | Push to `main`/`releases/*`, all PRs | Compile, test, build fat JAR, upload artifacts |\r\n| `matrixci.yml` | Push/PR | Matrix test across 8 JVM distributions × 3 OS |\r\n| `coverage.yml` | Push/PR | JaCoCo coverage + Coveralls upload |\r\n| `codeql.yml` | Schedule/Push | GitHub CodeQL security scanning |\r\n| `claude-code-review.yml` | PR | AI-powered code review |\r\n| `claude.yml` | Issue/PR comment with `@claude` | Claude Code interactive assistant |\r\n\r\nThe matrix CI tests Java 21 on:\r\n- **Distributions:** adopt, adopt-openj9, corretto, dragonwell, liberica, microsoft, temurin, zulu\r\n- **OS:** Ubuntu, Windows, macOS (some combos excluded for incompatibility)\r\n\r\n---\r\n\r\n## Dependencies Summary\r\n\r\n| Dependency | Version | Purpose |\r\n|---|---|---|\r\n| `bitcoinj-core` | 0.17 | Bitcoin crypto, address derivation |\r\n| `lmdbjava` | 0.9.3 | LMDB database bindings |\r\n| `jocl` | 2.0.6 | Java OpenCL bindings |\r\n| `gson` | 2.13.2 | JSON config parsing |\r\n| `snakeyaml` | 2.6 | YAML config parsing |\r\n| `guava` | 33.5.0-jre | Google core utilities |\r\n| `commons-codec` | 1.21.0 | Base58, hex encoding |\r\n| `commons-io` | 2.21.0 | I/O utilities |\r\n| `Java-WebSocket` | 1.6.0 | WebSocket producer |\r\n| `jeromq` | 0.6.0 | ZeroMQ producer |\r\n| `jspecify` | 1.0.0 | Nullness annotations |\r\n| `slf4j-api` | 2.0.17 | Logging facade |\r\n| `logback-classic` | 1.5.32 | SLF4J implementation |\r\n\r\nTest-only:\r\n| `junit` | 4.13.2 | Test runner |\r\n| `hamcrest` | 3.0 | Assertion matchers |\r\n| `mockito-core` | 5.22.0 | Mocking |\r\n| `junit-dataprovider` | 1.13.1 | Data-driven tests |\r\n\r\n---\r\n\r\n## Running the Tool\r\n\r\n```bash\r\n# Build fat JAR\r\n./mvnw package -P assembly -DskipTests\r\n\r\n# Run (replace config path as needed)\r\njava -jar target/bitcoinaddressfinder-1.5.0-jar-with-dependencies.jar \\\r\n  examples/config_Find_8CPUProducer.json\r\n```\r\n\r\nPre-built run scripts exist in `examples/` for each operation mode (`run_*.bat` for Windows).\r\n\r\n---\r\n\r\n## Test Writing Compliance\r\n\r\nAfter modifying or creating any `*Test.java` file, automatically verify that all rules from the generic Java TDD skill (`.claude/skills/java-tdd-guide/SKILL.md`) **and** the project-specific supplement (`TEST_WRITING_GUIDE.md`) are applied to the modified test class. Apply all fixable violations on your own without asking. Only report violations that cannot be resolved without a large refactoring. Consider the task complete only after all auto-fixable rules are satisfied.\r\n\r\n---\r\n\r\n## Code Writing Compliance\r\n\r\nAfter modifying or creating any production `.java` file, automatically verify that all rules from the generic Java TDD skill (`.claude/skills/java-tdd-guide/SKILL.md`) **and** the project-specific supplement (`CODE_WRITING_GUIDE.md`) are applied to the modified class. Apply all fixable violations on your own without asking. Only report violations that cannot be resolved without a large refactoring. Consider the task complete only after all auto-fixable rules are satisfied.\r\n\r\n---\r\n\r\n## Pull Request Workflow\r\n\r\n### Step 1 — Detect whether `gh` is available\r\n\r\n```bash\r\ngh --version 2>/dev/null && echo \"gh available\" || echo \"gh not available\"\r\n```\r\n\r\nIf `gh` is **not** available (e.g. local proxy remote), inform the user and stop. Do not attempt the remaining steps.\r\n\r\n### Step 2 — Create the PR\r\n\r\nAlways create a PR immediately after the first push to a feature branch:\r\n\r\n```bash\r\ngh pr create \\\r\n  --title \"<concise summary, ≤70 chars>\" \\\r\n  --body \"$(cat <<'EOF'\r\n## Summary\r\n- <bullet: what changed>\r\n- <bullet: why>\r\n\r\n## Test plan\r\n- [ ] Affected test classes pass\r\n- [ ] Full CI matrix passes\r\n\r\n<session URL>\r\nEOF\r\n)\"\r\n```\r\n\r\nNote the PR number printed — you need it in the next steps.\r\n\r\n### Step 3 — Wait for all checks to complete\r\n\r\n```bash\r\ngh pr checks <PR-number> --watch --interval 30\r\n```\r\n\r\nIf `--watch` is unavailable in the installed `gh` version, poll manually:\r\n\r\n```bash\r\nwhile gh pr checks <PR-number> | grep -qE \"pending|in_progress|queued\"; do\r\n  sleep 30\r\ndone\r\ngh pr checks <PR-number>\r\n```\r\n\r\n### Step 4 — Triage failures\r\n\r\nFor each failing check, fetch the log:\r\n\r\n```bash\r\ngh run list --branch <branch-name> --limit 10\r\ngh run view <run-id> --log-failed\r\n```\r\n\r\nFor **CodeQL annotation** failures, pull structured annotations directly (avoids parsing raw logs):\r\n\r\n```bash\r\n# get the annotations URL for the CodeQL check on the latest commit\r\ngh api repos/{owner}/{repo}/commits/<sha>/check-runs \\\r\n  --jq '.check_runs[] | select(.name | test(\"CodeQL\")) | .output.annotations_url'\r\n\r\n# fetch the annotations (path, line number, message)\r\ngh api <annotations-url> \\\r\n  --jq '.[] | {path: .path, line: .start_line, message: .message}'\r\n```\r\n\r\n### Step 5 — Fix, commit, push, repeat\r\n\r\n1. Read the failure message or annotation.\r\n2. Apply the fix.\r\n3. Commit and push:\r\n   ```bash\r\n   git add <files>\r\n   git commit -m \"Fix <check-name>: <short description>\"\r\n   git push\r\n   ```\r\n4. Return to **Step 3** and wait for the re-run.\r\n5. Repeat until `gh pr checks <PR-number>` shows every check as ✅ pass.\r\n\r\n### Step 6 — Report to the user\r\n\r\nOnce all checks pass, summarise what was fixed and why. If a failure **cannot** be fixed automatically (e.g. requires a large refactor, changes public API, or disabling a security check) stop, explain the situation, and ask for direction instead of silently suppressing or working around it.\r\n\r\n---\r\n\r\n## Key Design Principles\r\n\r\n1. **Performance first** — key generation is the hot path; minimize allocations, use byte arrays not objects.\r\n2. **Pluggable producers** — new key generation strategies implement `KeyProducer` and `Producer`; register in config classes.\r\n3. **Single consumer** — `ConsumerJava` is intentionally single-threaded to avoid LMDB contention; producers are the parallelism point.\r\n4. **Graceful shutdown** — always implement `Interruptable`; propagate interrupts from `Main` → `Finder` → all producers/consumers.\r\n5. **Null safety is required** — NullAway is error-level; annotate all nullable return types and parameters.\r\n6. **Configuration-driven** — behaviour changes belong in config, not in code conditionals.\r\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n[bernard.ladenthin@gmail.com](mailto:bernard.ladenthin@gmail.com).\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior,  harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.\n"
  },
  {
    "path": "CODE_WRITING_GUIDE.md",
    "content": "# Code Writing Guide — BitcoinAddressFinder (Project-Specific Supplement)\n\nThis guide contains **project-specific** production code conventions that supplement the generic Java TDD skill (`.claude/skills/java-tdd-guide.md`). For general Java conventions (named constants, logger injection, null safety, records, concurrency, etc.), refer to the generic guide.\n\n---\n\n## 1. Radix Constants — BitHelper\n\nRadix values (`16`, `10`, `2`) must always be referenced through `BitHelper` constants — never as bare integer literals:\n\n```java\n// ❌ BAD\nnew BigInteger(\"FF\", 16);\n\n// ✅ GOOD\nnew BigInteger(\"FF\", BitHelper.RADIX_HEX);\n```\n\nAvailable constants:\n- `BitHelper.RADIX_HEX` (16)\n- `BitHelper.RADIX_DECIMAL` (10)\n- `BitHelper.RADIX_BINARY` (2)\n\n---\n\n## 2. Configuration Objects — C-Prefix POJOs\n\nAll new features are driven by a C-prefixed configuration POJO:\n\n```java\npublic class CMyFeature {\n    public int threads = 1;\n    public @Nullable String optionalParam;\n}\n\n// Constructor receives the config as first argument:\npublic MyFeature(CMyFeature config, KeyUtility keyUtility, Logger logger) {\n    this.config = config;\n    this.keyUtility = keyUtility;\n    this.logger = logger;\n}\n```\n\n---\n\n## 3. Custom Domain Exceptions\n\nUse project-specific exception types rather than generic ones:\n\n| Exception | When to use |\n|---|---|\n| `KeyProducerIdNullException` | Key producer ID is null |\n| `KeyProducerIdIsNotUniqueException` | Duplicate key producer ID |\n| `KeyProducerIdUnknownException` | Unrecognized key producer ID |\n| `NoMoreSecretsAvailableException` | Secret source exhausted |\n| `PrivateKeyTooLargeException` | Private key exceeds secp256k1 range |\n| `UnknownSecretFormatException` | Unrecognized secret format |\n| `AddressFormatNotAcceptedException` | Invalid address format |\n\nCreate a new domain exception rather than throwing `IllegalArgumentException` or `RuntimeException` when a more specific type makes sense.\n\n---\n\n## 4. Graceful Shutdown — Interruptable Interface\n\nAll Producer/Consumer implementations must implement `Interruptable`:\n\n```java\npublic class MyProducer extends AbstractProducer implements Interruptable {\n    @Override\n    public void interrupt() {\n        // signal the work loop to stop\n    }\n}\n```\n\n---\n\n## 5. Lambda Callbacks in Production Constructors\n\nInject behaviour via functional interfaces rather than subclassing:\n\n```java\npublic AddressFile(\n    File file,\n    ReadStatistic readStatistic,\n    Network network,\n    Consumer<AddressToCoin> addressConsumer,\n    Consumer<String> rejectedLineConsumer\n) { ... }\n```\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n\n\nAPPENDIX A: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\n\nAPPENDIX B: Additional licenses relevant to this product:\n\n    This product includes a number of source files with code that has been \n    adapted from 3rd party sources including sources that may be subject \n    to different copyright notices and license terms. Your use of \n    the source code for these subcomponents is subject to the terms and\n    conditions of the following licenses.\n\n\n\n    =============================================================\n    Apache License version 2.0 (see above)\n    =============================================================\n    * [TEMPLATE-PROJECT]\n\n    Code locations:\n    -------------------------------------------------------------\n    * [TEMPLATE-LOCATION]\n\n\n\n    =============================================================\n    BSD-2-Clause License\n    =============================================================\n    All rights reserved.\n\n    BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)\n\n    Redistribution and use in source and binary forms, with or without modification,\n    are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this\n      list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above copyright notice, this\n      list of conditions and the following disclaimer in the documentation and/or\n      other materials provided with the distribution.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n    * [TEMPLATE-PROJECT]\n    Code locations:\n    -------------------------------------------------------------\n    * [TEMPLATE-LOCATION]\n\n\n\n\n\n    =============================================================\n    MIT License\n    =============================================================\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \n\n    -------------------------------------------------------------\n    * hashcat Copyright (c) 2015-2020 Jens Steube\n    Code locations:\n    -------------------------------------------------------------\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_common.cl\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_common.h\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_defines.h\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_ecc_secp256k1.cl\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_ecc_secp256k1.h\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_platform.cl\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_platform.h\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_types.h\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_vendor.h\n    * https://github.com/hashcat/hashcat/blob/master/OpenCL/inc_vendor.h\n\n    =============================================================\n    Public Domain (optional)\n    =============================================================\n    * [TEMPLATE-PROJECT]\n\n    Code locations:\n    -------------------------------------------------------------\n    * [TEMPLATE-LOCATION]\n"
  },
  {
    "path": "README.md",
    "content": "# BitcoinAddressFinder\n> 🚀 Fast address finder for Bitcoin and altcoins using OpenCL & Java – includes vanity address generation, balance checking, and offline support.\n<!-- =========================== Build & Environment =========================== -->\n[![OpenJDK](https://img.shields.io/badge/OpenJDK-21-blue)]()\n[![JUnit](https://img.shields.io/badge/tested%20with-JUnit4-yellow)]()\n[![Assembly](https://github.com/bernardladenthin/BitcoinAddressFinder/actions/workflows/assembly.yml/badge.svg)](https://github.com/bernardladenthin/BitcoinAddressFinder/actions/workflows/assembly.yml)\n[![Coverage](https://github.com/bernardladenthin/BitcoinAddressFinder/actions/workflows/coverage.yml/badge.svg)](https://github.com/bernardladenthin/BitcoinAddressFinder/actions/workflows/coverage.yml)\n[![Matrix CI](https://github.com/bernardladenthin/BitcoinAddressFinder/actions/workflows/matrixci.yml/badge.svg)](https://github.com/bernardladenthin/BitcoinAddressFinder/actions/workflows/matrixci.yml)\n<!-- =========================== Test Coverage =========================== -->\n[![Coverage Status](https://coveralls.io/repos/github/bernardladenthin/BitcoinAddressFinder/badge.svg?branch=main)](https://coveralls.io/github/bernardladenthin/BitcoinAddressFinder?branch=main)\n[![codecov](https://codecov.io/gh/bernardladenthin/BitcoinAddressFinder/graph/badge.svg?token=RRCR4ZC28T)](https://codecov.io/gh/bernardladenthin/BitcoinAddressFinder)\n<!-- =========================== Package & Release =========================== -->\n[![Maven Central](https://img.shields.io/maven-central/v/net.ladenthin/bitcoinaddressfinder.svg)](https://search.maven.org/artifact/net.ladenthin/bitcoinaddressfinder)\n[![Release Date](https://img.shields.io/github/release-date/bernardladenthin/BitcoinAddressFinder)]()\n[![Last Commit](https://img.shields.io/github/last-commit/bernardladenthin/BitcoinAddressFinder)]()\n<!-- =========================== Quality & Analysis =========================== -->\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=bernardladenthin_BitcoinAddressFinder&metric=alert_status)](https://sonarcloud.io/dashboard?id=bernardladenthin_BitcoinAddressFinder)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=bernardladenthin_BitcoinAddressFinder&metric=code_smells)](https://sonarcloud.io/dashboard?id=bernardladenthin_BitcoinAddressFinder)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bernardladenthin_BitcoinAddressFinder&metric=security_rating)](https://sonarcloud.io/dashboard?id=bernardladenthin_BitcoinAddressFinder)\n<!-- =========================== Security & Compliance =========================== -->\n[![Known Vulnerabilities](https://snyk.io/test/github/bernardladenthin/BitcoinAddressFinder/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/bernardladenthin/BitcoinAddressFinder?targetFile=pom.xml)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbernardladenthin%2FBitcoinAddressFinder.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbernardladenthin%2FBitcoinAddressFinder?ref=badge_shield)\n[![Dependencies](https://img.shields.io/librariesio/github/bernardladenthin/BitcoinAddressFinder)](https://libraries.io/github/bernardladenthin/BitcoinAddressFinder)\n<!-- =========================== License & Contribution =========================== -->\n[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE)\n[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/bernardladenthin/BitcoinAddressFinder)\n<!-- =========================== Sustainability =========================== -->\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10413/badge)](https://www.bestpractices.dev/projects/10413)\n[![Treeware](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=Treeware&query=%24.total&url=https%3A%2F%2Fpublic.offset.earth%2Fusers%2Ftreeware%2Ftrees)](https://treeware.earth)\n[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)\n<!--\nTODO:\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1234/badge)](https://bestpractices.coreinfrastructure.org/projects/1234)\n-->\n\n---\n\n## Table of Contents\n- [About BitcoinAddressFinder](#about-bitcoinaddressfinder)\n- [Requirements](#requirements)\n- [Quickstart](#quickstart)\n- [Features](#features)\n- [Address Database](#address-database)\n  - [Import](#import)\n  - [Create the Database by Yourself](#create-the-database-by-yourself)\n  - [Export](#export)\n  - [Use My Prepared Database](#use-my-prepared-database)\n    - [Light Database](#light-database)\n    - [Full Database](#full-database)\n- [Pages and Projects for Address Lists](#pages-and-projects-to-get-lists-dumps-of-pubkeyhash-addresses)\n- [Find Addresses](#find-addresses)\n  - [Mixed Modes](#mixed-modes)\n  - [Key Range](#key-range)\n  - [OpenCL Acceleration](#opencl-acceleration)\n    - [Built-in Self-Test (BIST)](#built-in-self-test-bist)\n    - [Performance Benchmarks](#performance-benchmarks)\n- [Collision Probability and Security Considerations](#collision-probability-and-security-considerations)\n- [Similar Projects](#similar-projects)\n  - [Deep Learning Private Key Prediction](#deep-learning-private-key-prediction)\n- [Known Issues](#known-issues)\n  - [Hybrid Graphics Performance (Low Throughput)](#hybrid-graphics-performance-low-throughput)\n- [Future Improvements](#future-improvements)\n  - [KeyProvider](#keyprovider)\n- [Legal](#legal)\n  - [Permitted Use Cases](#️-permitted-use-cases)\n  - [Prohibited Use Cases](#-prohibited-use-cases)\n  - [Legal References by Jurisdiction](#legal-references-by-jurisdiction)\n- [License](#license)\n\n---\n\n## About BitcoinAddressFinder\n**BitcoinAddressFinder** is a free, high-performance tool for scanning random private keys across a wide range of cryptocurrencies — including Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin, Dash, Zcash, and many more.\n\nIts core purpose is to generate both **compressed** and **uncompressed** addresses with maximum efficiency, combining the portability of the **Java Virtual Machine (JVM)** with **OpenCL-powered GPU acceleration**.\n\nEach generated address is checked against a high-speed **LMDB** database to detect whether it has ever been used — identifying possible balances, known keyspaces, and even **RIPEMD160 hash collisions**.\n\n🔍 Whether you're generating vanity addresses, verifying address usage, or experimenting with cryptographic edge cases, **BitcoinAddressFinder** is built for **speed**, **flexibility**, and **fully offline operation**.\n\n> 🔐 Runs air-gapped · ⚡ GPU-accelerated · 🧪 Unit-tested · 🛠️ Extensible\n\n**Made with ❤️ in Germany** \n \nCopyright (c) 2017-2025 Bernard Ladenthin\n\n## Requirements\n- **Java 21 or newer** is required to run BitcoinAddressFinder.  \n  Older versions such as Java 8, 11, or 17 are not supported.\n\n- **🚀 OpenCL (optional)**:  \n  You can run this software in either **CPU-only** mode or with **GPU acceleration via OpenCL** for significantly enhanced performance.\n\n  When OpenCL is enabled:\n  - **Elliptic Curve Key Generation** is offloaded to one or more OpenCL-capable devices (e.g., GPUs), dramatically boosting key scanning throughput.\n  - **SHA-256** and **RIPEMD-160** hashing operations are also offloaded to the GPU, further reducing CPU load and increasing overall efficiency.\n  - **Multi-GPU setups are fully supported** — each device can be configured individually, enabling efficient parallelization and scalability across multiple GPUs.\n\n## Quickstart\n1. Download Software\n- Release: Download the binary (jar) from https://github.com/bernardladenthin/BitcoinAddressFinder/releases\n- Nightly: Download the binary (jar) newest build from github: https://nightly.link/bernardladenthin/BitcoinAddressFinder/workflows/assembly/main/jar%20binaries.zip\n2. Download and extract the light database from https://github.com/bernardladenthin/BitcoinAddressFinder#use-my-prepared-database\n3. Download a configuration set like:\n- [`logbackConfiguration.xml`](https://github.com/bernardladenthin/BitcoinAddressFinder/blob/main/examples/logbackConfiguration.xml)\n- [`config_Find_1OpenCLDevice.json`](https://github.com/bernardladenthin/BitcoinAddressFinder/blob/main/examples/config_Find_1OpenCLDevice.json)\n- [`run_Find_1OpenCLDevice.bat`](https://github.com/bernardladenthin/BitcoinAddressFinder/blob/main/examples/run_Find_1OpenCLDevice.bat)\n4. Put all in one directory like the following structure\n  * Downloads\n    * lmdb\n      * data.mdb\n      * lock.mdb\n    * bitcoinaddressfinder-1.4.0-jar-with-dependencies.jar\n    * logbackConfiguration.xml\n    * config_Find_1OpenCLDevice.js\n    * run_Find_1OpenCLDevice.bat\n5. Run the file run_Find_1OpenCLDevice.bat\n\n## ✨ Features\n* 📐 Supports blockchain addresses based on [secp256k1](https://en.bitcoin.it/wiki/Secp256k1)\n* 🛡️ Unit-tested, trusted open source that can be compiled easily by yourself\n* 🎯 Vanity generation of Bitcoin addresses using regex patterns\n* 🔌 Runs entirely offline — no internet connection is required or used. Suitable for air-gapped systems and isolated environments — even in a bunker with a generator and zero connectivity.\n* 🤹 No synchronization required to run multiple instances. Random numbers are used, so no coordinated search strategy is needed — just run it on multiple machines\n* ⚡ Checks a high-performance database of known addresses to detect already used ones\n* 📦 Portable, platform-independent, runs on the JVM\n* 🔁 Generates both uncompressed and compressed keys simultaneously\n* 🧮 EC key generation via:\n  * 🧵 Multiple CPU threads\n  * 🖥️ Multiple OpenCL devices (optional)\n\n### ⚡ ECC Scalar Multiplication Optimizations\nTo accelerate **elliptic curve scalar multiplication** (`k·G`, i.e. private key × base point), the OpenCL kernel applies the following optimizations:\n\n- **Windowed Non-Adjacent Form (wNAF)**:  \n  The scalar `k` is converted to a signed digit representation using a **window size of 4**.  \n  This results in digits from the set `{±1, ±3, ±5, ±7}`, with at least one zero between non-zero digits.  \n  This reduces the number of costly additions during multiplication.  \n  [Further explanation of wNAF on crypto.stackexchange.com](https://crypto.stackexchange.com/questions/82013/simple-explanation-of-sliding-window-and-wnaf-methods-of-elliptic-curve-point-mu)\n\n- **Precomputed Table**:  \n  The kernel precomputes and stores the following multiples of the base point `G`:  \n  `±1·G`, `±3·G`, `±5·G`, `±7·G`  \n  These are stored in the `secp256k1_t` structure and reused during scalar multiplication.\n\n- **Left-to-Right Scalar Multiplication**:  \n  The multiplication loop scans the wNAF digits from most to least significant:  \n  - Each iteration **always doubles** the current point.  \n  - If the current digit is non-zero, it **adds the matching precomputed point**.\n\n- **Optimized for GPGPU (not constant-time)**:  \n  To prioritize speed on OpenCL/CUDA devices, this implementation is **not constant-time** and may be vulnerable to side-channel attacks in adversarial environments.\n\n- **Use of Constant Memory**:  \n  Precomputed points are stored in **constant GPU memory** (`__constant` via `CONSTANT_AS`), allowing fast access by all threads in a workgroup.\n\n### 🔄 Scalar Walker per Kernel (`loopCount`)\nThe OpenCL kernel supports a **loop-based scalar strategy** controlled by the `loopCount` parameter. Each GPU thread generates multiple EC keys by:\n\n- Computing the first key via full scalar multiplication: `P₀ = k₀·G` (using `point_mul_xy`)  \n- Computing subsequent keys via efficient affine additions: `Pₙ₊₁ = Pₙ + G` (using `point_add_xy`)\n\nThis enables high-throughput, grid-parallel **linear keyspace traversal** like:  \n`k₀·G, (k₀ + 1)·G, ..., (k₀ + loopCount - 1)·G`\n\nExample:  \n- If `loopCount = 8`, each thread generates 8 keys  \n- Grid size is reduced by a factor of 8  \n- All results are written to global memory\n\n> ✅ Lower `loopCount` values like 4 or 8 are often ideal.  \n> ❌ Higher values may reduce GPU occupancy due to fewer active threads.\n\n### 🚀 MSB-Zero Optimization\nTo accelerate elliptic curve multiplication, BitcoinAddressFinder applies a **160-bit private key optimization**:\n\n- The upper 96 bits of each 256-bit private key are set to zero  \n- Only the lower 160 bits are randomized and traversed\n\nThis reduction in scalar size speeds up `k·G` computations, resulting in significantly better performance during brute-force and batch-based key scanning.\n\n> ✅ Matches the size of `RIPEMD160(SHA256(pubkey))`  \n> ✅ Especially effective when combined with OpenCL acceleration\n\n### 🚀 Bloom Filter Address Cache (`useBloomFilter`)\nAs of version 1.5.0, a memory-efficient Bloom filter can be used to significantly accelerate address checks:\n\n```json\n\"useBloomFilter\": true\n```\n\nInstead of loading all addresses into a Java `HashSet`, a compact Bloom filter is loaded into RAM. This enables ultra-fast `containsAddress()` checks with minimal memory usage — even for millions or billions of entries.\nAdvantages:\n- ✅ O(1) lookup speed (comparable to HashSet)\n- ✅ Low memory usage, even with large datasets\n- ✅ No false negatives (real matches are always detected)\n- ⚠️ Possible false positives → only trigger additional LMDB lookups\n\n#### Estimated Memory Usage:\n| fpp    | Light Database (~132M) | Full Database (~1.37B)  |\n|--------|------------------------|-------------------------|\n| 0.1    | ~**80 MB**             | ~**800 MB**             |\n| 0.05   | ~**100 MB**            | ~**1024 MB**            |\n| 0.01   | ~**151 MB**            | ~**1574 MB**            |\n\n#### 🔧 Tuning Accuracy with `bloomFilterFpp`\nThe expected false positive probability (FPP) can be configured:\n\n```json\n\"bloomFilterFpp\": 0.1\n```\n\n| Value | Description |\n|-------|-------------|\n| `0.01` | ✅ Only ~1% false positives – high accuracy, more memory |\n| `0.05` | ⚖️ Balanced tradeoff between memory and performance |\n| `0.1`–`0.2` | 🪶 Very memory-efficient – suitable if some false positives are acceptable |\n\n```json\n\"useBloomFilter\": true,\n\"bloomFilterFpp\": 0.1\n```\nRecommended setting for best balance between speed and memory usage.\n\n### 🔐 Public Key Hashing on GPU (SHA-256 + RIPEMD-160)\nThe OpenCL kernel performs **blazing fast public key hashing** directly on the GPU using:\n\n- `SHA-256(pubkey.x || pubkey.y)` followed by  \n- `RIPEMD-160(SHA-256(pubkey))`\n\nThis allows each GPU thread to independently generate full Bitcoin-style public key hashes (`hash160`) **without CPU involvement**.\n\nBenefits:  \n- No host-side post-processing needed  \n- Fully parallelized and memory-efficient  \n- Ideal for massive batch generation and filtering\n\n> ✅ Output is already in hash160 format, ready for address comparison\n\n## Address Database\nThe addresses are stored in a high-performance database: [LMDB](https://github.com/LMDB).\nThe database can be used to check whether a generated address has ever been used.\n\n### Address Import Support\n\nThe importer supports reading multiple `.txt` or `.text` files, each containing one address per line in arbitrary order. Lines may vary in address type and format. Each line may also optionally include an associated coin amount.\n\n⚠️ **Unsupported or malformed lines are silently skipped during import.**\n\n#### Supported Address Types\n\n* **P2PKH** – Pay to Public Key Hash\n  Encoded using Base58. Most commonly used format for legacy Bitcoin addresses.\n\n* **P2SH** – Pay to Script Hash\n  Base58-encoded address type used for multisig and other script-based spending conditions.\n\n* **P2WPKH** – Pay to Witness Public Key Hash\n  Native SegWit v0 address, encoded in **Bech32**. One private key deterministically produces one address.\n\n#### Unsupported Address Types\n\n* **P2MS** – Pay to Multisig\n  Custom format prefixed with `d-`, `m-`, or `s-` (e.g. `m-<script>`).\n  ❌ **Not Supported:** Script-based format. Private keys cannot deterministically generate P2MS addresses without knowing the script.\n\n* **P2WSH** – Pay to Witness Script Hash\n  Native SegWit v0 address for scripts, encoded in **Bech32**.\n  ❌ **Not Supported:** Script Hash format. Addresses depend on the script hash, not directly on the public key.\n\n* **P2TR** – Pay to Taproot\n  Native SegWit v1 (Taproot) address, encoded using **Bech32m**.\n  ❌ **Not Supported:** Requires key tweaking based on an optional script. Without knowing the script, you cannot generate matching P2TR addresses from a private key. One private key can create infinite different P2TR addresses. This breaks the tool's design, which maps private keys to deterministic addresses.\n\n> **Note on Witness Versions:**\n> Bech32 was introduced in [BIP-173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) for SegWit v0 (P2WPKH, P2WSH).\n> Bech32m, defined in [BIP-350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki), is used for SegWit v1 (P2TR).\n\n#### Special Formats\n\nIn addition to standard script types, the importer also recognizes and supports several special address encodings:\n\n* **Bitcoin Cash (Base58 prefix `q`)**  \n  Legacy Bitcoin Cash addresses using the `q`-prefix are automatically converted to legacy Bitcoin format.\n\n* **BitCore WKH**  \n  Custom format prefixed with `wkh_` and encoded in **Base36**.\n\n* **Riecoin P2SH as ScriptPubKey**  \n  Riecoin P2SH addresses are provided as raw ScriptPubKey hex (starting with `76a914...`).\n\n---\n\n> **Legend:**  \n> ✅ = Supported and tested  \n> ❌ = Explicitly not supported (format known but intentionally excluded)  \n> _empty_ = Unknown or unverified — either not implemented by the altcoin project, or no valid address example was found (thus no implementation or test exists)\n\n| Coin                                                                                     |  TAG  | P2PKH | P2SH | P2WPKH | P2WSH  |  P2MS  |  P2TR  |\n|------------------------------------------------------------------------------------------|:-----:|:-----:|:----:|:------:|:------:|:------:|:------:|\n| [42-coin](https://github.com/42-coin/42)                                                 | 42    |  ✅   | ✅   |        |        |        |       |\n| [Alias](https://github.com/aliascash)                                                    | ALIAS |  ✅   |      |        |        |        |       |\n| [Argoneum](https://github.com/Argoneum/argoneum)                                         | AGM   |  ✅   |      |        |        |        |       |\n| [Artbyte](https://github.com/WikiMin3R/ArtBytE)                                          | ABY   |  ✅   |      |        |        |        |       |\n| [Auroracoin](https://github.com/aurarad/Auroracoin)                                      | AUR   |  ✅   |      |        |        |        |       |\n| [B3Coin](https://github.com/B3-Coin/B3-CoinV2)                                           | B3    |  ✅   |      |        |        |        |       |\n| [BBQCoin](https://github.com/BBQCoinCommunity/BBQCoin)                                   | BQC   |  ✅   |      |        |        |        |       |\n| [Bean Cash](https://github.com/teambean/BeanCash)                                        | BEAN  |  ✅   |      |        |        |        |       |\n| [Biblepay](https://github.com/biblepay/biblepay)                                         | BBP   |  ✅   |      |        |        |        |       |\n| [BitBay](https://github.com/bitbaymarket/bitbay-core)                                    | BAY   |  ✅   |      |        |        |        |       |\n| [BitBlocks](https://github.com/BitBlocksProject/BitBlocks)                               | BBK   |  ✅   |      |        |        |        |       |\n| [Bitcoin](https://github.com/bitcoin/bitcoin)                                            | BTC   |  ✅   | ✅   | ✅    | ❌     |  ❌    | ❌    |\n| [Bitcoin Cash](https://github.com/bitcoincashbch/bitcoin-cash)                           | BCH   |  ✅   | ❌   |        |        |  ❌    |       |\n| [Bitcoin Gold](https://github.com/btcgpu)                                                | BTG   |  ✅   |      |        |        |        |       |\n| [Bitcoin Oil](https://github.com/escapeneo/bitcoinoil/)                                  | BTCO  |  ✅   |      | ✅     | ❌     |        |       |\n| [Bitcoin Plus](https://github.com/bitcoinplusorg/xbcwalletsource)                        | XBC   |  ✅   |      |        |        |        |       |\n| [BitCore](https://github.com/bitcore-btx/bitcore)                                        | BTX   |  ✅   |      | ✅     | ❌     |        |       |\n| [Bitmark](https://github.com/project-bitmark/bitmark)                                    | BTMK  |  ✅   |      |        |        |        |       |\n| [BlackCoin](https://gitlab.com/blackcoin/blackcoin-more)                                 | BLK   |  ✅   |      |        |        |        |       |\n| [BlakeBitcoin](https://github.com/BlakeBitcoin/BlakeBitcoin)                             | BBTC  |  ✅   |      |        |        |        |       |\n| [Blakecoin](https://github.com/BlueDragon747/Blakecoin)                                  | BLC   |  ✅   |      |        |        |        |       |\n| [Blocknet](https://github.com/BlocknetDX/BlockDX)                                        | BLOCK |  ✅   |      |        |        |        |       |\n| [BolivarCoin](https://github.com/BOLI-Project/BolivarCoin)                               | BOLI  |  ✅   |      |        |        |        |       |\n| [BYTZ](https://github.com/bytzcurrency)                                                  | BYTZ  |  ✅   | ✅   |        |        |        |       |\n| [Canada-eCoin](https://github.com/Canada-eCoin/eCoinCore)                                | CDN   |  ✅   |      | ✅     | ❌      |        |         |\n| [Catcoin](https://github.com/CatcoinCore/catcoincore)                                    | CAT   |  ✅   |      |        |        |        |         |\n| [ChessCoin 0.32%](https://github.com/AKKPP/ChessCoin032/)                                | CHESS |  ✅   |      |        |        |        |         |\n| [Clam](https://github.com/nochowderforyou/clams)                                         | CLAM  |  ✅   |      |        |        |        |         |\n| [CloakCoin](https://github.com/CloakProject/CloakCoin)                                   | CLOAK |  ✅   | ✅   |        |        |        |         |\n| [C-Note](https://github.com/cnote-chain/CNOTE)                                           | CNOTE |  ✅   |     |        |        |        |         |\n| [Coino](https://github.com/scriptRack003756/coino)                                       | CNO   |  ✅   |      |        |        |         |       |\n| [ColossusXT](https://github.com/ColossusCoinXT/ColossusCoinXT)                           | COLX  |  ✅   |      |        |        |         |       |\n| [Compound](https://github.com/compounddev/Compound-Coin)                                 | COMP |  ✅   |      |        |        |         |       |\n| [CROWN](https://github.com/Crowndev/crowncoin)                                           | CRW   |  ✅   |      |        |        |         |       |\n| [Cryptoshares](https://github.com/Cryptosharescoin/shares)                               | SHARES|  ✅   |      |        |        |         |       |\n| [Curecoin](https://github.com/cygnusxi/CurecoinSource)                                   | CURE  |  ✅   |      |        |        |         |       |\n| [Dash](https://github.com/dashpay/dash)                                                  | DASH  |  ✅   | ✅   |        |        |        |         |\n| [Defcon](https://github.com/defcon-project/defcon)                                       | DEFCON|  ✅   | ✅   |        |         |        |         |\n| [DeFiChain](https://github.com/DeFiCh/ain)                                               | DFI   |  ✅   | ✅   | ✅     | ❌      |        |         |\n| [Deutsche eMark](https://github.com/emarkproject/eMark)                                  | DEM   |  ✅   |      |        |        |        |         |\n| [Diamond](https://github.com/DMDcoin/Diamond)                                            | DMD   |  ✅   |      |        |        |        |         |\n| [DiminutiveCoin](https://github.com/MadCatMining/DiminutiveCoin)                         | DIMI  |  ✅   |      |        |        |        |         |\n| [DigiByte](https://github.com/digibyte-core/digibyte)                                    | DGB   |  ✅   |      | ✅     | ❌     |        |         |\n| [DigitalCoin](https://github.com/lomtax/digitalcoin)                                     | DGC   |  ✅   |      |        |        |         |       |\n| [Dimecoin](https://github.com/dime-coin/dimecoin)                                        | DIME  |  ✅   |      |        |        |         |       |\n| [Divicoin](https://github.com/DiviProject/Divi)                                          | DIVI  |  ✅   |      |        |        |         |       |\n| [Dogecoin](https://github.com/dogecoin/dogecoin)                                         | DOGE  |  ✅   | ✅   |        |        |        |         |\n| [Dogmcoin](https://github.com/dogmcoin/dogmcoin)                                         | DOGM  |  ✅   |      |        |        |         |       |\n| [Doichain](https://github.com/Doichain/doichain-core)                                    | DOI   |  ✅   |      | ✅     | ❌     |        |         |\n| [e-Gulden](https://github.com/Electronic-Gulden-Foundation/egulden)                      | EFL   |  ✅   |      |        |        |         |       |\n| [Electron](https://github.com/Electron-Coin2014/Electron-ELT)                            | ELT   |  ✅   |      |        |        |         |       |\n| [Element (HYP)](https://github.com/Crypto-city/Element-HYP)                              | HYP   |  ✅   |      |        |        |         |       |\n| [Elite](https://github.com/ironsniper1/Elite-Source-2.0.1.2)                             | 1337  |  ✅   |      |        |        |         |       |\n| [Emerald](https://github.com/crypto-currency/Emerald)                                    | EMD   |  ✅   |      |        |        |         |       |\n| [EverGreenCoin](https://github.com/EverGreenCoinDev/EverGreenCoin)                       | EGC   |  ✅   |      |        |        |         |       |\n| [Feathercoin](https://github.com/FeatherCoin/Feathercoin)                                | FTC   |  ✅   |      | ✅     | ❌     |         |         |\n| [Firo](https://github.com/firoorg/firo/)                                                 | FIRO  |  ✅   |      |        |       |         |         |\n| [Freedomcoin](https://github.com/FreedomCoin-Project/FreedomCoin-Core/)                  | FREED |  ✅   |      |        |        |         |       |\n| [GapCoin](https://github.com/gapcoin/gapcoin)                                            | GAP   |  ✅   |      |        |        |         |       |\n| [Goldcash](https://github.com/iUNeIV/GoldCash)                                           | GOLD  |  ✅   |      |        |        |         |       |\n| [GoldCoin](https://github.com/goldcoin/goldcoin)                                         | GLC   |  ✅   |      |        |        |         |       |\n| [Groestlcoin](https://github.com/GroestlCoin/GroestlCoin/)                               | GRS   |  ✅   |      | ✅     | ❌     |         |       |\n| [Hemis](https://github.com/Hemis-Blockchain/Hemis)                                       | HMS   |  ✅   |      |        |        |         |       |\n| [Herencia](https://github.com/herenciacoin/HEIRS)                                        | HEIRS |  ✅   |      |        |        |         |       |\n| [HoboNickels](https://github.com/Tranz5/HoboNickels)                                     | HBN   |  ✅   |      |        |        |         |       |\n| [HTMLCOIN](https://github.com/HTMLCOIN)                                                  | HTML  |  ✅   |      |        |        |         |       |\n| [I/O Coin](https://github.com/IOCoin/DIONS)                                              | IOC   |  ✅   |      |        |        |         |       |\n| [IDChain](https://github.com/idchaincoin/idchaincoin)                                    | DCT   |  ✅   |      |        |        |         |       |\n| [Innova](https://github.com/innova-foundation/innova)                                    | INN   |  ✅   |      |        |        |         |       |\n| [InfiniLooP](https://github.com/WikiMin3R/InfiniLooP/)                                   | IL8P  |  ✅   |      |        |        |         |       |\n| [Infinitecoin](https://github.com/infinitecoin-project/infinitecoin)                     | IFC   |  ✅   |      |        |        |         |       |\n| [iXcoin](https://github.com/IXCore/IXCoin)                                               | IXC   |  ✅   |      |        |        |         |       |\n| [Kobocoin](https://github.com/kobocoin/Kobocoin/)                                        | KOBO  |  ✅   |      |        |        |         |       |\n| [Komodo](https://github.com/KomodoPlatform/komodo)                                       | KMD   |  ✅   |      |        |        |         |       |\n| [Lanacoin](https://github.com/LanaCoin/lanacoin)                                         | LANA  |  ✅   |      |        |        |         |       |\n| [Litecoin](https://github.com/litecoin-project/litecoin)                                 | LTC   |  ✅   | ✅   | ✅     | ❌     |        |         |\n| [Litecoin Cash](https://github.com/litecoincash-project/litecoincash)                    | LCC   |  ✅   |      | ✅     | ❌     |         |         |\n| [LiteDoge](https://github.com/ldoge/LDOGE)                                               | LDOGE |  ✅   |      |        |        |         |       |\n| [Lithium](https://github.com/lithiumcoin/lithium)                                        | LIT   |  ✅   |      |        |        |         |       |\n| [Luckycoin](https://github.com/LuckycoinFoundation/Luckycoin)                            | LKY   |  ✅   |      |        |        |         |       |\n| [Lynx](https://github.com/getlynx/Lynx)                                                  | LYNX  |  ✅   |      |        |        |         |       |\n| [MasterNoder2](https://github.com/jonK341/MasterNoder2)                                  | MN2   |  ✅   |      |        |        |         |       |\n| [Mooncoin](https://github.com/%20mooncoincore/wallet/releases)                           | MOON  |  ✅   | ✅   | ✅     | ❌      |         |       |\n| [MotaCoin](https://github.com/Jahvinci/MotaCoin)                                         | MOTA  |  ✅   |      |        |        |         |       |\n| [Myriad](https://github.com/myriadteam/myriadcoin)                                       | XMY   |  ✅   | ✅   | ✅     | ❌     |        |         |\n| [Namecoin](https://github.com/namecoin/namecoin-core)                                    | NMC   |  ✅   |      | ✅     | ❌     |         |         |\n| [NewYorkCoin](https://github.com/NewYorkCoinNYC)                                         | NYC   |  ✅   |      |        |        |         |       |\n| [Novacoin](https://github.com/novacoin-project/novacoin)                                 | NVC   |  ✅   |      |        |        |         |       |\n| [Oduwacoin](https://github.com/ODUWAX/oduwacoin)                                         | OWC   |  ✅   |      |        |        |         |       |\n| [PAC Protocol](https://github.com/pacprotocol/pacprotocol)                               | PAC   |  ✅   |      |        |        |         |       |\n| [PakCoin](https://github.com/Pakcoin-project/pakcoin)                                    | PAK   |  ✅   |      |        |        |         |       |\n| [PandaCoin](https://github.com/DigitalPandacoin/pandacoin)                               | PND   |  ✅   |      |        |        |         |       |\n| [Particl](https://github.com/particl/particl-core)                                       | PART  |  ✅   | ✅   |        |        |         |       |\n| [PeepCoin](https://github.com/PXN-Foundation/Peepcoin/)                                  | PCN   |  ✅   |      |        |        |         |       |\n| [Peercoin](https://github.com/peercoin/peercoin)                                         | PPC   |  ✅   |      |        |        |         |       |\n| [Photon](https://github.com/photonproject/photon)                                        | PHO   |  ✅   |      |        |        |         |       |\n| [Pinkcoin](https://github.com/Pink2Dev/Pink2)                                            | PINK  |  ✅   |      |        |        |         |       |\n| [PIVX](https://github.com/PIVX-Project/PIVX/)                                            | PIVX  |  ✅   |      |        |        |         |       |\n| [PotCoin](https://github.com/potcoin/potcoin)                                            | POT   |  ✅   |      |        |        |         |       |\n| [Primecoin](https://github.com/primecoin/primecoin)                                      | XPM   |  ✅   |      |        |        |         |       |\n| [PutinCoin v2](https://github.com/PutinCoinPUT/PutinCoin)                                | PUT   |  ✅   |      |        |        |         |       |\n| [Quark](https://github.com/quark-project-evolution/quark/)                               | QRK   |  ✅   |      |        |        |         |       |\n| [Raptoreum Core](https://github.com/Raptor3um/raptoreum)                                 | RTM   |  ✅   |      |        |        |        |         |\n| [Reddcoin](https://github.com/reddcoin-project/reddcoin)                                 | RDD   |  ✅   |      |        |        |        |         |\n| [Riecoin](https://github.com/riecointeam/riecoin)                                        | RIC   |       | ✅   | ✅     | ❌    |         |       |\n| [SaluS](https://github.com/saluscoin/salus)                                              | SLS   |  ✅   | ✅   |        |        |         |       |\n| [SexCoin](https://github.com/sexcoin-project/sexcoin)                                    | SXC   |  ✅   |      |        |        |         |       |\n| [Slimcoin](https://github.com/slimcoin-project/Slimcoin)                                 | SLM   |  ✅   |      |        |        |         |       |\n| [Smileycoin](https://github.com/tutor-web/smileyCoin)                                    | SMLY  |  ✅   |      |        |        |         |       |\n| [Smoke](https://github.com/cannacoin-official/cannacoin-smoke)                           | SMOKE |  ✅   |      |        |        |         |       |\n| [SpaceXpanse](https://github.com/SpaceXpanse/rod-core-wallet)                            | ROD   |  ✅   |      | ✅     | ❌     |         |       |\n| [Sparks](https://github.com/sparkspay/sparks/)                                           | SPK   |  ✅   |      |        |        |         |       |\n| [Stakecoin](https://github.com/sleewis/stakecoin)                                        | STK   |  ✅   |      |        |        |         |       |\n| [Sterlingcoin](https://github.com/Sterlingcoin/Sterlingcoin-1.6.2.0-Release)             | SLG   |  ✅   |      |        |        |         |       |\n| [Stronghands](https://bitbucket.org/bumbacoin/stronghands-new)                           | SHND  |  ✅   |      |        |        |         |       |\n| [Syscoin](https://github.com/syscoin/syscoin)                                            | SYS   |  ✅   |      | ✅     | ❌     |         |       |\n| [TajCoin](https://github.com/Taj-Coin/tajcoin)                                           | TAJ   |  ✅   |      |        |        |         |       |\n| [Terracoin](https://github.com/terracoin/terracoin)                                      | TRC   |  ✅   |      |        |        |         |       |\n| [TheHolyRogerCoin](https://github.com/TheHolyRoger/TheHolyRogerCoin)                     | ROGER |  ✅   |      | ✅     | ❌     |         |       |\n| [Trezarcoin](https://github.com/TrezarCoin/TrezarCoin)                                   | TZC   |  ✅   |      |        |        |         |       |\n| [Trollcoin](https://github.com/TrollCoin2/TrollCoin-2.0)                                 | TROLL |  ✅   |      |        |        |         |       |\n| [UFO](https://github.com/fiscalobject/ufo)                                               | UFO   |  ✅   | ✅   | ✅     | ❌      |        |         |\n| [UFOhub](https://github.com/MyGCoin/UFOHub-Coin)                                         | UFOHUB|  ✅   |      |        |        |         |       |\n| [Unitus](https://github.com/unitusdev/unitus)                                            | UIS   |  ✅   |      |        |        |         |       |\n| [UniversalMolecule](https://github.com/universalmol/universalmol)                        | UMO   |  ✅   |      |        |        |         |       |\n| [Unobtanium](https://github.com/unobtanium-official/Unobtanium)                          | UNO   |  ✅   |      |        |        |        |         |\n| [Validity](https://github.com/RadiumCore/Validity)                                       | VAL   |  ✅   |      |        |        |         |       |\n| [Vanillacash](https://github.com/WikiMin3R/Vanillacash)                                  | XVC   |  ✅   |      |        |        |         |       |\n| [VeriCoin](https://github.com/vericoin/vericoin)                                         | VRC   |  ✅   |      |        |        |         |       |\n| [Versacoin](https://github.com/versacoin/versacoin)                                      | VCN   |  ✅   |      |        |        |         |       |\n| [Vertcoin](https://github.com/vertcoin/vertcoin)                                         | VTC   |  ✅   |      | ✅     | ❌     |         |       |\n| [VirtaCoin](https://github.com/virtacoin/VirtaCoinProject)                               | VTA   |  ✅   |      |        |        |         |       |\n| [VirtacoinPlus](https://github.com/virtacoinplus/virtacoinplus)                          | XVP   |  ✅   |      |        |        |         |       |\n| [WorldCoin](https://github.com/OfficialWorldcoinGlobal/Worldcoin)                        | WDC   |  ✅   |      |        |        |         |       |\n| [Zetacoin](https://github.com/WikiMin3R/ZetacoinE)                                       | ZET   |  ✅   |      |        |        |         |       |\n| [ZCash](https://github.com/zcash/zcash)                                                  | ZEC   |  ✅   | ✅   |        |        |        |         |\n\n### Create the database by yourself\nUseful txt/text file provider:\n* http://blockdata.loyce.club/alladdresses/\n* https://blockchair.com/dumps\n\n\n### Export\nThe exporter provides various output formats for Bitcoin and altcoin address data:\n\n* **HexHash**  \n  Exports addresses as raw `hash160` (RIPEMD-160 of the SHA-256 of the public key), encoded in hexadecimal. No version byte or checksum is included. Ideal for advanced usage and low-level comparison. Best viewed in fixed-width hex viewers (e.g., HxD).\n\n* **FixedWidthBase58BitcoinAddress**  \n  Exports Base58Check-encoded addresses (e.g., legacy `P2PKH`) in a fixed-width format for consistent alignment. No amount is included. Suitable for hex/byte-aligned visual inspection and batch comparison.\n\n* **DynamicWidthBase58BitcoinAddressWithAmount**  \n  Exports Base58Check-encoded addresses along with their associated amounts (e.g., balance or UTXO value), using a dynamic-width format. Suitable for human-readable CSV-like formats and analytics.\n\n---\n\n### Use My Prepared Database\nI am in the process of building and publishing databases containing large sets of Bitcoin and altcoin addresses.  \n(Refer to the **Import** section above for details on supported address formats.)\n\n> The sources of these addresses are confidential, but you are fully permitted to extract, inspect, and use them.\n\nYou are also welcome to **extend this database** by importing your own address data. This allows you to build upon the existing dataset, tailoring it to your specific needs (e.g., adding additional coins, formats, or private address collections).\n\nIf you're missing any information or have questions about usage or content, feel free to ask or open an issue.\n\n#### Light database\n* Light (5.4 GiB), Last update: July 1, 2025\n  * Contains Bitcoin addresses whith amount and many altcoin addresses with amount.\n  * Static amount of 0 is used to allow best compression.\n  * Unique entries: 132288304\n  * Mapsize: 5576 MiB\n  * Time to create the database: ~9 hours\n  * Link (3.66 GiB zip archive): http://ladenthin.net/lmdb_light.zip\n  * Link extracted addresses as txt (5.17 GiB) (2.29 GiB zip archive); open with HxD, set 42 bytes each line: http://ladenthin.net/LMDBToAddressFile_Light_HexHash.zip\n\n> 💡 **Hint:** When using the light database, it is **strongly recommended** to enable the following setting in your configuration:\n> ```json\n> \"loadToMemoryCacheOnInit\" : true\n> ```  \n> Although LMDB is very fast, a Java `HashSet` provides true **O(1)** lookups compared to **O(log n)** (or worse) with disk-backed access.\n> Enabling this flag loads all addresses into memory at startup, resulting in significantly higher throughput during key scanning — especially for OpenCL or high-frequency batch operations.\n\n<details>\n<summary>Checksums lmdb_light.zip</summary>\n\n```txt\nlmdb_light.zip\tCRC32\tDF77E5CF\nlmdb_light.zip\tMD5\t4B733EAFF200C8044F80BE68538BB164\nlmdb_light.zip\tRipeMD160\tA82C31F511C9BF3CDCA705E63860B5B597227EB3\nlmdb_light.zip\tSHA-1\tC2E9FA56578C9F73942943C7861B226C6B44AC18\nlmdb_light.zip\tSHA-256\t3B8AB59232D9CBB67118A79143E788E0B08A957E9C3D877F8B41303005170DC0\nlmdb_light.zip\tSHA-512\t108D88E7EE1E90BEE975ADB711438C41971B23A65751EFB33EA6287A9697DC563ECCE40452DFA2DD1E0F66637F5AA14CC02D9A621AED953E0DA6FCEDD9D9C440\nlmdb_light.zip\tSHA3-224\tBDF86A26D072BF521AE4A909AC912AC1C0F4EEAB33D12AE4D554327F\nlmdb_light.zip\tSHA3-256\t55206B88314AD7F2907740FBD49C462BC0B1C2F075C23807E71E095EE9712345\nlmdb_light.zip\tSHA3-384\tD23681FC1722253F2B51BBCF9CDA22FDD2B79C33657D38C938B64392E8CD4957AAD1FD4E6D54E7B9FF1A98C3D110C52F\nlmdb_light.zip\tSHA3-512\t096B12FE4CB1A095287F678C10B30418091FCBF1FABB77003969C6D9846F1344A0C8918B3D2D047E94363B6E9BC5324801EA0E14331A012E8123FDE44672B394\n```\n\n</details>\n\n<details>\n<summary>Checksums LMDBToAddressFile_Light_HexHash.zip</summary>\n\n```txt\nLMDBToAddressFile_Light_HexHash.zip\tCRC32\tAA42A096\nLMDBToAddressFile_Light_HexHash.zip\tMD5\tEB2E19F7AFE545A1A98FAE134D5394D4\nLMDBToAddressFile_Light_HexHash.zip\tRipeMD160\tA011232D5069884ACFBE76C8DF4069DF684768DB\nLMDBToAddressFile_Light_HexHash.zip\tSHA-1\tC8899544133C605EAB9FE2C83227854737B8D3FC\nLMDBToAddressFile_Light_HexHash.zip\tSHA-256\tA8B67B606C574A4F895FA7E9B5E0AA9830C5DDD7E615EB59D77C2324E388DB78\nLMDBToAddressFile_Light_HexHash.zip\tSHA-512\t4FD1B0905016292169A23E166C0D1C4D448DADFE4EC8FE410C1991D37B6AB5FE34596FD6EDFC62C0DE8EC8AD7142212F105ACD137B9A71F5F71E1BB1FB3B9278\nLMDBToAddressFile_Light_HexHash.zip\tSHA3-224\t858550C2805FF1A20F3728392E70CAB9E4952792F31FA0881B0031D2\nLMDBToAddressFile_Light_HexHash.zip\tSHA3-256\t4B522E2F4225D6FB238228033CC8AAE843DC24BA00B32BCBCA0D23B9A4C1AC46\nLMDBToAddressFile_Light_HexHash.zip\tSHA3-384\tC29158FCB83F2D4F25BC610CE4D143964AC984ACA9D2064C9B8D40F33679830B3704A99BF408DAC75702658E55F58A7D\nLMDBToAddressFile_Light_HexHash.zip\tSHA3-512\t29CA44CD666D7B8CF9EAD4B340620FBB7EDC30F47DBC2582A57E3DFF5E537A2A2F2CE7A7CEC2C6EF21775F7B839E0D1F23BE720CE0FC64F304B142AFAFA1437E\n```\n\n</details>\n\n\n#### Full database\n* Full (57.0 GiB), Last update: June 4, 2025\n  * Contains all Bitcoin addresses which are ever used and many altcoin addresses with and without amount.\n  * Static amount of 0 is used to allow best compression.\n  * Unique entries: 1377481459\n  * Mapsize: 58368 MiB\n  * Time to create the database: ~54 hours\n  * Link (34.3 GiB zip archive): http://ladenthin.net/lmdb_full.zip\n  * Link extracted addresses as txt (23.4 GiB zip archive); open with HxD, set 42 bytes each line: http://ladenthin.net/LMDBToAddressFile_Full_HexHash.zip\n\n<details>\n<summary>Checksums lmdb_full.zip</summary>\n\n```txt\nlmdb_full.zip\tCRC32\t815A7A2D\nlmdb_full.zip\tMD5\tAF29E5E75C62DC9591DFE0C101726296\nlmdb_full.zip\tRipeMD160\t6137C2A7BDA337C274141ED866C7C9B5F011A47E\nlmdb_full.zip\tSHA-1\t82554DD5C17BBDCD071015382AF4E1A8F3A85B33\nlmdb_full.zip\tSHA-256\tDD9F6ACE080D24D80C1C032361226348D62CAF8BD0C0C09E0473A76F1ED95D57\nlmdb_full.zip\tSHA-512\t0DF89EDB8243A4E12F56BC1AB9DF2C558A32FE14919B8A648CD3EB6869611DE035B044DEFAE6A5D5835886CBA405975E534BE4A624CD17A39CF69CF45A46381A\nlmdb_full.zip\tSHA3-224\t43FF7478841483F022866569B73D89C7A4D154564CBE343873C29C61\nlmdb_full.zip\tSHA3-256\tEB02EA6321F346406011F8195A57AA43BDAFAD2BBD34944ED27A87EF04FC509D\nlmdb_full.zip\tSHA3-384\tF1A91448D85A84E6059EDED27E23FE5939B5F2A9BCE5DC260C8CAEF7B2E5AAFF75F6FE58AFB05F13094441F91DF3B031\nlmdb_full.zip\tSHA3-512\tEF669BAD483E373CE4AFBA37AAE800A030F78E3D81972D8385E659DC5BEF2973E279D8666F53F727F1891F2C242896A957944E2E8E24BF138BC61C5A58394A7A\n```\n\n</details>\n\n<details>\n<summary>Checksums LMDBToAddressFile_Full_HexHash.zip</summary>\n\n```txt\nLMDBToAddressFile_Full_HexHash.zip\tCRC32\t41E4AF53\nLMDBToAddressFile_Full_HexHash.zip\tMD5\t920B9656E21A0B68737255FC240F48D2\nLMDBToAddressFile_Full_HexHash.zip\tRipeMD160\t73689B50945034554DADA23E5C25B49FCD1BF57C\nLMDBToAddressFile_Full_HexHash.zip\tSHA-1\t2C59FCBF6FB53EDEB9E3B9069E67A547F114AEC6\nLMDBToAddressFile_Full_HexHash.zip\tSHA-256\tCC45F6E8F383344D918B9C9F2AEDA5846211D878B7E05E222DB066106230BFBE\nLMDBToAddressFile_Full_HexHash.zip\tSHA-512\t18E1739A6380D421F232C669DBD685B418B6F2D462C92E711539D2A2EEC606CEEDF58E19014B23A8936093ED07D55F51CFDC374B59B3299332E0DED223A53A96\nLMDBToAddressFile_Full_HexHash.zip\tSHA3-224\t24B2D4AD34E73B59FB7BA5F8E064288176733A2634B5470B25B1C0DE\nLMDBToAddressFile_Full_HexHash.zip\tSHA3-256\t1CC79E2F24031A37BFB5FFEA27C07CC654CDD91224A334F52095AF16FBE81F55\nLMDBToAddressFile_Full_HexHash.zip\tSHA3-384\tCA115D352C2609B0B2E85010CC13175E7DC3C8F6295B3B6B4BD858D60D81D6E3EA706E4979F764A4C6BF7D351153A429\nLMDBToAddressFile_Full_HexHash.zip\tSHA3-512\tA1419AFFE869B18973D499439E7EA90A94C4C7C6818F719741E59DD619985C6867F6C51F31BC7EDEBF27356D11B013E4D36FB83D89E5FFB1F77566FF5582FBD5\n```\n\n</details>\n\n---\n\n## Pages and projects to get lists (dumps) of PubkeyHash addresses\n* https://github.com/Pymmdrza/Rich-Address-Wallet\n* https://github.com/mycroft/chainstate\n* https://github.com/graymauser/btcposbal2csv\n* https://blockchair.com/dumps\n* https://balances.crypto-nerdz.org/\n\n## Find Addresses\n### 🔢 Key Generation Configuration  \nBitcoinAddressFinder supports multiple pseudorandom number generators (PRNGs) for private-key creation.\nPick one in your JSON via the `keyProducerJavaRandomInstance` field, e.g. `\"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\"`.\nThis flexibility lets you switch between **production-grade entropy** and **deterministic or deliberately weak sources** for audits and research.\n\n#### Key producer Use Cases\n* 🔐 Secure wallet generation\n* 🧪 Testing deterministic output\n* 🕵️ Simulating vulnerabilities\n* 🔄 Reproducible scans\n\n> ⚠️ **Security Warning**: This software is intended for research and educational purposes. Do **not** use it in production or on systems connected to the internet.\n\nA secure environment should be fully isolated — ideally an air-gapped computer (physically disconnected from all networks).  \nThe software is highly optimized for performance and **not designed to run in constant time**, which means it may be vulnerable to **side-channel attacks** on shared or exposed systems.\n\nFor generated vanity addresses or private keys, consider storing them safely using a [paper wallet](https://en.bitcoin.it/wiki/Paper_wallet).\n\n#### Supported PRNG Modes (key producer java random)\n\n| Value | Description |\n|-------|-------------|\n| `SECURE_RANDOM` | ✅ Cryptographically secure system CSPRNG (`/dev/urandom`, Windows CNG). **Recommended for real wallet generation.** |\n| `RANDOM_CURRENT_TIME_MILLIS_SEED` | ⚠️ `java.util.Random` seeded with the current timestamp. **Insecure**; handy for replaying time-window RNG flaws. |\n| `RANDOM_CUSTOM_SEED` | ⚠️ `java.util.Random` with user-supplied seed. Fully deterministic; useful for reproducible fuzzing or fixed keyspaces. |\n| `SHA1_PRNG` | ⚠️ Legacy “SHA1PRNG” engine (Android pre-2013). Lets you reproduce the historic SecureRandom bug. |\n\n#### Examples\n##### 🔐 `SECURE_RANDOM`  \nBest choice for real wallet generation – uses system CSPRNG (e.g. `/dev/urandom`, Windows CNG).\n```json\n...\n\"keyProducerJavaRandom\": [\n  {\n    \"keyProducerId\": \"exampleKeyProducerId\",\n    \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\"\n  }\n],\n...\n```\n\n##### 🕰️ `RANDOM_CURRENT_TIME_MILLIS_SEED`  \nRecreates time-based vulnerabilities using `java.util.Random` seeded with the current system time.\n```json\n...\n\"keyProducerJavaRandom\": [\n  {\n    \"keyProducerId\": \"exampleKeyProducerId\",\n    \"keyProducerJavaRandomInstance\": \"RANDOM_CURRENT_TIME_MILLIS_SEED\"\n  }\n],\n...\n```\n\n##### 🧪 `RANDOM_CUSTOM_SEED`\nFully deterministic PRNG using `java.util.Random` with a user-defined seed. Useful for reproducible scans and testing.\n\nFully deterministic output. Useful for reproducible tests or fixed keyspace scans.\nWithout explicit seed:\n```json\n...\n\"keyProducerJavaRandom\": [\n  {\n    \"keyProducerId\": \"exampleKeyProducerId\",\n    \"keyProducerJavaRandomInstance\": \"RANDOM_CUSTOM_SEED\"\n  }\n],\n...\n```\n\nWith custom deterministic seed:\n```json\n...\n\"keyProducerJavaRandom\": [\n  {\n    \"keyProducerId\": \"exampleKeyProducerId\",\n    \"keyProducerJavaRandomInstance\": \"RANDOM_CUSTOM_SEED\",\n    \"customSeed\": 123456789\n  }\n],\n...\n```\n\n##### ⚠️ `SHA1_PRNG`\nLegacy deterministic PRNG using `\"SHA1PRNG\"`. Used to reproduce the 2013 Android SecureRandom vulnerability. Can be used with or without an explicit seed.\n\nSimulates old Android bug. May produce the same keys if seeded poorly or not at all.\nWithout seed:\n```json\n...\n\"keyProducerJavaRandom\": [\n  {\n    \"keyProducerId\": \"exampleKeyProducerId\",\n    \"keyProducerJavaRandomInstance\": \"SHA1_PRNG\"\n  }\n],\n...\n```\n\nWith custom seed:\n```json\n...\n\"keyProducerJavaRandom\": [\n  {\n    \"keyProducerId\": \"exampleKeyProducerId\",\n    \"keyProducerJavaRandomInstance\": \"SHA1_PRNG\",\n    \"customSeed\": 987654321\n  }\n],\n...\n```\n\n#### 🔐 `BIP39_SEED` (key producer java bip 39)\nHD-wallet-style derivation: mnemonic + passphrase → BIP32/BIP44 keys.\n\nHierarchical deterministic key generator using a BIP39 mnemonic and optional passphrase. Allows full BIP32/BIP44 path derivation and reproducible HD wallets.\n\n| JSON field | Type | Default | Purpose |\n|------------|------|---------|---------|\n| `mnemonic` | string | — | 12/24-word BIP39 sentence |\n| `passphrase` | string | `\"\"` | Optional BIP39 salt (“wallet password”) |\n| `hardened` | boolean | `false` | \tWhether to use hardened key derivation (adds 0x80000000 to indices) |\n| `bip32Path` | string | `\"M/44H/0H/0H/0\"` (constant `DEFAULT_BIP32_PATH`) | Base derivation path; must start with `M/` |\n| `creationTimeSeconds` | number | `0` | Epoch-seconds creation timestamp; fed to `DeterministicSeed.ofMnemonic` |\n\nMinimal:\n```json\n...\n\"keyProducerJavaBip39\": [\n    {\n      \"keyProducerId\": \"exampleKeyProducerId\",\n      \"mnemonic\": \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\"\n    }\n],\n...\n```\n\nFull:\n```json\n...\n\"keyProducerJavaBip39\": [\n    {\n      \"keyProducerId\": \"exampleKeyProducerId\",\n      \"mnemonic\": \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\",\n      \"passphrase\": \"correct horse battery staple\",\n      \"hardened\" : false,\n      \"bip32Path\": \"M/44H/0H/0H/0\",\n      \"creationTimeSeconds\": 1650000000\n    }\n],\n...\n```\n\n#### 🔢 incremental scanning (key producer java incremental)\nThis mode generates private keys **sequentially in batches** within a specified key range. It is especially useful for:\n\n- **Systematic scanning** of a defined keyspace range (e.g., for key recovery or cryptographic research)\n- **Batch processing** optimized for GPU/OpenCL parallelization\n- Ensuring **deterministic and reproducible key generation** from start to end\n\n---\n\n#### Configuration Fields\n| JSON field     | Type   | Default                                                                                    | Purpose                                                      |\n|----------------|--------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------|\n| `startAddress` | string | `0000000000000000000000000000000000000000000000000000000000000002`                         | Hex string of the first private key in the range (inclusive) |\n| `endAddress`   | string | `FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141` (secp256k1 group order) | Hex string of the last private key in the range (inclusive)  |\n\n#### How it works\n- Scanning begins **at `startAddress`**, producing sequential private keys in batches of size `batchSize`, up to and including `endAddress`.\n- Each batch contains exactly `batchSize` keys.\n- If the next full batch would go **beyond `endAddress`**, the process stops with an **exception**.\n- The **`endAddress` is inclusive**, but **partial batches are not allowed by default** — batches must fit completely inside the range.\n- For optimal performance, especially with OpenCL, configure `batchSize` and your GPU's grid size so that batches align perfectly within the range. This prevents errors and maximizes throughput.\n\n> **Note:** If unsure, set the `endAddress` slightly higher to closely match the batch size. This helps avoid exceptions and ensures efficient scanning.\n\n---\n\n#### Example JSON Configuration\nExample minimal configuration:\n\n```json\n...\n{\n  \"keyProducerJavaIncremental\": [\n    {\n      \"keyProducerId\": \"exampleKeyProducerId\",\n      \"startAddress\": \"0000000000000000000000000000000000000000000000000000000000000002\",\n      \"endAddress\": \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\"\n    }\n  ]\n}\n...\n```\n\n🧩 This configuration incrementally searches a defined range of private keys. It is particularly suited for brute-force challenges, such as the [71st Bitcoin puzzle transaction](https://privatekeys.pw/puzzles/bitcoin-puzzle-tx?status=unsolved#p71).  \nThe private key range is specified by two 64-character hex strings: `startAddress` and `endAddress`.\n\n```json\n...\n\"keyProducerJavaIncremental\": [\n    {\n      \"keyProducerId\": \"exampleKeyProducerJavaIncremental\",\n      \"startAddress\": \"0000000000000000000000000000000000000000000000400000000000000000\",\n      \"endAddress\":   \"00000000000000000000000000000000000000000000007fffffffffffffffff\"\n    }\n],\n...\n```\n\n#### 🌐 `SOCKET_STREAM` (key producer java socket)  \nRead raw private keys from a TCP socket stream (client or server mode).  \nUseful for piping externally generated secrets (e.g., from Python, Go, etc.) directly into the finder.\n\n| JSON Field                    | Type                             | Default       | Description                                                                         |\n|-------------------------------|----------------------------------|---------------|-------------------------------------------------------------------------------------|\n| `keyProducerId`               | string                           | —             | Unique identifier for this key producer                                             |\n| `mode`                        | string enum (`CLIENT`, `SERVER`) | `\"SERVER\"`    | Whether to connect to a remote socket (`CLIENT`) or wait for connections (`SERVER`) |\n| `host`                        | string                           | `\"localhost\"` | Remote host to connect to (used only in `CLIENT` mode)                              |\n| `port`                        | number                           | `12345`       | TCP port to connect to or bind on                                                   |\n| `timeout`                     | number                           | `3000`        | Socket read timeout in milliseconds                                                 |\n| `logReceivedSecret`           | boolean                          | `false`       | Whether to log each received private key as a hex string                            |\n| `connectionRetryCount`        | number                           | `5`           | Number of times to retry establishing a socket connection                           |\n| `retryDelayMillisConnect`     | number                           | `1000`        | Delay between connection retry attempts (in milliseconds)                           |\n| `readRetryCount`              | number                           | `3`           | Number of attempts to retry reading a full secret after I/O failure                 |\n| `retryDelayMillisRead`        | number                           | `1000`        | Delay between read retry attempts (in milliseconds)                                 |\n| `readPartialRetryCount`       | number                           | `5`           | Number of retries when partially reading a single 32-byte secret                    |\n| `readPartialRetryDelayMillis` | number                           | `20`          | Delay between partial read retries (in milliseconds)                                |\n| `maxWorkSize`                 | number                           | `16777216`    | Maximum number of secrets to request in a single call                               |\n\n\nMinimal:\n```json\n...\n\"keyProducerJavaSocket\": [\n    {\n        \"keyProducerId\": \"exampleKeyProducerId\",\n        \"host\": \"localhost\",\n        \"port\": 12345,\n        \"mode\": \"SERVER\"\n    }\n],\n...\n```\n\nFull:\n```json\n...\n\"keyProducerJavaSocket\": [\n    {\n        \"keyProducerId\": \"exampleKeyProducerId\",\n        \"host\": \"localhost\",\n        \"port\": 12345,\n        \"mode\": \"SERVER\",\n        \"timeout\": 3000,\n        \"logReceivedSecret\": true,\n        \"connectionRetryCount\": 5,\n        \"retryDelayMillisConnect\": 1000,\n        \"readRetryCount\": 5,\n        \"retryDelayMillisRead\": 1000,\n        \"readPartialRetryCount\": 5,\n        \"readPartialRetryDelayMillis\": 20,\n        \"maxWorkSize\": 16777216\n    }\n],\n...\n```\n\n##### Example: Python Socket Stream Server:\n```python\nimport socket\nimport os\nimport time\nimport binascii\n\nHOST = 'localhost'\nPORT = 12345\n\nwhile True:\n    try:\n        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:\n            s.connect((HOST, PORT))\n            print(f\"Connected to {HOST}:{PORT}\")\n            while True:\n                private_key = os.urandom(32)\n                print(\"Sending key:\", binascii.hexlify(private_key).decode())\n                s.sendall(private_key)\n                time.sleep(1.0) # Slight delay to avoid flooding\n    except ConnectionRefusedError:\n        print(\"Connection refused, retrying in 1 second...\")\n        time.sleep(1)\n    except BrokenPipeError:\n        print(\"Connection lost, reconnecting...\")\n        time.sleep(1)\n```\n\n##### 🔄 Protocol\n* Each private key must be exactly 32 raw bytes, sent binary, with no delimiter or framing.\n* Keys are interpreted as big-endian (new BigInteger(1, bytes) in Java).\n* Sending fewer than 32 bytes will cause blocking or exceptions.\n\n#### 🌐 `SOCKET_STREAM` (key producer via ZeroMQ)\nReceive raw private keys via a ZeroMQ `PULL` socket.\nIdeal for decoupled key streaming where producers push keys using ZeroMQ `PUSH` sockets.\n\n| JSON field         | Type                         | Default                | Description                                 |\n|--------------------|------------------------------|------------------------|---------------------------------------------|\n| keyProducerId      | string                       | —                      | Unique identifier for this key producer     |\n| address            | string                       | tcp://localhost:5555   | The ZeroMQ address to bind or connect to    |\n| mode               | string enum (BIND, CONNECT)  | BIND                   | Whether this socket binds to or connects    |\n| timeout            | number                       | `-1`                   | Receive timeout in milliseconds:<br> `0` = non-blocking,<br> `-1` = infinite,<br> `>0` = wait that long |\n| logReceivedSecret  | boolean                      | false                  | Whether to log each received secret in hex  |\n\nMinimal:\n```json\n...\n\"keyProducerJavaZmq\": [\n    {\n        \"keyProducerId\": \"exampleKeyProducerId\",\n        \"address\": \"tcp://localhost:5555\"\n    }\n],\n...\n```\n\nFull:\n```json\n...\n\"keyProducerJavaZmq\": [\n    {\n        \"keyProducerId\": \"exampleKeyProducerId\",\n        \"address\": \"tcp://localhost:5555\",\n        \"mode\": \"BIND\",\n        \"timeout\": -1,\n        \"logReceivedSecret\": true\n    }\n],\n...\n```\n\n\n##### Example: Python Socket Stream Server:\n```python\nimport zmq\nimport os\nimport time\nimport binascii\nfrom enum import Enum\n\nclass Mode(Enum):\n    CONNECT = \"connect\"\n    BIND = \"bind\"\n\nADDRESS = \"tcp://localhost:5555\"\nMODE = Mode.CONNECT  # Change to Mode.BIND to switch\n\ncontext = zmq.Context()\n\nwhile True:\n    try:\n        socket = context.socket(zmq.PUSH)\n        socket.setsockopt(zmq.SNDHWM, 1) # Limit send queue to 1 message\n\n        if MODE == Mode.BIND:\n            socket.bind(ADDRESS)\n            print(f\"Bound to {ADDRESS}\")\n        else:\n            socket.connect(ADDRESS)\n            print(f\"Connected to {ADDRESS}\")\n\n        while True:\n            private_key = os.urandom(32)\n            print(\"Sending key:\", binascii.hexlify(private_key).decode())\n            try:\n                socket.send(private_key, flags=zmq.NOBLOCK)\n            except zmq.Again:\n                print(\"Send queue full, message not sent.\")\n            time.sleep(1.0) # Slight delay to avoid flooding\n\n    except zmq.ZMQError as e:\n        print(f\"ZMQ error occurred: {e}, retrying in 1 second...\")\n        time.sleep(1)\n\n    finally:\n        try:\n            socket.close()\n        except:\n            pass\n```\n\n##### 🔄 Protocol\n* Each private key must be exactly 32 raw bytes, sent as a single ZeroMQ message.\n* Messages are interpreted as unsigned big-endian (`new BigInteger(1, bytes)` in Java).\n* No framing or delimiters needed—ZeroMQ handles message boundaries.\n* Messages larger or smaller than 32 bytes will be discarded or raise errors.\n\n\n### Mixed Modes\nYou can combine **vanity address generation** with **database lookups** to enhance functionality and efficiency.\n\nFor example:\n- Search for personalized (vanity) addresses using custom patterns **and**\n- Simultaneously check if the generated addresses already **exist in the LMDB** database\n\nThis hybrid mode allows you to find rare or meaningful addresses while ensuring they haven’t been used before.\n\n### Key Range\n\nYou can define a custom key range for private key generation—for example, limiting the search space to 64-bit keys.  \nIn this setup, the first 192 bits (256-bit - 64-bit) of the key are zeroed, effectively restricting the generation to a specific portion of the keyspace.\n\nThis feature can be used for:\n\n- **Targeted key recovery**, such as searching for private keys from known ranges like the [Bitcoin Puzzle Transaction](https://privatekeys.pw/puzzles/bitcoin-puzzle-tx)\n- **Verification and testing**, to prove that the software functions correctly within a predictable key range\n\n### OpenCL Acceleration\n\nTo significantly boost the performance of EC key generation, the software supports OpenCL-based parallelization.\n\nA shared secret (base key) is transferred to the OpenCL device along with a predefined grid size. Each OpenCL thread independently derives a unique EC key by incrementing the base key with its thread ID. This allows the generation of a batch of EC keys in a single execution cycle. Once generated, the keys are transferred back to the host (CPU) memory for further processing.\n\nThe CPU then hashes the X and Y coordinates of the public keys to derive the corresponding (Bitcoin/Altcoin) addresses. This division of labor offloads the computationally expensive elliptic curve operations to the GPU, allowing the CPU to focus on faster address hashing and database lookup operations—resulting in improved overall throughput.\n\n#### Built-in Self-Test (BIST)\n\nThe OpenCL backend includes a built-in self-test mechanism that cross-verifies results from the GPU against a CPU-generated reference. This ensures that the OpenCL device is functioning correctly and producing valid EC keys—giving end users confidence in the reliability of their hardware-accelerated address search.\n> 💡 **Hint:** To enable the built-in self-test, make sure the following configuration flag is set to `true`:  \n> ```json\n> \"runtimePublicKeyCalculationCheck\": true\n> ```  \n> This option is disabled by default. Enabling it is especially useful during development, debugging, or when validating new hardware setups.\n\n#### ⚠️ BIP-39 Deterministic Keys and Batch Mode Limitation\n\nIf you configure a **BIP-39 key producer** (e.g. `keyProducerJavaBip39`) together with OpenCL acceleration, please read this carefully.\n\nThe BIP-39 key producer creates **deterministic private keys** derived from your mnemonic, passphrase, and BIP32 path.  \nThis derivation space is **finite** — once all child keys along the defined path are exhausted, the producer will throw  \na `NoMoreSecretsAvailableException`. This can happen relatively quickly in GPU batch configurations.\n\nIn your JSON configuration, you may have enabled:\n\n```java\n/**\n * The batch mode will use a private key increment internal to increase the performance.\n */\npublic boolean batchUsePrivateKeyIncrement = true;\n```\n\nWhen `batchUsePrivateKeyIncrement` is set to `true`, the OpenCL producer calls:\n\n```java\nsecrets = keyProducer.createSecrets(cProducer.getOverallWorkSize(bitHelper), cProducer.batchUsePrivateKeyIncrement);\n```\n\nInternally this sets `returnStartSecretOnly = true`, meaning that **only the first BIP-39-derived key** is passed to the GPU.  \nThe OpenCL kernel then uses that single key as a **base key**, incrementing the **least significant bits (LSB)** in parallel across all GPU threads to explore adjacent keyspaces.\n\n> ⚠️ **Use extreme caution:**  \n> - The effective search space on the GPU is *not* the same as the full BIP-39 derivation sequence.  \n> - This mode is intended purely for experimental or high-performance batch testing — not for full HD-wallet traversal.  \n> - Once all deterministic child keys are consumed, a `NoMoreSecretsAvailableException` will occur.\n\nFor technical details, see:\n- [`KeyProducerJavaBip39.java`](https://github.com/bernardladenthin/BitcoinAddressFinder/blob/main/src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaBip39.java)\n- [`BIP39KeyProducer.java`](https://github.com/bernardladenthin/BitcoinAddressFinder/blob/main/src/main/java/net/ladenthin/bitcoinaddressfinder/BIP39KeyProducer.java#L46)\n\n\n#### Performance Benchmarks\n\n> **Note:** OpenCL generates uncompressed keys. Compressed keys can be derived from uncompressed ones with minimal overhead.\n\n| GPU Model                   | CPU                 | Key Range (Bits) | Grid Size (Bits) | Effective Keys/s (~)   |\n|-----------------------------|---------------------|------------------|------------------|------------------------|\n| AMD Radeon RX 7900 XTX      | AMD Ryzen 7 9800X3D | 160              | 19               | 15,000,000 keys/s      |\n| AMD Radeon RX 7900 XTX      | AMD Ryzen 7 9800X3D | 256              | 19               | 11,000,000 keys/s      |\n| NVIDIA RTX 3070 Laptop      | AMD Ryzen 7 5800H   | 160              | 19               |  6,000,000 keys/s      |\n| NVIDIA RTX 3070 Laptop      | AMD Ryzen 7 5800H   | 256              | 19               |  4,000,000 keys/s      |\n| NVIDIA RTX 3090             | AMD Ryzen 9 3950X   | 160              | 19               | 11,000,000 keys/s      |\n| NVIDIA RTX 3090             | AMD Ryzen 9 3950X   | 256              | 19               |  8,000,000 keys/s      |\n| NVIDIA RTX A3000            | Intel i7-11850H     | 256              | 19               |  3,000,000 keys/s      |\n| NVIDIA RTX A3000            | Intel i7-11850H     | 160              | 19               |  5,000,000 keys/s      |\n| AMD Radeon 8060S            | AMD AI MAX+ 395     | 256              | 16               |  9,200,000 keys/s      |\n| AMD Radeon 8060S            | AMD AI MAX+ 395     | 160              | 16               | 11,000,000 keys/s      |\n\n\n## Collision Probability and Security Considerations\n\n> Isn't it impossible to find collisions?\n\nThe likelihood of discovering a collision—two different inputs that produce the same output hash—is **astronomically low** when using secure cryptographic functions like **SHA-256** and **RIPEMD-160**, which are employed in Bitcoin address generation.\n\nHowever, discussions around potential vulnerabilities, theoretical attacks, or edge cases exist in the cryptography and Bitcoin communities.\n\nFor more in-depth information on collision resistance, address reuse risks, and cryptographic hash functions, refer to the following resources:\n\n- [How to deal with collisions in Bitcoin addresses – Crypto StackExchange](https://crypto.stackexchange.com/questions/33821/how-to-deal-with-collisions-in-bitcoin-addresses)\n- [Why haven't any SHA-256 collisions been found yet? – Crypto StackExchange](https://crypto.stackexchange.com/questions/47809/why-havent-any-sha-256-collisions-been-found-yet)\n- [bitcoin-wallet-finder – Results and discussion](https://github.com/treyyoder/bitcoin-wallet-finder#results)\n- [PKGenerator_Checker – Instructions](https://github.com/Frankenmint/PKGenerator_Checker#instructions)\n- [BitBruteForce-Wallet – Requirements and usage](https://github.com/Xefrok/BitBruteForce-Wallet#requeriments)\n- [New Records in Collision Attacks on RIPEMD-160 and SHA-256 (ePrint 2023/285)](https://eprint.iacr.org/2023/285) – Li et al. present new records in collision attacks: 40-step RIPEMD-160 and 39-step semi-free-start SHA-256. Both hash functions are fundamental to Bitcoin address generation.\n\n### ⚠️ Security Advisory: Android RNG Vulnerability (2013) and Simulation via BitcoinAddressFinder\nIn 2013, a serious vulnerability was discovered in Android’s `SecureRandom` implementation. It caused Bitcoin private keys to be exposed due to reused or predictable random values during ECDSA signature creation. This problem affected many wallet apps that generated keys directly on Android devices.\n\nBitcoinAddressFinder can be used to simulate and analyze this type of attack. With small changes, it can reproduce faulty random number generators by:\n* using fixed or repeating `k` values\n* limiting entropy to 16, 32, or 64 bits\n* replacing the secure RNG with a weak or deterministic version\n\nThis makes it possible to test and study:\n* how r-collisions happen in ECDSA signatures\n* how easy it is to find reused `k` values\n* how quickly a private key can be recovered\n* how secure different RNG implementations really are\n\nBitcoinAddressFinder can generate millions of key pairs quickly. This allows researchers to create and scan large keyspaces under controlled RNG conditions. All results can be verified using the built-in self-test feature or compared against known addresses in the LMDB database.\n\nThis kind of simulation is useful for:\n* learning about signature security\n* building training examples for audits or courses\n* checking RNG quality in real wallets or custom apps\n\nReferences:\n* [Wikipedia: RNG Attack](https://en.wikipedia.org/wiki/Random_number_generator_attack)\n* [Crypto.SE: Android SecureRandom + r-Collisions](https://crypto.stackexchange.com/questions/9694/technical-details-of-attack-on-android-bitcoin-usage-of-securerandom)\n* [The Register: Android Bug Batters Wallets](https://www.theregister.com/2013/08/12/android_bug_batters_bitcoin_wallets/)\n* [Google Blog: SecureRandom Fixes](https://android-developers.googleblog.com/2013/08/some-securerandom-thoughts.html)\n* [bitcoin.org Alert (2013-08-11)](https://bitcoin.org/en/alert/2013-08-11-android)\n\n### Example: Weak RNG in an embedded Ethereum wallet (TinyMT32 seeded from `micros()`)\n\nIssue: https://github.com/AlphaWallet/Web3E/issues/31\n\nCredits / Found by Jean-Philippe Aumasson: https://github.com/veorq\n\n`KeyID::generatePrivateKey()` relies on `random_buffer()`, which uses `tinyMT32` as its PRNG. The PRNG is initialized only once using a 32-bit seed derived from `micros()`.\n\nThis is *not a cryptographically secure RNG,* and the 32-bit timer seed makes the generated private keys predictable and brute-forceable. All keys produced by the current implementation are vulnerable. A hardware CSPRNG or proper DRBG must be used instead.\n\nLinks:\n* https://github.com/AlphaWallet/Web3E/blob/c19324cc209b11fd4389d1c782a7e6ffbc391cfb/src/KeyID.cpp#L48-L50\n* https://github.com/AlphaWallet/Web3E/blob/c19324cc209b11fd4389d1c782a7e6ffbc391cfb/src/Trezor/rand.c#L362-L364\n\nAlthough this vulnerability originates from an **Ethereum-based embedded wallet**, it demonstrates the same class of weaknesses relevant to Bitcoin and all ECDSA-based systems: **private keys generated from low-entropy or predictable random sources**.\n\nIn this implementation, the wallet uses `TinyMT32` as its PRNG and seeds it only once with a 32-bit microsecond timer:\n\n```tinymt32_init(&tinymt, (uint32_t)micros());```\n\nTinyMT32 is *not* a cryptographically secure RNG, and seeding it with a 32-bit timestamp collapses the effective key space from 2²⁵⁶ to only 2³² possible seeds. An attacker who can approximate the device’s boot time can brute-force all feasible seeds, reproduce the PRNG stream, and reconstruct the wallet’s private keys.\n\nThis resembles the historic Android `SecureRandom` vulnerability: the elliptic-curve cryptography itself is secure, but the **randomness used to create keys is not**.\n\nBitcoinAddressFinder can simulate this type of scenario by generating keys using intentionally weak or deterministic RNGs and scanning the resulting restricted key ranges. This makes it possible to study how insecure RNGs can compromise wallets.\n\n## Similar projects\n* The [LBC](https://lbc.cryptoguru.org/) is optimized to find keys for the [Bitcoin Puzzle Transaction](https://privatekeys.pw/puzzles/bitcoin-puzzle-tx). It require communication to a server, doesn't support altcoin and pattern matching.\n* https://privatekeys.pw/scanner/bitcoin\n* https://allprivatekeys.com/get-lucky\n* https://allprivatekeys.com/vanity-address\n* https://github.com/treyyoder/bitcoin-wallet-finder\n* https://github.com/albertobsd/keyhunt\n* https://github.com/mvrc42/bitp0wn\n* https://github.com/JeanLucPons/BTCCollider\n* https://github.com/JeanLucPons/VanitySearch\n* https://github.com/JamieAcharya/Bitcoin-Private-Key-Finder\n* https://github.com/mingfunwong/all-bitcoin-private-key\n* https://github.com/Frankenmint/PKGenerator_Checker\n* https://github.com/Henshall/BitcoinPrivateKeyHunter\n* https://github.com/Xefrok/BitBruteForce-Wallet\n* https://github.com/Isaacdelly/Plutus\n* https://github.com/Noname400/Hunt-to-Mnemonic\n* https://github.com/Py-Project/Bitcoin-wallet-cracker\n* https://github.com/johncantrell97/bip39-solver-gpu\n* https://github.com/ilkerccom/bitcrackrandomiser\n* https://btcpuzzle.info/\n\n### Deep learning private key prediction\nAn export of the full database can be used to predict private keys with deep learning. A funny idea: https://github.com/DRSZL/BitcoinTensorFlowPrivateKeyPrediction\n\n## Learn more\n* https://learnmeabitcoin.com/technical/keys/public-key/\n\n## Known Issues\n\n### Hybrid Graphics Performance (Low Throughput)\n\nLaptops with hybrid graphics—using both integrated (iGPU) and discrete (dGPU) GPUs—may suffer from significantly reduced performance when running compute-intensive OpenCL workloads like BitcoinAddressFinder. This is often due to:\n\n- Shared memory between CPU and GPU\n- Bandwidth limitations\n- Automatic GPU switching (e.g., NVIDIA Optimus, AMD Enduro)\n- Suboptimal GPU selection by drivers\n\n#### Affected Devices and Recommendations\n\n| Manufacturer       | Affected Series/Models                          | Recommendation                           |\n|--------------------|--------------------------------------------------|------------------------------------------|\n| **HP**             | ZBook G3, G4, G5, G7                             | Enter BIOS → set **Graphics** to *Discrete Only* |\n| **Lenovo**         | ThinkPad X, T, and P Series (hybrid configs)     | Use **Lenovo Vantage** → Disable Hybrid Graphics |\n| **Dell**           | Inspiron, XPS, Precision (with Optimus)          | BIOS → Disable Hybrid Mode (if available) |\n| **MSI**            | Gaming laptops with switchable graphics          | Use **Dragon Center** to select dGPU     |\n| **Razer**          | Blade models with NVIDIA Optimus                 | Use **Razer Synapse** to enforce dGPU use |\n| **Apple (Intel)**  | MacBook Pro (pre-2021 with dual GPUs)            | macOS → Disable *Automatic Graphics Switching* in Energy Preferences |\n\n> If your laptop uses hybrid graphics, always ensure that the **discrete GPU** is explicitly selected for OpenCL workloads to avoid severe performance bottlenecks.\n\n## Future improvements\n- Refactor the entire key generation infrastructure to support a key provider. This provider should be configurable to supply private keys from various sources, such as Random, Secrets File, Key Range, and others. All consumers should retrieve keys from this provider.\n\n### KeyProvider\n- Key generation within a specific key range. See #27\nWished from themaster:\n```\n\"privateKeyStartHex\" : \"0000000000000000000000000000000000000000000000037e26d5b1f3afe216\"\n\"privateKeyEndHex\" : \"0000000000000000000000000000000000000000000000037e26d5b1ffffffff\"\n```\nWished from Ulugbek:\n```\n// Search started from given address. Would be nice if it can save last position...\n\"sequentalSearch\" : true,\n\"startAddress\" : xxxxxxxx,\n\n// Random search with batches, here 100000. I,e. some random number is found and after 100000 sequental addresses should be checked.\n\"searchAsBatches\" : true,\n\"searchBatchQuantity\" : 100000,\n\n\n// Random search within Address Space, with batches, here 100000.\n\"searchAsBatches\" : true,\n\"searchAddressStart\" : xxxxxxx,\n\"searchAddressEnd\" : xxxxxxxy,\n\"searchBatchQuantity\" : 100000\n```\n\n- Incomplete Seed-Phrase as Private KeyProvider. Wished from @mirasu See #38\n- Socket KeyProvider for independend KeyProvider via byte protocol\n  - Ideas might be a screen recorder and use the visible screen downscaled as 256 bit input\n- KeyProvider must get the grid size to increment properly on incremental based Producer\n- ExecutableKeyProvider gets data from stdout\n\n-----\n\n\n## Legal\n\n**BitcoinAddressFinder is not intended for malicious use**, and **you are solely responsible** for complying with your local laws, international regulations, and ethical standards.\n\nThis software must **not** be configured or used to attempt unauthorized access to cryptocurrency assets (e.g., scanning for RIPEMD-160 address collisions to gain access to third-party funds).  \nSuch activities are likely illegal in most jurisdictions and may carry serious penalties.\n\n---\n\n### ✅ Permitted Use Cases\n\nYou may use BitcoinAddressFinder for legitimate and research-focused purposes, such as:\n\n- **Recovering lost private keys** associated with your own known public addresses\n- Verifying whether generated addresses have ever been used to **prevent collisions**\n- Running **performance benchmarks** and OpenCL testing\n- Generating **vanity addresses** for personal or demonstrative use\n- Conducting **offline cryptographic research** and educational exploration\n\n---\n\n### 🚫 Prohibited Use Cases\n\nYou must not use this tool for:\n\n- **Gaining unauthorized access to cryptocurrency or wallet funds**\n- Circumventing access controls or exploiting systems\n- Engaging in unethical behavior or violating terms of service\n\n---\n\n### Legal References by Jurisdiction\n\nBelow is a non-exhaustive collection of legal frameworks that **may** apply depending on your jurisdiction.\n\n> ⚠️ **Important Note**: The following information is provided for informational purposes only and **does not constitute legal advice**.  \n> You should always consult with a **qualified legal professional** before engaging in any activity related to cryptographic systems or asset recovery.  \n> I merely present relevant legal context, not binding interpretations or actionable recommendations.\n\n#### Germany\n\n- **§ 202c StGB** – *Vorbereiten des Ausspähens und Abfangens von Daten*  \n  (Preparation of spying or intercepting data)\n- **OLG Braunschweig, Beschluss vom 18.09.2024 – 1 Ws 185/24**  \n  In einem aufsehenerregenden Fall entschied das OLG, dass der Zugriff auf eine Wallet mittels eines bekannten (nicht rechtswidrig erlangten) Seeds **nicht** als Straftat im Sinne der §§ 202a, 263a oder 303a StGB gewertet werden kann.  \n  Der Angeklagte hatte eine Wallet für einen Dritten erstellt und sich später mittels der Seed-Phrase Zugriff auf Token im Wert von rund 2,5 Mio. € verschafft.  \n  Das Gericht urteilte jedoch:\n\n  - **Kein Diebstahl**: Kryptowährungen sind keine „Sachen“ im Sinne des § 242 StGB.  \n  - **Kein Ausspähen von Daten (§ 202a StGB)**: Der Zugriff mittels bekannter Passwörter ist kein *Überwinden* einer Zugangssicherung.  \n  - **Kein Computerbetrug (§ 263a StGB)**: Eine Krypto-Transaktion impliziert keine „Täuschung“ oder „Miterklärung einer Berechtigung“.  \n  - **Keine Datenveränderung (§ 303a StGB)**: Die eigentliche Änderung erfolgt durch die Blockchain-Netzwerkbetreiber – nicht durch den User selbst.\n\n  > 🔍 Fazit: Der *„Kryptodiebstahl“* per bekanntem Seed ist unter Umständen **nicht strafbar** – bleibt aber **zivilrechtlich angreifbar**.  \n  > Quelle: [OLG Braunschweig Beschluss 1 Ws 185/24 (juris.de)](https://www.juris.de/static/infodienst/autoren/D_NJRE001604034.htm)  \n  > Bericht: [heise.de Artikel vom 11.07.2025](https://www.heise.de/news/Oberlandesgericht-Virtuelle-Entwendung-von-Kryptowerten-bleibt-straflos-10484771.html)\n\n#### United States\n\n- **Computer Fraud and Abuse Act (CFAA)**  \n  Prohibits unauthorized access to protected computers, including use of tools for circumvention\n\n- **Digital Millennium Copyright Act (DMCA)**  \n  Sections on anti-circumvention tools and reverse engineering may apply in specific contexts\n\n#### European Union\n\n- **General Data Protection Regulation (GDPR)**  \n  While not directly related, use of personally identifiable data or address targeting must comply\n\n- **Directive 2013/40/EU** on Attacks Against Information Systems  \n  Criminalizes the creation or possession of tools designed for unauthorized access\n\n#### Other Notable References\n\n- **UK**: Computer Misuse Act 1990  \n- **Canada**: Criminal Code Sections 342.1 & 430  \n- **Australia**: Criminal Code Act 1995 – Part 10.7 – Computer Offences\n\n---\n\n> ⚠️ The authors and maintainers of BitcoinAddressFinder assume **no responsibility** for how the tool is used.  \n> It is your duty to ensure compliance with all relevant legal and ethical standards in your country and jurisdiction.\n\nIf in doubt, consult with a legal professional before using this software for anything beyond educational or personal purposes.\n\n## License\n\nIt is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.\nSome subprojects have a different license.\n\nThis package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/bernardladenthin/BitcoinAddressFinder) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbernardladenthin%2FBitcoinAddressFinder.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbernardladenthin%2FBitcoinAddressFinder?ref=badge_large)\n"
  },
  {
    "path": "TEST_WRITING_GUIDE.md",
    "content": "# Unit Test Writing Guide — BitcoinAddressFinder (Project-Specific Supplement)\n\nThis guide contains **project-specific** test conventions that supplement the generic Java TDD skill (`.claude/skills/java-tdd-guide.md`). For general test conventions (AAA structure, Hamcrest assertions, editor folds, naming, data providers, etc.), refer to the generic guide.\n\n---\n\n## 1. Custom Marker Annotations\n\nApply the appropriate marker annotation alongside `@Test` when applicable:\n\n| Annotation | When to use |\n|---|---|\n| `@AwaitTimeTest` | Test involves timing assertions (`Duration.ofMillis`, `greaterThan`) |\n| `@ToStringTest` | Test validates a `toString()` implementation |\n| `@OpenCLTest` | Test requires an OpenCL-capable device |\n\nExample:\n\n```java\n@ToStringTest\n@Test\npublic void toString_whenCalled_containsClassNameAndIdentityHash() {\n    // ...\n    assertThat(output, matchesPattern(\"ProducerJava@\\\\p{XDigit}+\"));\n}\n```\n\n---\n\n## 2. Timing / Await Tests\n\nTests that assert on timing durations must:\n1. Be annotated with `@AwaitTimeTest`.\n2. Use `AwaitTimeTests.AWAIT_DURATION` (20 s) as the configurable duration.\n3. Use `AwaitTimeTests.IMPRECISION` (2 s) as the tolerance.\n4. Override the static constant before the test runs.\n\n```java\n@AwaitTimeTest\n@Test\npublic void interrupt_keysQueueNotEmpty_waitedForDuration()\n        throws IOException, InterruptedException {\n    ConsumerJava.AWAIT_DURATION_QUEUE_EMPTY = AwaitTimeTests.AWAIT_DURATION;\n\n    // ... arrange ...\n\n    long beforeAct = System.currentTimeMillis();\n    consumerJava.interrupt();\n    long afterAct = System.currentTimeMillis();\n\n    Duration waitTime = Duration.ofMillis(afterAct - beforeAct);\n\n    assertThat(waitTime, is(greaterThan(\n        ConsumerJava.AWAIT_DURATION_QUEUE_EMPTY.minus(AwaitTimeTests.IMPRECISION)\n    )));\n}\n```\n\n---\n\n## 3. Static Address Constants — Never Hard-Code Raw Strings\n\nUse the static address enums and helper classes for test data:\n\n| Class | Purpose |\n|---|---|\n| `StaticKey` | A single known private key with all derived forms |\n| `TestAddresses42` | A set of addresses derived from seed 42 |\n| `TestAddresses1337` | A set of addresses derived from seed 1337 |\n| `P2PKH` enum | Known valid P2PKH public addresses with expected hashes |\n| `P2SH` enum | Known valid P2SH script hash addresses |\n| `P2WPKH` enum | Known valid native SegWit addresses |\n| `StaticUnsupportedAddress` enum | Addresses that must be rejected |\n\n---\n\n## 4. Platform Assumptions\n\nTests that require a specific platform conditionally skip using assume classes:\n\n```java\n@OpenCLTest\n@Test\npublic void build_oneOpenCLDevice_returnsPlatformWithDevice() {\n    new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n    // test body\n}\n```\n\nAvailable assume classes:\n- `OpenCLPlatformAssume` — OpenCL GPU device required\n- `LMDBPlatformAssume` — LMDB native library required\n- `PlatformAssume` — generic OS assumptions\n\n---\n\n## 5. OpenCL Tests\n\n### When `@OpenCLTest` + assume IS required\n\nA test must be annotated with `@OpenCLTest` and call `assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable()` as its **first statement** when the test body invokes OpenCL API functions:\n\n- `CL.stringFor_*` or any `CL.*` native call\n- `OpenCLBuilder.build()` or methods that load/query the OpenCL runtime\n- Any code path triggering native library loading\n\n**Rules:**\n- Annotate with `@OpenCLTest`.\n- Call assume as the **first statement**.\n- Do not gate the entire class — only gate individual methods.\n\n### When `@OpenCLTest` + assume is NOT required\n\nTests that **only** use JOCL wrapper types (`cl_device_id`, `cl_context_properties`, `cl_platform_id`) as plain Java objects — without calling native OpenCL API functions — do **not** need `@OpenCLTest`.\n\n**Decision rule:** \"Does this test call any method that invokes a native OpenCL function?\" If yes → `@OpenCLTest` + assume. If no → no annotation needed.\n\n---\n\n## 6. LMDB / File System Tests\n\nUse project-specific helpers for LMDB test databases:\n\n```java\nTestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\nTestAddressesFiles testAddresses = new TestAddressesFiles(compressed);\nFile lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, useStaticAmount, false);\n```\n\nFor tests that share LMDB setup, extend `LMDBBase`:\n\n```java\npublic class MyLMDBTest extends LMDBBase {\n    // LMDBBase provides: @Rule folder, network, keyUtility, and LMDB helpers\n}\n```\n\n---\n\n## 7. Shared Test Fields\n\nCommon shared fields for BitcoinAddressFinder tests:\n\n```java\nprivate final Network network = new NetworkParameterFactory().getNetwork();\nprivate final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\nprivate final BitHelper bitHelper = new BitHelper();\n```\n\n---\n\n## 8. Producer Tests\n\nTests for `Producer` subclasses can extend `AbstractProducerTest` which provides shared verify helpers:\n\n```java\nAbstractProducerTest.verifyInitProducer(producer);\nAbstractProducerTest.verifyReleaseProducer(producer);\n```\n\n---\n\n## 9. Socket Test Utilities\n\n- Use `TestTimeProvider` constants for socket timeouts:\n  ```java\n  config.timeout = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;\n  config.readRetryCount = TestTimeProvider.DEFAULT_RETRY_COUNT;\n  ```\n- Use `ConnectionUtils.waitUntilTcpPortOpen(...)` for server readiness checks.\n\n---\n\n## 10. Accessing Test Resources\n\nUse `Path.of(\"src\",\"test\",\"resources\")` to locate test resource files:\n\n```java\nprivate final Path resourceDirectory = Path.of(\"src\", \"test\", \"resources\");\nprivate final Path testRoundtripDirectory = resourceDirectory.resolve(\"roundtrip\");\nprivate final Path configFile = testRoundtripDirectory.resolve(\"config_AddressFilesToLMDB.json\");\n```\n"
  },
  {
    "path": "build.bat",
    "content": "call mvn clean\r\ncall mvn compile test assembly:single"
  },
  {
    "path": "examples/addresses/fileContainingAddresses0.txt",
    "content": "# comment\r\n12R4kPeSK6i9427ctH15j2NcJ1ST1FT21C,0\r\n13z55AGS14pSPiPpMqAAFHb576tSmSmR77,1\r\n14rDamyE53BNLPSj4cku6ZXiW6xbBdMJ97,2\r\n15ArtCgi3wmpQAAfYx4riaFmo4prJA4VsK,3\r\n"
  },
  {
    "path": "examples/addresses/fileContainingAddresses1.tsv",
    "content": "# comment\r\n15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC;1337\r\n17LYqSzhuWksgoGsgakiWBG8PmbCKyrrac;1337\r\n17RTTUAiiPqUTKtEggJPec8RxLMi2n9EZ9;1337\r\n"
  },
  {
    "path": "examples/addresses/fileContainingAddresses2.csv",
    "content": "# comment\r\n17aDRzRQK8ccBLVBzsms3ZasVKc9q3o3Qk\r\n18LDvu2nqr8a5AK9AHkkqDK6Z65dzbTgtn\r\n1966U1pjj15tLxPXZ19U48c99EJDkdXeqb\r\n"
  },
  {
    "path": "examples/config_AddressFilesToLMDB.json",
    "content": "{\r\n  \"command\": \"AddressFilesToLMDB\",\r\n  \"addressFilesToLMDB\": {\r\n    \"addressesFiles\": [\r\n      \"addresses/fileContainingAddresses0.txt\",\r\n      \"addresses/fileContainingAddresses1.tsv\",\r\n      \"addresses/fileContainingAddresses2.csv\"\r\n    ],\r\n    \"lmdbConfigurationWrite\": {\r\n      \"initialMapSizeInMiB\": 16,\r\n      \"deleteEmptyAddresses\": false,\r\n      \"staticAmount\": 0,\r\n      \"useStaticAmount\": true,\r\n      \"increaseMapAutomatically\": true,\r\n      \"increaseSizeInMiB\": 1,\r\n      \"lmdbDirectory\": \"lmdb\",\r\n      \"useProxyOptimal\": true,\r\n      \"logStatsOnInit\": true,\r\n      \"logStatsOnClose\": true,\r\n      \"loadToMemoryCacheOnInit\" : false,\r\n      \"disableAddressLookup\" : false\r\n    }\r\n  }\r\n}"
  },
  {
    "path": "examples/config_Find_1OpenCLDevice.json",
    "content": "{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"keyProducerJavaIncremental\": [\r\n        {\r\n            \"keyProducerId\": \"exampleKeyProducerJavaIncremental\",\r\n            \"startAddress\" : \"0000000000000000000000000000000000000000000000000000000000000002\",\r\n            \"endAddress\"   : \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\"\r\n        }\r\n    ],\r\n    \"keyProducerJavaBip39\": [\r\n        {\r\n            \"keyProducerId\": \"exampleKeyProducerJavaBip39Id\",\r\n            \"mnemonic\": \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\",\r\n            \"passphrase\": \"correct horse battery staple\",\r\n            \"hardened\" : false,\r\n            \"bip32Path\": \"M/44H/0H/0H/0\",\r\n            \"creationTimeSeconds\": 1650000000\r\n        }\r\n    ],\r\n    \"keyProducerJavaRandom\": [\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      }\r\n    ],\r\n    \"keyProducerJavaSocket\": [\r\n        {\r\n            \"keyProducerId\": \"exampleKeyProducerJavaSocket\",\r\n            \"logReceivedSecret\": true,\r\n            \"maxWorkSize\": 16777216,\r\n            \"host\": \"localhost\",\r\n            \"port\": 5555,\r\n            \"mode\": \"SERVER\",\r\n            \"timeout\": 3000,\r\n            \"connectionRetryCount\": 5,\r\n            \"readRetryCount\": 5,\r\n            \"retryDelayMillisConnect\": 1000,\r\n            \"retryDelayMillisRead\": 1000,\r\n            \"readPartialRetryCount\": 5,\r\n            \"readPartialRetryDelayMillis\": 20\r\n        }\r\n    ],\r\n\t\"keyProducerJavaWebSocket\": [\r\n\t\t{\r\n\t\t\t\"keyProducerId\": \"exampleKeyProducerJavaWebSocket\",\r\n\t\t\t\"logReceivedSecret\": true,\r\n\t\t\t\"port\": 8080,\r\n\t\t\t\"timeout\": 1000\r\n\t\t}\r\n\t],\r\n\t\"keyProducerJavaZmq\": [\r\n\t\t{\r\n\t\t\t\"keyProducerId\": \"exampleKeyProducerJavaZmq\",\r\n\t\t\t\"logReceivedSecret\": true,\r\n\t\t\t\"address\": \"tcp://127.0.0.1:5557\",\r\n\t\t\t\"mode\": \"BIND\",\r\n\t\t\t\"timeout\": -1\r\n\t\t}\r\n\t],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": {\r\n        \"lmdbDirectory\": \"lmdb\",\r\n        \"useProxyOptimal\": true,\r\n        \"logStatsOnInit\": true,\r\n        \"logStatsOnClose\": false,\r\n        \"loadToMemoryCacheOnInit\" : false,\r\n        \"disableAddressLookup\" : false\r\n      },\r\n      \"printStatisticsEveryNSeconds\": 10,\r\n      \"threads\": 8,\r\n      \"delayEmptyConsumer\": 50,\r\n      \"queueSize\": 4,\r\n      \"runtimePublicKeyCalculationCheck\": false,\r\n      \"enableVanity\": false,\r\n      \"vanityPattern\": \"1[Ee][Mm][Ii][Ll].*\"\r\n    },\r\n    \"producerJava\": [],\r\n    \"producerJavaSecretsFiles\": [],\r\n    \"producerOpenCL\": [\r\n      {\r\n        \"platformIndex\": 0,\r\n        \"deviceType\": -1,\r\n        \"deviceIndex\": 0,\r\n        \"maxResultReaderThreads\": 4,\r\n        \"delayBlockedReader\": 50,\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"batchSizeInBits\": 18,\r\n        \"loopCount\" : 4,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      }\r\n    ]\r\n  }\r\n}"
  },
  {
    "path": "examples/config_Find_1OpenCLDeviceAnd2CPUProducer.json",
    "content": "{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"keyProducerJavaRandom\": [\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_1\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_2\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_3\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      }\r\n    ],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": {\r\n        \"lmdbDirectory\": \"lmdb\",\r\n        \"useProxyOptimal\": true,\r\n        \"logStatsOnInit\": true,\r\n        \"logStatsOnClose\": false,\r\n        \"loadToMemoryCacheOnInit\" : false,\r\n        \"disableAddressLookup\" : false\r\n      },\r\n      \"printStatisticsEveryNSeconds\": 10,\r\n      \"threads\": 8,\r\n      \"delayEmptyConsumer\": 50,\r\n      \"queueSize\": 4,\r\n      \"runtimePublicKeyCalculationCheck\": false,\r\n      \"enableVanity\": false,\r\n      \"vanityPattern\": \"1[Ee][Mm][Ii][Ll].*\"\r\n    },\r\n    \"producerJava\": [\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_2\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_3\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      }\r\n    ],\r\n    \"producerJavaSecretsFiles\": [],\r\n    \"producerOpenCL\": [\r\n      {\r\n        \"platformIndex\": 0,\r\n        \"deviceType\": -1,\r\n        \"deviceIndex\": 0,\r\n        \"maxResultReaderThreads\": 4,\r\n        \"delayBlockedReader\": 50,\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_1\",\r\n        \"batchSizeInBits\": 18,\r\n        \"loopCount\" : 4,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      }\r\n    ]\r\n  }\r\n}"
  },
  {
    "path": "examples/config_Find_8CPUProducer.json",
    "content": "{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"keyProducerJavaRandom\": [\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_1\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_2\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_3\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_4\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_5\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_6\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_7\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_8\",\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"privateKeyMaxNumBits\": 256\r\n      }\r\n    ],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": {\r\n        \"lmdbDirectory\": \"lmdb\",\r\n        \"useProxyOptimal\": true,\r\n        \"logStatsOnInit\": true,\r\n        \"logStatsOnClose\": false\r\n      },\r\n      \"printStatisticsEveryNSeconds\": 10,\r\n      \"threads\": 4,\r\n      \"delayEmptyConsumer\": 50,\r\n      \"queueSize\": 4,\r\n      \"runtimePublicKeyCalculationCheck\": false,\r\n      \"enableVanity\": false,\r\n      \"vanityPattern\": \"1[Ee][Mm][Ii][Ll].*\"\r\n    },\r\n    \"producerJava\": [\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_1\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_2\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_3\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_4\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_5\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_6\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_7\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      },\r\n      {\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId_8\",\r\n        \"batchSizeInBits\": 14,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      }\r\n    ],\r\n    \"producerJavaSecretsFiles\": [],\r\n    \"producerOpenCL\": []\r\n  }\r\n}"
  },
  {
    "path": "examples/config_Find_SecretsFile.json",
    "content": "{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"keyProducerJavaRandom\": [],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": {\r\n        \"lmdbDirectory\": \"lmdb\",\r\n        \"useProxyOptimal\": true,\r\n        \"logStatsOnInit\": true,\r\n        \"logStatsOnClose\": false,\r\n        \"loadToMemoryCacheOnInit\" : false,\r\n        \"disableAddressLookup\" : false\r\n      },\r\n      \"printStatisticsEveryNSeconds\": 10,\r\n      \"threads\": 4,\r\n      \"delayEmptyConsumer\": 50,\r\n      \"queueSize\": 4,\r\n      \"runtimePublicKeyCalculationCheck\": false,\r\n      \"enableVanity\": false,\r\n      \"vanityPattern\": \"1[Ee][Mm][Ii][Ll].*\"\r\n    },\r\n    \"producerJava\": [],\r\n    \"producerJavaSecretsFiles\": [\r\n      {\r\n        \"files\": [\r\n          \"secrets/fileContainingSecrets_BIG_INTEGER.txt\"\r\n        ],\r\n        \"secretFormat\": \"BIG_INTEGER\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      },\r\n      {\r\n        \"files\": [\r\n          \"secrets/fileContainingSecrets_DUMPED_RIVATE_KEY.txt\"\r\n        ],\r\n        \"secretFormat\": \"DUMPED_RIVATE_KEY\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      },\r\n      {\r\n        \"files\": [\r\n          \"secrets/fileContainingSecrets_SHA256.txt\"\r\n        ],\r\n        \"secretFormat\": \"SHA256\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      },\r\n      {\r\n        \"files\": [\r\n          \"secrets/fileContainingSecrets_STRING_DO_SHA256.txt\"\r\n        ],\r\n        \"secretFormat\": \"STRING_DO_SHA256\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      }\r\n    ],\r\n    \"producerOpenCL\": []\r\n  }\r\n}"
  },
  {
    "path": "examples/config_LMDBToAddressFile.json",
    "content": "{\r\n  \"command\": \"LMDBToAddressFile\",\r\n  \"lmdbToAddressFile\": {\r\n    \"lmdbConfigurationReadOnly\": {\r\n      \"lmdbDirectory\": \"lmdb\",\r\n      \"useProxyOptimal\": true,\r\n      \"logStatsOnInit\": false,\r\n      \"logStatsOnClose\": false\r\n    },\r\n    \"addressesFile\": \"export.txt\",\r\n    \"addressFileOutputFormat\": \"HexHash\"\r\n  }\r\n}"
  },
  {
    "path": "examples/config_OpenCLInfo.json",
    "content": "{\r\n  \"command\": \"OpenCLInfo\"\r\n}"
  },
  {
    "path": "examples/logbackConfiguration.xml",
    "content": "<configuration>\r\n  <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\r\n    <!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->\r\n    <encoder>\r\n      <pattern>%date{ISO8601} [%thread] %-5level %logger{200} - %msg%n</pattern>\r\n    </encoder>\r\n  </appender>\r\n\r\n  <root level=\"info\">\r\n    <appender-ref ref=\"STDOUT\" />\r\n  </root>\r\n</configuration>\r\n"
  },
  {
    "path": "examples/run_AddressFilesToLMDB.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512m ^\r\n-Xmx512m ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_AddressFilesToLMDB.json\r\nrem >> log_AddressFilesToLMDB.txt 2>&1\r\n"
  },
  {
    "path": "examples/run_Find_1OpenCLDevice.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512M ^\r\n-Xmx16G ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_Find_1OpenCLDevice.json\r\nrem >> log_Find_1OpenCLDevice.txt 2>&1\r\n"
  },
  {
    "path": "examples/run_Find_1OpenCLDeviceAnd2CPUProducer.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512M ^\r\n-Xmx16G ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_Find_1OpenCLDeviceAnd2CPUProducer.json\r\nrem >> log_Find_1OpenCLDeviceAnd2CPUProducer.txt 2>&1\r\n"
  },
  {
    "path": "examples/run_Find_8CPUProducer.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512M ^\r\n-Xmx16G ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_Find_8CPUProducer.json\r\nrem >> log_Find_8CPUProducer.txt 2>&1\r\n"
  },
  {
    "path": "examples/run_Find_SecretsFile.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512M ^\r\n-Xmx16G ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_Find_SecretsFile.json\r\nrem >> log_Find_SecretsFile.txt 2>&1\r\n"
  },
  {
    "path": "examples/run_LMDBToAddressFile.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512m ^\r\n-Xmx512m ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_LMDBToAddressFile.json\r\nrem >> log_LMDBToAddressFile.txt 2>&1\r\n"
  },
  {
    "path": "examples/run_OpenCLInfo.bat",
    "content": "rem start /low java ^\r\njava ^\r\n--add-opens java.base/java.lang=ALL-UNNAMED ^\r\n--add-opens java.base/java.io=ALL-UNNAMED ^\r\n--add-opens java.base/java.nio=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.ref=ALL-UNNAMED ^\r\n--add-opens java.base/jdk.internal.misc=ALL-UNNAMED ^\r\n--add-opens java.base/sun.nio.ch=ALL-UNNAMED ^\r\n--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED ^\r\n-Xms512m ^\r\n-Xmx512m ^\r\n-Dlogback.configurationFile=logbackConfiguration.xml ^\r\n-jar ^\r\nbitcoinaddressfinder-1.5.0-jar-with-dependencies.jar ^\r\nconfig_OpenCLInfo.json\r\nrem >> log_OpenCLInfo.txt 2>&1\r\n"
  },
  {
    "path": "examples/secrets/fileContainingSecrets_BIG_INTEGER.txt",
    "content": "72155939486846849509759369733266486982821795810448245423168957390607644363272\r\n39929263256442288830290225612580366403172818928633701045115663441379782969864\r\n42379586058257162021782620237913525000692985364990081801945649219990416465578\r\n"
  },
  {
    "path": "examples/secrets/fileContainingSecrets_DUMPED_RIVATE_KEY.txt",
    "content": "5K2YUVmWfxbmvsNxCsfvArXdGXm7d5DC9pn4yD75k2UaSYgkXTh\r\n5JVAXLpkZ21svEzwyimMHn5hAkWNqJq8uGxqUqcRrNb8F4Csp8V\r\n5JXYuGrwSbyp8sKBmiLcvokqSnxALPjKWQMPJXZYyBWKof7c2pk\r\n"
  },
  {
    "path": "examples/secrets/fileContainingSecrets_SHA256.txt",
    "content": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\r\n58472980a1d3449939eadc2652370972d5007fa9c059ce84fb3ab98f544e4a08\r\n5db1fee4b5703808c48078a76768b155b421b210c0761cd6a5d223f4d99f1eaa\r\n"
  },
  {
    "path": "examples/secrets/fileContainingSecrets_STRING_DO_SHA256.txt",
    "content": "test\r\ntest with space\r\n1337\r\n"
  },
  {
    "path": "examples/websocket.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Bit Pattern Visualizer</title>\n  <style>\n    body {\n      font-family: monospace;\n      background-color: #f4f4f4;\n      padding: 2rem;\n    }\n    h1 {\n      text-align: center;\n    }\n    .grid {\n      display: grid;\n      grid-template-columns: repeat(16, 24px);\n      grid-template-rows: repeat(16, 24px);\n      gap: 2px;\n      margin: 1rem auto;\n      width: fit-content;\n    }\n    .cell {\n      width: 24px;\n      height: 24px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      background-color: #000;\n      color: #fff;\n      font-size: 10px;\n      border-radius: 3px;\n      cursor: pointer;\n    }\n    .cell.on {\n      background-color: orange;\n      color: #111;\n    }\n    .controls, .output {\n      margin: 1rem auto;\n      max-width: 800px;\n    }\n    textarea {\n      width: 100%;\n      height: 400px;\n      font-family: monospace;\n    }\n    .output pre {\n      background: white;\n      padding: 1rem;\n      border: 1px solid #ccc;\n      overflow-x: auto;\n      word-wrap: break-word;\n      white-space: pre-wrap;\n    }\n    button {\n      margin: 0.25rem;\n      padding: 0.5rem 1rem;\n    }\n    .input-row {\n      margin-top: 0.5rem;\n    }\n  </style>\n</head>\n<body>\n  <h1>Bit Pattern Visualizer – Phase 1</h1>\n\n  <div class=\"controls\">\n    <label>JavaScript: createNumber(round)</label>\n    <textarea id=\"userScript\">\n// Example: Randomize only the last 71 LSB bits\n\nfunction setBitsInRange(secret, randomBytes, bitOffset, bitCount) {\n  for (let i = 0; i < bitCount; i++) {\n    const bitVal = (randomBytes[Math.floor(i / 8)] >> (7 - (i % 8))) & 1;\n    const bitIndex = bitOffset + i;\n    const byteIndex = Math.floor(bitIndex / 8);\n    const bitPos = 7 - (bitIndex % 8);\n    if (bitVal) {\n      secret[byteIndex] |= (1 << bitPos);\n    }\n  }\n}\n\nfunction create_random_LSB(bitsToSet) {\n  const secret = new Uint8Array(32); // 256 bits = 32 bytes\n  const bitOffset = 0; // start at LSB\n  const randomBytes = new Uint8Array(Math.ceil(bitsToSet / 8));\n  crypto.getRandomValues(randomBytes);\n  setBitsInRange(secret, randomBytes, bitOffset, bitsToSet);\n  return secret;\n}\n\nfunction createNumber(round) {\n  return create_random_LSB(71);\n}\n</textarea>\n    <div class=\"input-row\">\n      <label for=\"wsUrl\">WebSocket URL:</label>\n      <input type=\"text\" id=\"wsUrl\" value=\"ws://127.0.0.1:8080\" />\n      <button onclick=\"connectWebSocket()\">Connect</button>\n      <button onclick=\"disconnectWebSocket()\">Disconnect</button>\n    </div>\n    <div class=\"input-row\">\n      <label for=\"delay\">Interval (ms):</label>\n      <input type=\"number\" id=\"delay\" value=\"1000\" min=\"10\" step=\"10\">\n    </div>\n    <button onclick=\"startRounds()\">Start</button>\n    <button onclick=\"stopRounds()\">Stop</button>\n    <span id=\"roundDisplay\">Round: 0</span>\n  </div>\n\n  <div id=\"bitGrid\" class=\"grid\"></div>\n\n  <div class=\"output\">\n    <div><strong>Bit Sequence (MSB→LSB):</strong></div>\n    <pre id=\"bitString\"></pre>\n    <div><strong>HEX:</strong></div>\n    <pre id=\"hexString\"></pre>\n  </div>\n\n  <script>\n    let round = 0;\n    let running = false;\n    let intervalId = null;\n    let ws = null;\n\n    function connectWebSocket() {\n      const url = document.getElementById(\"wsUrl\").value;\n      if (ws && ws.readyState <= 1) return;\n      ws = new WebSocket(url);\n      ws.onopen = () => console.log(\"WebSocket connected\");\n      ws.onmessage = (event) => console.log(\"Received:\", event.data);\n      ws.onerror = (err) => console.error(\"WebSocket error:\", err);\n      ws.onclose = () => console.log(\"WebSocket closed\");\n    }\n\n    function disconnectWebSocket() {\n      if (ws) ws.close();\n    }\n\n    function startRounds() {\n      if (running) return;\n      const delay = parseInt(document.getElementById(\"delay\").value, 10) || 1000;\n      running = true;\n      intervalId = setInterval(() => {\n        round++;\n        document.getElementById(\"roundDisplay\").textContent = `Round: ${round}`;\n        runUserCode(round);\n      }, delay);\n    }\n\n    function stopRounds() {\n      running = false;\n      clearInterval(intervalId);\n    }\n\n    function runUserCode(currentRound) {\n      const code = document.getElementById(\"userScript\").value;\n      const wrapper = `(function(round) {\n        ${code}\n        return createNumber(round);\n      })`;\n\n      try {\n        const generatedFunc = eval(wrapper);\n        const result = generatedFunc(currentRound);\n        updateGrid(result);\n\n        if (ws && ws.readyState === WebSocket.OPEN) {\n          ws.send(result);\n        }\n      } catch (e) {\n        console.error(\"Error in user script:\", e);\n      }\n    }\n\n    function updateGrid(byteArray) {\n      const bitGrid = document.getElementById(\"bitGrid\");\n      bitGrid.innerHTML = \"\";\n      const bits = [];\n\n      for (let i = 0; i < byteArray.length; i++) {\n        for (let b = 7; b >= 0; b--) {\n          bits.push((byteArray[i] >> b) & 1);\n        }\n      }\n\n      while (bits.length < 256) bits.push(0);\n      bits.length = 256;\n\n      const reversed = [...bits].reverse();\n      for (let i = 0; i < 256; i++) {\n        const div = document.createElement(\"div\");\n        div.className = \"cell\" + (reversed[i] ? \" on\" : \"\");\n        div.textContent = 256 - i;\n        bitGrid.appendChild(div);\n      }\n\n      document.getElementById(\"bitString\").textContent = reversed.join(\"\");\n      let hex = \"\";\n      for (let i = 0; i < 32; i++) {\n        let byte = 0;\n        for (let j = 0; j < 8; j++) {\n          byte = (byte << 1) | reversed[i * 8 + j];\n        }\n        hex += byte.toString(16).padStart(2, \"0\");\n      }\n      document.getElementById(\"hexString\").textContent = hex;\n    }\n\n    runUserCode(0);\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "helper/bitinfocharts_com_scraping/scraping.py",
    "content": "#\r\n# Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n#    http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n#\r\nfrom selenium import webdriver\r\nimport time\r\nfrom io import BytesIO\r\nimport re\r\n\r\n# pip install selenium\r\n\r\ndef findAllInSource(addressPattern, driver):\r\n  html = driver.page_source\r\n  return re.findall(addressPattern, html)\r\n\r\ndef getAllUrls(urlPattern):\r\n  urls = []\r\n  for x in range(1, 100+1):\r\n    pageIndex = \"-\"+str(x)\r\n    if x == 1:\r\n        pageIndex = \"\"\r\n    fullUrl = urlPattern.format(pageIndex)\r\n    urls.append(fullUrl)\r\n  return urls\r\n\r\ndef scrapeAddresses(urlPattern, addressPattern, driver):\r\n    urls = getAllUrls(urlPattern)\r\n    addresses = set()\r\n    for url in urls:\r\n        driver.get(url)\r\n        time.sleep(2)\r\n        allInSource = findAllInSource(addressPattern, driver)\r\n        addresses.update(allInSource)\r\n    return addresses\r\n\r\ndef writeToFile(addressSet, filename):\r\n    outF = open(filename, \"w\")\r\n    for address in addressSet:\r\n        outF.write(address)\r\n        outF.write(\"\\n\")\r\n    outF.close()\r\n\r\ndriver = webdriver.Chrome('C:\\\\Users\\\\Bernard\\\\Desktop\\\\chromedriver88.exe')\r\n# manual input for captcha\r\n#driver.get(\"https://bitinfocharts.com/de/top-100-richest-bitcoin-addresses.html\")\r\n#time.sleep(30)\r\n\r\nbase58Pattern = \"[a-km-zA-HJ-NP-Z1-9]{25,34}\"\r\n\r\nbitcoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-bitcoin-addresses{}.html\"\r\nbitcoinAddressPattern = \"[13]\"+base58Pattern\r\nbitcoins = scrapeAddresses(bitcoinUrlPattern, bitcoinAddressPattern, driver)\r\nwriteToFile(bitcoins, \"bitcoin.txt\")\r\n\r\nlitecoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-litecoin-addresses{}.html\"\r\nlitecoinAddressPattern = \"[LM]\"+base58Pattern\r\nlitecoins = scrapeAddresses(litecoinUrlPattern, litecoinAddressPattern, driver)\r\nwriteToFile(litecoins, \"litecoin.txt\")\r\n\r\nbitcoincashUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-bitcoin%20cash-addresses{}.html\"\r\nbitcoincashAddressPattern = \"[13]\"+base58Pattern\r\nbitcoincashs = scrapeAddresses(bitcoincashUrlPattern, bitcoincashAddressPattern, driver)\r\nwriteToFile(bitcoincashs, \"bitcoincash.txt\")\r\n\r\nbitcoinsvUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-bitcoin%20sv-addresses{}.html\"\r\nbitcoinsvAddressPattern = \"[13]\"+base58Pattern\r\nbitcoinsvs = scrapeAddresses(bitcoinsvUrlPattern, bitcoinsvAddressPattern, driver)\r\nwriteToFile(bitcoinsvs, \"bitcoinsv.txt\")\r\n\r\ndashUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-dash-addresses{}.html\"\r\ndashAddressPattern = \"[X]\"+base58Pattern\r\ndashs = scrapeAddresses(dashUrlPattern, dashAddressPattern, driver)\r\nwriteToFile(dashs, \"dash.txt\")\r\n\r\ndogecoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-dogecoin-addresses{}.html\"\r\ndogecoinAddressPattern = \"[D]\"+base58Pattern\r\ndogecoins = scrapeAddresses(dogecoinUrlPattern, dogecoinAddressPattern, driver)\r\nwriteToFile(dogecoins, \"dogecoin.txt\")\r\n\r\nbitcoingoldUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-bitcoin%20gold-addresses{}.html\"\r\nbitcoingoldAddressPattern = \"[G]\"+base58Pattern\r\nbitcoingolds = scrapeAddresses(bitcoingoldUrlPattern, bitcoingoldAddressPattern, driver)\r\nwriteToFile(bitcoingolds, \"bitcoingold.txt\")\r\n\r\nreddcoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-reddcoin-addresses{}.html\"\r\nreddcoinAddressPattern = \"[R]\"+base58Pattern\r\nreddcoins = scrapeAddresses(reddcoinUrlPattern, reddcoinAddressPattern, driver)\r\nwriteToFile(reddcoins, \"reddcoin.txt\")\r\n\r\nnamecoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-namecoin-addresses{}.html\"\r\nnamecoinAddressPattern = \"[N]\"+base58Pattern\r\nnamecoins = scrapeAddresses(namecoinUrlPattern, namecoinAddressPattern, driver)\r\nwriteToFile(namecoins, \"namecoin.txt\")\r\n\r\nvertcoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-vertcoin-addresses{}.html\"\r\nvertcoinAddressPattern = \"[V]\"+base58Pattern\r\nvertcoins = scrapeAddresses(vertcoinUrlPattern, vertcoinAddressPattern, driver)\r\nwriteToFile(vertcoins, \"vertcoin.txt\")\r\n\r\nnovacoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-novacoin-addresses{}.html\"\r\nnovacoinAddressPattern = \"[4]\"+base58Pattern\r\nnovacoins = scrapeAddresses(novacoinUrlPattern, novacoinAddressPattern, driver)\r\nwriteToFile(novacoins, \"novacoin.txt\")\r\n\r\nblackcoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-blackcoin-addresses{}.html\"\r\nblackcoinAddressPattern = \"[B]\"+base58Pattern\r\nblackcoins = scrapeAddresses(blackcoinUrlPattern, blackcoinAddressPattern, driver)\r\nwriteToFile(blackcoins, \"blackcoin.txt\")\r\n\r\nfeathercoinUrlPattern = \"https://bitinfocharts.com/de/top-100-richest-feathercoin-addresses{}.html\"\r\nfeathercoinAddressPattern = \"[7]\"+base58Pattern\r\nfeathercoins = scrapeAddresses(feathercoinUrlPattern, feathercoinAddressPattern, driver)\r\nwriteToFile(feathercoins, \"feathercoin.txt\")\r\n# time.sleep(120)\r\n\r\nif (False): '''\r\n'''\r\ndriver.close()\r\n"
  },
  {
    "path": "helper/bitinfocharts_com_scraping/start.bat",
    "content": "python scraping.py"
  },
  {
    "path": "helper/dumpwallet/dumpwallet.py",
    "content": "#!/usr/bin/python3\r\n#\r\n# Author......: Bernard Ladenthin, 2020\r\n# License.....: MIT\r\n#\r\nimport sys\r\nimport struct\r\nfrom bsddb3.db import *\r\nfrom bitcoinaddress import Wallet\r\n\r\n# Dumps the private keys from an unencrypted wallet.dat file.\r\n# Idea from https://gist.github.com/SopaXorzTaker/e5256e9ecdce740f182093f72f05b8d2\r\n# and https://github.com/darkwallet/python-obelisk/blob/master/obelisk/bitcoin.py\r\n# download bsddb3 from https://www.lfd.uci.edu/~gohlke/pythonlibs/#bsddb3\r\n# pip install bsddb3-6.2.9-cp39-cp39-win_amd64.whl\r\n# pip install bitcoinaddress\r\n# Run with Python 3.9.1\r\n\r\n# asn.1\r\n# see https://brainwalletx.github.io/\r\npart1Compressed = \"3081d30201010420\"\r\npart1Uncompressed = \"308201130201010420\"\r\npart3 = \"a08185308182020101302c06072a8648ce3d0101022100\"\r\n\r\nif not len(sys.argv) == 2:\r\n    print(\"Usage: %s <wallet_file>\" % sys.argv[0])\r\n    sys.exit(1)\r\n\r\ndb = DB()\r\ndb.open(sys.argv[1], \"main\", DB_BTREE, DB_RDONLY)\r\n\r\nitems = db.items()\r\n\r\ndef getBetween(start, end, s):\r\n    return (s.split(start))[1].split(end)[0]\r\n\r\nfor item in items:\r\n    k, v = item\r\n    \r\n    vAsHexStr = v.hex()\r\n    if (part1Compressed in vAsHexStr):\r\n        between = getBetween(part1Compressed, part3, vAsHexStr)\r\n        wallet = Wallet(between)\r\n        print(wallet.key.mainnet.wif)\r\n        print(wallet.key.mainnet.wifc)\r\n        \r\n    if (part1Uncompressed in vAsHexStr):\r\n        between = getBetween(part1Uncompressed, part3, vAsHexStr)\r\n        wallet = Wallet(between)\r\n        print(wallet.key.mainnet.wif)\r\n        print(wallet.key.mainnet.wifc)\r\n\r\ndb.close()\r\n"
  },
  {
    "path": "pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>net.ladenthin</groupId>\n    <artifactId>bitcoinaddressfinder</artifactId>\n    <version>1.5.0</version>\n    <packaging>jar</packaging>\n\n    <name>bitcoinaddressfinder</name>\n    <description>Free high performance tool for fast scanning random Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin, Dash, Zcash (and many more) private keys and finding addresses with balance.</description>\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n        <slf4j.version>2.0.17</slf4j.version>\n        <logback.version>1.5.32</logback.version>\n        <argLine>-Xmx2g -Xms1g --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED</argLine>\n    </properties>\n    \n    \n    <repositories>\n        <repository>\n          <id>jitpack.io</id>\n          <url>https://jitpack.io</url>\n        </repository>\n      </repositories>\n\n    <build>\n        <resources>\n            <resource>\n                <directory>${basedir}/src/main/resources</directory>\n            </resource>\n        </resources>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-enforcer-plugin</artifactId>\n            <executions>\n              <execution>\n                <id>enforce-maven</id>\n                <goals>\n                  <goal>enforce</goal>\n                </goals>\n                <configuration>\n                  <rules>\n                    <requireMavenVersion>\n                      <version>[3.6.3,)</version>\n                    </requireMavenVersion>\n                  </rules>    \n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n            <plugin>\n                <groupId>org.eluder.coveralls</groupId>\n                <artifactId>coveralls-maven-plugin</artifactId>\n            </plugin>\n            <plugin>\n                <groupId>org.jacoco</groupId>\n                <artifactId>jacoco-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>prepare-agent</id>\n                        <goals>\n                            <goal>prepare-agent</goal>\n                        </goals>\n                    </execution>\n                    <execution>\n                        <id>report</id>\n                        <phase>test</phase>\n                        <goals>\n                            <goal>report</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <configuration>\n\n                    <source>21</source>\n                    <target>21</target>\n\n                    <compilerArgs>\n                        <arg>-XDaddTypeAnnotationsToSymbol=true</arg>\n                        <arg>-XDcompilePolicy=simple</arg>\n                        <arg>--should-stop=ifError=FLOW</arg>\n                        <arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR -XepOpt:NullAway:AnnotatedPackages=net.ladenthin</arg>\n\n                        <!-- add-exports -->\n                        <arg>--add-exports</arg><arg>java.base/java.lang=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>java.base/java.io=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>java.base/java.nio=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>java.base/jdk.internal.ref=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>java.base/jdk.internal.misc=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>java.base/sun.nio.ch=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.management/com.sun.management.internal=ALL-UNNAMED</arg>\n\n                        <!-- For ErrorProne, DO NOT TOUCH, documented here: https://errorprone.info/docs/installation#jdk-16 -->\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>\n                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>\n                        <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>\n                        <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>\n\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>\n                        <arg>--add-exports</arg><arg>jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>\n                        <arg>--add-opens</arg><arg>jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>\n                        <arg>--add-opens</arg><arg>jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>\n                    </compilerArgs>\n\n                    <annotationProcessorPaths>\n                        <path>\n                            <groupId>com.google.errorprone</groupId>\n                            <artifactId>error_prone_core</artifactId>\n                            <version>2.49.0</version>\n                        </path>\n                        <path>\n                            <groupId>com.uber.nullaway</groupId>\n                            <artifactId>nullaway</artifactId>\n                            <version>0.13.3</version>\n                        </path>\n                    </annotationProcessorPaths>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-surefire-plugin</artifactId>\n                <!-- Default Surefire plugin config (forking enabled) -->\n                <configuration>\n                        <!-- Fork just one JVM for test isolation -->\n                        <forkCount>1</forkCount>\n                        <reuseForks>false</reuseForks>\n                        <!-- Properly include JaCoCo agent and any other injected argLine -->\n                        <argLine>@{argLine}</argLine>\n                        <!-- Increase timeout to ensure long-running tests don't break -->\n                        <forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <configuration>\n                    <archive>\n                        <manifest>\n                            <mainClass>net.ladenthin.bitcoinaddressfinder.cli.Main</mainClass>\n                            <packageName>net.ladenthin.bitcoinaddressfinder</packageName>\n                        </manifest>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-assembly-plugin</artifactId>\n                <configuration>\n                    <descriptorRefs>\n                        <descriptorRef>jar-with-dependencies</descriptorRef>\n                    </descriptorRefs>\n                    <archive>\n                        <manifest>\n                            <mainClass>net.ladenthin.bitcoinaddressfinder.cli.Main</mainClass>\n                        </manifest>\n                    </archive>\n                </configuration>\n            </plugin>\n        </plugins>\n        \n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-surefire-plugin</artifactId>\n                    <version>3.5.5</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-jar-plugin</artifactId>\n                    <version>3.5.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-assembly-plugin</artifactId>\n                    <version>3.8.0</version>\n                </plugin>\n                  <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>3.6.2</version>\n                  </plugin>\n                <plugin>\n                  <groupId>org.apache.maven.plugins</groupId>\n                  <artifactId>maven-compiler-plugin</artifactId>\n                  <version>3.15.0</version>\n                </plugin>\n                <plugin>\n                  <groupId>org.jacoco</groupId>\n                  <artifactId>jacoco-maven-plugin</artifactId>\n                  <version>0.8.14</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.eluder.coveralls</groupId>\n                    <artifactId>coveralls-maven-plugin</artifactId>\n                    <version>4.3.0</version>\n                    <dependencies>\n                        <dependency>\n                            <groupId>javax.xml.bind</groupId>\n                            <artifactId>jaxb-api</artifactId>\n                            <version>2.3.1</version>\n                        </dependency>\n                    </dependencies>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n    <dependencies>\n        <dependency>\n            <groupId>org.java-websocket</groupId>\n            <artifactId>Java-WebSocket</artifactId>\n            <version>1.6.0</version>\n          </dependency>\n        <dependency>\n            <groupId>org.zeromq</groupId>\n            <artifactId>jeromq</artifactId>\n            <version>0.6.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jspecify</groupId>\n            <artifactId>jspecify</artifactId>\n            <version>1.0.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.bitcoinj</groupId>\n            <artifactId>bitcoinj-core</artifactId>\n            <version>0.17.1</version>\n        </dependency>\n        <dependency>\n            <groupId>com.google.guava</groupId>\n            <artifactId>guava</artifactId>\n            <version>33.6.0-jre</version>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n            <version>2.21.2</version>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.dataformat</groupId>\n            <artifactId>jackson-dataformat-yaml</artifactId>\n            <version>2.21.2</version>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <version>${slf4j.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <version>${logback.version}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>org.lmdbjava</groupId>\n            <artifactId>lmdbjava</artifactId>\n            <version>0.9.3</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jocl</groupId>\n            <artifactId>jocl</artifactId>\n            <version>2.0.6</version>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n            <version>2.21.0</version>\n        </dependency>\n        <dependency>\n            <groupId>commons-codec</groupId>\n            <artifactId>commons-codec</artifactId>\n            <version>1.21.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-artifact</artifactId>\n            <version>3.9.15</version>\n        </dependency>\n\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.13.2</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.hamcrest</groupId>\n            <artifactId>hamcrest</artifactId>\n            <version>3.0</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.mockito</groupId>\n            <artifactId>mockito-core</artifactId>\n            <version>5.23.0</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>com.tngtech.java</groupId>\n            <artifactId>junit-dataprovider</artifactId>\n            <version>1.13.1</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "skills/tdd.md",
    "content": "# TDD Skill — BitcoinAddressFinder\r\n\r\nThis skill documents **test-driven development practices and refactoring patterns** used in the BitcoinAddressFinder project. Apply these rules alongside `TEST_WRITING_GUIDE.md`, `CODE_WRITING_GUIDE.md`, and `CLAUDE.md`.\r\n\r\n---\r\n\r\n## 1. Extract Static Methods Into a Non-Static Helper Class\r\n\r\n### Motivation\r\n\r\nStatic utility methods embedded in a domain class (e.g. `AddressTxtLine`) are hard to unit-test in isolation and cannot be mocked or injected. Extracting them into a dedicated, non-static helper class (e.g. `Bech32Helper`) allows:\r\n\r\n- Direct, focused unit tests for each method without going through the owning class.\r\n- Easier mocking when a consumer needs to stub the helper in its own tests.\r\n- A single, named home for related utilities — consistent with the `BitHelper` pattern already established in the project.\r\n\r\n### Pattern\r\n\r\n**Before:** static method buried in a larger class\r\n\r\n```java\r\n// AddressTxtLine.java — hard to test in isolation\r\nprivate static byte[] decodeBech32CharsetToValues(String base32String) { ... }\r\n```\r\n\r\n**After:** non-static method on a dedicated helper class\r\n\r\n```java\r\n// Bech32Helper.java — small, focused, testable\r\npublic class Bech32Helper {\r\n    public byte[] decodeBech32CharsetToValues(String base32String) { ... }\r\n}\r\n```\r\n\r\nThe owning class holds an instance field and delegates:\r\n\r\n```java\r\n// AddressTxtLine.java\r\nBech32Helper bech32Helper = new Bech32Helper();\r\n// ...\r\nbyte[] payload = bech32Helper.extractPKHFromBitcoinCashAddress(address);\r\n```\r\n\r\n### Naming Conventions\r\n\r\n- Helper class names end with `Helper` (e.g. `BitHelper`, `Bech32Helper`).\r\n- The corresponding test class ends with `HelperTest` (e.g. `BitHelperTest`, `Bech32HelperTest`).\r\n- Public constants on the helper follow `public static final` with a Javadoc comment as required by `CODE_WRITING_GUIDE.md`.\r\n\r\n### When to Apply\r\n\r\nApply this extraction when:\r\n\r\n1. A class contains ≥ 2 closely related static (or effectively-static) methods that operate on the same concept.\r\n2. Those methods are not yet tested directly — their test coverage is indirect, piggybacking on a higher-level test class.\r\n3. The methods are stable enough that the refactoring does not break any public API contract.\r\n\r\nDo **not** apply this extraction for one-off utility methods that logically belong to their host class and have no reuse outside it.\r\n\r\n### Accompanying Test Migration\r\n\r\nWhen the extracted methods already have tests in the original test class (e.g. `AddressTxtLineTest`), **move** those tests to the new test class:\r\n\r\n1. Copy the test methods verbatim into `<HelperName>Test.java`.\r\n2. Delete them from the original test class.\r\n3. Clean up any imports in the original test class that are no longer needed after the removal.\r\n4. Add new tests for any methods that were not yet directly covered (see `TEST_WRITING_GUIDE.md` for the required test structure).\r\n\r\n---\r\n\r\n## 2. Test Class for a Helper — Required Coverage\r\n\r\nEvery helper class created by the extract pattern above **must** have a corresponding `*HelperTest` class that covers:\r\n\r\n| Category | Required tests |\r\n|---|---|\r\n| Happy path per public method | At least one test verifying correct output for representative input |\r\n| Public constants | `CHARSET`, `RADIX_*`, etc. are tested indirectly by the happy-path tests |\r\n| Boundary / error cases | E.g. invalid character → `IllegalArgumentException` |\r\n| Moved tests from original class | All tests that previously exercised these methods indirectly, now calling the helper directly |\r\n\r\nFollow all rules in `TEST_WRITING_GUIDE.md`: AAA structure, editor-fold groups, Hamcrest assertions, no raw JUnit asserts.\r\n\r\n### Reference Example\r\n\r\n`BitHelper` and `BitHelperTest` are the canonical model for this pattern in the project. `Bech32Helper` and `Bech32HelperTest` are the second instance. When adding a new helper class, follow the same structure.\r\n\r\n```java\r\n// Bech32HelperTest.java — canonical structure\r\n\r\npublic class Bech32HelperTest {\r\n\r\n    private final KeyUtility keyUtility = new KeyUtility(\r\n        new NetworkParameterFactory().getNetwork(), new ByteBufferUtility(false));\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBech32CharsetToValues\">\r\n    @Test\r\n    public void decodeBech32CharsetToValues_fullCharset_returnsValuesZeroToThirtyOne() {\r\n        // arrange\r\n        Bech32Helper sut = new Bech32Helper();\r\n        byte[] expected = {0,1,2,...,31};\r\n\r\n        // act\r\n        byte[] result = sut.decodeBech32CharsetToValues(Bech32Helper.CHARSET);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void decodeBech32CharsetToValues_invalidCharacter_throwsException() {\r\n        // arrange\r\n        Bech32Helper sut = new Bech32Helper();\r\n\r\n        // act\r\n        sut.decodeBech32CharsetToValues(\"i\"); // 'i' is not in the Bech32 character set\r\n    }\r\n    // </editor-fold>\r\n}\r\n```\r\n\r\n---\r\n\r\n## 3. Real-World Example: PrivateKeyValidator\r\n\r\nThe `PrivateKeyValidator` helper class is a concrete implementation of the refactoring pattern described above.\r\n\r\n### Extraction Details\r\n\r\n**Original State:** Five related static methods in `KeyUtility`:\r\n- `getMaxPrivateKeyForBatchSize(int batchSizeInBits)`\r\n- `isInvalidWithBatchSize(BigInteger, BigInteger)`\r\n- `isOutsidePrivateKeyRange(BigInteger)`\r\n- `returnValidPrivateKey(BigInteger)`\r\n- `replaceInvalidPrivateKeys(BigInteger[])`\r\n\r\n**Refactored:** Extracted to `PrivateKeyValidator` as non-static instance methods.\r\n\r\n**Injection Locations:**\r\n- `AbstractProducer` — instantiates in constructor, inherited by `ProducerJava` and `ProducerOpenCL`\r\n- `OpenClTask` — instantiates in constructor for batch validation\r\n- `PublicKeyBytes` — instantiates for key state validation\r\n\r\n### Test Coverage\r\n\r\n`PrivateKeyValidatorTest` provides comprehensive coverage:\r\n- **Batch size validation**: boundary tests for 0 bits, max bits, overflow cases\r\n- **Range validation**: tests for MIN/MAX boundaries and out-of-range keys\r\n- **Key correction**: tests for valid, too-small, and too-large keys\r\n- **Array correction**: tests for mixed valid/invalid arrays\r\n- **Data-provider tests**: uses `CommonDataProvider` for batch size edge cases\r\n\r\n### Benefits Realized\r\n\r\n1. **Isolated Testing**: Each validation method can be tested directly without instantiating higher-level classes.\r\n2. **Clear Dependencies**: Callers explicitly pass or store the validator, making dependencies visible.\r\n3. **Future Extension**: If validation rules change (e.g., support for alternative curves), subclassing becomes possible.\r\n4. **Code Reuse**: Multiple call sites (`OpenClTask`, `AbstractProducer`, `PublicKeyBytes`) share the same validation logic without static coupling.\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AbstractPlaintextFile.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.io.RandomAccessFile;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.lmdbjava.LmdbException;\r\n\r\npublic abstract class AbstractPlaintextFile implements Interruptable {\r\n    \r\n    @NonNull\r\n    protected final File file;\r\n    @NonNull\r\n    protected final ReadStatistic readStatistic;\r\n    @NonNull\r\n    private final AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n    \r\n    public AbstractPlaintextFile(@NonNull File file, @NonNull ReadStatistic readStatistic) {\r\n        this.file = file;\r\n        this.readStatistic = readStatistic;\r\n    }\r\n    \r\n    protected double calculateFileProgress(@NonNull RandomAccessFile raf) throws IOException {\r\n        return ((double)(Math.max(raf.getFilePointer(),1)) / (double)raf.length()) * 100.0d;\r\n    }\r\n    \r\n    protected abstract void processLine(String line);\r\n    \r\n    public void readFile() throws IOException {\r\n        try (RandomAccessFile raf = new RandomAccessFile(file, \"r\")) {\r\n            while(shouldRun.get()) {\r\n                String line = raf.readLine();\r\n                if (line == null) {\r\n                    return;\r\n                }\r\n                String utf8 = new String(line.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);\r\n                readStatistic.currentFileProgress = calculateFileProgress(raf);\r\n                try {\r\n                    processLine(utf8);\r\n                } catch(LmdbException e) {\r\n                    // do not catch expections from LMDB (e. g. MapFullException).\r\n                    throw e;\r\n                } catch (Exception e) {\r\n                    System.err.println(\"Error in line: \" + utf8);\r\n                    e.printStackTrace();\r\n                    readStatistic.errors.add(utf8);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void interrupt() {\r\n        shouldRun.set(false);\r\n    }\r\n    \r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AbstractProducer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducer;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\nimport java.math.BigInteger;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\n\r\npublic abstract class AbstractProducer implements Producer {\r\n    \r\n    private final static int SLEEP_WAIT_TILL_RUNNING = 10;\r\n\r\n    private Logger logger = LoggerFactory.getLogger(this.getClass());\r\n    \r\n    protected final AtomicBoolean running = new AtomicBoolean(false);\r\n    \r\n    protected final CProducer cProducer;\r\n    protected final Consumer consumer;\r\n    protected final KeyUtility keyUtility;\r\n    protected final KeyProducer keyProducer;\r\n    protected final BitHelper bitHelper;\r\n    protected final PrivateKeyValidator privateKeyValidator;\r\n\r\n    protected volatile ProducerState state = ProducerState.UNINITIALIZED;\r\n\r\n    protected final AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n\r\n    public AbstractProducer(CProducer cProducer, Consumer consumer, KeyUtility keyUtility, KeyProducer keyProducer, BitHelper bitHelper) {\r\n        this.cProducer = cProducer;\r\n        this.consumer = consumer;\r\n        this.keyUtility = keyUtility;\r\n        this.keyProducer = keyProducer;\r\n        this.bitHelper = bitHelper;\r\n        this.privateKeyValidator = new PrivateKeyValidator();\r\n    }\r\n\r\n    @Override\r\n    public void initProducer() {\r\n        logger.info(\"Init producer.\");\r\n        this.state = ProducerState.INITIALIZED;\r\n    }\r\n\r\n    @Override\r\n    public void releaseProducer() {\r\n        logger.info(\"Release producer.\");\r\n    }\r\n\r\n    @Override\r\n    public void run() {\r\n        if (!shouldRun.get()) {\r\n            logger.info(\"Producer was interrupted before it started running.\");\r\n            state = ProducerState.NOT_RUNNING;\r\n            return;\r\n        }\r\n        if (state != ProducerState.INITIALIZED) {\r\n            throw new IllegalStateException(\"Producer not initialized. Current state: \" + state);\r\n        }\r\n        state = ProducerState.RUNNING;\r\n        while (shouldRun.get()) {\r\n            try {\r\n                produceKeys();\r\n            } catch (Exception e) {\r\n                logger.error(\"Error in produceKeys\", e);\r\n                break;\r\n            }\r\n            if (cProducer.runOnce) {\r\n                break;\r\n            }\r\n        }\r\n        state = ProducerState.NOT_RUNNING;\r\n    }\r\n    \r\n    @Override\r\n    public void produceKeys() throws Exception {\r\n        try {\r\n            BigInteger[] secrets;\r\n            try {\r\n                secrets = keyProducer.createSecrets(cProducer.getOverallWorkSize(bitHelper), cProducer.batchUsePrivateKeyIncrement);\r\n            } catch (NoMoreSecretsAvailableException ex) {\r\n                logNoMoreSecretsInSecretFactory();\r\n                interrupt();\r\n                return;\r\n            }\r\n            \r\n            // assert the requested secrets array fulfill its request parameter\r\n            if (cProducer.batchUsePrivateKeyIncrement) {\r\n                if(secrets.length != 1) {\r\n                    throw new RuntimeException(\"secrets.length != 1\");\r\n                }\r\n            } else {\r\n                if(secrets.length != cProducer.getOverallWorkSize(bitHelper)) {\r\n                    throw new RuntimeException(\"secrets.length != bitHelper.convertBitsToSize(cProducer.batchSizeInBits)\");\r\n                }\r\n            }\r\n            privateKeyValidator.replaceInvalidPrivateKeys(secrets);\r\n            \r\n            consumeSecrets(secrets);\r\n         } catch (RuntimeException e) {\r\n            logErrorInProduceKeys(e);\r\n            throw e;\r\n        }\r\n    }\r\n    \r\n    void consumeSecrets(BigInteger[] secrets) {\r\n        if (cProducer.batchUsePrivateKeyIncrement) {\r\n            BigInteger secret = secrets[0];\r\n            BigInteger secretBase = createSecretBase(secret, cProducer.logSecretBase);\r\n            processSecretBase(secretBase);\r\n        } else {\r\n            processSecrets(secrets);\r\n        }\r\n    }\r\n    \r\n    /**\r\n     * The method fromPrivate can throw an {@link IllegalArgumentException}.\r\n     * The method {@link ByteBufferUtility#freeByteBuffer} can throw an {@link java.lang.IllegalAccessError}.\r\n     * @param secret the secret to be able to recover the issue\r\n     */\r\n    protected void logErrorInProduceKeys(Throwable e, BigInteger secret) {\r\n        logger.error(\"Error in produceKey for secret \" + secret + \".\", e);\r\n    }\r\n    \r\n    protected void logErrorInProduceKeys(Exception e) {\r\n        logger.error(\"Error in produceKey\", e);\r\n    }\r\n    \r\n    protected void logNoMoreSecretsInSecretFactory() {\r\n        logger.error(\"No more keys in secret factory. Shutdown producer.\");\r\n    }\r\n\r\n    @Override\r\n    public void waitTillProducerNotRunning() {\r\n        while(state == ProducerState.RUNNING) {\r\n            try {\r\n                Thread.sleep(SLEEP_WAIT_TILL_RUNNING);\r\n            } catch (InterruptedException e) {\r\n            }\r\n        }\r\n    }\r\n\r\n    public BigInteger createSecretBase(BigInteger secret, boolean logSecretBase) {\r\n        BigInteger killBits = bitHelper.getKillBits(cProducer.batchSizeInBits);\r\n        BigInteger secretBase = keyUtility.killBits(secret, killBits);\r\n        \r\n        if(logSecretBase) {\r\n            logger.info(\"secretBase: \" + keyUtility.bigIntegerToFixedLengthHex(secretBase) + \"/\" + cProducer.batchSizeInBits);\r\n        }\r\n            \r\n        if (logger.isTraceEnabled()) {\r\n            logger.trace(\"secret BigInteger: \" + secret);\r\n            logger.trace(\"secret as byte array: \" + keyUtility.bigIntegerToFixedLengthHex(secret));\r\n            logger.trace(\"killBits: \" + Hex.encodeHexString(killBits.toByteArray()));\r\n            logger.trace(\"secretBase: \" + secretBase);\r\n            logger.trace(\"secretBase as byte array: \" + keyUtility.bigIntegerToFixedLengthHex(secretBase));\r\n        }\r\n\r\n        return secretBase;\r\n    }\r\n    \r\n    public static BigInteger calculateSecretKey(BigInteger secretBase, int keyNumber) {\r\n        if (false) {\r\n            // works also but a or might be faster\r\n            return secretBase.add(BigInteger.valueOf(keyNumber));\r\n        }\r\n        return secretBase.or(BigInteger.valueOf(keyNumber));\r\n    }\r\n    \r\n    Logger getLogger() {\r\n        return logger;\r\n    }\r\n    \r\n    void setLogger(Logger logger) {\r\n        this.logger = logger;\r\n    }\r\n    \r\n    @Override\r\n    public void interrupt() {\r\n        shouldRun.set(false);\r\n    }\r\n    \r\n    @Override\r\n    public ProducerState getState() {\r\n        return state;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AddressFile.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.util.function.Consumer;\r\nimport org.bitcoinj.base.Network;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\npublic class AddressFile extends AbstractPlaintextFile {\r\n\r\n    @NonNull\r\n    private final Network network;\r\n    @NonNull\r\n    private final KeyUtility keyUtility;\r\n    @NonNull\r\n    private final Consumer<AddressToCoin> addressConsumer;\r\n    @NonNull\r\n    private final Consumer<String> unsupportedConsumer;\r\n\r\n    public AddressFile(@NonNull File file, ReadStatistic readStatistic, @NonNull Network network, @NonNull Consumer<AddressToCoin> addressConsumer, @NonNull Consumer<String> unsupportedConsumer) {\r\n        super(file, readStatistic);\r\n        this.network = network;\r\n        this.addressConsumer = addressConsumer;\r\n        this.unsupportedConsumer = unsupportedConsumer;\r\n        keyUtility = new KeyUtility(network, new ByteBufferUtility(true));\r\n    }\r\n\r\n    @Override\r\n    protected void processLine(String line) {\r\n        AddressTxtLine addressTxtLine = new AddressTxtLine();\r\n        try {\r\n            AddressToCoin addressToCoin = addressTxtLine.fromLine(line, keyUtility);\r\n            addressConsumer.accept(addressToCoin);\r\n            readStatistic.successful++;\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            unsupportedConsumer.accept(line);\r\n            readStatistic.incrementUnsupported(e.getReason());\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AddressFilesToLMDB.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationWrite;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport java.util.concurrent.atomic.AtomicLong;\r\nimport java.util.concurrent.atomic.AtomicReference;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFilesToLMDB;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.lmdb.LMDBPersistence;\r\nimport org.bitcoinj.base.Network;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\npublic class AddressFilesToLMDB implements Runnable, Interruptable {\r\n    \r\n    private final static long PROGRESS_LOG = 100_000;\r\n\r\n    private final Logger logger = LoggerFactory.getLogger(AddressFilesToLMDB.class);\r\n\r\n    private final @NonNull CAddressFilesToLMDB addressFilesToLMDB;\r\n\r\n    private final AtomicLong addressCounter = new AtomicLong();\r\n\r\n    private final ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n    @NonNull\r\n    AtomicReference<AddressFile> currentAddressFile = new AtomicReference<>();\r\n    \r\n    protected final AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n    \r\n    public AddressFilesToLMDB( @NonNull CAddressFilesToLMDB addressFilesToLMDB) {\r\n        this.addressFilesToLMDB = addressFilesToLMDB;\r\n    }\r\n\r\n    @Override\r\n    public void run() {\r\n        final Network network = new NetworkParameterFactory().getNetwork();\r\n\r\n        PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n        CLMDBConfigurationWrite lmdbConfigurationWrite = Objects.requireNonNull(addressFilesToLMDB.lmdbConfigurationWrite);\r\n        try(LMDBPersistence persistence = new LMDBPersistence(lmdbConfigurationWrite, persistenceUtils)) {\r\n            logger.info(\"Init LMDB ...\");\r\n            persistence.init();\r\n            logger.info(\"... init LMDB done.\");\r\n\r\n            try {\r\n                FileHelper fileHelper = new FileHelper();\r\n                List<String> addressesFiles = Objects.requireNonNull(addressFilesToLMDB.addressesFiles);\r\n                List<File> files = fileHelper.stringsToFiles(addressesFiles);\r\n                fileHelper.assertFilesExists(files);\r\n\r\n                java.util.function.Consumer<AddressToCoin> supported =\r\n                        addressToCoin -> {\r\n                            ByteBuffer hash160 = addressToCoin.hash160();\r\n                            persistence.putNewAmount(hash160, addressToCoin.coin());\r\n                            addressCounter.incrementAndGet();\r\n\r\n                            if (addressCounter.get() % PROGRESS_LOG == 0) {\r\n                                logProgress();\r\n                            }\r\n                        };\r\n\r\n                java.util.function.Consumer<String> unsupported =\r\n                        line -> {\r\n                            if (readStatistic.getUnsupportedTotal() % PROGRESS_LOG == 0) {\r\n                                logProgress();\r\n                            }\r\n                        };\r\n\r\n                logger.info(\"Iterate address files ...\");\r\n                for (File file : files) {\r\n                    if (!shouldRun.get()) {\r\n                        break;\r\n                    }\r\n                    AddressFile addressFile = new AddressFile(\r\n                            file,\r\n                            readStatistic,\r\n                            network,\r\n                            supported,\r\n                            unsupported\r\n                    );\r\n\r\n                logger.info(\"process \" + file.getAbsolutePath());\r\n                currentAddressFile.set(addressFile);\r\n                addressFile.readFile();\r\n                currentAddressFile.set(null);\r\n                logger.info(\"finished: \" + file.getAbsolutePath());\r\n                \r\n                logProgress();\r\n            }\r\n            logProgress();\r\n            logger.info(\"... iterate address files done.\");\r\n\r\n            for (String error : readStatistic.errors) {\r\n                logger.info(\"Error in line: \" + error);\r\n                }\r\n            } catch (IOException e) {\r\n                throw new RuntimeException(e);\r\n            }\r\n        }\r\n    }\r\n\r\n    private void logProgress() {\r\n        logger.info(\"Progress: \" + addressCounter.get() + \" addresses. Unsupported: \" + readStatistic.getUnsupportedTotal() + \". Errors: \" + readStatistic.errors.size() + \". Current File progress: \" + String.format(\"%.2f\", readStatistic.currentFileProgress) + \"%.\");\r\n    }\r\n\r\n    @Override\r\n    public void interrupt() {\r\n        AddressFile addressFile = currentAddressFile.get();\r\n        if (addressFile != null) {\r\n            addressFile.interrupt();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AddressFormatNotAcceptedException.java",
    "content": "// @formatter:off\n/**\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\n/**\n * Thrown by {@link AddressTxtLine#fromLine} when an address line cannot be\n * accepted because its format is unsupported or malformed.\n * The exception message includes a human-readable reason describing why the\n * format was rejected.\n */\npublic class AddressFormatNotAcceptedException extends Exception {\n\n    private final String reason;\n\n    public AddressFormatNotAcceptedException(String reason) {\n        super(\"Address format not accepted: \" + reason);\n        this.reason = reason;\n    }\n\n    public String getReason() {\n        return reason;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AddressToCoin.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.nio.ByteBuffer;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\n/**\r\n * Represents an immutable mapping from a hash160 to a Coin amount.\r\n *\r\n * <p>Note: hash160 is expected to be exactly {@code PublicKeyBytes.HASH160_SIZE} bytes long.</p>\r\n */\r\npublic record AddressToCoin(@NonNull ByteBuffer hash160, @NonNull Coin coin, @NonNull AddressType type) {\r\n\r\n    public AddressToCoin {\r\n        if (hash160.limit() != PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES) {\r\n            throw new IllegalArgumentException(\"Given hash160 has not the correct size: \" + hash160.limit());\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public @NonNull String toString() {\r\n        return \"AddressToCoin{\" +\r\n                \"hash160=\" + new ByteBufferUtility(false).getHexFromByteBuffer(hash160) +\r\n                \", coin=\" + coin +\r\n                \", type=\" + type +\r\n                '}';\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AddressTxtLine.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.hash.Hashing;\r\nimport org.bitcoinj.base.Base58;\r\nimport org.bitcoinj.base.Bech32;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.bitcoinj.base.SegwitAddress;\r\nimport org.bitcoinj.base.exceptions.AddressFormatException;\r\nimport org.bouncycastle.util.encoders.DecoderException;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Arrays;\r\n\r\n/**\r\n * Most txt files have a common format which uses Base58 address and separated\r\n * anmount.\r\n */\r\npublic class AddressTxtLine {\r\n\r\n    /**\r\n     * Should not be {@link Coin#ZERO} because it can't be written to LMDB.\r\n     */\r\n    public static final Coin DEFAULT_COIN = Coin.SATOSHI;\r\n\r\n    public static final String IGNORE_LINE_PREFIX = \"#\";\r\n    public static final String ADDRESS_HEADER = \"address\";\r\n    public static final String BITCOIN_CASH_PREFIX = \"bitcoincash:\";\r\n    \r\n    \r\n    public final static int VERSION_BYTES_REGULAR = 1;\r\n    public final static int VERSION_BYTES_ZCASH = 2;\r\n    public final static int CHECKSUM_BYTES_REGULAR = 4;\r\n\r\n    public static final String REASON_EMPTY = \"address is empty\";\r\n\r\n    /**\r\n     * Reason used when the line starts with {@link #IGNORE_LINE_PREFIX} ({@code \"#\"}).\r\n     * <p>\r\n     * This check is performed on the raw line <em>before</em> {@link SeparatorFormat#split},\r\n     * because {@code \"#\"} is also registered as {@link SeparatorFormat#HASH}. Splitting first\r\n     * would always produce an empty first token for {@code \"#...\"} lines, masking this reason\r\n     * with {@link #REASON_EMPTY} instead.\r\n     */\r\n    public static final String REASON_IGNORE_PREFIX = \"address starts with ignore prefix\";\r\n    public static final String REASON_ADDRESS_HEADER = \"address starts with address header\";\r\n    public static final String REASON_P2MS_NOT_SUPPORTED = \"Blockchair Multisig (P2MS) format is not supported\";\r\n    public static final String REASON_P2WSH_NOT_SUPPORTED = \"P2WSH is not supported\";\r\n    public static final String REASON_P2TR_NOT_SUPPORTED = \"P2TR is not supported\";\r\n    public static final String REASON_UNSUPPORTED_WITNESS_VERSION = \"unsupported witness version\";\r\n    public static final String REASON_BITCOIN_CASH_Q_ADDRESS_NOT_PARSABLE = \"Bitcoin Cash address is not parsable\";\r\n    public static final String REASON_INVALID_BASE58 = \"invalid Base58 address\";\r\n    \r\n    /**\r\n    * Witness version 0, used for SegWit v0 addresses such as:\r\n    * <ul>\r\n    *   <li><b>P2WPKH</b> – Pay to Witness Public Key Hash</li>\r\n    *   <li><b>P2WSH</b> – Pay to Witness Script Hash</li>\r\n    * </ul>\r\n    * Defined in <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki\">BIP-173</a>.\r\n    */\r\n   private static final int WITNESS_VERSION_0 = 0;\r\n\r\n   /**\r\n    * Witness version 1, introduced with Taproot (SegWit v1):\r\n    * <ul>\r\n    *   <li><b>P2TR</b> – Pay to Taproot</li>\r\n    * </ul>\r\n    * Defined in <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki\">BIP-341</a> and\r\n    * encoded using Bech32m as specified in <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki\">BIP-350</a>.\r\n    */\r\n   private static final int WITNESS_VERSION_1 = 1;\r\n\r\n    Bech32Helper bech32Helper = new Bech32Helper();\r\n    \r\n    /**\r\n     * Parses a line containing an address and optional amount.\r\n     * Throws {@link AddressFormatNotAcceptedException} if the address is unsupported,\r\n     * malformed, or marked as ignored.\r\n     * <p>\r\n     * If no coin amount is specified in the line, {@link #DEFAULT_COIN} is used as a fallback.\r\n     *\r\n     * @param line the line to parse\r\n     * @param keyUtility the {@link KeyUtility} used for conversions\r\n     * @return an {@link AddressToCoin} instance — never {@code null}\r\n     * @throws AddressFormatNotAcceptedException if the address format is not accepted,\r\n     *         with a reason message describing why\r\n     */\r\n    @NonNull\r\n    public AddressToCoin fromLine(String line, KeyUtility keyUtility) throws AddressFormatNotAcceptedException {\r\n        // Checked before splitting: \"#\" is also a SeparatorFormat separator, so splitting first\r\n        // would always produce an empty first token for \"#...\" lines, masking this reason.\r\n        if (line.trim().startsWith(IGNORE_LINE_PREFIX)) {\r\n            throw new AddressFormatNotAcceptedException(REASON_IGNORE_PREFIX);\r\n        }\r\n        // Remove the Bitcoin Cash prefix (which includes a colon) to avoid incorrect splitting.\r\n        // This ensures the address is recognized properly and not misinterpreted during parsing.\r\n        if(line.contains(BITCOIN_CASH_PREFIX)) {\r\n            line = line.replace(BITCOIN_CASH_PREFIX, \"\");\r\n        }\r\n        String[] lineSplitted = SeparatorFormat.split(line);\r\n        String address = lineSplitted[0];\r\n        Coin amount = getCoinIfPossible(lineSplitted, DEFAULT_COIN);\r\n        address = address.trim();\r\n        if (address.isEmpty()) {\r\n            throw new AddressFormatNotAcceptedException(REASON_EMPTY);\r\n        }\r\n        if (address.startsWith(ADDRESS_HEADER)) {\r\n            throw new AddressFormatNotAcceptedException(REASON_ADDRESS_HEADER);\r\n        }\r\n        \r\n        // Riecoin: ScriptPubKey-style encoded address (hex with OP codes)\r\n        {\r\n            final String OP_DUP = \"76\";\r\n            final String OP_HASH160 = \"a9\";\r\n            final String OP_PUSH_20_BYTES = \"14\";\r\n            final int length20Bytes = PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES;\r\n            final String riecoinP2SHPrefix = OP_DUP + OP_HASH160 + OP_PUSH_20_BYTES;\r\n            final int riecoinScriptPubKeyLengthHex = length20Bytes * 2 + riecoinP2SHPrefix.length();\r\n            if (address.length() >= riecoinScriptPubKeyLengthHex && address.startsWith(riecoinP2SHPrefix)) {\r\n                final String hash160Hex = address.substring(riecoinP2SHPrefix.length(), length20Bytes*2+riecoinP2SHPrefix.length());\r\n                final ByteBuffer hash160 = keyUtility.byteBufferUtility().getByteBufferFromHex(hash160Hex);\r\n                return new AddressToCoin(hash160, amount, AddressType.P2PKH_OR_P2SH);\r\n            }\r\n        }\r\n\r\n        // Blockchair Multisig (P2MS) format is not supported\r\n        if (\r\n               address.startsWith(\"d-\")\r\n            || address.startsWith(\"m-\")\r\n            || address.startsWith(\"s-\")\r\n        ) {\r\n            throw new AddressFormatNotAcceptedException(REASON_P2MS_NOT_SUPPORTED);\r\n        }\r\n        \r\n        // BitCore WKH format (Base36-encoded hash160)\r\n        if (address.startsWith(\"wkh_\")) {\r\n            // BitCore (WKH) is base36 encoded hash160\r\n            String addressWKH = address.substring(\"wkh_\".length());\r\n            byte[] hash160 = new Base36Decoder().decodeBase36ToFixedLengthBytes(addressWKH, PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES);\r\n            ByteBuffer hash160AsByteBuffer = keyUtility.byteBufferUtility().byteArrayToByteBuffer(hash160);\r\n            return new AddressToCoin(hash160AsByteBuffer, amount, AddressType.P2WPKH);\r\n        }\r\n        \r\n        // Bech32 decoding (P2WPKH, P2WSH, P2TR)\r\n        try {\r\n            Bech32.Bech32Data bechData = Bech32.decode(address);\r\n            \r\n            // protected: bechData.witnessVersion();\r\n            short witnessVersion = bech32Helper.getWitnessVersion(bechData);\r\n            // protected: bechData.witnessProgram();\r\n            byte[] witnessProgram = bech32Helper.getWitnessPrograms(bechData);\r\n            \r\n            switch (witnessVersion) {\r\n                case WITNESS_VERSION_0:\r\n                    if (witnessProgram.length == SegwitAddress.WITNESS_PROGRAM_LENGTH_PKH) {\r\n                        ByteBuffer hash160 = keyUtility.byteBufferUtility().byteArrayToByteBuffer(witnessProgram);\r\n                        return new AddressToCoin(hash160, amount, AddressType.P2WPKH); // P2WPKH supported\r\n                    } else if (witnessProgram.length == SegwitAddress.WITNESS_PROGRAM_LENGTH_SH) {\r\n                        byte[] scriptHash = witnessProgram;\r\n                        throw new AddressFormatNotAcceptedException(REASON_P2WSH_NOT_SUPPORTED);\r\n                    }\r\n                    break;\r\n                case WITNESS_VERSION_1:\r\n                    if (witnessProgram.length == SegwitAddress.WITNESS_PROGRAM_LENGTH_TR) {\r\n                        byte[] tweakedPublicKey = witnessProgram;\r\n                        throw new AddressFormatNotAcceptedException(REASON_P2TR_NOT_SUPPORTED);\r\n                    }\r\n                    break;\r\n                default:\r\n                    throw new AddressFormatNotAcceptedException(REASON_UNSUPPORTED_WITNESS_VERSION);\r\n            }\r\n        } catch (AddressFormatException | ReflectiveOperationException  e) {\r\n            // Bech32 parsing or reflection failed; continue to next format\r\n        }\r\n        \r\n        // ZCash or Peercoin with 2-byte version\r\n        if (address.startsWith(\"p\") || address.startsWith(\"t\")) {\r\n            // p: bitcoin cash / CashAddr (P2SH), this is a unique format and does not work\r\n            // p: peercoin possible\r\n            // t: ZCash has two version bytes\r\n            try {\r\n                AddressToCoin addressToCoin = parseBase58Address(address, VERSION_BYTES_ZCASH, CHECKSUM_BYTES_REGULAR, keyUtility);\r\n                return new AddressToCoin(addressToCoin.hash160(), amount, addressToCoin.type());\r\n            } catch (RuntimeException e) {\r\n                // Fall through to other format checks\r\n            }\r\n        }\r\n        \r\n        try {\r\n            // Bitcoin Cash 'q' prefix: convert to legacy address\r\n            if (address.startsWith(\"q\")) {\r\n                byte[] payload = bech32Helper.extractPKHFromBitcoinCashAddress(address);\r\n                ByteBuffer hash160 = keyUtility.byteBufferUtility().byteArrayToByteBuffer(payload);\r\n                return new AddressToCoin(hash160, amount, AddressType.P2PKH_OR_P2SH);\r\n            }\r\n        } catch (DecoderException e) {\r\n            throw e;\r\n        } catch (RuntimeException | ReflectiveOperationException e) {\r\n            throw new AddressFormatNotAcceptedException(REASON_BITCOIN_CASH_Q_ADDRESS_NOT_PARSABLE);\r\n        }\r\n        \r\n        // Fallback: assume Base58 with 1-byte version prefix\r\n        try {\r\n            AddressToCoin addressToCoin = parseBase58Address(address, VERSION_BYTES_REGULAR, CHECKSUM_BYTES_REGULAR, keyUtility);\r\n            return new AddressToCoin(addressToCoin.hash160(), amount, addressToCoin.type());\r\n        } catch (AddressFormatException e) {\r\n            throw new AddressFormatNotAcceptedException(REASON_INVALID_BASE58);\r\n        }\r\n    }\r\n    \r\n    static AddressToCoin parseBase58Address(String base58, int versionBytes, int checksumBytes, KeyUtility keyUtility) {\r\n        byte[] decoded = Base58.decode(base58);\r\n        \r\n        final byte[] version;\r\n        if (versionBytes > 0) {\r\n            // copy version bytes\r\n            version = new byte[versionBytes];\r\n            System.arraycopy(decoded, 0, version, 0, version.length);\r\n        } else {\r\n            version = null;\r\n        }\r\n        \r\n        byte[] hash160 = new byte[20];\r\n        int storedBytes = Math.min(decoded.length - versionBytes, hash160.length);\r\n        {\r\n            // copy hash160\r\n            System.arraycopy(decoded, versionBytes, hash160, 0, storedBytes);\r\n        }\r\n        \r\n        final byte[] checksum;\r\n        if (decoded.length >= versionBytes + hash160.length + checksumBytes) {\r\n            checksum = new byte[checksumBytes];\r\n            // copy cheksum\r\n            System.arraycopy(decoded, versionBytes + storedBytes, checksum, 0, checksum.length);\r\n            String checksumAsHex = org.apache.commons.codec.binary.Hex.encodeHexString(checksum);\r\n        } else {\r\n            checksum = null;\r\n        }\r\n        \r\n        boolean checksumMatches = false;\r\n        if (version != null && checksum != null) {\r\n            byte[] payload = new byte[version.length + hash160.length];\r\n            System.arraycopy(version, 0, payload, 0, version.length);\r\n            System.arraycopy(hash160, 0, payload, version.length, hash160.length);\r\n\r\n            byte[] firstHash = Hashing.sha256().hashBytes(payload).asBytes();\r\n            byte[] secondHash = Hashing.sha256().hashBytes(firstHash).asBytes();\r\n            byte[] calculatedChecksum = Arrays.copyOfRange(secondHash, 0, checksumBytes);\r\n\r\n            checksumMatches = Arrays.equals(calculatedChecksum, checksum);\r\n            if (false) {\r\n                // TODO: For debugging only\r\n                String versionAsHex = org.apache.commons.codec.binary.Hex.encodeHexString(version);\r\n            }\r\n        }\r\n\r\n        if (false) {\r\n            // TODO: For debugging only\r\n            String decodedAsHex = org.apache.commons.codec.binary.Hex.encodeHexString(decoded);\r\n            String hash160AsHex = org.apache.commons.codec.binary.Hex.encodeHexString(hash160);\r\n        }\r\n\r\n        ByteBuffer hash160AsByteBuffer = keyUtility.byteBufferUtility().byteArrayToByteBuffer(hash160);\r\n        \r\n        // fallback\r\n        AddressType addressType = AddressType.P2PKH_OR_P2SH;\r\n\r\n        AddressToCoin addressToCoin = new AddressToCoin(hash160AsByteBuffer, DEFAULT_COIN, addressType);\r\n        return addressToCoin;\r\n    }\r\n\r\n    @NonNull\r\n    private Coin getCoinIfPossible(@NonNull String[] lineSplitted, @NonNull Coin defaultValue) throws NumberFormatException {\r\n        if (lineSplitted.length > 1) {\r\n            String amountString = lineSplitted[1];\r\n            try {\r\n                return Coin.valueOf(Long.parseLong(amountString));\r\n            } catch (NumberFormatException e) {\r\n                return defaultValue;\r\n            }\r\n        } else {\r\n            return defaultValue;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/AddressType.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\n/**\n * Enum representing different Bitcoin/altcoin address script types.\n * Constants for witness program lengths are defined in {@link org.bitcoinj.base.SegwitAddress}.\n */\npublic enum AddressType {\n\n    /**\n     * Pay to Public Key Hash (Legacy Address) or\n     * Pay to Script Hash.\n     * <p>\n     * P2PKH Format: Base58Check. Typical prefix: '1' (BTC mainnet).<br>\n     * P2SH Format: Base58Check. Typical prefix: '3' (BTC mainnet).<br>\n     * P2PKH Script: OP_DUP OP_HASH160 &lt;pubKeyHash&gt; OP_EQUALVERIFY OP_CHECKSIG<br>\n     * P2SH Script: OP_HASH160 &lt;scriptHash&gt; OP_EQUAL\n     * </p>\n     * <p><b>Note:</b> P2PKH and P2SH addresses use the same Base58Check format and differ only by their version byte. \n     * This makes it impossible to distinguish them without additional context (e.g., the coin type or expected script).\n     * Address collisions or misclassification may occur when coins use the same address format with different version bytes.\n     * </p>\n     */\n    P2PKH_OR_P2SH,\n\n    /**\n     * Pay to Witness Public Key Hash (SegWit v0).\n     * Format: Bech32. Typical prefix: 'bc1q'.\n     * Length: {@link org.bitcoinj.base.SegwitAddress#WITNESS_PROGRAM_LENGTH_PKH}\n     * Script: 0 &lt;20-byte pubKeyHash&gt;\n     */\n    P2WPKH\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/BIP39KeyProducer.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\nimport com.google.common.annotations.VisibleForTesting;\nimport java.time.Instant;\nimport java.util.ArrayList;\nimport org.bitcoinj.crypto.ChildNumber;\nimport org.bitcoinj.crypto.DeterministicKey;\nimport org.bitcoinj.crypto.HDPath;\nimport org.bitcoinj.wallet.DeterministicKeyChain;\nimport org.bitcoinj.wallet.DeterministicSeed;\n\nimport java.util.List;\nimport java.util.concurrent.atomic.AtomicInteger;\n\n/**\n * Deterministic key producer based on a BIP39 mnemonic + BIP44 path.\n * Allows sequential derivation of keys like Random.next() from a fixed HD wallet seed.\n */\npublic class BIP39KeyProducer extends java.util.Random {\n\n    private final DeterministicKeyChain keyChain;\n    private final List<ChildNumber> basePath;\n    private final boolean hardened;\n    @VisibleForTesting\n    final AtomicInteger counter = new AtomicInteger(0);\n\n    public BIP39KeyProducer(String mnemonic, String passphrase, String bip44BasePath, Instant creationTime, boolean hardened) {\n        DeterministicSeed seed = DeterministicSeed.ofMnemonic(mnemonic, passphrase, creationTime);\n        this.keyChain = DeterministicKeyChain.builder().seed(seed).build();\n        this.basePath = HDPath.parsePath(bip44BasePath); // e.g., \"M/44H/0H/0H/0\"\n        this.hardened = hardened;\n    }\n    \n    /**\n     * Returns the next derived key along the BIP44 path.\n     */\n    public DeterministicKey nextKey() throws NoMoreSecretsAvailableException {\n        int index = counter.getAndIncrement();\n        if (index < 0) {\n            throw new NoMoreSecretsAvailableException(\"Child index overflow: counter exceeded Integer.MAX_VALUE\");\n        }\n        List<ChildNumber> path = append(basePath, new ChildNumber(index, hardened));\n        return keyChain.getKeyByPath(path, true);\n    }\n    \n    public static List<ChildNumber> append(List<ChildNumber> base, ChildNumber child) {\n        List<ChildNumber> extended = new ArrayList<>(base);\n        extended.add(child);\n        return extended;\n    }\n\n    /**\n     * Overrides nextBytes to produce deterministic bytes from key material.\n     */\n    @Override\n    public void nextBytes(byte[] bytes) {\n        DeterministicKey key = nextKey();\n        byte[] priv = key.getPrivKeyBytes();\n        System.arraycopy(priv, 0, bytes, 0, Math.min(bytes.length, priv.length));\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/BIP39Wordlist.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.io.InputStream;\n\npublic enum BIP39Wordlist {\n    \n    CHINESE_SIMPLIFIED(\"chinese_simplified.txt\"),\n    CHINESE_TRADITIONAL(\"chinese_traditional.txt\"),\n    CZECH(\"czech.txt\"),\n    ENGLISH(\"english.txt\"),\n    FRENCH(\"french.txt\"),\n    ITALIAN(\"italian.txt\"),\n    JAPANESE(\"japanese.txt\"),\n    KOREAN(\"korean.txt\"),\n    PORTUGUESE(\"portuguese.txt\"),\n    RUSSIAN(\"russian.txt\"),\n    SPANISH(\"spanish.txt\"),\n    TURKISH(\"turkish.txt\");\n    \n    /**\n     * Unicode character for an ideographic space (U+3000), used in East Asian languages such as Japanese.\n     * This space is wider than a standard space and is required for correct formatting of Japanese mnemonics.\n     */\n    public static final String IDEOGRAPHIC_SPACE = \"\\u3000\";\n\n    /**\n     * Standard ASCII space character (U+0020).\n     * Used as the default separator between words in most BIP39 wordlists, such as English.\n     */\n    public static final String NORMAL_SPACE = \" \";\n    \n    /**\n    * The name of the wordlist file associated with this BIP39 language.\n    * <p>\n    * This filename is used to locate the corresponding wordlist resource file in the\n    * {@code /mnemonic/wordlist/} directory of the classpath (e.g., {@code english.txt}).\n    */\n    private final String fileName;\n    \n    /**\n     * Constructs a BIP39 wordlist enum constant with the associated filename.\n     *\n     * @param fileName the name of the wordlist file (e.g., {@code \"english.txt\"}), which is used\n     *                 to load the corresponding wordlist resource from the classpath\n     */\n    BIP39Wordlist(String fileName) {\n        this.fileName = fileName;\n    }\n\n    /**\n    * Loads the BIP39 wordlist file as an {@link InputStream} for this language.\n    * <p>\n    * The wordlist file is expected to be located in the resource path:\n    * {@code /mnemonic/wordlist/{fileName}}, where {@code fileName} corresponds\n    * to the file name associated with the enum constant (e.g. {@code english.txt}).\n    * <p>\n    * This method is used to initialize a {@link org.bitcoinj.crypto.MnemonicCode} instance with the correct\n    * wordlist for a given language.\n    *\n    * @return the input stream of the wordlist file for this language, or {@code null}\n    *         if the resource is not found.\n    */\n    public InputStream getWordListStream() {\n        return BIP39Wordlist.class.getResourceAsStream(\"/mnemonic/wordlist/\" + fileName);\n    }\n    \n    /**\n     * Converts a filename-like language name into the corresponding {@link BIP39Wordlist} enum constant.\n     * <p>\n     * The input typically comes from wordlist filenames in the format {@code mnemonic/wordlist/{language}.txt},\n     * for example:\n     * <ul>\n     *   <li>{@code chinese_simplified.txt} → {@code CHINESE_SIMPLIFIED}</li>\n     *   <li>{@code english.txt} → {@code ENGLISH}</li>\n     * </ul>\n     * <p>\n     * To perform the conversion, this method:\n     * <ul>\n     *   <li>Converts the name to upper case</li>\n     *   <li>Replaces hyphens with underscores (if any)</li>\n     * </ul>\n     * This enables consistent mapping between file-based wordlist identifiers and enum values.\n     *\n     * @param name the lowercase filename-based language identifier, e.g. {@code \"english\"} or {@code \"chinese_simplified\"}\n     * @return the corresponding {@link BIP39Wordlist} enum constant\n     * @throws IllegalArgumentException if no matching enum exists\n     */\n    public static BIP39Wordlist fromLanguageName(String name) {\n        return valueOf(name.toUpperCase().replace('-', '_'));\n    }\n    \n    /**\n    * Returns the word separator used in the mnemonic phrase for the given language.\n    * <p>\n    * Most languages use a single space (\" \") as the separator between words.\n    * However, Japanese uses the IDEOGRAPHIC SPACE (U+3000) to conform with the official BIP39 specification.\n    *\n    * @return the word separator specific to the language\n    */\n    public String getSeparator() {\n        if (this == JAPANESE) {\n            return IDEOGRAPHIC_SPACE;\n        }\n        return NORMAL_SPACE;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Base36Decoder.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.math.BigInteger;\n\npublic class Base36Decoder {\n    /**\n     * Decodes a Base36-encoded string (e.g., from a WKH address) into a fixed-length byte array.\n     * <p>\n     * This method is typically used to convert a Base36-encoded hash representation (such as a RIPEMD-160 hash)\n     * into a normalized {@code byte[]} of exactly {@code hashLength} bytes.\n     * It handles BigInteger's sign-extension by trimming or zero-padding the result as needed.\n     * <p>\n     * If the decoded byte array is shorter than {@code hashLength}, the result is left-padded with zeros.\n     * If the decoded array is longer, only the least-significant {@code hashLength} bytes are kept.\n     *\n     * @param base36Encoded  the Base36-encoded input string (e.g., from a \"wkh_\" address)\n     * @param hashLength  the desired length of the output byte array (e.g., 20 for hash160)\n     * @return a normalized byte array of length {@code hashLength}, representing the decoded hash\n     * @throws NumberFormatException if the input string is not valid Base36\n     */\n    public byte[] decodeBase36ToFixedLengthBytes(String base36Encoded, final int hashLength) {\n        byte[] raw = new BigInteger(base36Encoded, 36).toByteArray();\n        byte[] hash160 = new byte[hashLength];\n        int srcPos = Math.max(0, raw.length - hashLength);\n        int destPos = hashLength - (raw.length - srcPos);\n        int length = raw.length - srcPos;\n        System.arraycopy(raw, srcPos, hash160, destPos, length);\n        return hash160;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Bech32Helper.java",
    "content": "// @formatter:off\n/**\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport org.bitcoinj.base.Bech32;\nimport org.bitcoinj.base.exceptions.AddressFormatException;\n\nimport java.lang.reflect.Method;\nimport java.util.Arrays;\n\nimport static net.ladenthin.bitcoinaddressfinder.AddressTxtLine.BITCOIN_CASH_PREFIX;\n\npublic class Bech32Helper {\n\n    /**\n     * Bech32 character set as defined in BIP-0173.\n     * The position of each character in this string defines its 5-bit integer value (0–31).\n     *\n     * @see <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki\">BIP-173</a>\n     */\n    public static final String CHARSET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\n\n    /**\n     * Lookup table for fast Bech32 character-to-value resolution.\n     */\n    private static final int[] LOOKUP = new int[128];\n\n    static {\n        Arrays.fill(LOOKUP, -1);\n        for (int i = 0; i < CHARSET.length(); i++) {\n            LOOKUP[CHARSET.charAt(i)] = i;\n        }\n    }\n\n    /**\n     * Decodes a Bech32-encoded string into an array of 5-bit integer values.\n     * Each character is looked up in {@link #CHARSET}; its index (0–31) becomes\n     * the corresponding byte in the result.\n     *\n     * @param base32String the Bech32 character string to decode; must contain only characters\n     *                     present in {@link #CHARSET}\n     * @return a byte array of 5-bit values, one per input character\n     * @throws IllegalArgumentException if any character is not in the Bech32 character set\n     */\n    public byte[] decodeBech32CharsetToValues(String base32String) {\n        // Decode characters to 5-bit values\n        int len = base32String.length();\n        byte[] result = new byte[len];\n        for (int i = 0; i < len; i++) {\n            char c = base32String.charAt(i);\n            if (c >= LOOKUP.length || LOOKUP[c] == -1) {\n                throw new IllegalArgumentException(\"Invalid character in Bech32 string: \" + c);\n            }\n            result[i] = (byte) LOOKUP[c];\n        }\n\n        return result;\n    }\n\n    /**\n     * Return the data, fully-decoded with 8-bits per byte.\n     * @return The data, fully-decoded as a byte array.\n     */\n    private byte[] decode5to8(byte[] bytes) throws ReflectiveOperationException {\n        return invokeConvertBitsStatic(bytes, 0, bytes.length, 5, 8, false);\n    }\n\n    private byte[] decode5to8WithPadding(byte[] bytes) throws ReflectiveOperationException {\n        return invokeConvertBitsStatic(bytes, 0, bytes.length, 5, 8, true);\n    }\n\n    private byte[] encode8to5(byte[] data) throws ReflectiveOperationException {\n        return invokeConvertBitsStatic(data, 0, data.length, 8, 5, true);\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private byte[] invokeConvertBitsStatic(byte[] in, int inStart, int inLen, int fromBits, int toBits, boolean pad) throws ReflectiveOperationException {\n        Method method = Bech32.class.getDeclaredMethod(\"convertBits\", byte[].class, int.class, int.class, int.class, int.class, boolean.class);\n        method.setAccessible(true);\n        try {\n            return (byte[]) method.invoke(null, in, inStart, inLen, fromBits, toBits, pad);\n        } catch (ReflectiveOperationException e) {\n            // rethrow AddressFormatException if it's the underlying cause\n            Throwable cause = e.getCause();\n            if (cause instanceof AddressFormatException) {\n                throw (AddressFormatException) cause;\n            }\n            throw e;\n        }\n    }\n\n    /**\n     * Extracts the raw 20-byte Public Key Hash (PKH) from a Bitcoin Cash CashAddr address.\n     * The optional {@code bitcoincash:} prefix is stripped if present before decoding.\n     * After Bech32 decoding, the first byte (address type/version) and the last 6 bytes\n     * (CashAddr checksum) are discarded; the remaining bytes form the PKH.\n     *\n     * @param address the Bitcoin Cash CashAddr address, with or without the {@code bitcoincash:} prefix\n     * @return the 20-byte PKH extracted from the address\n     * @throws ReflectiveOperationException if the internal {@code Bech32.convertBits} method\n     *                                      cannot be accessed via reflection\n     */\n    public byte[] extractPKHFromBitcoinCashAddress(String address) throws ReflectiveOperationException {\n        if (address.startsWith(BITCOIN_CASH_PREFIX)) {\n            address = address.substring(BITCOIN_CASH_PREFIX.length());\n        }\n        byte[] decoded5 = decodeBech32CharsetToValues(address);\n        byte[] decoded8 = decode5to8WithPadding(decoded5);\n        // Extracts the payload portion from the decoded Bech32 data.\n        // Skips the first byte (address type/version) and removes the last 6 bytes (checksum).\n        // The result is the raw payload encoded in 5-bit format.\n        return Arrays.copyOfRange(decoded8, 1, decoded8.length - 6);\n    }\n\n    /**\n     * Returns the witness program bytes from a decoded Bech32 SegWit address.\n     * Accesses the protected {@code witnessProgram()} method of {@link Bech32.Bech32Data}\n     * via reflection because it is not exposed in the public API.\n     *\n     * @param bechData the decoded Bech32 data, typically obtained from {@link Bech32#decode(String)}\n     * @return the raw witness program bytes (e.g., the 20-byte PKH for P2WPKH)\n     * @throws ReflectiveOperationException if the protected method cannot be accessed\n     */\n    public byte[] getWitnessPrograms(Bech32.Bech32Data bechData) throws ReflectiveOperationException {\n        return invokeProtectedMethod(bechData, \"witnessProgram\", byte[].class);\n    }\n\n    /**\n     * Returns the witness version from a decoded Bech32 SegWit address.\n     * Accesses the protected {@code witnessVersion()} method of {@link Bech32.Bech32Data}\n     * via reflection because it is not exposed in the public API.\n     * <ul>\n     *   <li>Version 0 — P2WPKH and P2WSH (BIP-173)</li>\n     *   <li>Version 1 — P2TR / Taproot (BIP-341, encoded with Bech32m per BIP-350)</li>\n     * </ul>\n     *\n     * @param bechData the decoded Bech32 data, typically obtained from {@link Bech32#decode(String)}\n     * @return the witness version as a {@link Short}\n     * @throws ReflectiveOperationException if the protected method cannot be accessed\n     */\n    public Short getWitnessVersion(Bech32.Bech32Data bechData) throws ReflectiveOperationException {\n        return invokeProtectedMethod(bechData, \"witnessVersion\", Short.class);\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    private <T> T invokeProtectedMethod(Bech32.Bech32Bytes bech32Bytes, String methodName, Class<T> returnType) throws ReflectiveOperationException  {\n        Class<?> clazz = Bech32.Bech32Bytes.class;\n        Method method = clazz.getDeclaredMethod(methodName);\n        method.setAccessible(true);\n        return (T) method.invoke(bech32Bytes);\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/BitHelper.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\n\r\npublic class BitHelper {\r\n    \r\n    public static final int RADIX_HEX = 16;\r\n    \r\n    public int convertBitsToSize(int bits) {\r\n        return 1 << bits;\r\n    }\r\n    \r\n    public BigInteger getKillBits(int bits) {\r\n        return BigInteger.valueOf(2).pow(bits).subtract(BigInteger.ONE);\r\n    }\r\n    \r\n    public void assertBatchSizeInBitsIsInRange(int batchSizeInBits) {\r\n        if (batchSizeInBits < 0) {\r\n            throw new IllegalArgumentException(\"batchSizeInBits must higher or equal to 0.\");\r\n        }\r\n        if (batchSizeInBits > PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY) {\r\n            throw new IllegalArgumentException(\"batchSizeInBits must be lower or equal than \" + PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY + \".\");\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ByteBufferUtility.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Arrays;\r\nimport jdk.internal.misc.Unsafe;\r\nimport org.bouncycastle.util.encoders.Hex;\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.jspecify.annotations.Nullable;\r\n\r\npublic class ByteBufferUtility {\r\n    \r\n    /**\r\n     * Decide between {@link java.nio.DirectByteBuffer} and {@link java.nio.HeapByteBuffer}.\r\n     */\r\n    private final boolean allocateDirect;\r\n\r\n    public ByteBufferUtility(boolean allocateDirect) {\r\n        this.allocateDirect = allocateDirect;\r\n    }\r\n    \r\n    /**\r\n     * ATTENTION: The {@link Unsafe#getUnsafe} can throw an {@link java.lang.IllegalAccessError}.\r\n     * https://stackoverflow.com/questions/8462200/examples-of-forcing-freeing-of-native-memory-direct-bytebuffer-has-allocated-us\r\n     * https://stackoverflow.com/questions/13003871/how-do-i-get-the-instance-of-sun-misc-unsafe\r\n     * https://stackoverflow.com/questions/29301755/got-securityexception-in-java\r\n     * https://bugs.openjdk.org/browse/JDK-8171377\r\n     * @param byteBuffer the ByteBuffer to free\r\n     */\r\n    public void freeByteBuffer(@Nullable ByteBuffer byteBuffer) {\r\n        if (byteBuffer == null) {\r\n            return;\r\n        }\r\n\r\n        if (!byteBuffer.isDirect()) {\r\n            return;\r\n        }\r\n\r\n        Unsafe u = Unsafe.getUnsafe();\r\n        // https://bugs.openjdk.org/browse/JDK-8171377\r\n        // https://openjdk.org/jeps/8323072\r\n        // https://stackoverflow.com/questions/3496508/deallocating-direct-buffer-native-memory-in-java-for-jogl/26777380\r\n        u.invokeCleaner(byteBuffer);\r\n    }\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ByteBuffer byte array conversion\">\r\n    public byte[] byteBufferToBytes(ByteBuffer byteBuffer) {\r\n        byte[] bytes = new byte[byteBuffer.remaining()];\r\n        byteBuffer.get(bytes);\r\n        byteBuffer.rewind();\r\n        return bytes;\r\n    }\r\n    \r\n    public ByteBuffer byteArrayToByteBuffer(byte[] bytes) {\r\n        if (allocateDirect) { \r\n            return byteArrayToByteBufferAllocatedDirect(bytes);\r\n        } else {\r\n            return byteArrayToByteBufferWrapped(bytes);\r\n        }\r\n    }\r\n\r\n    private ByteBuffer byteArrayToByteBufferWrapped(byte[] bytes) {\r\n        // wrap() delivers a buffer which is already flipped\r\n        ByteBuffer wrap = ByteBuffer.wrap(bytes);\r\n        return wrap;\r\n    }\r\n\r\n    private ByteBuffer byteArrayToByteBufferAllocatedDirect(byte[] bytes) {\r\n        ByteBuffer key = ByteBuffer.allocateDirect(bytes.length);\r\n        key.put(bytes).flip();\r\n        return key;\r\n    }\r\n    \r\n    /**\r\n    * Writes a BigInteger into a ByteBuffer.\r\n    *\r\n    * @param buffer The ByteBuffer to write to.\r\n    * @param byteArray The byte array to write.\r\n    */\r\n   public static void putToByteBuffer(ByteBuffer buffer, byte[] byteArray) {\r\n       buffer.clear();\r\n       buffer.put(byteArray, 0, byteArray.length);\r\n       buffer.rewind();\r\n   }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ByteBuffer Hex conversion\">\r\n    public String getHexFromByteBuffer(ByteBuffer byteBuffer) {\r\n        byte[] array = byteBufferToBytes(byteBuffer);\r\n        String hexString = Hex.toHexString(array);\r\n        return hexString;\r\n    }\r\n\r\n    public ByteBuffer getByteBufferFromHex(String hex) {\r\n        byte[] decoded = Hex.decode(hex);\r\n        // wrap() delivers a buffer which is already flipped\r\n        final ByteBuffer byteBuffer = byteArrayToByteBuffer(decoded);\r\n        return byteBuffer;\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ensureByteBufferCapacityFitsInt\">\r\n    /**\r\n    * Validates that the given capacity fits within Java's ByteBuffer limit.\r\n    * \r\n    * @param capacity the desired buffer capacity in bytes\r\n    * @return the same value as an int, if within bounds\r\n    * @throws IllegalArgumentException if capacity exceeds Integer.MAX_VALUE or is negative\r\n    */\r\n   public static int ensureByteBufferCapacityFitsInt(long capacity) {\r\n       if (capacity < 0) {\r\n           throw new IllegalArgumentException(\"Capacity must not be negative: \" + capacity);\r\n       }\r\n       if (capacity > Integer.MAX_VALUE) {\r\n           throw new IllegalArgumentException(\"Capacity exceeds maximum ByteBuffer limit: \" + capacity);\r\n       }\r\n       return (int) capacity;\r\n   }\r\n    // </editor-fold>\r\n   \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"allocateByteBufferDirectStrict (enforce direct allocation)\">\r\n    /**\r\n     * Allocates a {@link ByteBuffer} strictly using {@link ByteBuffer#allocateDirect(int)}.\r\n     * <p>\r\n     * This method enforces that {@code allocateDirect == true}.\r\n     * It throws an {@link IllegalStateException} if heap allocation is enabled.\r\n     * Useful when native memory access is required, e.g. for OpenCL interop.\r\n     *\r\n     * @param capacity the number of bytes to allocate\r\n     * @return a direct {@link ByteBuffer}\r\n     * @throws IllegalStateException if not configured for direct allocation\r\n     */\r\n    public ByteBuffer allocateByteBufferDirectStrict(int capacity) {\r\n        if (!allocateDirect) {\r\n            throw new IllegalStateException(\"Direct allocation requested, but allocateDirect is false.\");\r\n        }\r\n        return ByteBuffer.allocateDirect(capacity);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    /**\r\n     * https://bitbucket.org/connect2id/nimbus-srp/pull-requests/6/remove-leading-zero-byte-when-converting/diff\r\n     * Converts a BigInteger into a byte array ignoring the sign of the\r\n     * BigInteger, according to SRP specification\r\n     *\r\n     * @param bigInteger BigInteger, must not be null\r\n     *\r\n     * @return byte array (leading byte is always != 0), empty array if\r\n     * BigInteger is zero.\r\n     */\r\n    public static byte[] bigIntegerToBytes(final BigInteger bigInteger) {\r\n        byte[] bytes = bigInteger.toByteArray();\r\n        if (bytes[0] == 0) {\r\n            return Arrays.copyOfRange(bytes, 1, bytes.length);\r\n        }\r\n        return bytes;\r\n    }\r\n    \r\n    private final static boolean USE_XOR_SWAP = false;\r\n    \r\n    /**\r\n     * https://stackoverflow.com/questions/12893758/how-to-reverse-the-byte-array-in-java\r\n     */\r\n    public void reverse(byte @NonNull [] array) {\r\n        if (USE_XOR_SWAP) {\r\n            int len = array.length;\r\n            for (int i = 0; i < len / 2; i++) {\r\n                array[i] ^= array[len - i - 1];\r\n                array[len - i - 1] ^= array[i];\r\n                array[i] ^= array[len - i - 1];\r\n            }\r\n        } else {\r\n            int i = 0;\r\n            int j = array.length - 1;\r\n            byte tmp;\r\n            while (j > i) {\r\n                tmp = array[j];\r\n                array[j] = array[i];\r\n                array[i] = tmp;\r\n                j--;\r\n                i++;\r\n            }\r\n        }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ByteConversion.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic class ByteConversion {\r\n    \r\n    public long mibToBytes(long mib) {\r\n        return mib * 1_024L * 1_024L;\r\n    }\r\n    \r\n    public double bytesToMib(long bytes) {\r\n        return (double)bytes / (double)(1_024L * 1_024L);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Consumer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic interface Consumer extends Interruptable {\r\n\r\n    void consumeKeys(PublicKeyBytes[] publicKeyBytes) throws InterruptedException;\r\n\r\n    void startConsumer();\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ConsumerJava.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.annotations.VisibleForTesting;\r\nimport java.nio.ByteBuffer;\r\nimport java.time.Duration;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.Future;\r\nimport java.util.concurrent.LinkedBlockingQueue;\r\nimport java.util.concurrent.ScheduledExecutorService;\r\nimport java.util.concurrent.TimeUnit;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport java.util.concurrent.atomic.AtomicLong;\r\nimport java.util.regex.Matcher;\r\nimport java.util.regex.Pattern;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.Persistence;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.lmdb.LMDBPersistence;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport org.bitcoinj.crypto.MnemonicException;\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class ConsumerJava implements Consumer {\r\n\r\n    /**\r\n     * We assume a queue might be empty after this amount of time.\r\n     * If not, some keys in the queue are not checked before shutdow.\r\n     */\r\n    @VisibleForTesting\r\n    static Duration AWAIT_DURATION_QUEUE_EMPTY = Duration.ofMinutes(1);\r\n    \r\n    public static final String MISS_PREFIX = \"miss: Could not find the address: \";\r\n    public static final String HIT_PREFIX = \"hit: Found the address: \";\r\n    public static final String VANITY_HIT_PREFIX = \"vanity pattern match: \";\r\n    public static final String HIT_SAFE_PREFIX = \"hit: safe log: \";\r\n\r\n    private Logger logger = LoggerFactory.getLogger(this.getClass());\r\n\r\n    private final KeyUtility keyUtility;\r\n    protected final AtomicLong checkedKeys = new AtomicLong();\r\n    protected final AtomicLong checkedKeysSumOfTimeToCheckContains = new AtomicLong();\r\n    protected final AtomicLong emptyConsumer = new AtomicLong();\r\n    protected final AtomicLong hits = new AtomicLong();\r\n    protected long startTime = 0;\r\n\r\n    protected final CConsumerJava consumerJava;\r\n    @VisibleForTesting\r\n    ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();\r\n\r\n    protected @Nullable Persistence persistence;\r\n    private final PersistenceUtils persistenceUtils;\r\n    \r\n    private final List<Future<Void>> consumers = new ArrayList<>();\r\n    protected final LinkedBlockingQueue<PublicKeyBytes[]> keysQueue;\r\n    private final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n    \r\n    protected final AtomicLong vanityHits = new AtomicLong();\r\n    private final @Nullable Pattern vanityPattern;\r\n    \r\n    @VisibleForTesting\r\n    final AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n    \r\n    @VisibleForTesting\r\n    final ExecutorService consumeKeysExecutorService;\r\n\r\n    protected ConsumerJava(CConsumerJava consumerJava, KeyUtility keyUtility, PersistenceUtils persistenceUtils) {\r\n        this.consumerJava = consumerJava;\r\n        this.keysQueue = new LinkedBlockingQueue<>(consumerJava.queueSize);\r\n        this.keyUtility = keyUtility;\r\n        this.persistenceUtils = persistenceUtils;\r\n        if (consumerJava.enableVanity && consumerJava.vanityPattern != null) {\r\n            this.vanityPattern = Pattern.compile(consumerJava.vanityPattern);\r\n        } else {\r\n            vanityPattern = null;\r\n        }\r\n        consumeKeysExecutorService = Executors.newFixedThreadPool(consumerJava.threads);\r\n    }\r\n\r\n    Logger getLogger() {\r\n        return logger;\r\n    }\r\n    \r\n    void setLogger(Logger logger) {\r\n        this.logger = logger;\r\n    }\r\n\r\n    protected void initLMDB() {\r\n        persistence = new LMDBPersistence(consumerJava.lmdbConfigurationReadOnly, persistenceUtils);\r\n        persistence.init();\r\n    }\r\n\r\n    protected void startStatisticsTimer() {\r\n        long period = consumerJava.printStatisticsEveryNSeconds;\r\n        if (period <= 0) {\r\n            throw new IllegalArgumentException(\"period must be greater than 0.\");\r\n        }\r\n\r\n        startTime = System.currentTimeMillis();\r\n\r\n        scheduledExecutorService.scheduleAtFixedRate(() -> {\r\n            // get transient information\r\n            long uptime = Math.max(System.currentTimeMillis() - startTime, 1);\r\n\r\n            String message = new Statistics().createStatisticsMessage(uptime, checkedKeys.get(), checkedKeysSumOfTimeToCheckContains.get(), emptyConsumer.get(), keysQueue.size(), hits.get());\r\n\r\n            // log the information\r\n            logger.info(message);\r\n        }, period, period, TimeUnit.SECONDS);\r\n    }\r\n\r\n    @Override\r\n    public void startConsumer() {\r\n        logger.debug(\"Starting {} consumer threads...\", consumerJava.threads);\r\n        for (int i = 0; i < consumerJava.threads; i++) {\r\n            consumers.add(consumeKeysExecutorService.submit(\r\n                    () -> {\r\n                        consumeKeysRunner();\r\n                        return null;\r\n                    }));\r\n        }\r\n        logger.debug(\"Successfully started {} consumer threads.\", consumers.size());\r\n    }\r\n    \r\n    /**\r\n     * This method runs in multiple threads.\r\n     */\r\n    private void consumeKeysRunner() {\r\n        logger.info(\"start consumeKeysRunner\");\r\n        final ByteBuffer threadLocalReuseableByteBuffer = ByteBuffer.allocateDirect(PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES);\r\n        \r\n        while (shouldRun.get()) {\r\n            if (keysQueue.size() >= consumerJava.queueSize) {\r\n                logger.warn(\"Attention, queue is full. Please increase queue size.\");\r\n            }\r\n            try {\r\n                consumeKeys(threadLocalReuseableByteBuffer);\r\n                // the consumeKeys method is looped inside, if the method returns it means the queue is empty\r\n                emptyConsumer.incrementAndGet();\r\n                Thread.sleep(consumerJava.delayEmptyConsumer);\r\n            } catch (InterruptedException e) {\r\n                // we need to catch the exception to not break the thread\r\n                logger.error(\"Ignore InterruptedException during Thread.sleep.\", e);\r\n            } catch (Exception e) {\r\n                // log every Exception because it's hard to debug and we do not break down the thread loop\r\n                logger.error(\"Error in consumeKeysRunner().\" , e);\r\n            }\r\n        }\r\n\r\n        byteBufferUtility.freeByteBuffer(threadLocalReuseableByteBuffer);\r\n\r\n        logger.info(\"end consumeKeysRunner\");\r\n    }\r\n    \r\n    void consumeKeys(ByteBuffer threadLocalReuseableByteBuffer) throws MnemonicException.MnemonicLengthException {\r\n        logger.trace(\"consumeKeys\");\r\n        PublicKeyBytes[] publicKeyBytesArray = keysQueue.poll();\r\n        while (publicKeyBytesArray != null) {\r\n            for (PublicKeyBytes publicKeyBytes : publicKeyBytesArray) {\r\n                if (publicKeyBytes.isOutsidePrivateKeyRange()) {\r\n                    continue;\r\n                }\r\n                \r\n                byte[] hash160Uncompressed = publicKeyBytes.getUncompressedKeyHash();\r\n                boolean containsAddressUncompressed = containsAddress(threadLocalReuseableByteBuffer, hash160Uncompressed);\r\n                \r\n                byte[] hash160Compressed = publicKeyBytes.getCompressedKeyHash();\r\n                boolean containsAddressCompressed = containsAddress(threadLocalReuseableByteBuffer, hash160Compressed);\r\n                \r\n                if (consumerJava.runtimePublicKeyCalculationCheck) {\r\n                    publicKeyBytes.runtimePublicKeyCalculationCheck(logger);\r\n                }\r\n                \r\n                if (containsAddressUncompressed) {\r\n                    // immediately log the secret\r\n                    safeLog(publicKeyBytes, hash160Uncompressed, hash160Compressed);\r\n                    hits.incrementAndGet();\r\n                    ECKey ecKeyUncompressed = ECKey.fromPrivateAndPrecalculatedPublic(publicKeyBytes.getSecretKey().toByteArray(), publicKeyBytes.getUncompressed());\r\n                    String hitMessageUncompressed = HIT_PREFIX + keyUtility.createKeyDetails(ecKeyUncompressed);\r\n                    logger.info(hitMessageUncompressed);\r\n                }\r\n\r\n                if (containsAddressCompressed) {\r\n                    // immediately log the secret\r\n                    safeLog(publicKeyBytes, hash160Uncompressed, hash160Compressed);\r\n                    hits.incrementAndGet();\r\n                    ECKey ecKeyCompressed = ECKey.fromPrivateAndPrecalculatedPublic(publicKeyBytes.getSecretKey().toByteArray(), publicKeyBytes.getCompressed());\r\n                    String hitMessageCompressed = HIT_PREFIX + keyUtility.createKeyDetails(ecKeyCompressed);\r\n                    logger.info(hitMessageCompressed);\r\n                }\r\n\r\n                if (consumerJava.enableVanity) {\r\n                    var localVanityPattern = Objects.requireNonNull(vanityPattern);\r\n                    String uncompressedKeyHashAsBase58 = publicKeyBytes.getUncompressedKeyHashAsBase58(keyUtility);\r\n                    Matcher uncompressedKeyHashAsBase58Matcher = localVanityPattern.matcher(uncompressedKeyHashAsBase58);\r\n                    if (uncompressedKeyHashAsBase58Matcher.matches()) {\r\n                        // immediately log the secret\r\n                        safeLog(publicKeyBytes, hash160Uncompressed, hash160Compressed);\r\n                        vanityHits.incrementAndGet();\r\n                        ECKey ecKeyUncompressed = ECKey.fromPrivateAndPrecalculatedPublic(publicKeyBytes.getSecretKey().toByteArray(), publicKeyBytes.getUncompressed());\r\n                        String vanityHitMessageUncompressed = VANITY_HIT_PREFIX + keyUtility.createKeyDetails(ecKeyUncompressed);\r\n                        logger.info(vanityHitMessageUncompressed);\r\n                    }\r\n\r\n                    String compressedKeyHashAsBase58 = publicKeyBytes.getCompressedKeyHashAsBase58(keyUtility);\r\n                    Matcher compressedKeyHashAsBase58Matcher = vanityPattern.matcher(compressedKeyHashAsBase58);\r\n                    if (compressedKeyHashAsBase58Matcher.matches()) {\r\n                        // immediately log the secret\r\n                        safeLog(publicKeyBytes, hash160Uncompressed, hash160Compressed);\r\n                        vanityHits.incrementAndGet();\r\n                        ECKey ecKeyCompressed = ECKey.fromPrivateAndPrecalculatedPublic(publicKeyBytes.getSecretKey().toByteArray(), publicKeyBytes.getCompressed());\r\n                        String vanityHitMessageCompressed = VANITY_HIT_PREFIX + keyUtility.createKeyDetails(ecKeyCompressed);\r\n                        logger.info(vanityHitMessageCompressed);\r\n                    }\r\n                }\r\n\r\n                if (!containsAddressUncompressed && !containsAddressCompressed) {\r\n                    if (logger.isTraceEnabled()) {\r\n                        ECKey ecKeyUncompressed = ECKey.fromPrivateAndPrecalculatedPublic(publicKeyBytes.getSecretKey().toByteArray(), publicKeyBytes.getUncompressed());\r\n                        String missMessageUncompressed = MISS_PREFIX + keyUtility.createKeyDetails(ecKeyUncompressed);\r\n                        logger.trace(missMessageUncompressed);\r\n\r\n                        ECKey ecKeyCompressed = ECKey.fromPrivateAndPrecalculatedPublic(publicKeyBytes.getSecretKey().toByteArray(), publicKeyBytes.getCompressed());\r\n                        String missMessageCompressed = MISS_PREFIX + keyUtility.createKeyDetails(ecKeyCompressed);\r\n                        logger.trace(missMessageCompressed);\r\n                    }\r\n                }\r\n            }\r\n            publicKeyBytesArray = keysQueue.poll();\r\n        }\r\n    }\r\n\r\n    public boolean containsAddress(ByteBuffer threadLocalReuseableByteBuffer, byte[] hash160) {\r\n        threadLocalReuseableByteBuffer.rewind();\r\n        threadLocalReuseableByteBuffer.put(hash160);\r\n        threadLocalReuseableByteBuffer.flip();\r\n        return containsAddress(threadLocalReuseableByteBuffer);\r\n    }\r\n    \r\n    /**\r\n     * Logs key information in a safe and robust way to avoid losing critical data\r\n     * in case of a runtime exception.\r\n     * <p>\r\n     * The primary goal of this method is to ensure that if a valid secret key (i.e., a hit)\r\n     * is found, its corresponding BigInteger value is immediately logged. Since logging a\r\n     * BigInteger is unlikely to fail, this is the first and most essential piece of information.\r\n     * <p>\r\n     * Logging additional details such as the uncompressed/compressed public keys and their\r\n     * hash160 values may theoretically trigger runtime exceptions (e.g., due to malformed data\r\n     * or encoding issues). To mitigate the risk of losing the crucial secret value in such rare\r\n     * cases, it is logged first.\r\n     * <p>\r\n     * All logs are prefixed consistently with {@code HIT_SAFE_PREFIX} to make hits easily searchable.\r\n     *\r\n     * @param publicKeyBytes         the public key bytes wrapper\r\n     * @param hash160Uncompressed    the hash160 of the uncompressed public key\r\n     * @param hash160Compressed      the hash160 of the compressed public key\r\n     */\r\n    private void safeLog(PublicKeyBytes publicKeyBytes, byte[] hash160Uncompressed, byte[] hash160Compressed) {\r\n        logger.info(HIT_SAFE_PREFIX +\"publicKeyBytes.getSecretKey(): \" + publicKeyBytes.getSecretKey());\r\n        logger.info(HIT_SAFE_PREFIX +\"publicKeyBytes.getUncompressed(): \" + Hex.encodeHexString(publicKeyBytes.getUncompressed()));\r\n        logger.info(HIT_SAFE_PREFIX +\"publicKeyBytes.getCompressed(): \" + Hex.encodeHexString(publicKeyBytes.getCompressed()));\r\n        logger.info(HIT_SAFE_PREFIX +\"hash160Uncompressed: \" + Hex.encodeHexString(hash160Uncompressed));\r\n        logger.info(HIT_SAFE_PREFIX +\"hash160Compressed: \" + Hex.encodeHexString(hash160Compressed));\r\n    }\r\n\r\n    private boolean containsAddress(ByteBuffer hash160AsByteBuffer) {\r\n        long timeBefore = System.currentTimeMillis();\r\n        if (logger.isTraceEnabled()) {\r\n            logger.trace(\"Time before persistence.containsAddress: \" + timeBefore);\r\n        }\r\n        Persistence localPersistence = Objects.requireNonNull(persistence);\r\n        boolean containsAddress = localPersistence.containsAddress(hash160AsByteBuffer);\r\n        long timeAfter = System.currentTimeMillis();\r\n        long timeDelta = timeAfter - timeBefore;\r\n        checkedKeys.incrementAndGet();\r\n        checkedKeysSumOfTimeToCheckContains.addAndGet(timeDelta);\r\n        if (logger.isTraceEnabled()) {\r\n            logger.trace(\"Time after persistence.containsAddress: \" + timeAfter);\r\n            logger.trace(\"Time delta: \" + timeDelta);\r\n        }\r\n        return containsAddress;\r\n    }\r\n\r\n    @Override\r\n    public void consumeKeys(PublicKeyBytes[] publicKeyBytes) throws InterruptedException {\r\n        if(logger.isDebugEnabled()){\r\n            logger.debug(\"keysQueue.put(publicKeyBytes) with length: \" + publicKeyBytes.length);\r\n        }\r\n        \r\n        keysQueue.put(publicKeyBytes);\r\n        \r\n        if(logger.isDebugEnabled()){\r\n            logger.debug(\"keysQueue.size(): \" + keysQueue.size());\r\n        }\r\n    }\r\n    \r\n    /**\r\n    * Initiates a graceful shutdown of the consumer:\r\n    * <ul>\r\n    *   <li>Stops internal execution by setting the control flag</li>\r\n    *   <li>Shuts down scheduled tasks and consumer thread pool</li>\r\n    *   <li>Waits for all consumer threads to finish within a defined timeout</li>\r\n    *   <li>Logs any unclean terminations</li>\r\n    *   <li>Closes LMDB persistence and releases resources</li>\r\n    * </ul>\r\n    *\r\n    * This method ensures a clean and deterministic shutdown without relying on thread interruption signals.\r\n    */\r\n    @Override\r\n    public void interrupt() {\r\n        logger.info(\"Interrupt initiated: stopping consumer execution...\");\r\n        shouldRun.set(false);\r\n        scheduledExecutorService.shutdown();\r\n        consumeKeysExecutorService.shutdown();\r\n        logger.info(\"Waiting for termination of {} consumer threads (timeout: {} seconds)...\", consumers.size(), AWAIT_DURATION_QUEUE_EMPTY.getSeconds());\r\n        try {\r\n            boolean terminated = consumeKeysExecutorService.awaitTermination(AWAIT_DURATION_QUEUE_EMPTY.getSeconds(), TimeUnit.SECONDS);\r\n            if (!terminated) {\r\n                logger.warn(\"Timeout reached. Some consumer threads may not have terminated cleanly.\");\r\n            }\r\n        } catch (InterruptedException e) {\r\n            logger.error(\"Interrupted while awaiting consumer termination.\", e);\r\n            throw new RuntimeException(e);\r\n        }\r\n        try {\r\n            if(persistence != null){\r\n                Persistence localPersistence = Objects.requireNonNull(persistence);\r\n                localPersistence.close();\r\n                persistence = null;\r\n            }\r\n        } catch (Exception e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n        logger.debug(\"Interrupt complete: resources released and persistence closed.\");\r\n    }\r\n    \r\n    @VisibleForTesting\r\n    int keysQueueSize() {\r\n        return keysQueue.size();\r\n    }\r\n    \r\n    @Override\r\n    public String toString() {\r\n        return \"ConsumerJava@\" + Integer.toHexString(System.identityHashCode(this));\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/EndiannessConverter.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.nio.ByteOrder;\n\n/**\n * Utility class for converting byte arrays between different endianness formats.\n * <p>\n * The conversion is based on a {@code sourceOrder} and a {@code targetOrder}.\n * If they differ, the array is reversed.\n * </p>\n */\npublic class EndiannessConverter {\n\n    private final ByteOrder sourceOrder;\n    private final ByteOrder targetOrder;\n    private final ByteBufferUtility byteBufferUtility;\n\n    /**\n     * Creates a converter based on source and target byte orders.\n     *\n     * @param sourceOrder\n     *     The byte order of the input data.\n     * @param targetOrder\n     *     The desired byte order after conversion.\n     * @param byteBufferUtility\n     *     The {@link ByteBufferUtility} instance used for reversing byte arrays.\n     */\n    EndiannessConverter(ByteOrder sourceOrder, ByteOrder targetOrder, ByteBufferUtility byteBufferUtility) {\n        this.sourceOrder = sourceOrder;\n        this.targetOrder = targetOrder;\n        this.byteBufferUtility = byteBufferUtility;\n    }\n\n    /**\n     * Converts the byte array if the source and target endianness differ.\n     * The array may be modified in place.\n     *\n     * @param array The byte array to convert.\n     */\n    public void convertEndian(byte[] array) {\n        if (mustConvert()) {\n            byteBufferUtility.reverse(array);\n        }\n    }\n\n    /**\n     * Checks if a byte order conversion is required.\n     *\n     * @return true if source and target orders differ, false otherwise\n     */\n    public boolean mustConvert() {\n        return sourceOrder != targetOrder;\n    }\n\n    public ByteOrder getSourceOrder() {\n        return sourceOrder;\n    }\n\n    public ByteOrder getTargetOrder() {\n        return targetOrder;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/FileHelper.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class FileHelper {\r\n    \r\n    private final Logger logger = LoggerFactory.getLogger(FileHelper.class);\r\n    \r\n    public List<File> stringsToFiles(List<String> strings) {\r\n        List<File> files = new ArrayList<>();\r\n        for (String string : strings) {\r\n            files.add(new File(string));\r\n        }\r\n        return files;\r\n    }\r\n\r\n    public void assertFilesExists(List<File> files) throws IllegalArgumentException {\r\n        logger.info(\"Validating that all input files exist...\");\r\n        for (File file : files) {\r\n            if (!file.exists()) {\r\n                throw new IllegalArgumentException(\"Missing file: \" + file);\r\n            }\r\n            logger.debug(\"Found file: {}\", file);\r\n        }\r\n        logger.info(\"All input files verified successfully.\");\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Finder.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.annotations.VisibleForTesting;\r\nimport com.google.common.collect.ImmutableMap;\r\nimport java.time.Duration;\r\nimport java.time.temporal.ChronoUnit;\r\nimport java.util.*;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.TimeUnit;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CFinder;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducer;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport org.bitcoinj.base.Network;\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\nimport java.util.function.*;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerIdIsNotUniqueException;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerIdNullException;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerIdUnknownException;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaBip39;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaIncremental;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaRandom;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaSocket;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaWebSocket;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaZmq;\r\n\r\npublic class Finder implements Interruptable {\r\n\r\n    /**\r\n     * We must define a maximum time to wait for terminate. Wait for 100 thousand years is enough.\r\n     */\r\n    @VisibleForTesting\r\n    static Duration AWAIT_DURATION_TERMINATE = Duration.ofDays(365L * 1000L);\r\n    \r\n    protected Logger logger = LoggerFactory.getLogger(this.getClass());\r\n    \r\n    private final CFinder finder;\r\n    \r\n    private final Map<String, KeyProducer> keyProducers = new HashMap<>();\r\n    \r\n    @Nullable\r\n    private ConsumerJava consumerJava;\r\n    \r\n    private final List<ProducerOpenCL> openCLProducers = new ArrayList<>();\r\n    private final List<ProducerJava> javaProducers = new ArrayList<>();\r\n    private final List<ProducerJavaSecretsFiles> javaProducersSecretsFiles = new ArrayList<>();\r\n    \r\n    @VisibleForTesting\r\n    final ExecutorService producerExecutorService = Executors.newCachedThreadPool();\r\n    \r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n    private final BitHelper bitHelper = new BitHelper();\r\n    \r\n    public Finder(CFinder finder) {\r\n        this.finder = finder;\r\n    }\r\n    \r\n    public void startKeyProducer() {\r\n        logger.info(\"startKeyProducer\");\r\n        processKeyProducers(\r\n            finder.keyProducerJavaRandom,\r\n            cKeyProducerJavaRandom -> new KeyProducerJavaRandom(cKeyProducerJavaRandom, keyUtility, bitHelper, LoggerFactory.getLogger(KeyProducerJavaRandom.class)),\r\n            cKeyProducerJavaRandom -> cKeyProducerJavaRandom.keyProducerId,\r\n            keyProducers\r\n        );\r\n\r\n        processKeyProducers(\r\n            finder.keyProducerJavaBip39,\r\n            cKeyProducerJavaBip39 -> new KeyProducerJavaBip39(cKeyProducerJavaBip39, keyUtility, bitHelper, LoggerFactory.getLogger(KeyProducerJavaBip39.class)),\r\n            cKeyProducerJavaBip39 -> cKeyProducerJavaBip39.keyProducerId,\r\n            keyProducers\r\n        );\r\n\r\n        processKeyProducers(\r\n            finder.keyProducerJavaIncremental,\r\n            cKeyProducerJavaIncremental -> new KeyProducerJavaIncremental(cKeyProducerJavaIncremental, keyUtility, bitHelper, LoggerFactory.getLogger(KeyProducerJavaIncremental.class)),\r\n            cKeyProducerJavaIncremental -> cKeyProducerJavaIncremental.keyProducerId,\r\n            keyProducers\r\n        );\r\n\r\n        processKeyProducers(\r\n            finder.keyProducerJavaSocket,\r\n            cKeyProducerJavaSocket -> new KeyProducerJavaSocket(cKeyProducerJavaSocket, keyUtility, bitHelper, LoggerFactory.getLogger(KeyProducerJavaSocket.class)),\r\n            cKeyProducerJavaSocket -> cKeyProducerJavaSocket.keyProducerId,\r\n            keyProducers\r\n        );\r\n\r\n        processKeyProducers(\r\n            finder.keyProducerJavaWebSocket,\r\n            cKeyProducerJavaWebSocket -> new KeyProducerJavaWebSocket(cKeyProducerJavaWebSocket, keyUtility, bitHelper, LoggerFactory.getLogger(KeyProducerJavaWebSocket.class)),\r\n            cKeyProducerJavaWebSocket -> cKeyProducerJavaWebSocket.keyProducerId,\r\n            keyProducers\r\n        );\r\n\r\n        processKeyProducers(\r\n            finder.keyProducerJavaZmq,\r\n            cKeyProducerJavaZmq -> new KeyProducerJavaZmq(cKeyProducerJavaZmq, keyUtility, bitHelper, LoggerFactory.getLogger(KeyProducerJavaZmq.class)),\r\n            cKeyProducerJavaZmq -> cKeyProducerJavaZmq.keyProducerId,\r\n            keyProducers\r\n        );\r\n    }\r\n    \r\n    private <T, K> void processKeyProducers(\r\n        List<T> configList,\r\n        Function<T, K> constructor,\r\n        Function<T, String> getId,\r\n        Map<String, K> keyProducers\r\n    ) {\r\n        if (configList != null) {\r\n            for (T config : configList) {\r\n                String keyProducerId = getId.apply(config);\r\n                if (keyProducerId == null) {\r\n                    throw new KeyProducerIdNullException();\r\n                }\r\n                if (keyProducers.containsKey(keyProducerId)) {\r\n                    throw new KeyProducerIdIsNotUniqueException(keyProducerId);\r\n                }\r\n                K keyProducer = constructor.apply(config);\r\n                keyProducers.put(keyProducerId, keyProducer);\r\n            }\r\n        }\r\n    }\r\n\r\n    public void startConsumer() {\r\n        logger.info(\"startConsumer\");\r\n        CConsumerJava localCConsumerJava = Objects.requireNonNull(finder.consumerJava);\r\n\r\n        consumerJava = new ConsumerJava(localCConsumerJava, keyUtility, persistenceUtils);\r\n        consumerJava.initLMDB();\r\n        consumerJava.startConsumer();\r\n        consumerJava.startStatisticsTimer();\r\n    }\r\n\r\n    public void configureProducer() {\r\n        logger.info(\"configureProducer\");\r\n        var localConsumerJava = Objects.requireNonNull(consumerJava);\r\n        processProducers(\r\n                finder.producerJava,\r\n                bitHelper::assertBatchSizeInBitsIsInRange,\r\n                this::getKeyProducer,\r\n                (config, keyProducer) -> new ProducerJava(config, localConsumerJava, keyUtility, keyProducer, bitHelper),\r\n                javaProducers\r\n        );\r\n\r\n        processProducers(\r\n                finder.producerJavaSecretsFiles,\r\n                bitHelper::assertBatchSizeInBitsIsInRange,\r\n                this::getKeyProducer,\r\n                (config, keyProducer) -> new ProducerJavaSecretsFiles(config, localConsumerJava, keyUtility, keyProducer, bitHelper),\r\n                javaProducersSecretsFiles\r\n        );\r\n\r\n        processProducers(\r\n                finder.producerOpenCL,\r\n                bitHelper::assertBatchSizeInBitsIsInRange,\r\n                this::getKeyProducer,\r\n                (config, keyProducer) -> new ProducerOpenCL(config, localConsumerJava, keyUtility, keyProducer, bitHelper),\r\n                openCLProducers\r\n        );\r\n    }\r\n    \r\n    private <T extends CProducer, P> void processProducers(\r\n        List<T> configs,\r\n        java.util.function.Consumer<Integer> batchSizeAssert,\r\n        Function<T, KeyProducer> getKeyProducer,\r\n        BiFunction<T, KeyProducer, P> producerConstructor,\r\n        Collection<P> targetCollection\r\n    ) {\r\n        if (configs != null) {\r\n            for (T config : configs) {\r\n                batchSizeAssert.accept(config.batchSizeInBits);\r\n                KeyProducer keyProducer = getKeyProducer.apply(config);\r\n                P producer = producerConstructor.apply(config, keyProducer);\r\n                targetCollection.add(producer);\r\n            }\r\n        }\r\n    }\r\n\r\n    public KeyProducer getKeyProducer(CProducer cProducer) throws RuntimeException {\r\n        KeyProducer keyProducer = keyProducers.get(cProducer.keyProducerId);\r\n        if(keyProducer == null) {\r\n            throw new KeyProducerIdUnknownException(cProducer.keyProducerId);\r\n        }\r\n        return keyProducer;\r\n    }\r\n    \r\n    public void initProducer() {\r\n        logger.info(\"initProducer\");\r\n        for (Producer producer : getAllProducers()) {\r\n            producer.initProducer();\r\n        }\r\n    }\r\n    \r\n    public void startProducer() {\r\n        logger.info(\"startProducer\");\r\n        for (Producer producer : getAllProducers()) {\r\n            producerExecutorService.submit(producer);\r\n        }\r\n    }\r\n    \r\n    public void shutdownAndAwaitTermination() {\r\n        logger.info(\"shutdownAndAwaitTermination\");\r\n        try {\r\n            producerExecutorService.shutdown();\r\n            producerExecutorService.awaitTermination(AWAIT_DURATION_TERMINATE.get(ChronoUnit.SECONDS), TimeUnit.SECONDS);\r\n        } catch (InterruptedException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n        \r\n        // no producers are running anymore, the consumer can be interrupted\r\n        if (consumerJava != null) {\r\n            logger.info(\"Interrupt: \" + consumerJava);\r\n            consumerJava.interrupt();\r\n            consumerJava = null;\r\n        }\r\n        logger.info(\"consumerJava released.\");\r\n    }\r\n    \r\n    @Override\r\n    public void interrupt() {\r\n        logger.info(\"interrupt called: delegate interrupt to all keyProducers and producers\");\r\n        \r\n        // Interrupt all Producers\r\n        for (Producer producer : getAllProducers()) {\r\n            logger.info(\"Interrupt Producer: \" + producer.toString());\r\n            producer.interrupt();\r\n            logger.info(\"waitTillProducerNotRunning ...\");\r\n            producer.waitTillProducerNotRunning();\r\n            producer.releaseProducer();\r\n        }\r\n        freeAllProducers();\r\n        \r\n        // Interrupt all KeyProducers\r\n        for (KeyProducer keyProducer : getKeyProducers().values()) {\r\n            logger.info(\"Interrupt KeyProducer: \" + keyProducer.toString());\r\n            keyProducer.interrupt();\r\n        }\r\n        freeAllKeyProducers();\r\n\r\n        logger.info(\"All producers released and freed.\");\r\n    }\r\n    \r\n    public Map<String, KeyProducer> getKeyProducers() {\r\n        return ImmutableMap.copyOf(keyProducers);\r\n    }\r\n    \r\n    public List<Producer> getAllProducers() {\r\n        List<Producer> producers = new ArrayList<>();\r\n        producers.addAll(javaProducers);\r\n        producers.addAll(javaProducersSecretsFiles);\r\n        producers.addAll(openCLProducers);\r\n        return producers;\r\n    }\r\n    \r\n    public void freeAllProducers() {\r\n        javaProducers.clear();\r\n        javaProducersSecretsFiles.clear();\r\n        openCLProducers.clear();\r\n    }\r\n    \r\n    public void freeAllKeyProducers() {\r\n        keyProducers.clear();\r\n    }\r\n    \r\n    public List<Consumer> getAllConsumers() {\r\n        List<Consumer> consumers = new ArrayList<>();\r\n        if (consumerJava != null) {\r\n            consumers.add(consumerJava);\r\n        }\r\n        return consumers;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Interruptable.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic interface Interruptable {\r\n    void interrupt();\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/KeyUtility.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Random;\r\nimport static net.ladenthin.bitcoinaddressfinder.PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT;\r\nimport org.bitcoinj.base.LegacyAddress;\r\nimport org.bitcoinj.base.Network;\r\n\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport org.bitcoinj.crypto.MnemonicCode;\r\nimport org.bitcoinj.crypto.MnemonicException;\r\nimport org.bouncycastle.util.encoders.Hex;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\n/**\r\n * https://stackoverflow.com/questions/5399798/byte-array-and-int-conversion-in-java/11419863\r\n * https://stackoverflow.com/questions/21087651/how-to-efficiently-change-endianess-of-byte-array-in-java\r\n * https://stackoverflow.com/questions/7619058/convert-a-byte-array-to-integer-in-java-and-vice-versa\r\n */\r\npublic record KeyUtility(@NonNull Network network, @NonNull ByteBufferUtility byteBufferUtility) {\r\n\r\n    public BigInteger killBits(BigInteger bigInteger, BigInteger killBits) {\r\n        return bigInteger.andNot(killBits);\r\n    }\r\n\r\n\r\n    /**\r\n     * Require networkParameters.\r\n     */\r\n    public ByteBuffer getHash160ByteBufferFromBase58String(String base58) {\r\n        LegacyAddress address = LegacyAddress.fromBase58(base58, network);\r\n        byte[] hash160 = address.getHash();\r\n        return byteBufferUtility.byteArrayToByteBuffer(hash160);\r\n    }\r\n\r\n    public String toBase58(byte[] hash160) {\r\n        LegacyAddress address = LegacyAddress.fromPubKeyHash(network, hash160);\r\n        return address.toBase58();\r\n    }\r\n\r\n    public BigInteger createSecret(int maximumBitLength, Random random) {\r\n        BigInteger secret = new BigInteger(maximumBitLength, random);\r\n        return secret;\r\n    }\r\n\r\n    public ECKey createECKey(BigInteger bi, boolean compressed) {\r\n        return ECKey.fromPrivate(bi, compressed);\r\n    }\r\n\r\n    public String createKeyDetails(ECKey key) throws MnemonicException.MnemonicLengthException {\r\n        BigInteger privateKeyBigInteger = key.getPrivKey();\r\n        byte[] privateKeyBytes = key.getPrivKeyBytes();\r\n        String privateKeyHex = key.getPrivateKeyAsHex();\r\n        String privateKeyAsWiF = key.getPrivateKeyAsWiF(network);\r\n\r\n        byte[] hash160 = key.getPubKeyHash();\r\n        String publicKeyHash160Hex = Hex.toHexString(hash160);\r\n        String publicKeyHash160Base58 = toBase58(hash160);\r\n\r\n        String logprivateKeyBigInteger = \"privateKeyBigInteger: [\" + privateKeyBigInteger + \"]\";\r\n        String logprivateKeyBytes = \"privateKeyBytes: [\" + Arrays.toString(privateKeyBytes) + \"]\";\r\n        String logprivateKeyHex = \"privateKeyHex: [\" + privateKeyHex + \"]\";\r\n        String logWiF = \"WiF: [\" + privateKeyAsWiF + \"]\";\r\n        String logPublicKeyAsHex = \"publicKeyAsHex: [\" + key.getPublicKeyAsHex() + \"]\";\r\n        String logPublicKeyHash160 = \"publicKeyHash160Hex: [\" + publicKeyHash160Hex + \"]\";\r\n        String logPublicKeyHash160Base58 = \"publicKeyHash160Base58: [\" + publicKeyHash160Base58 + \"]\";\r\n        String logCompressed = \"Compressed: [\" + key.isCompressed() + \"]\";\r\n        String logMnemonic = createMnemonics(privateKeyBytes);\r\n\r\n        String space = \" \";\r\n        return logprivateKeyBigInteger + space + logprivateKeyBytes + space + logprivateKeyHex + space + logWiF + space + logPublicKeyAsHex + space + logPublicKeyHash160 + space + logPublicKeyHash160Base58 + space + logCompressed + space + logMnemonic;\r\n    }\r\n\r\n    public String createMnemonics(byte[] privateKeyBytes) {\r\n        StringBuilder logMnemonic = new StringBuilder(\"Mnemonic:\");\r\n        for (BIP39Wordlist wordList : BIP39Wordlist.values()) {\r\n            try {\r\n                MnemonicCode mnemonicCode = new MnemonicCode(wordList.getWordListStream(), null);\r\n                List<String> mnemonics = mnemonicCode.toMnemonic(privateKeyBytes);\r\n                logMnemonic.append(\" \");\r\n                logMnemonic.append(wordList.name());\r\n                logMnemonic.append(\": [\");\r\n                boolean first = true;\r\n                for (String mnemonic : mnemonics) {\r\n                    if (!first) {\r\n                        logMnemonic.append(wordList.getSeparator());\r\n                    }\r\n                    logMnemonic.append(mnemonic);\r\n                    first = false;\r\n                }\r\n                logMnemonic.append(\"]\");\r\n            } catch (IOException | IllegalArgumentException ex) {\r\n                throw new RuntimeException(ex);\r\n            }\r\n        }\r\n        return logMnemonic.toString();\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ByteBuffer LegacyAddress conversion\">\r\n    public ByteBuffer addressToByteBuffer(LegacyAddress address) {\r\n        ByteBuffer byteBuffer = byteBufferUtility.byteArrayToByteBuffer(address.getHash());\r\n        return byteBuffer;\r\n    }\r\n\r\n    /**\r\n     * Require networkParameters.\r\n     */\r\n    public LegacyAddress byteBufferToAddress(ByteBuffer byteBuffer) {\r\n        return LegacyAddress.fromPubKeyHash(network, byteBufferUtility.byteBufferToBytes(byteBuffer));\r\n    }\r\n    // </editor-fold>\r\n\r\n    public BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly, int privateKeyMaxNumBits, SecretSupplier supplier) throws NoMoreSecretsAvailableException {\r\n        int length = returnStartSecretOnly ? 1 : overallWorkSize;\r\n        BigInteger[] secrets = new BigInteger[length];\r\n        for (int i = 0; i < secrets.length; i++) {\r\n            secrets[i] = supplier.nextSecret(privateKeyMaxNumBits);\r\n        }\r\n        return secrets;\r\n    }\r\n\r\n    @Deprecated\r\n    static int byteArrayToInt(byte[] b) {\r\n        return byteArrayToInt(b, 0);\r\n    }\r\n\r\n    @Deprecated\r\n    static int byteArrayToInt(byte[] b, int offsetByteArray) {\r\n        return b[3 + offsetByteArray] & 0xFF\r\n                | (b[2 + offsetByteArray] & 0xFF) << 8\r\n                | (b[1 + offsetByteArray] & 0xFF) << 16\r\n                | (b[offsetByteArray] & 0xFF) << 24;\r\n    }\r\n\r\n    @Deprecated\r\n    static void byteArrayToIntArray(byte[] b, int offsetByteArray, int[] i, int offsetIntArray) {\r\n        i[offsetIntArray] = byteArrayToInt(b, offsetByteArray);\r\n    }\r\n\r\n    @Deprecated\r\n    static byte[] intToByteArray(int a) {\r\n        byte[] b = new byte[4];\r\n        intToByteArray(a, b, 0);\r\n        return b;\r\n    }\r\n\r\n    @Deprecated\r\n    static void intToByteArray(int a, byte[] b, int offset) {\r\n        b[offset] = (byte) ((a >> 24) & 0xFF);\r\n        b[1 + offset] = (byte) ((a >> 16) & 0xFF);\r\n        b[2 + offset] = (byte) ((a >> 8) & 0xFF);\r\n        b[3 + offset] = (byte) (a & 0xFF);\r\n    }\r\n\r\n    @Deprecated\r\n    private static void swapIntBytes(byte[] bytes) {\r\n        assert bytes.length % 4 == 0;\r\n        for (int i = 0; i < bytes.length; i += 4) {\r\n            // swap 0 and 3\r\n            byte tmp = bytes[i];\r\n            bytes[i] = bytes[i + 3];\r\n            bytes[i + 3] = tmp;\r\n            // swap 1 and 2\r\n            byte tmp2 = bytes[i + 1];\r\n            bytes[i + 1] = bytes[i + 2];\r\n            bytes[i + 2] = tmp2;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Converts a BigInteger to a fixed-length 64-character (32-byte) lowercase\r\n     * hex string. Preserves leading zeros, which are otherwise dropped by\r\n     * BigInteger.toByteArray().\r\n     *\r\n     * @param value The BigInteger to convert.\r\n     * @return A 64-character hex string representing the value as a 256-bit\r\n     * number.\r\n     */\r\n    public String bigIntegerToFixedLengthHex(BigInteger value) {\r\n        byte[] raw = value.toByteArray();\r\n        byte[] result = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\r\n        int srcPos = Math.max(0, raw.length - result.length);\r\n        int length = Math.min(result.length, raw.length);\r\n        System.arraycopy(raw, srcPos, result, result.length - length, length);\r\n        return Hex.toHexString(result);\r\n    }\r\n\r\n    /**\r\n     * Converts a 32-byte array into a positive BigInteger, preserving leading\r\n     * zeros. The array must be exactly\r\n     * {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BYTES} bytes.\r\n     *\r\n     * @param buffer a 32-byte array representing the unsigned big-endian\r\n     *               integer\r\n     * @return a positive BigInteger constructed from the buffer\r\n     */\r\n    public BigInteger bigIntegerFromUnsignedByteArray(byte[] buffer) {\r\n        if (buffer.length != PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES) {\r\n            throw new IllegalArgumentException(\"Expected buffer of length \" + PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES);\r\n        }\r\n        return new BigInteger(1, buffer);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/LMDBToAddressFile.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.lmdb.LMDBPersistence;\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBToAddressFile;\r\nimport org.bitcoinj.base.Network;\r\n\r\npublic class LMDBToAddressFile implements Runnable, Interruptable {\r\n\r\n    private final Logger logger = LoggerFactory.getLogger(LMDBToAddressFile.class);\r\n    \r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n\r\n    private final CLMDBToAddressFile lmdbToAddressFile;\r\n    \r\n    private final AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n\r\n    public LMDBToAddressFile(CLMDBToAddressFile lmdbToAddressFile) {\r\n        this.lmdbToAddressFile = lmdbToAddressFile;\r\n    }\r\n\r\n    @Override\r\n    public void run() {\r\n        PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n        try (LMDBPersistence persistence = new LMDBPersistence(lmdbToAddressFile.lmdbConfigurationReadOnly, persistenceUtils)) {\r\n            persistence.init();\r\n            logger.info(\"writeAllAmounts ...\");\r\n            File addressesFile = new File(lmdbToAddressFile.addressesFile);\r\n            // delete before write all addresses\r\n            boolean deleted = addressesFile.delete();\r\n            if(deleted) {\r\n                logger.info(\"deleted existing address file \" + addressesFile);\r\n            }\r\n            persistence.writeAllAmountsToAddressFile(addressesFile, lmdbToAddressFile.addressFileOutputFormat, shouldRun);\r\n            logger.info(\"writeAllAmounts done\");\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void interrupt() {\r\n        shouldRun.set(false);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/NetworkParameterFactory.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.core.NetworkParameters;\r\nimport org.bitcoinj.params.MainNetParams;\r\n\r\npublic class NetworkParameterFactory {\r\n    \r\n    public Network getNetwork() {\r\n        return getNetworkParameters().network();\r\n    }\r\n    \r\n    private NetworkParameters getNetworkParameters() {\r\n        NetworkParameters networkParameters = MainNetParams.get();\r\n        return networkParameters;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/OpenCLContext.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.annotations.VisibleForTesting;\r\nimport com.google.common.io.Resources;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.net.URL;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLBuilder;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDevice;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDeviceSelection;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatformSelector;\r\nimport static org.jocl.CL.clBuildProgram;\r\nimport static org.jocl.CL.clCreateCommandQueueWithProperties;\r\nimport static org.jocl.CL.clCreateContext;\r\nimport static org.jocl.CL.clCreateKernel;\r\nimport static org.jocl.CL.clCreateProgramWithSource;\r\nimport static org.jocl.CL.clReleaseCommandQueue;\r\nimport static org.jocl.CL.clReleaseContext;\r\nimport org.jocl.cl_command_queue;\r\nimport org.jocl.cl_context;\r\nimport org.jocl.cl_context_properties;\r\nimport org.jocl.cl_device_id;\r\nimport org.jocl.cl_kernel;\r\nimport org.jocl.cl_program;\r\nimport org.jocl.cl_queue_properties;\r\nimport org.jocl.CL;\r\nimport static org.jocl.CL.clReleaseKernel;\r\nimport static org.jocl.CL.clReleaseProgram;\r\n\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class OpenCLContext implements ReleaseCLObject {\r\n\r\n    private final Logger logger;\r\n\r\n    public String[] getOpenCLPrograms() throws IOException {\r\n        List<String> resourceNamesContent = getResourceNamesContent(getResourceNames());\r\n        List<String> resourceNamesContentWithReplacements = new ArrayList<>();\r\n        for (String content : resourceNamesContent) {\r\n            String contentWithReplacements = content;\r\n            contentWithReplacements = contentWithReplacements.replaceAll(\"#include.*\", \"\");\r\n            resourceNamesContentWithReplacements.add(contentWithReplacements);\r\n        }\r\n        String[] openClPrograms = resourceNamesContentWithReplacements.toArray(new String[0]);\r\n        return openClPrograms;\r\n    }\r\n    \r\n    private List<String> getResourceNames() {\r\n        List<String> resourceNames = new ArrayList<>();\r\n        resourceNames.add(\"inc_defines.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_vendor.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_types.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_platform.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_platform.cl\");\r\n        resourceNames.add(\"copyfromhashcat/inc_common.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_common.cl\");\r\n        resourceNames.add(\"copyfromhashcat/inc_hash_sha256.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_hash_sha256.cl\");\r\n        resourceNames.add(\"copyfromhashcat/inc_hash_ripemd160.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_hash_ripemd160.cl\");\r\n\r\n        resourceNames.add(\"copyfromhashcat/inc_ecc_secp256k1.h\");\r\n        resourceNames.add(\"copyfromhashcat/inc_ecc_secp256k1.cl\");\r\n        resourceNames.add(\"inc_ecc_secp256k1custom.cl\");\r\n        return resourceNames;\r\n    }\r\n    \r\n    private final static String KERNEL_NAME = \"generateKeysKernel_grid\";\r\n    private final static boolean EXCEPTIONS_ENABLED = true;\r\n    \r\n    private final CProducerOpenCL producerOpenCL;\r\n    private final BitHelper bitHelper;\r\n\r\n    private @Nullable OpenCLDevice device;\r\n    private @Nullable cl_context context;\r\n    private @Nullable cl_command_queue commandQueue;\r\n    private @Nullable cl_program program;\r\n    private @Nullable cl_kernel kernel;\r\n    private @Nullable OpenClTask openClTask;\r\n    private final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n    \r\n    private boolean closed = false;\r\n    \r\n    public OpenCLContext(CProducerOpenCL producerOpenCL, BitHelper bitHelper) {\r\n        this(producerOpenCL, bitHelper, LoggerFactory.getLogger(OpenCLContext.class));\r\n    }\r\n\r\n    @VisibleForTesting\r\n    OpenCLContext(CProducerOpenCL producerOpenCL, BitHelper bitHelper, Logger logger) {\r\n        this.producerOpenCL = producerOpenCL;\r\n        this.bitHelper = bitHelper;\r\n        this.logger = logger;\r\n    }\r\n    \r\n    public void init() throws IOException {\r\n\r\n        // #################### general ####################\r\n\r\n        // Enable exceptions and subsequently omit error checks in this sample\r\n        CL.setExceptionsEnabled(EXCEPTIONS_ENABLED);\r\n\r\n        List<OpenCLPlatform> platforms = new OpenCLBuilder().build();\r\n\r\n        OpenCLPlatformSelector platformSelector = new OpenCLPlatformSelector();\r\n        OpenCLDeviceSelection selection = platformSelector.select(\r\n            platforms,\r\n            producerOpenCL.platformIndex,\r\n            producerOpenCL.deviceType,\r\n            producerOpenCL.deviceIndex\r\n        );\r\n        \r\n        device = selection.device();\r\n        logger.info(\"Selected OpenCL device:\\n{}\", device.toStringPretty());\r\n        cl_context_properties contextProperties = selection.contextProperties();\r\n        cl_device_id[] cl_device_ids = new cl_device_id[]{device.device()};\r\n        \r\n        // Create a context for the selected device\r\n        context = clCreateContext(contextProperties, 1, cl_device_ids, null, null, null);\r\n        \r\n        // Create a command-queue for the selected device\r\n        cl_queue_properties properties = new cl_queue_properties();\r\n        commandQueue = clCreateCommandQueueWithProperties(context, device.device(), properties, null);\r\n        \r\n        // #################### kernel specifix ####################\r\n        \r\n        String[] openCLPrograms = getOpenCLPrograms();\r\n        // Create the program from the source code\r\n        program = clCreateProgramWithSource(context, openCLPrograms.length, openCLPrograms, null, null);\r\n\r\n        // Build the program\r\n        clBuildProgram(program, 0, null, null, null, null);\r\n        \r\n        // Create the kernel\r\n        kernel = clCreateKernel(program, KERNEL_NAME, null);\r\n        \r\n        openClTask = new OpenClTask(context, producerOpenCL, bitHelper, byteBufferUtility);\r\n    }\r\n\r\n    @Nullable\r\n    OpenClTask getOpenClTask() {\r\n        return openClTask;\r\n    }\r\n    \r\n    @Override\r\n    public boolean isClosed() {\r\n        return closed;\r\n    }\r\n\r\n    @Override\r\n    public void close() {\r\n        device = null;\r\n        if (!closed) {\r\n            if (openClTask != null) {\r\n                openClTask = null;\r\n            }\r\n            if (kernel != null) {\r\n                clReleaseKernel(kernel);\r\n                kernel = null;\r\n            }\r\n            if (program != null) {\r\n                clReleaseProgram(program);\r\n                program = null;\r\n            }\r\n            if (commandQueue != null) {\r\n                clReleaseCommandQueue(commandQueue);\r\n                commandQueue = null;\r\n            }\r\n            if (context != null) {\r\n                clReleaseContext(context);\r\n                context = null;\r\n            }\r\n            closed = true;\r\n        }\r\n    }\r\n\r\n    public OpenCLGridResult createKeys(BigInteger privateKeyBase) {\r\n        OpenClTask localOpenClTask = Objects.requireNonNull(openClTask);\r\n        cl_kernel localKernel = Objects.requireNonNull(kernel);\r\n        cl_command_queue localCommandQueue = Objects.requireNonNull(commandQueue);\r\n\r\n        localOpenClTask.setSrcPrivateKeyChunk(privateKeyBase);\r\n        ByteBuffer dstByteBuffer = localOpenClTask.executeKernel(localKernel, localCommandQueue);\r\n\r\n        OpenCLGridResult openCLGridResult = new OpenCLGridResult(privateKeyBase, producerOpenCL.getOverallWorkSize(bitHelper), dstByteBuffer);\r\n        return openCLGridResult;\r\n    }\r\n\r\n    private static List<String> getResourceNamesContent(List<String> resourceNames) throws IOException {\r\n        List<String> contents = new ArrayList<>();\r\n        for (String resourceName : resourceNames) {\r\n            URL url = Resources.getResource(resourceName);\r\n            String content = Resources.toString(url, StandardCharsets.UTF_8);\r\n            contents.add(content);\r\n        }\r\n        return contents;\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/OpenCLGridResult.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.util.Arrays;\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava;\r\n\r\npublic class OpenCLGridResult {\r\n    \r\n    /**\r\n     * Enable additional validation to check if generated uncompressed keys are not all zero.\r\n     * <p>\r\n     * This should remain <b>disabled in production</b> to avoid unnecessary performance overhead.\r\n     * Useful only during debugging or when validating OpenCL/GPU kernel correctness.\r\n     * </p>\r\n     * <p>\r\n     * Superseded by {@link PublicKeyBytes#runtimePublicKeyCalculationCheck(org.slf4j.Logger)}\r\n     * and its activation via {@link CConsumerJava#runtimePublicKeyCalculationCheck}.\r\n     * </p>\r\n     */\r\n    private static final boolean ENABLE_UNCOMPRESSED_KEY_VALIDATION = false;\r\n    \r\n    private final BigInteger secretKeyBase;\r\n    private final int workSize;\r\n    private final ByteBuffer result;\r\n    \r\n    OpenCLGridResult(BigInteger secretKeyBase, int workSize, ByteBuffer result) {\r\n        this.secretKeyBase = secretKeyBase;\r\n        this.workSize = workSize;\r\n        this.result = result;\r\n    }\r\n\r\n    public BigInteger getSecretKeyBase() {\r\n        return secretKeyBase;\r\n    }\r\n\r\n    public int getWorkSize() {\r\n        return workSize;\r\n    }\r\n\r\n    public ByteBuffer getResult() {\r\n        return result;\r\n    }\r\n    \r\n    /**\r\n     * Reads the computed public keys from the OpenCL result buffer and converts them into the correct format.\r\n     * <p>\r\n     * OpenCL writes 32-bit integers (u32) into memory using the device's native endianness (typically Little-Endian).\r\n     * However, Bitcoin/ECC standards expect public keys in Big-Endian (MSB-first) byte order.\r\n     * <p>\r\n     * Therefore, after reading X and Y coordinates for each public key, the bytes of each coordinate\r\n     * must be reversed if the device endianness differs from the target Big-Endian format.\r\n     * <p>\r\n     * The resulting format matches the uncompressed SEC (Standards for Efficient Cryptography) format:\r\n     * <ul>\r\n     *   <li>Prefix byte 0x04</li>\r\n     *   <li>Followed by 32 bytes for X coordinate (Big-Endian)</li>\r\n     *   <li>Followed by 32 bytes for Y coordinate (Big-Endian)</li>\r\n     * </ul>\r\n     * <p>\r\n     * <b>Note:</b> This operation is relatively time-consuming because it involves memory copying and per-key byte order correction.\r\n     *\r\n     * @return an array of {@link PublicKeyBytes} containing the reconstructed public keys.\r\n     */\r\n    public PublicKeyBytes[] getPublicKeyBytes() {\r\n        ByteBuffer readOnlyResult = result.asReadOnlyBuffer();\r\n        PublicKeyBytes[] publicKeys = new PublicKeyBytes[workSize];\r\n        \r\n        for (int i = 0; i < workSize; i++) {\r\n            PublicKeyBytes publicKeyBytes = getPublicKeyFromByteBufferXY(readOnlyResult, i, secretKeyBase);\r\n            publicKeys[i] = publicKeyBytes;\r\n        }\r\n        return publicKeys;\r\n    }\r\n    \r\n    public static byte[] trimU32PrefixBytes(byte[] fullArray) {\r\n        final int PREFIX_BYTES_TO_SKIP = 3;\r\n        return Arrays.copyOfRange(fullArray, PREFIX_BYTES_TO_SKIP, fullArray.length);\r\n    }\r\n\r\n    /**\r\n     * Reconstructs a {@link PublicKeyBytes} object from the OpenCL kernel output.\r\n     * <p>\r\n     * This method extracts a block of bytes for one key from the given {@link ByteBuffer},\r\n     * based on the work-item index ({@code keyNumber}). The layout of each chunk is defined\r\n     * by constants in {@link PublicKeyBytes}:\r\n     * <ul>\r\n     *   <li>{@code CHUNK_SIZE_00_NUM_BYTES_BIG_ENDIAN_X}: X coordinate (Big-Endian)</li>\r\n     *   <li>{@code CHUNK_SIZE_01_NUM_BYTES_BIG_ENDIAN_Y}: Y coordinate (Big-Endian)</li>\r\n     *   <li>{@code CHUNK_SIZE_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED}: RIPEMD-160 hash of the uncompressed key</li>\r\n     *   <li>{@code CHUNK_SIZE_11_NUM_BYTES_RIPEMD160_COMPRESSED}: RIPEMD-160 hash of the compressed key</li>\r\n     * </ul>\r\n     * <p>\r\n     * The method reads and assembles the uncompressed public key in SEC format\r\n     * ({@code 04 || X || Y}) using the provided X and Y coordinates. It also\r\n     * extracts the precomputed RIPEMD-160 hashes for both uncompressed and\r\n     * compressed formats from the buffer.\r\n     * <p>\r\n     * If the reconstructed secret key is zero, a predefined fallback key is returned.\r\n     *\r\n     * @param resultBuffer the buffer containing OpenCL results for all keys\r\n     * @param keyNumber the zero-based index of the key to extract\r\n     * @param secretKeyBase the base secret key used to derive the current key\r\n     * @return the reconstructed {@link PublicKeyBytes} object\r\n     * @throws RuntimeException if the key bytes are invalid (e.g. all coordinate bytes are zero)\r\n     */\r\n    private static final PublicKeyBytes getPublicKeyFromByteBufferXY(ByteBuffer resultBuffer, int keyNumber, BigInteger secretKeyBase) {\r\n        BigInteger secret = AbstractProducer.calculateSecretKey(secretKeyBase, keyNumber);\r\n        if(BigInteger.ZERO.equals(secret)) {\r\n            // the calculated key is invalid, return a fallback\r\n            return PublicKeyBytes.INVALID_KEY_ONE;\r\n        }\r\n        \r\n        final int keyOffsetInByteBuffer = PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * keyNumber;\r\n        \r\n        // Get X\r\n        byte[] xFromBigEndian = new byte[PublicKeyBytes.CHUNK_SIZE_00_NUM_BYTES_BIG_ENDIAN_X];\r\n        resultBuffer.get(keyOffsetInByteBuffer + PublicKeyBytes.CHUNK_OFFSET_00_NUM_BYTES_BIG_ENDIAN_X, xFromBigEndian, 0, xFromBigEndian.length);\r\n        \r\n        // Get Y\r\n        byte[] yFromBigEndian = new byte[PublicKeyBytes.CHUNK_SIZE_01_NUM_BYTES_BIG_ENDIAN_Y];\r\n        resultBuffer.get(keyOffsetInByteBuffer + PublicKeyBytes.CHUNK_OFFSET_01_NUM_BYTES_BIG_ENDIAN_Y, yFromBigEndian, 0, yFromBigEndian.length);\r\n        \r\n        // Assemble uncompressed key\r\n        byte[] uncompressedFromBigEndian = PublicKeyBytes.assembleUncompressedPublicKey(xFromBigEndian, yFromBigEndian);\r\n        \r\n        // Get RIPEMD160 for uncompressed key\r\n        byte[] ripemd160Uncompressed = new byte[PublicKeyBytes.CHUNK_SIZE_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED];\r\n        resultBuffer.get(keyOffsetInByteBuffer + PublicKeyBytes.CHUNK_OFFSET_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED, ripemd160Uncompressed, 0, ripemd160Uncompressed.length);\r\n        \r\n        // Get RIPEMD160 for uncompressed key\r\n        byte[] ripemd160Compressed = new byte[PublicKeyBytes.CHUNK_SIZE_11_NUM_BYTES_RIPEMD160_COMPRESSED];\r\n        resultBuffer.get(keyOffsetInByteBuffer + PublicKeyBytes.CHUNK_OFFSET_11_NUM_BYTES_RIPEMD160_COMPRESSED, ripemd160Compressed, 0, ripemd160Compressed.length);\r\n\r\n        if (ENABLE_UNCOMPRESSED_KEY_VALIDATION) {\r\n            boolean allZero = PublicKeyBytes.isAllCoordinateBytesZero(uncompressedFromBigEndian);\r\n            if (allZero) {\r\n                throw new RuntimeException(\"Invalid GPU result: all coordinate bytes are zero in uncompressed public key.\");\r\n            }\r\n        }\r\n        \r\n        PublicKeyBytes publicKeyBytes = new PublicKeyBytes(secret, uncompressedFromBigEndian,  ripemd160Uncompressed, ripemd160Compressed);\r\n        \r\n        return publicKeyBytes;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/OpenClTask.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.annotations.VisibleForTesting;\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.ByteOrder;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducer;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\r\nimport static org.jocl.CL.CL_MEM_READ_ONLY;\r\nimport static org.jocl.CL.CL_MEM_USE_HOST_PTR;\r\nimport static org.jocl.CL.CL_MEM_WRITE_ONLY;\r\nimport static org.jocl.CL.CL_TRUE;\r\nimport static org.jocl.CL.clCreateBuffer;\r\nimport static org.jocl.CL.clEnqueueNDRangeKernel;\r\nimport static org.jocl.CL.clEnqueueReadBuffer;\r\nimport static org.jocl.CL.clEnqueueWriteBuffer;\r\nimport static org.jocl.CL.clFinish;\r\nimport static org.jocl.CL.clReleaseMemObject;\r\nimport static org.jocl.CL.clSetKernelArg;\r\nimport org.jocl.Pointer;\r\nimport org.jocl.Sizeof;\r\nimport org.jocl.cl_command_queue;\r\nimport org.jocl.cl_context;\r\nimport org.jocl.cl_kernel;\r\nimport org.jocl.cl_mem;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class OpenClTask implements ReleaseCLObject {\r\n\r\n    protected Logger logger = LoggerFactory.getLogger(this.getClass());\r\n    \r\n    private final static int PRIVATE_KEY_SOURCE_SIZE_IN_BYTES = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES;\r\n    \r\n    private final CProducerOpenCL cProducer;\r\n\r\n    private final cl_context context;\r\n    \r\n    private final SourceArgument privateKeySourceArgument;\r\n    \r\n    private final BitHelper bitHelper;\r\n    private final ByteBufferUtility byteBufferUtility;\r\n    private final BigInteger maxPrivateKeyForBatchSize;\r\n    private final PrivateKeyValidator privateKeyValidator;\r\n\r\n    private boolean closed = false;\r\n\r\n    public abstract static class CLByteBufferPointerArgument implements ReleaseCLObject {\r\n        /**\r\n         * Controls how memory is allocated for the OpenCL output buffer.\r\n         *\r\n         * If set to {@link org.jocl.CL#CL_MEM_USE_HOST_PTR}, the OpenCL buffer is created using a host pointer,\r\n         * meaning the host's {@link ByteBuffer} is directly used by the device (zero-copy if supported).\r\n         * This may reduce memory copy overhead on some platforms, but:\r\n         * <ul>\r\n         *     <li>It requires the buffer to remain valid and pinned in memory.</li>\r\n         *     <li>On some OpenCL implementations or devices (e.g. discrete GPUs), it may cause slower access due to lack of true zero-copy support.</li>\r\n         *     <li>Debugging and compatibility issues can arise if host memory alignment or page-locking requirements aren't met.</li>\r\n         * </ul>\r\n         *\r\n         * If set to {@link org.jocl.CL#CL_MEM_WRITE_ONLY}, the buffer is created with no reference to host memory,\r\n         * and OpenCL manages the memory internally. This is typically safer and potentially faster on discrete GPUs,\r\n         * although it requires an explicit copy back to the host after kernel execution.\r\n         *\r\n         * In most cases, {@link org.jocl.CL#CL_MEM_WRITE_ONLY} (i.e. setting this flag to {@code false}) is more robust and portable.\r\n         */\r\n        protected static final boolean USE_HOST_PTR = false;\r\n\r\n        protected final ByteBuffer byteBuffer;\r\n        protected final Pointer hostMemoryPointer;\r\n        protected final cl_mem mem;\r\n        protected final Pointer clMemPointer;\r\n        private boolean closed = false;\r\n\r\n        public CLByteBufferPointerArgument(ByteBuffer byteBuffer, Pointer hostMemoryPointer, cl_mem mem, Pointer clMemPointer) {\r\n            this.byteBuffer = byteBuffer;\r\n            this.hostMemoryPointer = hostMemoryPointer;\r\n            this.mem = mem;\r\n            this.clMemPointer = clMemPointer;\r\n        }\r\n\r\n        public ByteBuffer getByteBuffer() {\r\n            return byteBuffer;\r\n        }\r\n\r\n        /** Used for reading/writing data to the host via clEnqueueRead/WriteBuffer. */\r\n        public Pointer getHostMemoryPointer() {\r\n            return hostMemoryPointer;\r\n        }\r\n\r\n        /** Used to pass the buffer to the kernel via clSetKernelArg. */\r\n        public Pointer getClMemPointer() {\r\n            return clMemPointer;\r\n        }\r\n\r\n        public cl_mem getMem() {\r\n            return mem;\r\n        }\r\n\r\n        @Override\r\n        public boolean isClosed() {\r\n            return closed;\r\n        }\r\n\r\n        @Override\r\n        public void close() {\r\n            if (!closed) {\r\n                clReleaseMemObject(mem);\r\n                closed = true;\r\n            }\r\n        }\r\n    }\r\n\r\n    public static class DestinationArgument extends CLByteBufferPointerArgument {\r\n        \r\n        private DestinationArgument(ByteBuffer byteBuffer, Pointer hostMemoryPointer, cl_mem mem, Pointer clMemPointer) {\r\n            super(byteBuffer, hostMemoryPointer, mem, clMemPointer);\r\n        }\r\n\r\n        public static DestinationArgument create(cl_context context, long sizeInBytes) {\r\n            final ByteBuffer byteBuffer = ByteBuffer.allocateDirect(ByteBufferUtility.ensureByteBufferCapacityFitsInt(sizeInBytes));\r\n            final Pointer hostMemoryPointer = Pointer.to(byteBuffer);\r\n            final cl_mem mem;\r\n\r\n            if (USE_HOST_PTR) {\r\n                mem = clCreateBuffer(context, CL_MEM_USE_HOST_PTR, sizeInBytes, hostMemoryPointer, null);\r\n            } else {\r\n                mem = clCreateBuffer(context, CL_MEM_WRITE_ONLY, sizeInBytes, null, null);\r\n            }\r\n            final Pointer clMemPointer = Pointer.to(mem);\r\n\r\n            return new DestinationArgument(byteBuffer, hostMemoryPointer, mem, clMemPointer);\r\n        }\r\n        \r\n    }\r\n    \r\n    public static class SourceArgument extends CLByteBufferPointerArgument {\r\n\r\n        private SourceArgument(ByteBuffer byteBuffer, Pointer hostMemoryPointer, cl_mem mem, Pointer clMemPointer) {\r\n            super(byteBuffer, hostMemoryPointer, mem, clMemPointer);\r\n        }\r\n\r\n        public static SourceArgument create(cl_context context, long sizeInBytes) {\r\n            final ByteBuffer byteBuffer = ByteBuffer.allocateDirect(ByteBufferUtility.ensureByteBufferCapacityFitsInt(sizeInBytes));\r\n            final Pointer hostMemoryPointer = Pointer.to(byteBuffer);\r\n            final cl_mem mem = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, sizeInBytes, hostMemoryPointer, null);\r\n            final Pointer clMemPointer = Pointer.to(mem);\r\n            return new SourceArgument(byteBuffer, hostMemoryPointer, mem, clMemPointer);\r\n        }\r\n    }\r\n\r\n    // Only available after init\r\n    public OpenClTask(cl_context context, CProducerOpenCL cProducer, BitHelper bitHelper, ByteBufferUtility byteBufferUtility) {\r\n        this.context = context;\r\n        this.cProducer = cProducer;\r\n        this.bitHelper = bitHelper;\r\n        this.byteBufferUtility = byteBufferUtility;\r\n        this.privateKeyValidator = new PrivateKeyValidator();\r\n        this.maxPrivateKeyForBatchSize = privateKeyValidator.getMaxPrivateKeyForBatchSize(cProducer.batchSizeInBits);\r\n        this.privateKeySourceArgument = SourceArgument.create(context, PRIVATE_KEY_SOURCE_SIZE_IN_BYTES);\r\n    }\r\n\r\n    public long getDstSizeInBytes() {\r\n        return (long) PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * cProducer.getOverallWorkSize(bitHelper);\r\n    }\r\n\r\n    /**\r\n    * Writes the base private key to the source buffer in the format expected by the OpenCL kernel.\r\n    * <p>\r\n    * The method ensures that the provided private key is valid for the current batch size. If it exceeds\r\n    * the allowed range, a {@link PrivateKeyTooLargeException} is thrown.\r\n    * <p>\r\n    * Internally, the private key is first converted to a byte array in Big-Endian format (as returned\r\n    * by {@link BigInteger#toByteArray()}). Because the OpenCL kernel expects the private key as a\r\n    * {@code __global const u32 *k} array in <strong>Little-Endian</strong> word order, the byte array\r\n    * is then converted from Big-Endian to Little-Endian before being written to the OpenCL input buffer.\r\n    * <p>\r\n    * This matches the behavior of the OpenCL kernel {@code generateKeysKernel_grid}, which reads the key\r\n    * using {@code copy_u32_array(k_littleEndian_local, k, ...)} assuming Little-Endian input and applies\r\n    * the work-item ID to the least-significant word.\r\n    *\r\n    * @param privateKeyBase the base private key used as input to the OpenCL kernel\r\n    * @throws PrivateKeyTooLargeException if the key is too large for the current batch size\r\n    */\r\n    public void setSrcPrivateKeyChunk(BigInteger privateKeyBase) {\r\n        if (privateKeyValidator.isInvalidWithBatchSize(privateKeyBase, maxPrivateKeyForBatchSize)) {\r\n            throw new PrivateKeyTooLargeException(privateKeyBase, maxPrivateKeyForBatchSize, cProducer.batchSizeInBits);\r\n        }\r\n\r\n        // BigInteger.toByteArray() always returns a big-endian (MSB-first) representation, \r\n        // meaning the most significant byte (MSB) comes first.\r\n        // Therefore, the source format is always Big Endian.\r\n        final byte[] byteArray = ByteBufferUtility.bigIntegerToBytes(privateKeyBase);\r\n        EndiannessConverter endiannessConverter = new EndiannessConverter(ByteOrder.BIG_ENDIAN, ByteOrder.LITTLE_ENDIAN, byteBufferUtility);\r\n        endiannessConverter.convertEndian(byteArray);\r\n        ByteBufferUtility.putToByteBuffer(privateKeySourceArgument.getByteBuffer(), byteArray);\r\n    }\r\n    \r\n    @VisibleForTesting\r\n    public SourceArgument getPrivateKeySourceArgument() {\r\n        return privateKeySourceArgument;\r\n    }\r\n\r\n    public ByteBuffer executeKernel(cl_kernel kernel, cl_command_queue commandQueue) {\r\n        final long dstSizeInBytes = getDstSizeInBytes();\r\n        // Allocate a new destination buffer so that cloning after kernel execution is unnecessary\r\n        try (final DestinationArgument destinationArgument = DestinationArgument.create(context, dstSizeInBytes) ) {\r\n            // Set the work-item dimensions\r\n            final long totalResultCount = bitHelper.convertBitsToSize(cProducer.batchSizeInBits);\r\n            final int loopCount = cProducer.loopCount;\r\n            final long adjustedWorkSize = totalResultCount / loopCount;\r\n            \r\n            // Validate loopCount constraints\r\n            if (loopCount < 1) {\r\n                throw new IllegalArgumentException(\"loopCount must be >= 1.\");\r\n            }\r\n            if (loopCount > totalResultCount) {\r\n                throw new IllegalArgumentException(\"loopCount must not exceed total result count. Given: \" + loopCount + \", max: \" + totalResultCount);\r\n            }\r\n            if (totalResultCount % loopCount != 0) {\r\n                throw new IllegalArgumentException(\"batchSizeInBits is not divisible by loopCount; result count would be invalid.\");\r\n            }\r\n            \r\n            final long[] global_work_size = new long[]{adjustedWorkSize};\r\n            final long[] localWorkSize = null; // new long[]{1}; // enabling the system to choose the work-group size.\r\n            final int workDim = 1;\r\n            \r\n            // Set the arguments for the kernel\r\n            clSetKernelArg(kernel, 0, Sizeof.cl_mem, destinationArgument.getClMemPointer());\r\n            clSetKernelArg(kernel, 1, Sizeof.cl_mem, privateKeySourceArgument.getClMemPointer());\r\n            clSetKernelArg(kernel, 2, Sizeof.cl_uint, Pointer.to(new int[] { loopCount }));\r\n\r\n            {\r\n                // write src buffer\r\n                clEnqueueWriteBuffer(commandQueue,\r\n                        privateKeySourceArgument.getMem(),\r\n                        CL_TRUE,\r\n                        0,\r\n                        PRIVATE_KEY_SOURCE_SIZE_IN_BYTES,\r\n                        privateKeySourceArgument.getHostMemoryPointer(),\r\n                        0,\r\n                        null,\r\n                        null\r\n                );\r\n                clFinish(commandQueue);\r\n            }\r\n            {\r\n                // execute the kernel\r\n                final long beforeExecute = System.currentTimeMillis();\r\n                clEnqueueNDRangeKernel(\r\n                        commandQueue,\r\n                        kernel,\r\n                        workDim,\r\n                        null,\r\n                        global_work_size,\r\n                        localWorkSize,\r\n                        0,\r\n                        null,\r\n                        null\r\n                );\r\n                clFinish(commandQueue);\r\n\r\n                final long afterExecute = System.currentTimeMillis();\r\n\r\n                if (logger.isTraceEnabled()) {\r\n                    logger.trace(\"Executed OpenCL kernel in \" + (afterExecute - beforeExecute) + \"ms\");\r\n                }\r\n            }\r\n            {\r\n                // read the dst buffer\r\n                final long beforeRead = System.currentTimeMillis();\r\n\r\n                clEnqueueReadBuffer(commandQueue,\r\n                        destinationArgument.getMem(),\r\n                        CL_TRUE,\r\n                        0,\r\n                        dstSizeInBytes,\r\n                        destinationArgument.getHostMemoryPointer(),\r\n                        0,\r\n                        null,\r\n                        null\r\n                );\r\n                clFinish(commandQueue);\r\n                destinationArgument.close();\r\n\r\n                final long afterRead = System.currentTimeMillis();\r\n                if (logger.isTraceEnabled()) {\r\n                    logger.trace(\"Read OpenCL data \"+((dstSizeInBytes / 1024) / 1024) + \"Mb in \" + (afterRead - beforeRead) + \"ms\");\r\n                }\r\n            }\r\n            return destinationArgument.getByteBuffer();\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public boolean isClosed() {\r\n        return closed;\r\n    }\r\n    \r\n    @Override\r\n    public void close() {\r\n        if(!closed) {\r\n            privateKeySourceArgument.close();\r\n            closed = true;\r\n            // hint: destinationArgument will be released immediately\r\n        }\r\n    }\r\n\r\n    /**\r\n     * https://stackoverflow.com/questions/3366925/deep-copy-duplicate-of-javas-bytebuffer/4074089\r\n     */\r\n    private static ByteBuffer cloneByteBuffer(final ByteBuffer original) {\r\n        // Create clone with same capacity as original.\r\n        final ByteBuffer clone = (original.isDirect())\r\n                ? ByteBuffer.allocateDirect(original.capacity())\r\n                : ByteBuffer.allocate(original.capacity());\r\n\r\n        // Create a read-only copy of the original.\r\n        // This allows reading from the original without modifying it.\r\n        final ByteBuffer readOnlyCopy = original.asReadOnlyBuffer();\r\n\r\n        // Flip and read from the original.\r\n        readOnlyCopy.flip();\r\n        clone.put(readOnlyCopy);\r\n\r\n        return clone;\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/PrivateKeyTooLargeException.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.math.BigInteger;\n\n/**\n * Exception thrown when a given private key exceeds the safe upper bound\n * for use in grid-based key chunking (incrementing the base key).\n * <p>\n * The maximum allowed private key is {@link PublicKeyBytes#MAX_PRIVATE_KEY}.\n * This exception is typically thrown if the base key plus the chunk range (2^bits) exceeds this bound.\n */\npublic class PrivateKeyTooLargeException extends IllegalArgumentException {\n\n    private final BigInteger providedKey;\n    private final BigInteger maxAllowedKey;\n    private final int batchSizeInBits;\n\n    public PrivateKeyTooLargeException(BigInteger providedKey, BigInteger maxAllowedKey, int batchSizeInBits) {\n        super(buildMessage(providedKey, maxAllowedKey, batchSizeInBits));\n        this.providedKey = providedKey;\n        this.maxAllowedKey = maxAllowedKey;\n        this.batchSizeInBits = batchSizeInBits;\n    }\n\n    private static String buildMessage(BigInteger providedKey, BigInteger maxAllowedKey, int batchSizeInBits) {\n        return \"Private key exceeds maximum allowed range for chunked grid mode: \" +\n               \"\\nProvided key:        0x\" + providedKey.toString(16) +\n               \"\\nMaximum allowed key: 0x\" + maxAllowedKey.toString(16) +\n               \"\\n(batchSizeInBits = \" + batchSizeInBits + \")\" +\n               \"\\nThe maximum private key is defined in: PublicKeyBytes.MAX_PRIVATE_KEY\";\n    }\n\n    public BigInteger getProvidedKey() {\n        return providedKey;\n    }\n\n    public BigInteger getMaxAllowedKey() {\n        return maxAllowedKey;\n    }\n\n    public int getBatchSizeInBits() {\n        return batchSizeInBits;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/PrivateKeyValidator.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\n/**\r\n * Validates and manipulates private keys according to secp256k1 constraints.\r\n * <p>\r\n * This helper class encapsulates logic for checking if private keys fall within\r\n * valid ranges, and for correcting invalid keys to a known replacement value.\r\n * It is particularly useful for grid-based key generation where batch sizes must\r\n * be carefully bounded to avoid exceeding the secp256k1 private key limit.\r\n */\r\npublic class PrivateKeyValidator {\r\n\r\n    /**\r\n     * Calculates the maximum allowed private key value that can safely be used as a base\r\n     * for grid-based key generation without exceeding the secp256k1 private key limit.\r\n     * <p>\r\n     * This is necessary for chunked or grid-based generation where the base key is incremented\r\n     * by up to 2^batchSizeInBits - 1.\r\n     *\r\n     * @param batchSizeInBits The number of bits used for batch size (i.e., the number of keys generated in one grid chunk).\r\n     *                        Must be in the range [0, {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BITS}].\r\n     * @return The maximum base private key that will not overflow when incremented by the grid.\r\n     * @throws IllegalArgumentException if batchSizeInBits is outside the valid range\r\n     * @throws IllegalStateException if batchSizeInBits is too large and no valid keys remain\r\n     */\r\n    public BigInteger getMaxPrivateKeyForBatchSize(int batchSizeInBits) {\r\n        if (batchSizeInBits < 0 || batchSizeInBits > PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS) {\r\n            throw new IllegalArgumentException(\"batchSizeInBits must be between 0 and \" + PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS);\r\n        }\r\n\r\n        // 2^batchSizeInBits represents the maximum offset (grid size)\r\n        BigInteger maxOffset = BigInteger.ONE.shiftLeft(batchSizeInBits);\r\n\r\n        // Subtract maxOffset - 1 to ensure that baseKey + (2^bits - 1) ≤ MAX_PRIVATE_KEY\r\n        BigInteger maxSafeKey = PublicKeyBytes.MAX_PRIVATE_KEY.subtract(maxOffset).add(BigInteger.ONE);\r\n\r\n        if (maxSafeKey.signum() < 0) {\r\n            throw new IllegalStateException(\"batchSizeInBits too large; no valid private keys remain.\");\r\n        }\r\n\r\n        return maxSafeKey;\r\n    }\r\n\r\n    /**\r\n     * Checks whether a private key base exceeds the maximum allowed value for a given batch size.\r\n     *\r\n     * @param privateKeyBase the base private key to check\r\n     * @param maxPrivateKeyForBatchSize the maximum allowed value for the batch size\r\n     * @return true if the key exceeds the maximum; false otherwise\r\n     */\r\n    public boolean isInvalidWithBatchSize(@NonNull BigInteger privateKeyBase, @NonNull BigInteger maxPrivateKeyForBatchSize) {\r\n        return privateKeyBase.compareTo(maxPrivateKeyForBatchSize) > 0;\r\n    }\r\n\r\n    /**\r\n     * Checks whether a private key falls outside the valid range for secp256k1.\r\n     * <p>\r\n     * Valid private keys are in the range [{@link PublicKeyBytes#MIN_VALID_PRIVATE_KEY}, {@link PublicKeyBytes#MAX_PRIVATE_KEY}].\r\n     *\r\n     * @param secret the private key to check\r\n     * @return true if the key is outside the valid range; false otherwise\r\n     */\r\n    public boolean isOutsidePrivateKeyRange(@NonNull BigInteger secret) {\r\n        return secret.compareTo(PublicKeyBytes.MIN_VALID_PRIVATE_KEY) < 0\r\n                || secret.compareTo(PublicKeyBytes.MAX_PRIVATE_KEY) > 0;\r\n    }\r\n\r\n    /**\r\n     * Returns a valid private key, or a replacement value if the input is invalid.\r\n     * <p>\r\n     * If the input key is outside the valid range, this method returns\r\n     * {@link PublicKeyBytes#INVALID_PRIVATE_KEY_REPLACEMENT}. Otherwise, it returns the input unchanged.\r\n     *\r\n     * @param secret the private key to validate\r\n     * @return the input key if valid, or the replacement value if invalid\r\n     */\r\n    public @NonNull BigInteger returnValidPrivateKey(@NonNull BigInteger secret) {\r\n        if (isOutsidePrivateKeyRange(secret)) {\r\n            return PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT;\r\n        }\r\n        return secret;\r\n    }\r\n\r\n    /**\r\n     * Replaces invalid private keys in an array with a known replacement value.\r\n     * <p>\r\n     * Each element in the array is checked and, if invalid, replaced with\r\n     * {@link PublicKeyBytes#INVALID_PRIVATE_KEY_REPLACEMENT}. Valid keys are left unchanged.\r\n     *\r\n     * @param secrets the array of private keys to validate and correct (modified in-place)\r\n     */\r\n    public void replaceInvalidPrivateKeys(@NonNull BigInteger[] secrets) {\r\n        for (int i = 0; i < secrets.length; i++) {\r\n            secrets[i] = returnValidPrivateKey(secrets[i]);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Producer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport java.util.Random;\r\n\r\npublic interface Producer extends Runnable, Interruptable, ProducerStateProvider {\r\n    \r\n    /**\r\n     * Initialize the producer to procue keys with\r\n     * {@link #produceKeys()} continuously.\r\n     */\r\n    void initProducer();\r\n    \r\n    /**\r\n     * Release the producer.\r\n     */\r\n    void releaseProducer();\r\n\r\n    /**\r\n     * Create multiple keys for a specific bit length using {@link Random} and\r\n     * push them to the {@link Consumer}.\r\n     * \r\n     * Specifically, any 256-bit number between {@code 0x1} and {@link PublicKeyBytes#MAX_PRIVATE_KEY} is a valid private key.\r\n     */\r\n    void produceKeys() throws Exception;\r\n    \r\n    /**\r\n     * Processes a provided secret base, which may be used for key generation or other cryptographic\r\n     * operations in the implementation of the producer.\r\n     *\r\n     * @param secretBase the secret base value to be processed, represented as a {@link BigInteger}\r\n     */\r\n    void processSecretBase(BigInteger secretBase);\r\n    \r\n    /**\r\n     * Processes an array of secrets represented as BigInteger values.\r\n     *\r\n     * @param secrets an array of BigInteger objects representing the secrets to be processed\r\n     */\r\n    void processSecrets(BigInteger[] secrets);\r\n    \r\n    /**\r\n     * Blocks till the producer is not running anymore.\r\n     */\r\n    void waitTillProducerNotRunning();\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ProducerJava.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJava;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\n\r\npublic class ProducerJava extends AbstractProducer {\r\n\r\n    protected final CProducerJava producerJava;\r\n\r\n    public ProducerJava(CProducerJava producerJava, Consumer consumer, KeyUtility keyUtility, KeyProducer keyProducer, BitHelper bitHelper) {\r\n        super(producerJava, consumer, keyUtility, keyProducer, bitHelper);\r\n        this.producerJava = producerJava;\r\n    }\r\n\r\n    @Override\r\n    public void processSecretBase(BigInteger secretBase) {\r\n        try {\r\n            PublicKeyBytes[] publicKeyBytesArray = createGrid(secretBase);\r\n            consumer.consumeKeys(publicKeyBytesArray);\r\n        } catch (Exception e) {\r\n            logErrorInProduceKeys(e, secretBase);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void processSecrets(BigInteger[] secrets) {\r\n        try {\r\n            PublicKeyBytes[] publicKeyBytesArray = new PublicKeyBytes[secrets.length];\r\n            for (int i = 0; i < secrets.length; i++) {\r\n                publicKeyBytesArray[i] = PublicKeyBytes.fromPrivate(secrets[i]);\r\n            }\r\n            consumer.consumeKeys(publicKeyBytesArray);\r\n        } catch (Exception e) {\r\n            logErrorInProduceKeys(e);\r\n        }\r\n    }\r\n\r\n    protected PublicKeyBytes[] createGrid(final BigInteger secretBase) {\r\n        PublicKeyBytes[] publicKeyBytesArray = new PublicKeyBytes[producerJava.getOverallWorkSize(bitHelper)];\r\n        for (int i = 0; i < publicKeyBytesArray.length; i++) {\r\n            // create uncompressed\r\n            BigInteger gridSecret = calculateSecretKey(secretBase, i);\r\n            if (privateKeyValidator.isOutsidePrivateKeyRange(gridSecret)) {\r\n                publicKeyBytesArray[i] = PublicKeyBytes.INVALID_KEY_ONE;\r\n                continue;\r\n            }\r\n            publicKeyBytesArray[i] = PublicKeyBytes.fromPrivate(gridSecret);\r\n        }\r\n        return publicKeyBytesArray;\r\n    }\r\n    \r\n    @Override\r\n    public String toString() {\r\n        return \"ProducerJava@\" + Integer.toHexString(System.identityHashCode(this));\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ProducerJavaSecretsFiles.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.util.List;\r\nimport java.util.concurrent.atomic.AtomicReference;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJavaSecretsFiles;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\nimport org.bitcoinj.base.Network;\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class ProducerJavaSecretsFiles extends ProducerJava {\r\n\r\n    private final Logger logger = LoggerFactory.getLogger(ProducerJavaSecretsFiles.class);\r\n    \r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    \r\n    private final CProducerJavaSecretsFiles producerJavaSecretsFiles;\r\n\r\n    private final ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n    @NonNull\r\n    AtomicReference<SecretsFile> currentSecretsFile = new AtomicReference<>();\r\n\r\n    public ProducerJavaSecretsFiles(CProducerJavaSecretsFiles producerJavaSecretsFiles, Consumer consumer, KeyUtility keyUtility, KeyProducer keyProducer, BitHelper bitHelper) {\r\n        super(producerJavaSecretsFiles, consumer, keyUtility, keyProducer, bitHelper);\r\n        this.producerJavaSecretsFiles = producerJavaSecretsFiles;\r\n    }\r\n    \r\n    @Override\r\n    public void produceKeys() {\r\n        try {\r\n            FileHelper fileHelper = new FileHelper();\r\n            List<File> files = fileHelper.stringsToFiles(producerJavaSecretsFiles.files);\r\n            fileHelper.assertFilesExists(files);\r\n\r\n            logger.info(\"Starting secrets file processing...\");\r\n            for (File file : files) {\r\n                if (!shouldRun.get()) {\r\n                    logger.info(\"Key production stopped by flag.\");\r\n                    break;\r\n                }\r\n                SecretsFile secretsFile = new SecretsFile(\r\n                    network,\r\n                    file,\r\n                    producerJavaSecretsFiles.secretFormat,\r\n                    readStatistic,\r\n                    this::consumeSecrets\r\n                );\r\n\r\n                logger.info(\"Processing secrets file: {}\", file);\r\n                currentSecretsFile.set(secretsFile);\r\n                secretsFile.readFile();\r\n                currentSecretsFile.set(null);\r\n                logger.info(\"Finished processing: {}\", file);\r\n\r\n                logProgress();\r\n            }\r\n            logger.info(\"All secrets files processed.\");\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void processSecrets(BigInteger[] secrets) {\r\n        throw new UnsupportedOperationException(\"Not supported yet.\");\r\n    }\r\n    \r\n    private void logProgress() {\r\n        logger.info(\"Progress: Unsupported: \" + readStatistic.getUnsupportedTotal() + \". Errors: \" + readStatistic.errors.size() + \". Current File progress: \" + String.format(\"%.2f\", readStatistic.currentFileProgress) + \"%.\");\r\n    }\r\n\r\n    @Override\r\n    public void interrupt() {\r\n        super.interrupt();\r\n        SecretsFile secretsFile = currentSecretsFile.get();\r\n        if (secretsFile != null) {\r\n            secretsFile.interrupt();\r\n        }\r\n    }\r\n    \r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ProducerOpenCL.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.annotations.VisibleForTesting;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.ThreadPoolExecutor;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class ProducerOpenCL extends AbstractProducer {\r\n\r\n    private final CProducerOpenCL producerOpenCL;\r\n\r\n    @VisibleForTesting\r\n    final ThreadPoolExecutor resultReaderThreadPoolExecutor;\r\n    @VisibleForTesting\r\n    @Nullable\r\n    OpenCLContext openCLContext;\r\n\r\n    public ProducerOpenCL(CProducerOpenCL producerOpenCL, Consumer consumer, KeyUtility keyUtility, KeyProducer keyProducer, BitHelper bitHelper) {\r\n        super(producerOpenCL, consumer, keyUtility, keyProducer, bitHelper);\r\n        this.producerOpenCL = producerOpenCL;\r\n        this.resultReaderThreadPoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(producerOpenCL.maxResultReaderThreads);\r\n        if (false) {\r\n            int prestartedThreads = resultReaderThreadPoolExecutor.prestartAllCoreThreads();\r\n            if (prestartedThreads != producerOpenCL.maxResultReaderThreads) {\r\n                throw new RuntimeException(\"Unable to prestart core threads.\");\r\n            }\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void initProducer() {\r\n        super.initProducer();\r\n        openCLContext = new OpenCLContext(producerOpenCL, bitHelper);\r\n        try {\r\n            openCLContext.init();\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void processSecretBase(BigInteger secretBase) {\r\n        if (openCLContext == null) {\r\n            throw new IllegalStateException(\"ProducerOpenCL not initialized\");\r\n        }\r\n        try {\r\n            waitTillFreeThreadsInPool();\r\n            if(getLogger().isDebugEnabled()) {\r\n                getLogger().debug(\"openCLContext.createKeys for secretBase: \" + secretBase);\r\n            }\r\n            OpenCLGridResult openCLGridResult = openCLContext.createKeys(secretBase);\r\n            ResultReaderRunnable resultReaderRunnable = new ResultReaderRunnable(openCLGridResult, consumer, secretBase, this);\r\n\r\n            if(getLogger().isDebugEnabled()) {\r\n                getLogger().debug(\"submit resultReaderRunnable for secretBase: \" + secretBase);\r\n            }\r\n            resultReaderThreadPoolExecutor.submit(resultReaderRunnable, openCLContext);\r\n        } catch (Exception e) {\r\n            logErrorInProduceKeys(e, secretBase);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void processSecrets(BigInteger[] secrets) {\r\n        throw new UnsupportedOperationException(\"Not supported yet.\");\r\n    }\r\n    \r\n    protected static class ResultReaderRunnable implements Runnable {\r\n        \r\n        private final Logger logger = LoggerFactory.getLogger(this.getClass());\r\n        \r\n        private final OpenCLGridResult openCLGridResult;\r\n        private final Consumer consumer;\r\n        private final BigInteger secretBase;\r\n        private final AbstractProducer abstractProducer;\r\n        \r\n        ResultReaderRunnable(OpenCLGridResult openCLGridResult, Consumer consumer, BigInteger secretBase, AbstractProducer abstractProducer) {\r\n            this.openCLGridResult = openCLGridResult;\r\n            this.consumer = consumer;\r\n            this.secretBase = secretBase;\r\n            this.abstractProducer = abstractProducer;\r\n        }\r\n\r\n        @Override\r\n        public void run() {\r\n            logger.trace(\"ResultReaderRunnable started\");\r\n            try {\r\n                PublicKeyBytes[] publicKeyBytesArray = openCLGridResult.getPublicKeyBytes();\r\n\r\n                final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n                byteBufferUtility.freeByteBuffer(openCLGridResult.getResult());\r\n\r\n                consumer.consumeKeys(publicKeyBytesArray);\r\n            } catch (Throwable e) {\r\n                abstractProducer.logErrorInProduceKeys(e, secretBase);\r\n            }\r\n            logger.trace(\"ResultReaderRunnable finished\");\r\n        }\r\n    }\r\n    \r\n    @VisibleForTesting\r\n    void waitTillFreeThreadsInPool() throws InterruptedException {\r\n        while(getFreeThreads() < 1) {\r\n            Thread.sleep(producerOpenCL.delayBlockedReader);\r\n            getLogger().trace(\"No possible free threads to read OpenCL results. May increase maxResultReaderThreads.\");\r\n        }\r\n    }\r\n\r\n    @VisibleForTesting\r\n    int getFreeThreads() {\r\n        return resultReaderThreadPoolExecutor.getMaximumPoolSize() - resultReaderThreadPoolExecutor.getActiveCount();\r\n    }\r\n\r\n    @Override\r\n    public void releaseProducer() {\r\n        super.releaseProducer();\r\n        resultReaderThreadPoolExecutor.shutdown();\r\n        if (openCLContext != null) {\r\n            openCLContext.close();\r\n            openCLContext = null;\r\n        }\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ProducerState.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic enum ProducerState {\r\n    UNINITIALIZED, INITIALIZED, RUNNING, NOT_RUNNING\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ProducerStateProvider.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic interface ProducerStateProvider {\r\n    ProducerState getState();\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/PublicKeyBytes.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.hash.Hashing;\r\nimport java.math.BigInteger;\r\nimport java.util.Arrays;\r\nimport java.util.Objects;\r\nimport org.apache.commons.codec.digest.DigestUtils;\r\nimport org.bitcoinj.core.Utils;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport org.bitcoinj.crypto.internal.CryptoUtils;\r\nimport org.bouncycastle.crypto.digests.RIPEMD160Digest;\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.slf4j.Logger;\r\n\r\npublic class PublicKeyBytes {\r\n    \r\n    /**\r\n     * Use {@link com.google.common.hash.Hashing} and\r\n     * {@link org.bouncycastle.crypto.digests.RIPEMD160Digest} instead\r\n     * {@link org.bitcoinj.crypto.internal.CryptoUtils#sha256hash160(byte[])}.\r\n     */\r\n    public static final boolean USE_SHA256_RIPEMD160_FAST = true;\r\n\r\n    public static final BigInteger MAX_TECHNICALLY_PRIVATE_KEY = BigInteger.valueOf(2).pow(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS).subtract(BigInteger.ONE);\r\n\r\n    public static final BigInteger MIN_PRIVATE_KEY = BigInteger.ONE;\r\n    \r\n    /**\r\n     * The minimum valid private key that can be safely used in this implementation.\r\n     * <p>\r\n     * While the secp256k1 specification allows private keys in the range\r\n     * {@code [0x1, MAX_PRIVATE_KEY]} (i.e., including {@code 1}), this implementation\r\n     * deliberately excludes {@code 1} for practical safety and compatibility reasons.\r\n     * The constant {@code MIN_VALID_PRIVATE_KEY} is therefore defined as {@code 2}.\r\n     * </p>\r\n     * <p>\r\n     * This avoids edge cases or known issues in downstream libraries or certain \r\n     * ECKey handling implementations (e.g., {@link org.bitcoinj.crypto.ECKey#fromPrivate(BigInteger, boolean)})\r\n     * that may throw exceptions or produce inconsistent results for {@code 1}.\r\n     * </p>\r\n     *\r\n     * @see #MAX_PRIVATE_KEY\r\n     * @see org.bitcoinj.crypto.ECKey#fromPrivate(BigInteger, boolean)\r\n     */\r\n    public static final BigInteger MIN_VALID_PRIVATE_KEY = BigInteger.TWO;\r\n    public static final String MIN_VALID_PRIVATE_KEY_HEX = MIN_VALID_PRIVATE_KEY.toString(BitHelper.RADIX_HEX).toUpperCase();\r\n    \r\n    public static final String MAX_PRIVATE_KEY_HEX = \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\";\r\n\r\n    /**\r\n     * The maximum valid private key according to the secp256k1 specification.\r\n     * <p>\r\n     * The valid range for secp256k1 private keys is technically defined as \r\n     * {@code 0x1} to {@link #MAX_PRIVATE_KEY_HEX} (inclusive).\r\n     * This value represents the order of the secp256k1 curve (also called the group order).\r\n     * </p>\r\n     * <p>\r\n     * However, this implementation deliberately defines {@link PublicKeyBytes#MIN_VALID_PRIVATE_KEY} as {@code 0x2},\r\n     * excluding {@code 0x1} due to its potential to cause inconsistencies or exceptions in certain cryptographic\r\n     * libraries such as {@link org.bitcoinj.crypto.ECKey#fromPrivate(BigInteger, boolean)}.\r\n     * </p>\r\n     *\r\n     * @see #MIN_VALID_PRIVATE_KEY\r\n     * @see org.bitcoinj.crypto.ECKey\r\n     */\r\n    public static final BigInteger MAX_PRIVATE_KEY = new BigInteger(MAX_PRIVATE_KEY_HEX, BitHelper.RADIX_HEX);\r\n\r\n    /**\r\n     * I choose a random value for a replacement.\r\n     */\r\n    public static final BigInteger INVALID_PRIVATE_KEY_REPLACEMENT = BigInteger.valueOf(2);\r\n\r\n    // ==== BEGIN: SYNCHRONIZED WITH OpenCL CONSTANTS (Do not modify without updating OpenCL) ====\r\n    public static final int BITS_PER_BYTE                                          = 8;\r\n    public static final int U32_PER_WORD                                           = 1;\r\n    public static final int U32_NUM_BYTES                                          = 4;\r\n    public static final int BYTE_SHIFT_TO_U32_MSB                                  = 24;\r\n    \r\n    // === private key ===\r\n    public static final int PRIVATE_KEY_MAX_NUM_BITS                               = 256;\r\n    public static final int PRIVATE_KEY_MAX_NUM_BYTES                              = PRIVATE_KEY_MAX_NUM_BITS / BITS_PER_BYTE; // 32\r\n    public static final int PRIVATE_KEY_MAX_NUM_WORDS                              = PRIVATE_KEY_MAX_NUM_BYTES / U32_NUM_BYTES; // 8\r\n    \r\n    // === SEC format prefixes ===\r\n    public static final int SEC_PREFIX_NUM_BITS                                    = BITS_PER_BYTE;\r\n    public static final int SEC_PREFIX_NUM_BYTES                                   = 1;\r\n    public static final int SEC_PREFIX_NUM_WORDS                                   = U32_PER_WORD;\r\n    public static final int SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT                    = 0x04;\r\n    public static final int SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y               = 0x02;\r\n    public static final int SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y                = 0x03;\r\n    \r\n    // ==== SEC format prefixes shifted versions (for use in u32[0] with MSB-first layout) ====\r\n    public static final int SEC_PREFIX_SHIFTED_NUM_BYTES                           = U32_NUM_BYTES;\r\n    public static final int SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT_SHIFTED            = (SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT           << BYTE_SHIFT_TO_U32_MSB);\r\n    public static final int SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y_SHIFTED       = (SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y << BYTE_SHIFT_TO_U32_MSB);\r\n    public static final int SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y_SHIFTED        = (SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y   << BYTE_SHIFT_TO_U32_MSB);\r\n    \r\n    // ==== x, y coordinate length ====\r\n    public static final int ONE_COORDINATE_NUM_BITS                                = 256;\r\n    public static final int ONE_COORDINATE_NUM_BYTES                               = ONE_COORDINATE_NUM_BITS / BITS_PER_BYTE; // 32\r\n    public static final int TWO_COORDINATES_NUM_BITS                               = ONE_COORDINATE_NUM_BITS * 2; // 512\r\n    public static final int TWO_COORDINATES_NUM_BYTES                              = ONE_COORDINATE_NUM_BYTES * 2; // 64\r\n    public static final int ONE_COORDINATE_NUM_WORDS                               = ONE_COORDINATE_NUM_BYTES / U32_NUM_BYTES; // 8\r\n    public static final int TWO_COORDINATE_NUM_WORDS                               = ONE_COORDINATE_NUM_WORDS * 2; // 16\r\n    \r\n    // ==== public key length ====\r\n    public static final int SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BITS                   = SEC_PREFIX_NUM_BITS  + TWO_COORDINATES_NUM_BITS;  // 520\r\n    public static final int SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BYTES                  = SEC_PREFIX_NUM_BYTES + TWO_COORDINATES_NUM_BYTES; // 65\r\n    public static final int SEC_PUBLIC_KEY_UNCOMPRESSED_WORDS                      = SEC_PREFIX_NUM_WORDS + TWO_COORDINATE_NUM_WORDS;  // 17\r\n    public static final int SEC_PUBLIC_KEY_COMPRESSED_NUM_BITS                     = SEC_PREFIX_NUM_BITS  + ONE_COORDINATE_NUM_BITS;   // 264\r\n    public static final int SEC_PUBLIC_KEY_COMPRESSED_NUM_BYTES                    = SEC_PREFIX_NUM_BYTES + ONE_COORDINATE_NUM_BYTES;  // 33\r\n    public static final int SEC_PUBLIC_KEY_COMPRESSED_WORDS                        = SEC_PREFIX_NUM_WORDS + ONE_COORDINATE_NUM_WORDS;  // 9\r\n    \r\n    // === Hash sizes in bytes ===\r\n    public static final int SHA256_INPUT_BLOCK_SIZE_BITS                           = 512;\r\n    public static final int SHA256_INPUT_BLOCK_SIZE_BYTES                          = SHA256_INPUT_BLOCK_SIZE_BITS /  BITS_PER_BYTE; // 64\r\n    public static final int SHA256_INPUT_BLOCK_SIZE_WORDS                          = SHA256_INPUT_BLOCK_SIZE_BYTES / U32_NUM_BYTES; // 16\r\n    public static final int RIPEMD160_INPUT_BLOCK_SIZE_BITS                        = 512;\r\n    public static final int RIPEMD160_INPUT_BLOCK_SIZE_BYTES                       = RIPEMD160_INPUT_BLOCK_SIZE_BITS /  BITS_PER_BYTE; // 64\r\n    public static final int RIPEMD160_INPUT_BLOCK_SIZE_WORDS                       = RIPEMD160_INPUT_BLOCK_SIZE_BYTES / U32_NUM_BYTES; // 16\r\n    public static final int SHA256_HASH_NUM_BITS                                   = 256;\r\n    public static final int SHA256_HASH_NUM_BYTES                                  = SHA256_HASH_NUM_BITS /  BITS_PER_BYTE; // 32\r\n    public static final int SHA256_HASH_NUM_WORDS                                  = SHA256_HASH_NUM_BYTES / U32_NUM_BYTES; // 8\r\n    public static final int RIPEMD160_HASH_NUM_BITS                                = 160;\r\n    public static final int RIPEMD160_HASH_NUM_BYTES                               = RIPEMD160_HASH_NUM_BITS /  BITS_PER_BYTE; // 20\r\n    public static final int RIPEMD160_HASH_NUM_WORDS                               = RIPEMD160_HASH_NUM_BYTES / U32_NUM_BYTES; // 5\r\n    \r\n    public static final int SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC               = 2;\r\n    public static final int SHA256_INPUT_TOTAL_BITS_UNCOMPRESSED                   = SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BITS;  // 1024\r\n    public static final int SHA256_INPUT_TOTAL_BYTES_UNCOMPRESSED                  = SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BYTES; // 128\r\n    public static final int SHA256_INPUT_TOTAL_WORDS_UNCOMPRESSED                  = SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_WORDS; // 32\r\n    \r\n    public static final int SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC                 = 1;\r\n    public static final int SHA256_INPUT_TOTAL_BITS_COMPRESSED                     = SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BITS;  // 512\r\n    public static final int SHA256_INPUT_TOTAL_BYTES_COMPRESSED                    = SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BYTES; // 64\r\n    public static final int SHA256_INPUT_TOTAL_WORDS_COMPRESSED                    = SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_WORDS; // 16\r\n    \r\n    // ==== Individual Chunk Sizes (Bytes in Java) ====\r\n    public static final int CHUNK_SIZE_00_NUM_BYTES_BIG_ENDIAN_X                   = ONE_COORDINATE_NUM_BYTES;\r\n    public static final int CHUNK_SIZE_01_NUM_BYTES_BIG_ENDIAN_Y                   = ONE_COORDINATE_NUM_BYTES;\r\n    public static final int CHUNK_SIZE_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED         = RIPEMD160_HASH_NUM_BYTES;\r\n    public static final int CHUNK_SIZE_11_NUM_BYTES_RIPEMD160_COMPRESSED           = RIPEMD160_HASH_NUM_BYTES;\r\n    \r\n    // ==== Offsets Within a Chunk ====\r\n    public static final int CHUNK_OFFSET_00_NUM_BYTES_BIG_ENDIAN_X                 = 0;\r\n    public static final int CHUNK_OFFSET_01_NUM_BYTES_BIG_ENDIAN_Y                 = CHUNK_OFFSET_00_NUM_BYTES_BIG_ENDIAN_X                    + CHUNK_SIZE_00_NUM_BYTES_BIG_ENDIAN_X;\r\n    public static final int CHUNK_OFFSET_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED       = CHUNK_OFFSET_01_NUM_BYTES_BIG_ENDIAN_Y                    + CHUNK_SIZE_01_NUM_BYTES_BIG_ENDIAN_Y;\r\n    public static final int CHUNK_OFFSET_11_NUM_BYTES_RIPEMD160_COMPRESSED         = CHUNK_OFFSET_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED          + CHUNK_SIZE_10_NUM_BYTES_RIPEMD160_UNCOMPRESSED;\r\n    public static final int CHUNK_OFFSET_99_NUM_BYTES_END_OF_CHUNK                 = CHUNK_OFFSET_11_NUM_BYTES_RIPEMD160_COMPRESSED            + CHUNK_SIZE_11_NUM_BYTES_RIPEMD160_COMPRESSED;\r\n    \r\n    // ==== Total Chunk Size ====\r\n    public static final int CHUNK_SIZE_NUM_BYTES                                   = CHUNK_OFFSET_99_NUM_BYTES_END_OF_CHUNK;\r\n    \r\n    // ==== END: SYNCHRONIZED WITH OpenCL CONSTANTS ====\r\n    \r\n    /**\r\n     * Computes the maximum permissible length for an array intended to store pairs of coordinates within a 32-bit system.\r\n     * This constant represents the upper limit on array length, factoring in the memory constraint imposed by the maximum\r\n     * integer value addressable in Java ({@link Integer#MAX_VALUE}) and the storage requirement for two coordinates.\r\n     * <p>\r\n     * The calculation divides {@link Integer#MAX_VALUE} by the number of bytes needed to store a OpenCL chunk,\r\n     * as defined by {@link PublicKeyBytes#CHUNK_SIZE_NUM_BYTES}, ensuring the array's indexing does not surpass\r\n     * Java's maximum allowable array length.\r\n     * </p>\r\n     */\r\n    public static final int MAXIMUM_CHUNK_ELEMENTS = Integer.MAX_VALUE / CHUNK_SIZE_NUM_BYTES;\r\n\r\n    /**\r\n     * Determines the minimum number of bits required to address the maximum array length for storing chunks.\r\n     * This value is crucial for efficiently allocating memory without exceeding the 32-bit system's limitations.\r\n     * <p>\r\n     * The calculation employs a bit manipulation strategy to find the exponent of the nearest superior power of 2\r\n     * capable of accommodating the maximum array length. By decrementing the maximum array length by 1 and\r\n     * calculating 32 minus the count of leading zeros in the decremented value, we obtain the closest superior power of 2.\r\n     * This technique, derived from a common bit manipulation trick (source: https://stackoverflow.com/questions/5242533/fast-way-to-find-exponent-of-nearest-superior-power-of-2),\r\n     * ensures the calculated bit count represents the smallest possible number that can address all potential array indices\r\n     * without breaching the 32-bit address space limitation.\r\n     * </p>\r\n     */\r\n    public static final int BIT_COUNT_FOR_MAX_CHUNKS_ARRAY = MAXIMUM_CHUNK_ELEMENTS == 0 ? 0 : 32 - Integer.numberOfLeadingZeros(MAXIMUM_CHUNK_ELEMENTS - 1) - 1;\r\n\r\n    public static final int LAST_Y_COORDINATE_BYTE_INDEX = SEC_PREFIX_NUM_BYTES + TWO_COORDINATES_NUM_BYTES - 1;\r\n    \r\n    public final static int PUBLIC_KEY_UNCOMPRESSED_BYTES = SEC_PREFIX_NUM_BYTES + TWO_COORDINATES_NUM_BYTES;\r\n    public final static int PUBLIC_KEY_COMPRESSED_BYTES   = SEC_PREFIX_NUM_BYTES + ONE_COORDINATE_NUM_BYTES;\r\n\r\n    private final byte @NonNull [] uncompressed;\r\n    private final byte @NonNull [] compressed;\r\n\r\n    /**\r\n     * Lazy initialization.\r\n     */\r\n    private byte @Nullable [] uncompressedKeyHash;\r\n\r\n    /**\r\n     * Lazy initialization.\r\n     */\r\n    private byte @Nullable [] compressedKeyHash;\r\n\r\n    /**\r\n     * Lazy initialization.\r\n     */\r\n    private @Nullable String uncompressedKeyHashBase58;\r\n\r\n    /**\r\n     * Lazy initialization.\r\n     */\r\n    private @Nullable String compressedKeyHashBase58;\r\n\r\n    private final BigInteger secretKey;\r\n    private final PrivateKeyValidator privateKeyValidator;\r\n    \r\n    // [4, 121, -66, 102, 126, -7, -36, -69, -84, 85, -96, 98, -107, -50, -121, 11, 7, 2, -101, -4, -37, 45, -50, 40, -39, 89, -14, -127, 91, 22, -8, 23, -104, 72, 58, -38, 119, 38, -93, -60, 101, 93, -92, -5, -4, 14, 17, 8, -88, -3, 23, -76, 72, -90, -123, 84, 25, -100, 71, -48, -113, -5, 16, -44, -72]\r\n    // Hex.decodeHex(\"0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\r\n    public static final PublicKeyBytes INVALID_KEY_ONE = new PublicKeyBytes(BigInteger.ONE, new byte[] {4, 121, -66, 102, 126, -7, -36, -69, -84, 85, -96, 98, -107, -50, -121, 11, 7, 2, -101, -4, -37, 45, -50, 40, -39, 89, -14, -127, 91, 22, -8, 23, -104, 72, 58, -38, 119, 38, -93, -60, 101, 93, -92, -5, -4, 14, 17, 8, -88, -3, 23, -76, 72, -90, -123, 84, 25, -100, 71, -48, -113, -5, 16, -44, -72});\r\n    \r\n    public BigInteger getSecretKey() {\r\n        return secretKey;\r\n    }\r\n\r\n    public byte[] getCompressed() {\r\n        return compressed;\r\n    }\r\n\r\n    public byte[] getUncompressed() {\r\n        return uncompressed;\r\n    }\r\n    \r\n    public boolean isOutsidePrivateKeyRange() {\r\n        return privateKeyValidator.isOutsidePrivateKeyRange(secretKey);\r\n    }\r\n    \r\n    public PublicKeyBytes(BigInteger secretKey, byte[] uncompressed) {\r\n        this(secretKey, uncompressed, createCompressedBytes(uncompressed));\r\n    }\r\n    \r\n    public PublicKeyBytes(BigInteger secretKey, byte[] uncompressed, byte[] uncompressedKeyHash, byte[] compressedKeyHash) {\r\n        this(secretKey, uncompressed, createCompressedBytes(uncompressed), uncompressedKeyHash, compressedKeyHash);\r\n    }\r\n    \r\n    public PublicKeyBytes(BigInteger secretKey, byte @NonNull [] uncompressed, byte @NonNull [] compressed) {\r\n        this.secretKey = secretKey;\r\n        this.uncompressed = uncompressed;\r\n        this.compressed = compressed;\r\n        this.privateKeyValidator = new PrivateKeyValidator();\r\n    }\r\n\r\n    public PublicKeyBytes(BigInteger secretKey, byte @NonNull [] uncompressed, byte @NonNull [] compressed, byte @Nullable [] uncompressedKeyHash, byte @Nullable [] compressedKeyHash) {\r\n        this.secretKey = secretKey;\r\n        this.uncompressed = uncompressed;\r\n        this.compressed = compressed;\r\n        this.uncompressedKeyHash = uncompressedKeyHash;\r\n        this.compressedKeyHash = compressedKeyHash;\r\n        this.privateKeyValidator = new PrivateKeyValidator();\r\n    }\r\n    \r\n    public static PublicKeyBytes fromPrivate(BigInteger secretKey) {\r\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\r\n        return new PublicKeyBytes(ecKey.getPrivKey(), ecKey.getPubKey());\r\n    }\r\n    \r\n    /**\r\n     * Creates a compressed public key from an uncompressed public key byte array in SEC format.\r\n     * <p>\r\n     * The method extracts the X coordinate and calculates the appropriate compression prefix\r\n     * based on the parity (evenness) of the Y coordinate.\r\n     * <p>\r\n     * The resulting compressed key is structured as:\r\n     * <ul>\r\n     *   <li>1 byte prefix: {@code 0x02} if Y is even, {@code 0x03} if Y is odd</li>\r\n     *   <li>32 bytes: X coordinate (Big-Endian) (MSB-first)</li>\r\n     * </ul>\r\n     * <p>\r\n     * This format follows the Bitcoin and general ECC compressed public key convention,\r\n     * where the full Y coordinate is not transmitted, but can later be recovered.\r\n     *\r\n     * @param uncompressed the full uncompressed public key byte array in SEC format ({@code 04 || X || Y})\r\n     * @return the compressed public key byte array in SEC format\r\n     */\r\n    public static byte @NonNull [] createCompressedBytes(byte @NonNull [] uncompressed) {\r\n        // add one byte for format sign\r\n        byte[] compressed = new byte[PUBLIC_KEY_COMPRESSED_BYTES];\r\n        // parity\r\n        boolean even = uncompressed[LAST_Y_COORDINATE_BYTE_INDEX] % 2 == 0;\r\n        if (even) {\r\n            compressed[0] = SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y;\r\n        } else {\r\n            compressed[0] = SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y;\r\n        }\r\n        // x\r\n        System.arraycopy(uncompressed, SEC_PREFIX_NUM_BYTES, compressed, SEC_PREFIX_NUM_BYTES, PublicKeyBytes.ONE_COORDINATE_NUM_BYTES);\r\n        return compressed;\r\n    }\r\n    \r\n    /**\r\n     * Assembles an uncompressed public key in SEC (Standards for Efficient Cryptography) format\r\n     * from the X and Y coordinate byte arrays.\r\n     * <p>\r\n     * The method expects both the X and Y coordinates to be in Big-Endian (MSB-first) order,\r\n     * which is the standard byte ordering for Bitcoin public keys.\r\n     * <p>\r\n     * The resulting byte array is structured as:\r\n     * <ul>\r\n     *   <li>1 byte prefix: {@code 0x04} indicating an uncompressed public key</li>\r\n     *   <li>32 bytes: X coordinate (Big-Endian) (MSB-first)</li>\r\n     *   <li>32 bytes: Y coordinate (Big-Endian) (MSB-first)</li>\r\n     * </ul>\r\n     * <p>\r\n     * This format complies with Bitcoin, Ethereum, and general ECC usage where\r\n     * uncompressed public keys are transmitted as {@code 04 || X || Y}.\r\n     *\r\n     * @param x the X coordinate in Big-Endian (MSB-first) order\r\n     * @param y the Y coordinate in Big-Endian (MSB-first) order\r\n     * @return the assembled uncompressed public key byte array in SEC format\r\n     */\r\n    public static byte @NonNull [] assembleUncompressedPublicKey(byte @NonNull [] x, byte @NonNull [] y) {\r\n        byte[] uncompressed = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES];\r\n        // prefix\r\n        uncompressed[0] = SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT;\r\n        // x\r\n        System.arraycopy(x, 0, uncompressed, SEC_PREFIX_NUM_BYTES, ONE_COORDINATE_NUM_BYTES);\r\n        // y\r\n        System.arraycopy(y, 0, uncompressed, SEC_PREFIX_NUM_BYTES + ONE_COORDINATE_NUM_BYTES, ONE_COORDINATE_NUM_BYTES);\r\n        return uncompressed;\r\n    }\r\n\r\n   /**\r\n    * Checks whether all coordinate bytes (excluding the prefix byte) are zero.\r\n    * <p>\r\n    * This is used to detect critical failures such as a broken OpenCL kernel execution or invalid GPU output.\r\n    * </p>\r\n    * \r\n    * @param uncompressed the full uncompressed public key byte array (prefix + X + Y)\r\n    * @return true if all coordinate bytes are zero, false otherwise\r\n    */\r\n   public static boolean isAllCoordinateBytesZero(byte[] uncompressed) {\r\n       for (int i = SEC_PREFIX_NUM_BYTES; i < uncompressed.length; i++) {\r\n           if (uncompressed[i] != 0) {\r\n               return false;\r\n           }\r\n       }\r\n       return true;\r\n   }\r\n   \r\n   private static byte @NonNull [] calculateHash160(byte[] input) {\r\n        if (USE_SHA256_RIPEMD160_FAST) {\r\n            return sha256hash160Fast(input);\r\n        } else {\r\n            return CryptoUtils.sha256hash160(input);\r\n        }\r\n    }\r\n\r\n    public byte @NonNull [] getUncompressedKeyHash() {\r\n        if (uncompressedKeyHash == null) {\r\n            uncompressedKeyHash = calculateHash160(uncompressed);\r\n        }\r\n        return uncompressedKeyHash;\r\n    }\r\n\r\n    public byte @NonNull [] getCompressedKeyHash() {\r\n        if (compressedKeyHash == null) {\r\n            compressedKeyHash = calculateHash160(compressed);\r\n        }\r\n        return compressedKeyHash;\r\n    }\r\n\r\n    /**\r\n     * Calculates RIPEMD160(SHA256(input)). This is used in Address\r\n     * calculations. Same as {@link org.bitcoinj.crypto.internal.CryptoUtils#sha256hash160(byte[])} but using\r\n     * {@link DigestUtils}.\r\n     */\r\n    public static byte[] sha256hash160Fast(byte[] input) {\r\n        byte[] sha256 = Hashing.sha256().hashBytes(input).asBytes();\r\n        RIPEMD160Digest digest = new RIPEMD160Digest();\r\n        digest.update(sha256, 0, sha256.length);\r\n        byte[] out = new byte[RIPEMD160_HASH_NUM_BYTES];\r\n        digest.doFinal(out, 0);\r\n        return out;\r\n    }\r\n\r\n    public @NonNull String getCompressedKeyHashAsBase58(@NonNull KeyUtility keyUtility) {\r\n        if (uncompressedKeyHashBase58 == null) {\r\n            uncompressedKeyHashBase58 = keyUtility.toBase58(getCompressedKeyHash());\r\n        }\r\n        return uncompressedKeyHashBase58;\r\n    }\r\n\r\n    public @NonNull String getUncompressedKeyHashAsBase58(@NonNull KeyUtility keyUtility) {\r\n        if (compressedKeyHashBase58 == null) {\r\n            compressedKeyHashBase58 = keyUtility.toBase58(getUncompressedKeyHash());\r\n        }\r\n        return compressedKeyHashBase58;\r\n    }\r\n    \r\n    public boolean runtimePublicKeyCalculationCheck(Logger logger) {\r\n        byte[] hash160Uncompressed = getUncompressedKeyHash();\r\n        byte[] hash160Compressed = getCompressedKeyHash();\r\n        ECKey fromPrivateUncompressed = ECKey.fromPrivate(getSecretKey(), false);\r\n        ECKey fromPrivateCompressed = ECKey.fromPrivate(getSecretKey(), true);\r\n        \r\n        final byte[] pubKeyUncompressedFromEcKey = fromPrivateUncompressed.getPubKey();\r\n        final byte[] pubKeyCompressedFromEcKey = fromPrivateCompressed.getPubKey();\r\n        \r\n        final byte[] hash160UncompressedFromEcKey = fromPrivateUncompressed.getPubKeyHash();\r\n        final byte[] hash160CompressedFromEcKey = fromPrivateCompressed.getPubKeyHash();\r\n        \r\n        boolean isValid = true;\r\n        if (!Arrays.equals(hash160UncompressedFromEcKey, hash160Uncompressed)) {\r\n            logger.error(\"fromPrivateUncompressed.getPubKeyHash() != hash160Uncompressed\");\r\n            logger.error(\"getSecretKey: \" + getSecretKey());\r\n            logger.error(\"pubKeyUncompressed: \" + org.apache.commons.codec.binary.Hex.encodeHexString(getUncompressed()));\r\n            logger.error(\"pubKeyUncompressedFromEcKey: \" + org.apache.commons.codec.binary.Hex.encodeHexString(pubKeyUncompressedFromEcKey));\r\n            logger.error(\"hash160Uncompressed: \" + org.apache.commons.codec.binary.Hex.encodeHexString(hash160Uncompressed));\r\n            logger.error(\"hash160UncompressedFromEcKey: \" + org.apache.commons.codec.binary.Hex.encodeHexString(hash160UncompressedFromEcKey));\r\n            isValid = false;\r\n        }\r\n        \r\n        if (!Arrays.equals(hash160CompressedFromEcKey, hash160Compressed)) {\r\n            logger.error(\"fromPrivateCompressed.getPubKeyHash() != hash160Compressed\");\r\n            logger.error(\"getSecretKey: \" + getSecretKey());\r\n            logger.error(\"pubKeyCompressed: \" + org.apache.commons.codec.binary.Hex.encodeHexString(getCompressed()));\r\n            logger.error(\"pubKeyCompressedFromEcKey: \" + org.apache.commons.codec.binary.Hex.encodeHexString(pubKeyCompressedFromEcKey));\r\n            logger.error(\"hash160Compressed: \" + org.apache.commons.codec.binary.Hex.encodeHexString(hash160Compressed));\r\n            logger.error(\"hash160CompressedFromEcKey: \" + org.apache.commons.codec.binary.Hex.encodeHexString(hash160CompressedFromEcKey));\r\n            isValid = false;\r\n        }\r\n        return isValid;\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"Overrides: hashCode, equals, toString\">\r\n    /*\r\n     * Overrides for {@code hashCode()}, {@code equals(Object)}, and {@code toString()}.\r\n     * <p>\r\n     * These methods are implemented based **only** on the {@code secretKey} field, \r\n     * which uniquely identifies the {@code PublicKeyBytes} instance.\r\n     * <ul>\r\n     *     <li>{@code hashCode()} – Generated using a prime multiplier and {@code secretKey} hash.</li>\r\n     *     <li>{@code equals(Object)} – Considers two instances equal if their {@code secretKey} values are equal.</li>\r\n     *     <li>{@code toString()} – Returns a string including the {@code secretKey} for debugging/logging.</li>\r\n     * </ul>\r\n     * <p>\r\n     * This design ensures that objects with the same {@code secretKey} are treated as equal,\r\n     * regardless of other internal state (e.g., precomputed hash representations or compressed keys).\r\n     */\r\n    \r\n    // generated, based on secretKey only!\r\n    @Override\r\n    public int hashCode() {\r\n        int hash = 3;\r\n        hash = 73 * hash + Objects.hashCode(this.secretKey);\r\n        return hash;\r\n    }\r\n\r\n    // generated, based on secretKey only!\r\n    @Override\r\n    public boolean equals(Object obj) {\r\n        if (this == obj) {\r\n            return true;\r\n        }\r\n        if (obj == null) {\r\n            return false;\r\n        }\r\n        if (getClass() != obj.getClass()) {\r\n            return false;\r\n        }\r\n        final PublicKeyBytes other = (PublicKeyBytes) obj;\r\n        return Objects.equals(this.secretKey, other.secretKey);\r\n    }\r\n\r\n    // generated, based on secretKey only!\r\n    @Override\r\n    public String toString() {\r\n        return \"PublicKeyBytes{\" + \"secretKey=\" + secretKey + '}';\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/RandomSecretSupplier.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.math.BigInteger;\nimport java.util.Random;\n\npublic class RandomSecretSupplier implements SecretSupplier {\n    private final Random random;\n\n    public RandomSecretSupplier(Random random) {\n        this.random = random;\n    }\n\n    @Override\n    public BigInteger nextSecret(int bitLength) {\n        return new BigInteger(bitLength, random);\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ReadStatistic.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.LinkedHashMap;\r\nimport java.util.List;\r\nimport java.util.Map;\r\n\r\npublic class ReadStatistic {\r\n\r\n    public long successful = 0;\r\n    public final Map<String, Long> unsupportedReasons = new LinkedHashMap<>();\r\n    /**\r\n     * In percent.\r\n     */\r\n    public double currentFileProgress;\r\n\r\n    public final List<String> errors = new ArrayList<>();\r\n\r\n    /**\r\n     * Increments the counter for the given unsupported reason by one.\r\n     * If the reason has not been seen before, it is added with a count of 1.\r\n     *\r\n     * @param reason the reason string from {@link AddressFormatNotAcceptedException#getReason()}\r\n     */\r\n    public void incrementUnsupported(String reason) {\r\n        unsupportedReasons.merge(reason, 1L, Long::sum);\r\n    }\r\n\r\n    /**\r\n     * Returns the total number of unsupported lines across all reasons.\r\n     *\r\n     * @return sum of all per-reason counts in {@link #unsupportedReasons}\r\n     */\r\n    public long getUnsupportedTotal() {\r\n        return unsupportedReasons.values().stream().mapToLong(Long::longValue).sum();\r\n    }\r\n\r\n    @Override\r\n    public String toString() {\r\n        return \"ReadStatistic{\" + \"successful=\" + successful + \", unsupportedTotal=\" + getUnsupportedTotal() + \", unsupportedReasons=\" + unsupportedReasons + \", currentFileProgress=\" + currentFileProgress + \", errors=\" + errors + '}';\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/ReleaseCLObject.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\n/**\n * Represents an OpenCL-related object that holds a native resource and must be explicitly released.\n * <p>\n * Extends {@link AutoCloseable} to support usage with Java's {@code try-with-resources} construct.\n * This interface is intended for resources such as {@link org.jocl.cl_mem}, {@link org.jocl.cl_kernel}, etc.\n * which require manual cleanup via OpenCL's native API.\n * </p>\n *\n * <p>\n * Implementations must ensure that {@link #close()} releases the underlying native resource exactly once\n * and that {@link #isClosed()} accurately reflects the release status.\n * </p>\n *\n * Example usage:\n * <pre>{@code\n * try (ReleaseCLObject buffer = MyCLBuffer.create(context, size)) {\n *     // Use buffer safely\n * }\n * // buffer is automatically released\n * }</pre>\n */\npublic interface ReleaseCLObject extends AutoCloseable {\n    \n    /**\n     * Indicates whether the underlying OpenCL resource has already been released.\n     *\n     * @return {@code true} if {@link #close()} has been called and the resource is no longer valid,\n     *         {@code false} otherwise\n     */\n    boolean isClosed();\n\n    /**\n     * Releases the native OpenCL resource if it has not been released yet.\n     * <p>\n     * This method must be idempotent, calling it multiple times should have no effect\n     * after the first call.\n     * </p>\n     *\n     * @throws RuntimeException if the release fails\n     */\n    @Override\n    void close();\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/SecretSupplier.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\nimport java.math.BigInteger;\n\n@FunctionalInterface\npublic interface SecretSupplier {\n    BigInteger nextSecret(int bitLength) throws NoMoreSecretsAvailableException;\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/SecretsFile.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.hash.Hashing;\r\nimport java.io.File;\r\nimport java.math.BigInteger;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.function.Consumer;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.UnknownSecretFormatException;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.crypto.DumpedPrivateKey;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\npublic class SecretsFile extends AbstractPlaintextFile {\r\n\r\n    private final CSecretFormat secretFormat;\r\n    private final Consumer<BigInteger[]> secretConsumer;\r\n    private final Network network;\r\n\r\n    public SecretsFile(@NonNull Network network, @NonNull File file, @NonNull CSecretFormat secretFormat, @NonNull ReadStatistic readStatistic, @NonNull Consumer<BigInteger[]> secretConsumer) {\r\n        super(file, readStatistic);\r\n        this.network = network;\r\n        this.secretFormat = secretFormat;\r\n        this.secretConsumer = secretConsumer;\r\n    }\r\n\r\n    @Override\r\n    public void processLine(String line) {\r\n        final BigInteger secret;\r\n        switch (secretFormat) {\r\n            case STRING_DO_SHA256:\r\n                byte[] sha256 = Hashing.sha256().hashString(line, StandardCharsets.UTF_8).asBytes();\r\n                String hexOfHash = Hex.encodeHexString( sha256 );\r\n                secret = new BigInteger(hexOfHash, 16);\r\n                break;\r\n            case BIG_INTEGER:\r\n                secret = new BigInteger(line);\r\n                break;\r\n            case SHA256:\r\n                secret = new BigInteger(line, 16);\r\n                break;\r\n            case DUMPED_RIVATE_KEY:\r\n                DumpedPrivateKey dpk = DumpedPrivateKey.fromBase58(network, line);\r\n                secret = dpk.getKey().getPrivKey();\r\n                break;\r\n            default:\r\n                throw new UnknownSecretFormatException(secretFormat);\r\n        }\r\n        final BigInteger[] secrets = new BigInteger[1];\r\n        secrets[0] = secret;\r\n        secretConsumer.accept(secrets);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/SeparatorFormat.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.List;\nimport java.util.regex.Pattern;\n\npublic enum SeparatorFormat {\n    // <editor-fold desc=\"Common CSV-style separators\">\n\n    /**\n     * Standard CSV separator (comma).\n     */\n    COMMA(\",\"),\n    /**\n     * Common in European CSV formats where comma is used as a decimal\n     * separator.\n     */\n    SEMICOLON(\";\"),\n    /**\n     * CSV variant with added space for human readability (e.g., \"addr,\n     * amount\").\n     */\n    COMMA_SPACE(\", \"),\n    // </editor-fold>\n\n    // <editor-fold desc=\"Structural / programming-style separators\">\n\n    /**\n     * Common in CLI tools, configs, or simple key-value pairs (e.g.,\n     * \"addr:amount\").\n     */\n    COLON(\":\"),\n    /**\n     * Extended separator occasionally used in custom log or structured data\n     * formats (e.g., \"addr::amount\").\n     */\n    DOUBLE_COLON(\"::\"),\n    /**\n     * Key-value style separator, typically found in config or scripting files.\n     */\n    EQUALS(\"=\"),\n    /**\n     * Visual separator often used in logs or mapping formats (e.g.,\n     * \"addr->amount\").\n     */\n    ARROW(\"->\"),\n    /**\n     * Functional programming style or log format separator (e.g.,\n     * \"addr=>amount\").\n     */\n    DOUBLE_ARROW(\"=>\"),\n    /**\n     * Sometimes used in URI-like or REST-style address formats (e.g.,\n     * \"addr/amount\").\n     */\n    SLASH(\"/\"),\n    // </editor-fold>\n\n    // <editor-fold desc=\"Log/console-style separators\">\n\n    /**\n     * Common in logs or console output for clear vertical splitting (e.g.,\n     * \"addr|amount\").\n     */\n    PIPE(\"|\"),\n    /**\n     * Rare scripting-style separator or used in lightweight exports.\n     */\n    CARET(\"^\"),\n    /**\n     * Rarely used but useful to avoid conflicts with other symbols.\n     */\n    TILDE(\"~\"),\n    /**\n     * Seen in logs or non-standard formats, often for inline comments or\n     * metadata (e.g., \"addr#amount\").\n     */\n    HASH(\"#\"),\n    // </editor-fold>\n\n    // <editor-fold desc=\"Whitespace-based separators\">\n\n    /**\n     * Tab character separator, typically used in TSV (Tab-Separated Values)\n     * formats.\n     */\n    TAB_SPLIT(\"\\t\"),\n    /**\n     * Simple space separator, used in CLI tools or minimalist export formats.\n     */\n    SPACE(\" \");\n\n    // </editor-fold>\n    private final String symbol;\n\n    SeparatorFormat(String symbol) {\n        this.symbol = symbol;\n    }\n\n    public String getSymbol() {\n        return symbol;\n    }\n\n    /**\n     * Returns the list of separator formats sorted by descending symbol length.\n     * <p>\n     * This ensures that longer separators like \"::\" are evaluated before\n     * shorter ones like \":\" when used in splitting or pattern matching. This\n     * prevents premature matches on partial separators that are substrings of\n     * longer ones.\n     *\n     * @return a list of SeparatorFormat values sorted by descending length of\n     *         their symbols\n     */\n    public static List<SeparatorFormat> getSortedSeparators() {\n        return Arrays.stream(SeparatorFormat.values())\n                .sorted(Comparator.comparingInt(\n                        (SeparatorFormat s) -> s.getSymbol().length()\n                ).reversed())\n                .toList();\n    }\n    \n    /**\n     * Recursively splits the given input string using all defined {@link SeparatorFormat} values,\n     * in descending order of separator length.\n     * <p>\n     * Unlike the original {@link String#split(String)} implementation which applies only the first matching\n     * separator, this version performs a deep, recursive traversal, ensuring that all relevant separators\n     * (e.g., {@link SeparatorFormat#DOUBLE_COLON}, {@link SeparatorFormat#COLON}, {@link SeparatorFormat#PIPE})\n     * are applied in sequence. This guarantees complete and hierarchical resolution of mixed separator patterns.\n     * <p>\n     * This method is especially useful when inputs may include multiple nested or combined separators,\n     * and all of them must be processed in order of priority.\n     * <p>\n     * Trailing and leading empty strings are preserved (e.g., {@code \"|value|\"} results in {@code [\"\", \"value\", \"\"]}).\n     *\n     * @param input the string to split; must not be {@code null}\n     * @return an array of string parts resulting from full recursive splitting\n     * @throws NullPointerException if the input is {@code null}\n     */\n    public static String[] split(String input) {\n        List<String> result = new ArrayList<>();\n        splitRecursive(input, result, getSortedSeparators(), 0);\n        return result.toArray(new String[0]);\n    }\n\n    /**\n    * Helper method for recursively applying separators to the input.\n    * <p>\n    * Each separator is applied in turn, starting with the longest one. If the current\n    * separator splits the input, each resulting part is passed recursively to the next separator.\n    * If no split occurs at the current level, the method proceeds to the next separator.\n    *\n    * @param input       the string to split\n    * @param result      the list collecting all final split segments\n    * @param separators  the list of separators to apply\n    * @param index       the current separator index in the list\n    */\n   private static void splitRecursive(String input, List<String> result, List<SeparatorFormat> separators, int index) {\n       if (index >= separators.size()) {\n           result.add(input); // No more separators, store the remaining part\n           return;\n       }\n\n       SeparatorFormat separator = separators.get(index);\n       String[] parts = input.split(Pattern.quote(separator.getSymbol()), -1);\n\n       if (parts.length > 1) {\n           for (String part : parts) {\n               splitRecursive(part, result, separators, index + 1);\n           }\n       } else {\n           splitRecursive(input, result, separators, index + 1);\n       }\n   }\n\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Shutdown.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic interface Shutdown {\r\n    void shutdown();\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/Statistics.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\npublic class Statistics {\r\n    \r\n    @Deprecated\r\n    public static final int ONE_SECOND_IN_MILLISECONDS = 1000;\r\n    \r\n    String createStatisticsMessage(long uptime, long keys, long keysSumOfTimeToCheckContains, long emptyConsumer, long keysQueueSize, long hits) {\r\n        // calculate uptime\r\n        long uptimeInSeconds = uptime / (long) ONE_SECOND_IN_MILLISECONDS;\r\n        long uptimeInMinutes = uptimeInSeconds / 60;\r\n        // calculate per time, prevent division by zero with Math.max\r\n        long keysPerSecond = keys / Math.max(uptimeInSeconds, 1);\r\n        long keysPerMinute = keys / Math.max(uptimeInMinutes, 1);\r\n        // calculate average contains time\r\n        long averageContainsTime = keysSumOfTimeToCheckContains / Math.max(keys, 1);\r\n\r\n        String message = \"Statistics: [Checked \" + (keys / 1_000_000L) + \" M keys in \" + uptimeInMinutes + \" minutes] [\" + (keysPerSecond/1_000L) + \" k keys/second] [\" + (keysPerMinute / 1_000_000L) + \" M keys/minute] [Times an empty consumer: \" + emptyConsumer + \"] [Average contains time: \" + averageContainsTime + \" ms] [keys queue size: \" + keysQueueSize + \"] [Hits: \" + hits + \"]\";\r\n        return message;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/cli/Main.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.cli;\r\n\r\nimport com.fasterxml.jackson.databind.ObjectMapper;\r\nimport com.fasterxml.jackson.databind.SerializationFeature;\r\nimport com.fasterxml.jackson.dataformat.yaml.YAMLMapper;\r\nimport com.google.common.annotations.VisibleForTesting;\r\nimport java.io.IOException;\r\nimport java.nio.charset.Charset;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.*;\r\nimport java.util.concurrent.CountDownLatch;\r\nimport java.util.concurrent.TimeUnit;\r\nimport net.ladenthin.bitcoinaddressfinder.AddressFilesToLMDB;\r\nimport net.ladenthin.bitcoinaddressfinder.Finder;\r\nimport net.ladenthin.bitcoinaddressfinder.Interruptable;\r\nimport net.ladenthin.bitcoinaddressfinder.LMDBToAddressFile;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFilesToLMDB;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConfiguration;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CFinder;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBToAddressFile;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLBuilder;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\n// VM option: -Dorg.slf4j.simpleLogger.defaultLogLevel=trace\r\npublic class Main implements Runnable, Interruptable {\r\n\r\n    /**\r\n     * File extension for JavaScript configuration files; treated identically to {@link #FILE_EXTENSION_JSON}.\r\n     */\r\n    @VisibleForTesting\r\n    static final String FILE_EXTENSION_JS = \".js\";\r\n\r\n    /**\r\n     * Standard file extension for JSON configuration files.\r\n     *\r\n     * @see #FILE_EXTENSION_JS\r\n     */\r\n    @VisibleForTesting\r\n    static final String FILE_EXTENSION_JSON = \".json\";\r\n\r\n    /**\r\n     * Standard long-form file extension for YAML configuration files.\r\n     *\r\n     * @see #FILE_EXTENSION_YML\r\n     */\r\n    @VisibleForTesting\r\n    static final String FILE_EXTENSION_YAML = \".yaml\";\r\n\r\n    /**\r\n     * Short-form file extension for YAML configuration files; treated identically to {@link #FILE_EXTENSION_YAML}.\r\n     */\r\n    @VisibleForTesting\r\n    static final String FILE_EXTENSION_YML = \".yml\";\r\n\r\n    @VisibleForTesting\r\n    public static Logger logger = LoggerFactory.getLogger(Main.class);\r\n\r\n    private final List<Interruptable> interruptables = new ArrayList<>();\r\n\r\n    private final CConfiguration configuration;\r\n    \r\n    CountDownLatch runLatch = new CountDownLatch(1);\r\n    \r\n    public Main(CConfiguration configuration) {\r\n        this.configuration = configuration;\r\n    }\r\n    \r\n    public static String readString(Path path) {\r\n        try {\r\n            String content = Files.readString(path, Charset.defaultCharset());\r\n            return content;\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n    \r\n    public static CConfiguration fromJson(String configurationString) {\r\n        try {\r\n            ObjectMapper mapper = new ObjectMapper();\r\n            return mapper.readValue(configurationString, CConfiguration.class);\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    public static CConfiguration fromYaml(String configurationString) {\r\n        try {\r\n            YAMLMapper mapper = new YAMLMapper();\r\n            return mapper.readValue(configurationString, CConfiguration.class);\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    public static String configurationToJson(CConfiguration configuration) {\r\n        try {\r\n            ObjectMapper mapper = new ObjectMapper();\r\n            mapper.enable(SerializationFeature.INDENT_OUTPUT);\r\n            return mapper.writeValueAsString(configuration);\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    public static String configurationToYAML(CConfiguration configuration) {\r\n        try {\r\n            YAMLMapper mapper = new YAMLMapper();\r\n            return mapper.writeValueAsString(configuration);\r\n        } catch (IOException e) {\r\n            throw new RuntimeException(e);\r\n        }\r\n    }\r\n\r\n    public static void main(String[] args) {\r\n        if (args.length != 1) {\r\n            logger.error(\"Invalid arguments. Pass path to configuration as first argument.\");\r\n            return;\r\n        }\r\n        final Path configurationPath = Path.of(args[0]);\r\n        String configurationAsString = readString(configurationPath);\r\n        final CConfiguration configuration;\r\n        String lowerPath = configurationPath.toString().toLowerCase();\r\n        if (lowerPath.endsWith(FILE_EXTENSION_JS) || lowerPath.endsWith(FILE_EXTENSION_JSON)) {\r\n            configuration = fromJson(configurationAsString);\r\n        } else if (lowerPath.endsWith(FILE_EXTENSION_YAML) || lowerPath.endsWith(FILE_EXTENSION_YML)) {\r\n            configuration = fromYaml(configurationAsString);\r\n        } else {\r\n            throw new IllegalArgumentException(\"Unknown file ending for: \" + configurationPath);\r\n        }\r\n        Main main = new Main(configuration);\r\n        main.logConfigurationTransformation();\r\n        main.run();\r\n    }\r\n\r\n    public void logConfigurationTransformation() {\r\n        String json = configurationToJson(configuration);\r\n        String yaml = configurationToYAML(configuration);\r\n        logger.info(\r\n                \"Please review the transformed configuration to ensure it aligns with your expectations and requirements before proceeding.:\\n\" +\r\n                        \"########## BEGIN transformed JSON configuration ##########\\n\" +\r\n                        json + \"\\n\" +\r\n                        \"########## END   transformed JSON configuration ##########\\n\" +\r\n                        \"\\n\" + \r\n                        \"########## BEGIN transformed YAML configuration ##########\\n\" +\r\n                        yaml + \"\\n\" +\r\n                        \"########## END   transformed YAML configuration ##########\\n\"\r\n        );\r\n    }\r\n\r\n    @Override\r\n    public void run() {\r\n        logger.info(configuration.command.name());\r\n        \r\n        addSchutdownHook();\r\n        \r\n        switch (configuration.command) {\r\n            case Find:\r\n                CFinder cFinder = Objects.requireNonNull(configuration.finder);\r\n                Finder finder = new Finder(cFinder);\r\n                interruptables.add(finder);\r\n                // key producer first\r\n                finder.startKeyProducer();\r\n                \r\n                // consumer second\r\n                finder.startConsumer();\r\n                \r\n                // producer last\r\n                finder.configureProducer();\r\n                finder.initProducer();\r\n                finder.startProducer();\r\n                finder.shutdownAndAwaitTermination();\r\n                break;\r\n            case LMDBToAddressFile:\r\n                CLMDBToAddressFile cLMDBToAddressFile = Objects.requireNonNull(configuration.lmdbToAddressFile);\r\n                LMDBToAddressFile lmdbToAddressFile = new LMDBToAddressFile(cLMDBToAddressFile);\r\n                interruptables.add(lmdbToAddressFile);\r\n                lmdbToAddressFile.run();\r\n                break;\r\n            case AddressFilesToLMDB:\r\n                CAddressFilesToLMDB cAddressFilesToLMDB = Objects.requireNonNull(configuration.addressFilesToLMDB);\r\n                AddressFilesToLMDB addressFilesToLMDB = new AddressFilesToLMDB(cAddressFilesToLMDB);\r\n                interruptables.add(addressFilesToLMDB);\r\n                addressFilesToLMDB.run();\r\n                break;\r\n            case OpenCLInfo:\r\n                OpenCLBuilder openCLBuilder = new OpenCLBuilder();\r\n                List<OpenCLPlatform> openCLPlatforms = openCLBuilder.build();\r\n                System.out.println(openCLPlatforms);\r\n                break;\r\n            default:\r\n                throw new UnsupportedOperationException(\"Command: \" + configuration.command.name() + \" currently not supported.\" );\r\n        }\r\n        logger.info(\"Main#run end.\");\r\n        runLatch.countDown();\r\n        \r\n        if (false) {\r\n            printAllStackTracesWithDelay(2_000L, true);\r\n        }\r\n    }\r\n\r\n    public static void printAllStackTracesWithDelay(long delayMillis, boolean includeDaemons) {\r\n        try { Thread.sleep(delayMillis); } catch (InterruptedException ignored) { Thread.currentThread().interrupt(); }\r\n\r\n        Map<Thread, StackTraceElement[]> all = Thread.getAllStackTraces();\r\n\r\n        List<Map.Entry<Thread, StackTraceElement[]>> entries = new ArrayList<>(all.entrySet());\r\n        entries.sort(Comparator\r\n                .comparing((Map.Entry<Thread, StackTraceElement[]> e) -> {\r\n                    String n = e.getKey().getName();\r\n                    return n == null ? \"\" : n;\r\n                })\r\n                .thenComparingLong(e -> e.getKey().getId()));\r\n\r\n        boolean printedAny = false;\r\n        for (Map.Entry<Thread, StackTraceElement[]> e : entries) {\r\n            Thread t = e.getKey();\r\n            if (!includeDaemons && t.isDaemon()) continue; // previous behavior\r\n\r\n            printedAny = true;\r\n            System.out.println(\"##################################################\");\r\n            System.out.println(\"# Thread: \" + t + \" | state=\" + t.getState() + \" | daemon=\" + t.isDaemon());\r\n            for (StackTraceElement el : e.getValue()) System.out.println(\"  at \" + el);\r\n        }\r\n\r\n        if (!printedAny) {\r\n            System.out.println(includeDaemons\r\n                    ? \"No threads to print.\"\r\n                    : \"No non-daemon threads found. JVM should be able to exit normally.\");\r\n        }\r\n    }\r\n    \r\n    private void addSchutdownHook() {\r\n        Runtime.getRuntime().addShutdownHook(new Thread(() -> {\r\n            logger.info(\"Shutdown received via hook.\");\r\n            interrupt();\r\n            try {\r\n                logger.info(\"runLatch await\");\r\n                runLatch.await(30, TimeUnit.SECONDS);\r\n            } catch (InterruptedException e) {\r\n                throw new RuntimeException(e);\r\n            }\r\n            logger.info(\"Finish shutdown hook.\");\r\n        }));\r\n    }\r\n    \r\n    @Override\r\n    public void interrupt() {\r\n        for (Interruptable interruptable : interruptables) {\r\n            interruptable.interrupt();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CAddressFileOutputFormat.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\npublic enum CAddressFileOutputFormat {\r\n    /**\r\n     * The hash160 will be written encoded in hex without the amount. Optimal to view with a viewer with a fixed width (e.g. HxD).\r\n     */\r\n    HexHash,\r\n    /**\r\n     * The addresses will be written with a fixed width and without the amount. Optimal to view with a viewer with a fixed width (e.g. HxD).\r\n     */\r\n    FixedWidthBase58BitcoinAddress,\r\n    /**\r\n     * The addresses will be written with amount. Separated with a {@link net.ladenthin.bitcoinaddressfinder.SeparatorFormat#COMMA}.\r\n     */\r\n    DynamicWidthBase58BitcoinAddressWithAmount\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CAddressFilesToLMDB.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport org.jspecify.annotations.Nullable;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class CAddressFilesToLMDB {\r\n    \r\n    /**\r\n     * The list of addresses files which should be read.\r\n     */\r\n    public List<String> addressesFiles = new ArrayList<>();\r\n    \r\n    /**\r\n     * The configuration to write a LMDB database.\r\n     */\r\n    public @Nullable CLMDBConfigurationWrite lmdbConfigurationWrite;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CCommand.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\npublic enum CCommand {\r\n    Find, LMDBToAddressFile, AddressFilesToLMDB, OpenCLInfo\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CConfiguration.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport org.jspecify.annotations.Nullable;\r\n\r\npublic class CConfiguration {\r\n    public CCommand command = CCommand.OpenCLInfo;\r\n    \r\n    public @Nullable CLMDBToAddressFile lmdbToAddressFile;\r\n    public @Nullable CAddressFilesToLMDB addressFilesToLMDB;\r\n    public @Nullable CFinder finder;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CConsumerJava.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.jspecify.annotations.Nullable;\r\n\r\npublic class CConsumerJava {\r\n    public @NonNull CLMDBConfigurationReadOnly lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\r\n    public int printStatisticsEveryNSeconds = 60;\r\n    public int threads = 4;\r\n    /**\r\n     * in ms.\r\n     */\r\n    public long delayEmptyConsumer = 100;\r\n    public int queueSize = 10;\r\n    \r\n    /**\r\n     * Enables runtime verification of public key calculation.\r\n     * \r\n     * This performs a full consistency check for each generated key by comparing it\r\n     * against a known-correct Java-based calculation. Use this option only in very specific\r\n     * debugging or validation scenarios, such as:\r\n     * \r\n     * <ul>\r\n     *   <li>Suspected errors in the OpenCL implementation</li>\r\n     *   <li>Hardware defects causing incorrect calculations</li>\r\n     *   <li>Regression testing during development</li>\r\n     * </ul>\r\n     * \r\n     * <b>Warning:</b> This has a significant performance impact.\r\n     * <ul>\r\n     *   <li>Enabled: ~20k keys/second</li>\r\n     *   <li>Disabled (default): ~10 million keys/second (LMDB benchmark)</li>\r\n     * </ul>\r\n     * \r\n     * <p>Do not enable in production or performance benchmarking environments.</p>\r\n     */\r\n    public boolean runtimePublicKeyCalculationCheck;\r\n    \r\n    public boolean enableVanity = false;\r\n    \r\n    public @Nullable String vanityPattern;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CFinder.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport org.jspecify.annotations.Nullable;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class CFinder {\r\n    \r\n    public List<CKeyProducerJavaRandom> keyProducerJavaRandom = new ArrayList<>();\r\n    public List<CKeyProducerJavaBip39> keyProducerJavaBip39 = new ArrayList<>();\r\n    public List<CKeyProducerJavaIncremental> keyProducerJavaIncremental = new ArrayList<>();\r\n    public List<CKeyProducerJavaSocket> keyProducerJavaSocket = new ArrayList<>();\r\n    public List<CKeyProducerJavaWebSocket> keyProducerJavaWebSocket = new ArrayList<>();\r\n    public List<CKeyProducerJavaZmq> keyProducerJavaZmq = new ArrayList<>();\r\n    \r\n    public @Nullable CConsumerJava consumerJava;\r\n    \r\n    public List<CProducerJava> producerJava = new ArrayList<>();\r\n    public List<CProducerJavaSecretsFiles> producerJavaSecretsFiles = new ArrayList<>();\r\n    public List<CProducerOpenCL> producerOpenCL = new ArrayList<>();\r\n    \r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJava.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\r\nimport org.jspecify.annotations.Nullable;\r\n\r\npublic class CKeyProducerJava {\r\n    public @Nullable String keyProducerId;\r\n    \r\n    /**\r\n     * (2<sup>{@code maxNumBits}</sup> - 1) can be set to a lower value to improve a search on specific ranges (e.g. the puzzle transaction <a href=\"https://privatekeys.pw/puzzles/bitcoin-puzzle-tx\">bitcoin-puzzle-tx</a> ).\r\n     * {@code 1} can't be tested because {@link org.bitcoinj.crypto.ECKey#fromPrivate} throws an {@link IllegalArgumentException}.\r\n     * Range: {@code 2} (inclusive) to {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BITS} (inclusive).\r\n     */\r\n    public int privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\r\n    \r\n    /** Maximum allowed work size (number of secrets to generate) — 2^24 = 16,777,216*/\r\n    public int maxWorkSize = 1 << PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaBip39.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.configuration;\n\nimport org.jspecify.annotations.Nullable;\n\nimport java.time.Instant;\n\npublic class CKeyProducerJavaBip39 extends CKeyProducerJava {\n\n    public static final String DEFAULT_MNEMONIC = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\";\n    \n    /** Default BIP32 path used for external addresses (BIP44). */\n    public static final String DEFAULT_BIP32_PATH = \"M/44H/0H/0H/0\";\n    \n    /**\n     * Must be a valid BIP39 mnemonic phrase (typically 12 or 24 words).\n     */\n    public String mnemonic = DEFAULT_MNEMONIC;\n\n    /**\n     * Optional passphrase used in combination with the BIP39 mnemonic.\n     * Can be an empty string.\n     */\n    public String passphrase = \"\";\n\n    /**\n    * Indicates whether the key derivation uses \"hardened\" child keys.\n    * \n    * In BIP32 hierarchical deterministic wallets, the hardened bit (0x80000000) is set in the child index\n    * to mark hardened keys. Hardened derivation prevents the possibility of deriving child public keys \n    * from a parent public key alone.\n    * \n    * With hardened keys:\n    * - It is impossible to derive child public keys using only the parent public key.\n    * - This enhances security by preventing attacks where knowledge of a parent public key and a \n    *   child private key could allow recovery of the parent private key.\n    * \n    * With non-hardened keys:\n    * - You can derive child public keys from a parent public key without needing any private key.\n    * - However, this introduces a potential vulnerability: if a child private key and the parent public key \n    *   are both compromised, the parent private key can be exposed due to elliptic curve mathematics.\n    * \n    * Setting this flag to true enables hardened key derivation; false means non-hardened.\n    * \n    * See also {@link org.bitcoinj.crypto.ChildNumber#HARDENED_BIT}.\n    */\n   public boolean hardened = false;\n\n    /**\n     * Optional base path for BIP32/BIP44 derivation, e.g., \"M/44H/0H/0H/0\".\n     */\n    public String bip32Path = DEFAULT_BIP32_PATH;\n    \n    /**\n     * Optional wallet creation time (in epoch seconds) used for BIP39 seed.\n     * If not set, defaults to {@link java.time.Instant#ofEpochSecond(long)} Instant.ofEpochSecond(0).\n     */\n    public @Nullable Long creationTimeSeconds;\n    \n    /**\n     * Returns the creation time as an Instant.\n     * Defaults to Instant.ofEpochSecond(0) if not set.\n     */\n    public Instant getCreationTimeInstant() {\n        return Instant.ofEpochSecond(this.creationTimeSeconds != null ? this.creationTimeSeconds : 0L);\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaIncremental.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.configuration;\n\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\n\npublic class CKeyProducerJavaIncremental extends CKeyProducerJava {\n    \n    public String startAddress = PublicKeyBytes.MIN_VALID_PRIVATE_KEY.toString(BitHelper.RADIX_HEX).toUpperCase();\n    public String endAddress = PublicKeyBytes.MAX_PRIVATE_KEY_HEX;\n    \n    public BigInteger getStartAddress() {\n        return new BigInteger(startAddress, BitHelper.RADIX_HEX);\n    }\n    \n    public BigInteger getEndAddress() {\n        return new BigInteger(endAddress, BitHelper.RADIX_HEX);\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaRandom.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport org.jspecify.annotations.Nullable;\r\n\r\npublic class CKeyProducerJavaRandom extends CKeyProducerJava {\r\n\r\n    /**\r\n     * Selects the pseudo-random number generator (PRNG) used for private-key creation.\r\n     * See {@link CKeyProducerJavaRandomInstance} for the available implementations.\r\n     * Defaults to {@link CKeyProducerJavaRandomInstance#SECURE_RANDOM} to prefer security\r\n     * over convenience.\r\n     */\r\n    public CKeyProducerJavaRandomInstance keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.SECURE_RANDOM;\r\n\r\n    /**\r\n     * Used for {@link CKeyProducerJavaRandomInstance#RANDOM_CUSTOM_SEED}.\r\n     * Also optionally used by {@link CKeyProducerJavaRandomInstance#SHA1_PRNG}\r\n     * if deterministic output is desired.\r\n     * Nullable to simulate unset seed.\r\n     */\r\n    public @Nullable Long customSeed;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaRandomInstance.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\n/**\r\n * Enumeration of PRNG (Pseudo-Random Number Generator) strategies used for generating keys.\r\n * \r\n * From a security perspective, some options are considered cryptographically secure and suitable \r\n * for wallet generation, while others are insecure and may have been used in weak or vulnerable wallets.\r\n * \r\n * This enum is useful both for:\r\n * - Secure wallet generation (using strong entropy sources)\r\n * - Wallet cracking or forensic analysis (by replicating weak/random key generation)\r\n */\r\npublic enum CKeyProducerJavaRandomInstance {\r\n\r\n    /**\r\n     * Cryptographically secure PRNG provided by the OS.\r\n     * \r\n     * ✅ Strong entropy source, suitable for generating secure wallets.\r\n     * ❌ Not suitable for brute-force reproduction (unpredictable output).\r\n     * \r\n     * Internally uses system sources like `/dev/urandom` or platform CSPRNG.\r\n     */\r\n    SECURE_RANDOM,\r\n\r\n    /**\r\n     * Standard Java Random seeded with the current system time in milliseconds.\r\n     * \r\n     * ❌ Extremely insecure. Many compromised wallets were generated this way.\r\n     * ❗ Easily brute-forced by scanning a narrow time window.\r\n     * \r\n     * Common mistake in early Bitcoin wallet implementations.\r\n     */\r\n    RANDOM_CURRENT_TIME_MILLIS_SEED,\r\n\r\n    /**\r\n     * Standard Java Random seeded with a user-supplied long value.\r\n     * \r\n     * ❌ Insecure if the seed is low-entropy or guessable.\r\n     * ❗ Useful for forensic key regeneration if the seed is known or derived.\r\n     */\r\n    RANDOM_CUSTOM_SEED,\r\n\r\n    /**\r\n     * SHA1PRNG – an old deterministic PRNG available in some Java implementations.\r\n     * \r\n     * ⚠️ Not cryptographically strong by modern standards.\r\n     * 🛠 Historically used on Android (notably flawed pre-2013).\r\n     * ❗ Potential attack surface if used in old or custom wallets.\r\n     */\r\n    SHA1_PRNG\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaReceiver.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.configuration;\n\npublic class CKeyProducerJavaReceiver extends CKeyProducerJava {\n    \n    /** Enable logging of each received secret as hex */\n    public boolean logReceivedSecret = false;\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaSocket.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.configuration;\n\npublic class CKeyProducerJavaSocket extends CKeyProducerJavaReceiver {\n    \n    public enum Mode {\n        CLIENT,\n        SERVER\n    }\n    \n    /** Hostname or IP address for client mode; ignored in server mode */\n    public String host = \"localhost\";\n\n    /** Port number to connect to or listen on */\n    public int port = 12345;\n\n    /** Operating mode: client or server */\n    public Mode mode = Mode.SERVER;\n\n    /** Socket read and connection timeout in milliseconds */\n    public int timeout = 3000;\n\n    /** Number of attempts to reconnect if connection fails */\n    public int connectionRetryCount = 5;\n\n    /** Number of attempts to retry reading a secret after I/O failure */\n    public int readRetryCount = 5;\n\n    /** Delay in milliseconds between retry attempts */\n    public int retryDelayMillisConnect = 1000;\n\n    /** Delay in milliseconds between retry attempts */\n    public int retryDelayMillisRead = 1000;\n\n    /** Maximum retry attempts when partially reading a single secret */\n    public int readPartialRetryCount = 5;\n\n    /** Delay in milliseconds between partial read retry attempts */\n    public int readPartialRetryDelayMillis = 20;\n\n    public String getHost() {\n        return host;\n    }\n\n    public int getPort() {\n        return port;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaWebSocket.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.configuration;\n\npublic class CKeyProducerJavaWebSocket extends CKeyProducerJavaReceiver {\n    public int timeout = 1000;\n    public int port = 8080;\n\n    public int getPort() {\n        return port;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaZmq.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.configuration;\n\npublic class CKeyProducerJavaZmq extends CKeyProducerJavaReceiver {\n\n    public enum Mode {\n        CONNECT,\n        BIND\n    }\n\n    /** The ZMQ address, e.g., tcp://localhost:5555 */\n    public String address = \"tcp://localhost:5555\";\n\n    /** Whether this side binds to the address or connects */\n    public Mode mode = Mode.BIND;\n\n    /**\n     * Timeout for receiving secrets, in milliseconds.\n     *\n     * <p>This timeout is applied consistently to:\n     * <ul>\n     *   <li>the underlying ZMQ socket receive operation (RCVTIMEO)</li>\n     *   <li>the internal secret queue polling</li>\n     * </ul>\n     *\n     * <p>Semantics:\n     * <ul>\n     *   <li>Must be a strictly positive value (&gt; 0)</li>\n     *   <li>Specifies the maximum time to wait for each receive operation</li>\n     * </ul>\n     *\n     * <p>Notes:\n     * <ul>\n     *   <li>Infinite blocking is intentionally not supported</li>\n     *   <li>Values less than or equal to zero are invalid and may lead to undefined behavior</li>\n     *   <li>Timeouts are enforced to guarantee responsive shutdown and deterministic behavior</li>\n     * </ul>\n     *\n     * <p>This value maps directly to the ZMQ socket option {@code RCVTIMEO}.\n     *\n     * <p>Default: {@code 1000} ms\n     */\n    public int timeout = 1000;\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CLMDBConfigurationReadOnly.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\npublic class CLMDBConfigurationReadOnly {\r\n    /**\r\n     * The directory of the LMDB database.\r\n     */\r\n    public String lmdbDirectory = \"\";\r\n    \r\n    /**\r\n     * Whether to use the optimal LMDB proxy implementation \r\n     * (see {@link org.lmdbjava.ByteBufferProxy#PROXY_OPTIMAL}).\r\n     */\r\n    public boolean useProxyOptimal = true;\r\n    \r\n    /**\r\n     * Whether to log detailed LMDB statistics when initializing the environment.\r\n     * This causes a full iteration over the database, which can be expensive on large datasets,\r\n     * but also results in the data being fully cached by the OS.\r\n     */\r\n    public boolean logStatsOnInit = false;\r\n    \r\n    /**\r\n     * Whether to log LMDB statistics when closing the environment.\r\n     */\r\n    public boolean logStatsOnClose = false;\r\n    \r\n    /**\r\n     * If set to true, the LMDB database will load a Bloom filter into memory on initialization.\r\n     * This filter is used to perform fast probabilistic membership checks for hash160 addresses.\r\n     * \r\n     * The Bloom filter does not store the full set of addresses in memory, but instead uses a compact bit array\r\n     * and multiple hash functions to determine whether an address might exist in the database.\r\n     * \r\n     * Advantages:\r\n     *  - Extremely fast `containsAddress()` lookups (O(1))\r\n     *  - Low memory consumption even for millions or billions of entries\r\n     * \r\n     * Tradeoff:\r\n     *  - False positives are possible: an address might be reported as present, even if it is not.\r\n     *    This may lead to unnecessary database lookups, but never to false negatives.\r\n     * \r\n     * If this is set to false, LMDB will perform direct queries for each address using transactions.\r\n     */\r\n    public boolean useBloomFilter = true;\r\n    \r\n    /**\r\n     * The expected false positive probability (FPP) for the Bloom filter.\r\n     * <p>\r\n     * Lower values reduce the chance of false positives but increase memory usage.\r\n     * Higher values save memory but allow more false positives, potentially causing unnecessary LMDB lookups.\r\n     * <p>\r\n     * Recommended values:\r\n     * <ul>\r\n     *   <li><b>0.01</b> – ~1% false positives: High accuracy, higher memory usage</li>\r\n     *   <li><b>0.05</b> – ~5% false positives: Balanced performance and memory</li>\r\n     *   <li><b>0.1</b> or <b>0.2</b> – 10–20% false positives: Very memory-efficient, suitable if occasional extra DB reads are acceptable</li>\r\n     * </ul>\r\n     * <p>\r\n     * This value is only used if {@link #useBloomFilter} is <code>true</code>.\r\n     */\r\n   public double bloomFilterFpp = 0.1;\r\n\r\n    /**\r\n     * If true, {@code containsAddress(...)} will always return {@code false}, skipping both LMDB and in-memory lookups.\r\n     *\r\n     * This disables all address existence checks and is useful for performance benchmarking or dry-run scenarios\r\n     * where address verification is intentionally omitted.\r\n     */\r\n    public boolean disableAddressLookup = false;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CLMDBConfigurationWrite.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport org.bitcoinj.base.Coin;\r\n\r\npublic class CLMDBConfigurationWrite extends CLMDBConfigurationReadOnly {\r\n\r\n    /**\r\n     * LMDB site in MiB (e.g. 1024).\r\n     */\r\n    public int initialMapSizeInMiB = 1;\r\n\r\n    /**\r\n     * Enable if empty hash160s should be deleted. Empty means zero satoshis. It\r\n     * has a higher priority than {@link #useStaticAmount} which means empty\r\n     * addresses will be delted instead written with {@link #staticAmount}.\r\n     */\r\n    public boolean deleteEmptyAddresses = false;\r\n\r\n    /**\r\n     * Only used if {@link #useStaticAmount} is {@code true}.\r\n     * {@link Coin#ZERO} allows a smaller database.\r\n     */\r\n    public long staticAmount = Coin.ZERO.value;\r\n\r\n    /**\r\n     * Use the static amount {@link #staticAmount} instead the imported amount\r\n     * to obscure amount and allow higher database compression.\r\n     */\r\n    public boolean useStaticAmount = true;\r\n    \r\n    public boolean increaseMapAutomatically = true;\r\n    \r\n    /**\r\n     * LMDB site increase in MiB (e.g. 1024). Attention: If the value is too low, the increase for a full db was not enough and a {@link org.lmdbjava.Env.MapFullException} will be thrown.\r\n     */\r\n    public long increaseSizeInMiB = 8;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CLMDBToAddressFile.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\npublic class CLMDBToAddressFile {\r\n\r\n    public CLMDBConfigurationReadOnly lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\r\n    \r\n    public String addressesFile = \"\";\r\n    \r\n    public CAddressFileOutputFormat addressFileOutputFormat = CAddressFileOutputFormat.HexHash;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CProducer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\r\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\r\nimport org.jspecify.annotations.Nullable;\r\n\r\npublic class CProducer {\r\n    \r\n    public @Nullable String keyProducerId;\r\n    \r\n    /**\r\n     * Range: {@code 0} (inclusive) to {@link PublicKeyBytes#BIT_COUNT_FOR_MAX_CHUNKS_ARRAY} (inclusive).\r\n     */\r\n    public int batchSizeInBits = 0;\r\n    \r\n    /**\r\n     * The batch mode will use a private key increment internal to increase the performance.\r\n     */\r\n    public boolean batchUsePrivateKeyIncrement = true;\r\n    \r\n    /**\r\n     * Enable the log output for the secret address.\r\n     */\r\n    public boolean logSecretBase;\r\n    \r\n    /**\r\n     * Enable to let the producer run one time only.\r\n     */\r\n    public boolean runOnce = false;\r\n    \r\n    public int getOverallWorkSize(BitHelper bitHelper) {\r\n        return bitHelper.convertBitsToSize(batchSizeInBits);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CProducerJava.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\npublic class CProducerJava extends CProducer {\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CProducerJavaSecretsFiles.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class CProducerJavaSecretsFiles extends CProducerJava {\r\n    /**\r\n     * The list of strings files which should be read.\r\n     */\r\n    public List<String> files = new ArrayList<>();\r\n    \r\n    /**\r\n     * The format of each line in the files.\r\n     */\r\n    public CSecretFormat secretFormat = CSecretFormat.STRING_DO_SHA256;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CProducerOpenCL.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport static org.jocl.CL.CL_DEVICE_TYPE_ALL;\r\n\r\npublic class CProducerOpenCL extends CProducer {\r\n\r\n    public int platformIndex = 0;\r\n    public long deviceType = CL_DEVICE_TYPE_ALL;\r\n    public int deviceIndex = 0;\r\n    \r\n    public int maxResultReaderThreads = 4;\r\n    \r\n    /**\r\n     * in ms.\r\n     */\r\n    public int delayBlockedReader = 100;\r\n    \r\n    /**\r\n     * Number of inner iterations each OpenCL work-item performs on the GPU.\r\n     * <p>\r\n     * Instead of launching one work-item per candidate key, the kernel can loop\r\n     * {@code loopCount} times per work-item to reduce the total number of threads\r\n     * and avoid exceeding GPU or host memory limits.\r\n     * </p>\r\n     * <p>\r\n     * This directly reduces the number of launched work-items by a factor of {@code loopCount},\r\n     * and each work-item will compute and write {@code loopCount} results.\r\n     * </p>\r\n     * <p>\r\n     * Requirements:\r\n     * <ul>\r\n     *   <li>{@code loopCount} must be a power of two (e.g. 1, 2, 4, 8, 16, ...)</li>\r\n     *   <li>The total result size (workSize × loopCount × chunkSize) must not exceed {@code Integer.MAX_VALUE}</li>\r\n     *   <li>{@code batchSizeInBits} must be divisible by {@code loopCount}</li>\r\n     * </ul>\r\n     * </p>\r\n     * <p>\r\n     * <b>Performance notes:</b>\r\n     * <ul>\r\n     *   <li>Lower values (e.g. 4 or 8) are often sufficient to reduce launch overhead and register pressure.</li>\r\n     *   <li>Using too high a {@code loopCount} can underutilize the GPU, as fewer total work-items are launched,\r\n     *       which may reduce occupancy and throughput on highly parallel architectures.</li>\r\n     *   <li>This optimization is especially useful when using point addition in the kernel instead of full scalar multiplication.</li>\r\n     * </ul>\r\n     * </p>\r\n     * <p>\r\n     * Example:\r\n     * If {@code batchSizeInBits} = 20 (≈1 million keys) and {@code loopCount} = 8,\r\n     * the kernel is launched with only 131,072 work-items (1,048,576 ÷ 8),\r\n     * each performing 8 iterations internally.\r\n     * </p>\r\n     */\r\n    public int loopCount = 1;\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/CSecretFormat.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\npublic enum CSecretFormat {\r\n    \r\n    /**\r\n     * Represents a big integer.\r\n     * e.g.:\r\n     * <pre>\r\n     * 72155939486846849509759369733266486982821795810448245423168957390607644363272\r\n     * 39929263256442288830290225612580366403172818928633701045115663441379782969864\r\n     * 42379586058257162021782620237913525000692985364990081801945649219990416465578\r\n     * </pre>\r\n     */\r\n    BIG_INTEGER,\r\n    \r\n    /**\r\n     * Also referred to as WiF (Wallet Import Format).\r\n     * e.g.:\r\n     * <pre>\r\n     * 5K2YUVmWfxbmvsNxCsfvArXdGXm7d5DC9pn4yD75k2UaSYgkXTh\r\n     * 5JVAXLpkZ21svEzwyimMHn5hAkWNqJq8uGxqUqcRrNb8F4Csp8V\r\n     * 5JXYuGrwSbyp8sKBmiLcvokqSnxALPjKWQMPJXZYyBWKof7c2pk\r\n     * </pre>\r\n     */\r\n    DUMPED_RIVATE_KEY,\r\n    \r\n    /**\r\n     * A HEX-encoded SHA256 string. This might already be the hashed brainwallet.\r\n     * e.g.:\r\n     * <pre>\r\n     * 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\r\n     * 58472980a1d3449939eadc2652370972d5007fa9c059ce84fb3ab98f544e4a08\r\n     * 5db1fee4b5703808c48078a76768b155b421b210c0761cd6a5d223f4d99f1eaa\r\n     * </pre>\r\n     */\r\n    SHA256,\r\n    \r\n    /**\r\n     * Also known as a brainwallet. A string is hashed using SHA256 and used as the private key.\r\n     * e.g.: \r\n     * <pre>\r\n     * test\r\n     * test with space\r\n     * 1337\r\n     * </pre>\r\n     */\r\n    STRING_DO_SHA256\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/configuration/UnknownSecretFormatException.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\n/**\r\n * Thrown by {@link net.ladenthin.bitcoinaddressfinder.SecretsFile} when a\r\n * {@link CSecretFormat} value is encountered that is not handled by the\r\n * implementation. This indicates a programming error: a new enum constant was\r\n * added to {@link CSecretFormat} but the corresponding handling branch was not\r\n * implemented.\r\n */\r\npublic class UnknownSecretFormatException extends IllegalArgumentException {\r\n\r\n    private final CSecretFormat secretFormat;\r\n\r\n    public UnknownSecretFormatException(CSecretFormat secretFormat) {\r\n        super(\"Unknown secret format: \" + secretFormat);\r\n        this.secretFormat = secretFormat;\r\n    }\r\n\r\n    public CSecretFormat getSecretFormat() {\r\n        return secretFormat;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/eckey/Secp256k1.java",
    "content": "package net.ladenthin.bitcoinaddressfinder.eckey;\r\n\r\nimport java.math.BigInteger;\r\nimport java.security.GeneralSecurityException;\r\nimport java.security.KeyFactory;\r\nimport java.security.interfaces.ECPrivateKey;\r\nimport java.security.interfaces.ECPublicKey;\r\nimport java.security.spec.ECField;\r\nimport java.security.spec.ECFieldFp;\r\nimport java.security.spec.ECParameterSpec;\r\nimport java.security.spec.ECPoint;\r\nimport java.security.spec.ECPublicKeySpec;\r\nimport java.security.spec.EllipticCurve;\r\n\r\n// https://stackoverflow.com/questions/19673962/codes-to-generate-a-public-key-in-an-elliptic-curve-algorithm-using-a-given-priv/42797410#42797410\r\npublic class Secp256k1 {\r\n\r\n    final static BigInteger FieldP_2 = BigInteger.valueOf(2); // constant for scalar operations\r\n    final static BigInteger FieldP_3 = BigInteger.valueOf(3); // constant for scalar operations\r\n\r\n    public static String byteArrayToHexString(byte[] a) {\r\n        StringBuilder sb = new StringBuilder(a.length * 2);\r\n        for (byte b : a) {\r\n            sb.append(String.format(\"%02X\", b));\r\n        }\r\n        return sb.toString();\r\n    }\r\n\r\n    public static byte[] hexStringToByteArray(String s) {\r\n        int len = s.length();\r\n        byte[] data = new byte[len / 2];\r\n        for (int i = 0; i < len; i += 2) {\r\n            data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\r\n                    + Character.digit(s.charAt(i + 1), 16));\r\n        }\r\n        return data;\r\n    }\r\n\r\n    // scalar operations for native java\r\n    // see https://stackoverflow.com/a/42797410/8166854\r\n    // written by author: SkateScout\r\n    private static ECPoint doublePoint(final BigInteger p, final BigInteger a, final ECPoint R) {\r\n        if (R.equals(ECPoint.POINT_INFINITY)) {\r\n            return R;\r\n        }\r\n        BigInteger slope = (R.getAffineX().pow(2)).multiply(FieldP_3);\r\n        slope = slope.add(a);\r\n        slope = slope.multiply((R.getAffineY().multiply(FieldP_2)).modInverse(p));\r\n        final BigInteger Xout = slope.pow(2).subtract(R.getAffineX().multiply(FieldP_2)).mod(p);\r\n        final BigInteger Yout = (R.getAffineY().negate()).add(slope.multiply(R.getAffineX().subtract(Xout))).mod(p);\r\n        return new ECPoint(Xout, Yout);\r\n    }\r\n\r\n    private static ECPoint addPoint(final BigInteger p, final BigInteger a, final ECPoint r, final ECPoint g) {\r\n        if (r.equals(ECPoint.POINT_INFINITY)) {\r\n            return g;\r\n        }\r\n        if (g.equals(ECPoint.POINT_INFINITY)) {\r\n            return r;\r\n        }\r\n        if (r == g || r.equals(g)) {\r\n            return doublePoint(p, a, r);\r\n        }\r\n        final BigInteger gX = g.getAffineX();\r\n        final BigInteger sY = g.getAffineY();\r\n        final BigInteger rX = r.getAffineX();\r\n        final BigInteger rY = r.getAffineY();\r\n        final BigInteger slope = (rY.subtract(sY)).multiply(rX.subtract(gX).modInverse(p)).mod(p);\r\n        final BigInteger Xout = (slope.modPow(FieldP_2, p).subtract(rX)).subtract(gX).mod(p);\r\n        BigInteger Yout = sY.negate().mod(p);\r\n        Yout = Yout.add(slope.multiply(gX.subtract(Xout))).mod(p);\r\n        return new ECPoint(Xout, Yout);\r\n    }\r\n\r\n    public static ECPoint scalmultNew(final ECParameterSpec params, final ECPoint g, final BigInteger kin) {\r\n        EllipticCurve curve = params.getCurve();\r\n        final ECField field = curve.getField();\r\n        if (!(field instanceof ECFieldFp)) {\r\n            throw new UnsupportedOperationException(field.getClass().getCanonicalName());\r\n        }\r\n        final BigInteger p = ((ECFieldFp) field).getP();\r\n        final BigInteger a = curve.getA();\r\n        ECPoint R = ECPoint.POINT_INFINITY;\r\n        // value only valid for curve secp256k1, code taken from https://www.secg.org/sec2-v2.pdf,\r\n        // see \"Finally the order n of G and the cofactor are: n = \"FF..\"\r\n        BigInteger SECP256K1_Q = params.getOrder();\r\n        //BigInteger SECP256K1_Q = new BigInteger(\"00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\",16);\r\n        BigInteger k = kin.mod(SECP256K1_Q); // uses this !\r\n        // BigInteger k = kin.mod(p); // do not use this ! wrong as per comment from President James Moveon Polk\r\n        final int length = k.bitLength();\r\n        final byte[] binarray = new byte[length];\r\n        for (int i = 0; i <= length - 1; i++) {\r\n            binarray[i] = k.mod(FieldP_2).byteValue();\r\n            k = k.shiftRight(1);\r\n        }\r\n        for (int i = length - 1; i >= 0; i--) {\r\n            R = doublePoint(p, a, R);\r\n            if (binarray[i] == 1) {\r\n                R = addPoint(p, a, R, g);\r\n            }\r\n        }\r\n        return R;\r\n    }\r\n\r\n    public static ECPoint scalmultOrg(final EllipticCurve curve, final ECPoint g, final BigInteger kin) {\r\n        final ECField field = curve.getField();\r\n        if (!(field instanceof ECFieldFp)) {\r\n            throw new UnsupportedOperationException(field.getClass().getCanonicalName());\r\n        }\r\n        final BigInteger p = ((ECFieldFp) field).getP();\r\n        final BigInteger a = curve.getA();\r\n        ECPoint R = ECPoint.POINT_INFINITY;\r\n        // value only valid for curve secp256k1, code taken from https://www.secg.org/sec2-v2.pdf,\r\n        // see \"Finally the order n of G and the cofactor are: n = \"FF..\"\r\n        BigInteger SECP256K1_Q = new BigInteger(\"00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\", 16);\r\n        BigInteger k = kin.mod(SECP256K1_Q); // uses this !\r\n        // wrong as per comment from President James Moveon Polk\r\n        // BigInteger k = kin.mod(p); // do not use this !\r\n        System.out.println(\" SECP256K1_Q: \" + SECP256K1_Q);\r\n        System.out.println(\"           p: \" + p);\r\n        System.out.println(\"curve: \" + curve);\r\n        final int length = k.bitLength();\r\n        final byte[] binarray = new byte[length];\r\n        for (int i = 0; i <= length - 1; i++) {\r\n            binarray[i] = k.mod(FieldP_2).byteValue();\r\n            k = k.shiftRight(1);\r\n        }\r\n        for (int i = length - 1; i >= 0; i--) {\r\n            R = doublePoint(p, a, R);\r\n            if (binarray[i] == 1) {\r\n                R = addPoint(p, a, R, g);\r\n            }\r\n        }\r\n        return R;\r\n    }\r\n\r\n    public static ECPublicKey getPublicKey(final ECPrivateKey pk) throws GeneralSecurityException {\r\n        final ECParameterSpec params = pk.getParams();\r\n        final ECPoint w = scalmultNew(params, pk.getParams().getGenerator(), pk.getS());\r\n        //final ECPoint w = scalmult(params.getCurve(), pk.getParams().getGenerator(), pk.getS());\r\n        final KeyFactory kg = KeyFactory.getInstance(\"EC\");\r\n        return (ECPublicKey) kg.generatePublic(new ECPublicKeySpec(w, params));\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/AbstractKeyProducer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\r\n\r\npublic abstract class AbstractKeyProducer implements KeyProducer {\r\n    \r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/AbstractKeyProducerQueueBuffered.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.LinkedBlockingQueue;\nimport java.util.concurrent.TimeUnit;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaReceiver;\nimport org.slf4j.Logger;\n\n/**\n * Base class to manage secret buffering using a blocking queue.\n * Intended for streaming protocols like WebSocket or ZMQ.\n */\npublic abstract class AbstractKeyProducerQueueBuffered<T extends CKeyProducerJavaReceiver> extends KeyProducerJava<T> {\n\n    protected final KeyUtility keyUtility;\n    protected final BlockingQueue<byte[]> secretQueue;\n    protected volatile boolean shouldStop = false;\n    \n    public AbstractKeyProducerQueueBuffered(T config, KeyUtility keyUtility, Logger logger) {\n        super(config, logger);\n        this.keyUtility = keyUtility;\n        this.secretQueue = new LinkedBlockingQueue<>();\n    }\n\n    protected AbstractKeyProducerQueueBuffered(\n            T config,\n            KeyUtility keyUtility,\n            Logger logger,\n            BlockingQueue<byte[]> queue\n    ) {\n        super(config, logger);\n        this.keyUtility = keyUtility;\n        this.secretQueue = queue;\n    }\n\n    @Override\n    public BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly) throws NoMoreSecretsAvailableException {\n        verifyWorkSize(overallWorkSize, cKeyProducerJava.maxWorkSize);\n\n        int length = returnStartSecretOnly ? 1 : overallWorkSize;\n        BigInteger[] secrets = new BigInteger[length];\n\n        for (int i = 0; i < length; i++) {\n            if (shouldStop) {\n                throw new NoMoreSecretsAvailableException(\"Interrupted while waiting for secrets\");\n            }\n\n            try {\n                byte[] secret = secretQueue.poll(getReadTimeout(), TimeUnit.MILLISECONDS);\n\n                if (secret == null) {\n                    throw new NoMoreSecretsAvailableException(\"Timeout while waiting for secret\");\n                }\n\n                if (secret.length != PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES) {\n                    throw new NoMoreSecretsAvailableException(\"Invalid secret length: \" + secret.length);\n                }\n\n                secrets[i] = keyUtility.bigIntegerFromUnsignedByteArray(secret);\n\n                if (cKeyProducerJava.logReceivedSecret) {\n                    logger.info(\"Received key: {}\", keyUtility.bigIntegerToFixedLengthHex(secrets[i]));\n                }\n\n            } catch (InterruptedException e) {\n                Thread.currentThread().interrupt();\n                throw new NoMoreSecretsAvailableException(\"Interrupted while polling secret\", e);\n            }\n        }\n\n        return secrets;\n    }\n    \n    protected void sleep(int millis) {\n        try {\n            Thread.sleep(millis);\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n        }\n    }\n\n    /**\n     * Add a raw secret (e.g. from socket, ZMQ, websocket).\n     */\n    protected void addSecret(byte[] secret) {\n        if (!shouldStop) {\n            if (!secretQueue.offer(secret)) {\n                logger.error(\"Secret queue is full, ignore secret: {}\", secret);\n            }\n        }\n    }\n\n    /**\n     * Override to define how long createSecrets() should block.\n     */\n    protected abstract int getReadTimeout();\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/ConnectionUtils.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.net.InetSocketAddress;\nimport java.net.Socket;\n\npublic class ConnectionUtils {\n\n    public static void waitUntilTcpPortOpen(String host, int port, int timeoutMillis) throws InterruptedException {\n        long start = System.currentTimeMillis();\n        while (System.currentTimeMillis() - start < timeoutMillis) {\n            try (Socket socket = new Socket()) {\n                socket.connect(new InetSocketAddress(host, port), 100);\n                return;\n            } catch (Exception e) {\n                Thread.sleep(50);\n            }\n        }\n        throw new IllegalStateException(\"TCP port \" + host + \":\" + port + \" not open after \" + timeoutMillis + \"ms\");\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducer.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.Interruptable;\nimport org.slf4j.Logger;\n\npublic interface KeyProducer extends Interruptable {\n    BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly) throws NoMoreSecretsAvailableException;\n    Logger getLogger();\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerIdIsNotUniqueException.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\n/**\n * Thrown by {@link net.ladenthin.bitcoinaddressfinder.Finder} during\n * producer initialisation when two or more producers share the same\n * {@code keyProducerId}. Each producer must be identified by a unique string\n * so that hits can be attributed to the correct producer.\n */\npublic class KeyProducerIdIsNotUniqueException extends RuntimeException {\n\n    private final String id;\n\n    public KeyProducerIdIsNotUniqueException(String id) {\n        super(\"Key producer id must be unique: \" + id);\n        this.id = id;\n    }\n\n    public String getId() {\n        return id;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerIdNullException.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\n/**\n * Thrown by {@link net.ladenthin.bitcoinaddressfinder.Finder} during\n * producer initialisation when a producer's {@code keyProducerId} is\n * {@code null}. Every producer must carry a non-null identifier so that\n * hits can be attributed to the correct producer.\n */\npublic class KeyProducerIdNullException extends RuntimeException {\n\n    public KeyProducerIdNullException() {\n        super(\"Key producer id must not be null.\");\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerIdUnknownException.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport org.jspecify.annotations.Nullable;\n\n/**\n * Thrown by {@link net.ladenthin.bitcoinaddressfinder.Finder} when a\n * configured {@code keyProducerId} cannot be resolved to a registered producer.\n * This typically indicates a misconfiguration: the requested producer type is\n * not supported or the id was misspelled.\n */\npublic class KeyProducerIdUnknownException extends RuntimeException {\n\n    private final @Nullable String id;\n\n    public KeyProducerIdUnknownException(@Nullable String id) {\n        super(\"Key producer id is unknown: \" + id);\n        this.id = id;\n    }\n\n    public @Nullable String getId() {\n        return id;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJava.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJava;\nimport org.slf4j.Logger;\n\npublic abstract class KeyProducerJava<T extends CKeyProducerJava> extends AbstractKeyProducer {\n\n    protected final T cKeyProducerJava;\n    \n    protected final Logger logger;\n    \n    public KeyProducerJava(T cKeyProducerJava, Logger logger) {\n        this.cKeyProducerJava = cKeyProducerJava;\n        this.logger = logger;\n    }\n\n    public void verifyWorkSize(int overallWorkSize, int maxWorkSize) throws NoMoreSecretsAvailableException {\n        if (overallWorkSize < 0 || overallWorkSize > maxWorkSize) {\n            throw new IllegalArgumentException(\"Unreasonable work size: \" + overallWorkSize);\n        }\n    }\n    \n    @Override\n    public Logger getLogger() {\n        return logger;\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaBip39.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.BIP39KeyProducer;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.RandomSecretSupplier;\nimport net.ladenthin.bitcoinaddressfinder.SecretSupplier;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaBip39;\nimport org.slf4j.Logger;\n\npublic class KeyProducerJavaBip39 extends KeyProducerJava<CKeyProducerJavaBip39> {\n\n    private final KeyUtility keyUtility;\n    private final BitHelper bitHelper;\n    private final SecretSupplier randomSupplier;\n    private final BIP39KeyProducer bip39KeyProducer;\n    \n    public KeyProducerJavaBip39(CKeyProducerJavaBip39 cKeyProducerJavaBip39, KeyUtility keyUtility, BitHelper bitHelper, Logger logger) {\n        super(cKeyProducerJavaBip39, logger);\n        this.keyUtility = keyUtility;\n        this.bitHelper = bitHelper;\n        \n        bip39KeyProducer = new BIP39KeyProducer(\n            cKeyProducerJavaBip39.mnemonic,\n            cKeyProducerJavaBip39.passphrase,\n            cKeyProducerJavaBip39.bip32Path,\n            cKeyProducerJavaBip39.getCreationTimeInstant(),\n            cKeyProducerJavaBip39.hardened\n        );\n        randomSupplier = new RandomSecretSupplier(bip39KeyProducer);\n    }\n\n    @Override\n    public BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly) throws NoMoreSecretsAvailableException {\n        verifyWorkSize(overallWorkSize, cKeyProducerJava.maxWorkSize);\n        return keyUtility.createSecrets(overallWorkSize, returnStartSecretOnly, this.cKeyProducerJava.privateKeyMaxNumBits, randomSupplier);\n    }\n\n    @Override\n    public void interrupt() {\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaIncremental.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaIncremental;\nimport org.jspecify.annotations.NonNull;\nimport org.slf4j.Logger;\n\npublic class KeyProducerJavaIncremental extends KeyProducerJava<CKeyProducerJavaIncremental> {\n    \n    @NonNull\n    private BigInteger currentValue;\n    \n    public KeyProducerJavaIncremental(CKeyProducerJavaIncremental cKeyProducerJavaIncremental, KeyUtility keyUtility, BitHelper bitHelper, Logger logger) {\n        super(cKeyProducerJavaIncremental, logger);\n        this.currentValue = new BigInteger(cKeyProducerJavaIncremental.startAddress, BitHelper.RADIX_HEX);\n    }\n\n    @Override\n    public BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly) throws NoMoreSecretsAvailableException {\n        verifyWorkSize(overallWorkSize, cKeyProducerJava.maxWorkSize);\n        final BigInteger endAddress = cKeyProducerJava.getEndAddress();\n        if (currentValue.compareTo(endAddress) > 0) {\n            throw new NoMoreSecretsAvailableException(currentValue + \" exceeds \");\n        }\n        \n        int length = returnStartSecretOnly ? 1 : overallWorkSize;\n        BigInteger[] secrets = new BigInteger[length];\n        BigInteger counter = currentValue;\n        for (int i = 0; i < length; i++) {\n            if (counter.compareTo(endAddress) > 0) {\n                throw new NoMoreSecretsAvailableException(counter + \" exceeds end address \" + endAddress);\n            }\n            secrets[i] = counter;\n            counter = counter.add(BigInteger.ONE);\n        }\n        \n        currentValue = currentValue.add(BigInteger.valueOf(overallWorkSize));\n        \n        return secrets;\n    }\n\n    @Override\n    public void interrupt() {\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaRandom.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport java.security.NoSuchAlgorithmException;\nimport java.security.SecureRandom;\nimport java.util.Random;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.RandomSecretSupplier;\nimport net.ladenthin.bitcoinaddressfinder.SecretSupplier;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandom;\nimport org.slf4j.Logger;\n\npublic class KeyProducerJavaRandom extends KeyProducerJava<CKeyProducerJavaRandom> {\n\n    private final KeyUtility keyUtility;\n    private final BitHelper bitHelper;\n    private final SecretSupplier randomSupplier;\n    \n    /**\n     * It is already thread local, no need for {@link java.util.concurrent.ThreadLocalRandom}.\n     */\n    private final Random random;\n\n    @SuppressWarnings({\"squid:S2245\"})\n    public KeyProducerJavaRandom(CKeyProducerJavaRandom cKeyProducerJavaRandom, KeyUtility keyUtility, BitHelper bitHelper, Logger logger) {\n        super(cKeyProducerJavaRandom, logger);\n        this.keyUtility = keyUtility;\n        this.bitHelper = bitHelper;\n        \n        switch (cKeyProducerJavaRandom.keyProducerJavaRandomInstance) {\n            case SECURE_RANDOM:\n                try {\n                    random = SecureRandom.getInstanceStrong();\n                } catch (NoSuchAlgorithmException e) {\n                    throw new RuntimeException(e);\n                }\n                break;\n            case RANDOM_CURRENT_TIME_MILLIS_SEED:\n                // EXPLOIT for: https://cwe.mitre.org/data/definitions/338\n                random = new Random(System.currentTimeMillis());\n                break;\n            case RANDOM_CUSTOM_SEED:\n                // EXPLOIT for: https://cwe.mitre.org/data/definitions/338\n                random = new Random();\n                if (cKeyProducerJavaRandom.customSeed != null) {\n                    random.setSeed(cKeyProducerJavaRandom.customSeed); // only if explicitly configured\n                }\n                break;\n            case SHA1_PRNG:\n                try {\n                    random = SecureRandom.getInstance(\"SHA1PRNG\");\n                    \n                    // To simulate bug: do NOT set a seed at all\n                    if (cKeyProducerJavaRandom.customSeed != null) {\n                        random.setSeed(cKeyProducerJavaRandom.customSeed); // only if explicitly configured\n                    }\n                } catch (NoSuchAlgorithmException e) {\n                    throw new RuntimeException(e);\n                }\n                break;\n            default:\n                throw new RuntimeException(\"Unknown keyProducerJavaRandomInstance: \" + cKeyProducerJavaRandom.keyProducerJavaRandomInstance);\n        }\n        randomSupplier = new RandomSecretSupplier(random);\n    }\n    \n    @Override\n    public BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly) throws NoMoreSecretsAvailableException {\n        verifyWorkSize(overallWorkSize, cKeyProducerJava.maxWorkSize);\n        return keyUtility.createSecrets(overallWorkSize, returnStartSecretOnly, this.cKeyProducerJava.privateKeyMaxNumBits, randomSupplier);\n    }\n\n    @Override\n    public void interrupt() {\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaSocket.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaSocket;\nimport java.io.DataInputStream;\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.net.ServerSocket;\nimport java.net.Socket;\nimport java.util.Objects;\nimport java.util.concurrent.ExecutorService;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport org.jspecify.annotations.Nullable;\nimport org.slf4j.Logger;\nimport java.util.concurrent.*;\n\npublic class KeyProducerJavaSocket extends AbstractKeyProducerQueueBuffered<CKeyProducerJavaSocket> {\n\n    private @Nullable ServerSocket serverSocket;\n    private @Nullable Socket socket;\n    private @Nullable DataInputStream inputStream;\n    private Future<?> readerFuture;\n\n    private final ExecutorService readerExecutor = Executors.newSingleThreadExecutor();\n\n    public KeyProducerJavaSocket(CKeyProducerJavaSocket config, KeyUtility keyUtility, BitHelper bitHelper, Logger logger) {\n        super(config, keyUtility, logger);\n        setupSocket();\n    }\n\n    private void setupSocket() {\n        readerFuture = readerExecutor.submit(() -> {\n            int attempts = 0;\n            Exception lastException = null;\n\n            while (!shouldStop && attempts < cKeyProducerJava.connectionRetryCount) {\n                try {\n                    if (cKeyProducerJava.mode == CKeyProducerJavaSocket.Mode.SERVER) {\n                        if (serverSocket == null) {\n                            serverSocket = new ServerSocket(cKeyProducerJava.getPort());\n                            serverSocket.setSoTimeout(cKeyProducerJava.timeout);\n                        }\n                        socket = serverSocket.accept();\n                        logger.info(\"Accepted client connection at port {}\", cKeyProducerJava.getPort());\n                    } else {\n                        socket = new Socket();\n                        socket.connect(new InetSocketAddress(cKeyProducerJava.getHost(), cKeyProducerJava.getPort()), cKeyProducerJava.timeout);\n                        logger.info(\"Connected to server at {}:{}\", cKeyProducerJava.getHost(), cKeyProducerJava.getPort());\n                    }\n\n                    Socket localSocket = Objects.requireNonNull(socket);\n                    localSocket.setSoTimeout(cKeyProducerJava.timeout);\n                    inputStream = new DataInputStream(localSocket.getInputStream());\n\n                    byte[] buffer = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\n                    while (!shouldStop) {\n                        int read = 0;\n                        while (read < buffer.length) {\n                            int r = inputStream.read(buffer, read, buffer.length - read);\n                            if (r == -1) throw new IOException(\"End of stream\");\n                            read += r;\n                        }\n                        addSecret(buffer.clone());\n                    }\n\n                } catch (IOException e) {\n                    lastException = e;\n                    logger.warn(\"Connection attempt {} failed: {}\", attempts + 1, e.getMessage());\n                    attempts++;\n                    closeConnections();\n                    sleep(cKeyProducerJava.retryDelayMillisConnect);\n                }\n            }\n\n            if (!shouldStop && socket == null) {\n                throw new RuntimeException(\"Unable to establish socket connection\", lastException);\n            }\n        });\n    }\n\n    private void closeConnections() {\n        try { if (inputStream != null) inputStream.close(); } catch (IOException ignored) {}\n        try { if (socket != null) socket.close(); } catch (IOException ignored) {}\n        try { if (serverSocket != null) serverSocket.close(); } catch (IOException ignored) {}\n        inputStream = null;\n        socket = null;\n        serverSocket = null;\n    }\n\n    @Override\n    protected int getReadTimeout() {\n        return cKeyProducerJava.timeout;\n    }\n\n    @Override\n    public void interrupt() {\n        shouldStop = true;\n        if (readerFuture != null) {\n            readerFuture.cancel(true);\n        }\n        readerExecutor.shutdownNow();\n        closeConnections();\n        try {\n            readerExecutor.awaitTermination(500, TimeUnit.MILLISECONDS);\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n        }\n    }\n}"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaWebSocket.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaWebSocket;\nimport org.java_websocket.WebSocket;\nimport org.java_websocket.server.WebSocketServer;\nimport org.java_websocket.handshake.ClientHandshake;\nimport org.slf4j.Logger;\n\nimport java.net.InetSocketAddress;\nimport java.nio.ByteBuffer;\nimport java.util.concurrent.Executors;\n\npublic class KeyProducerJavaWebSocket extends AbstractKeyProducerQueueBuffered<CKeyProducerJavaWebSocket> {\n\n    private WebSocketServer webSocketServer;\n\n    public KeyProducerJavaWebSocket(CKeyProducerJavaWebSocket config, KeyUtility keyUtility, BitHelper bitHelper, Logger logger) {\n        super(config, keyUtility, logger);\n        initWebSocketServer();\n    }\n\n    private void initWebSocketServer() {\n        webSocketServer = new WebSocketServer(new InetSocketAddress(cKeyProducerJava.getPort())) {\n            @Override\n            public void onOpen(WebSocket conn, ClientHandshake handshake) {\n                logger.info(\"WebSocket connection opened from: {}\", conn.getRemoteSocketAddress());\n            }\n\n            @Override\n            public void onClose(WebSocket conn, int code, String reason, boolean remote) {\n                logger.info(\"WebSocket closed: {}\", conn.getRemoteSocketAddress());\n            }\n\n            @Override\n            public void onMessage(WebSocket conn, ByteBuffer message) {\n                if (shouldStop) return;\n                if (message.remaining() == PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES) {\n                    byte[] secret = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\n                    message.get(secret);\n                    addSecret(secret);\n                } else {\n                    logger.warn(\"Invalid message length: {}\", message.remaining());\n                }\n            }\n\n            @Override\n            public void onError(WebSocket conn, Exception ex) {\n                logger.error(\"WebSocket error\", ex);\n            }\n\n            @Override\n            public void onStart() {\n                logger.info(\"WebSocket server started on port: {}\", getPort());\n            }\n\n            @Override\n            public void onMessage(WebSocket ws, String string) {\n                logger.info(\"onMessage: {}\", string);\n            }\n        };\n\n        Executors.newSingleThreadExecutor().submit(webSocketServer::start);\n    }\n\n    @Override\n    protected int getReadTimeout() {\n        return cKeyProducerJava.timeout;\n    }\n\n    @Override\n    public void interrupt() {\n        shouldStop = true;\n        if (webSocketServer != null) {\n            try {\n                webSocketServer.stop();\n            } catch (InterruptedException e) {\n                Thread.currentThread().interrupt();\n            }\n        }\n    }\n}"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaZmq.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaZmq;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport org.slf4j.Logger;\nimport org.zeromq.SocketType;\nimport org.zeromq.ZContext;\nimport org.zeromq.ZMQ;\nimport org.zeromq.ZMQException;\n\npublic class KeyProducerJavaZmq extends AbstractKeyProducerQueueBuffered<CKeyProducerJavaZmq> {\n\n    private final ZContext context;\n    private final ZMQ.Socket socket;\n    private final Thread receiverThread;\n    \n    public KeyProducerJavaZmq(CKeyProducerJavaZmq config, KeyUtility keyUtility, BitHelper bitHelper, Logger logger) {\n        super(config, keyUtility, logger);\n\n        context = new ZContext();\n        socket = context.createSocket(SocketType.PULL);\n\n        if (cKeyProducerJava.mode == CKeyProducerJavaZmq.Mode.BIND) {\n            socket.bind(cKeyProducerJava.address);\n        } else {\n            socket.connect(cKeyProducerJava.address);\n        }\n\n        int internalTimeout = getReadTimeout();\n        socket.setReceiveTimeOut(internalTimeout);\n\n        receiverThread = new Thread(() -> {\n            while (!shouldStop && !Thread.currentThread().isInterrupted()) {\n                try {\n                    byte[] msg = socket.recv(0); // blocking up to timeout\n                    if (msg != null) {\n                        if (msg.length == PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES) {\n                            addSecret(msg);\n                        } else {\n                            logger.error(\"Received invalid secret length: \" + msg.length);\n                        }\n                    }\n                    // if msg is null: it's a timeout — just loop again\n                } catch (ZMQException e) {\n                    if (shouldStop || e.getErrorCode() == ZMQ.Error.ETERM.getCode()) break;\n                    logger.error(\"ZMQ error\", e); // unexpected ZMQ errors\n                }\n            }\n        }, \"ZMQ-Receiver\");\n\n        receiverThread.setDaemon(true);\n        receiverThread.start();\n    }\n\n    @Override\n    protected int getReadTimeout() {\n        return cKeyProducerJava.timeout;\n    }\n\n    @Override\n    public void interrupt() {\n        shouldStop = true;\n        receiverThread.interrupt(); // allow thread to exit if blocked\n        try {\n            receiverThread.join(500);\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n        }\n        socket.close();\n        context.close();\n    }\n}"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/keyproducer/NoMoreSecretsAvailableException.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\r\n\r\n/**\r\n * Exception thrown when no more secrets are available.\r\n * \r\n * This class extends RuntimeException because it is used with methods such as\r\n * {@link java.util.Random#nextBytes(byte[])} and {@link java.math.BigInteger#BigInteger(int, java.util.Random)},\r\n * which require a {@code Random} instance that only throws unchecked exceptions.\r\n */\r\npublic class NoMoreSecretsAvailableException extends RuntimeException {\r\n    \r\n    public NoMoreSecretsAvailableException() {\r\n        super();\r\n    }\r\n\r\n    public NoMoreSecretsAvailableException(String message) {\r\n        super(message);\r\n    }\r\n\r\n    public NoMoreSecretsAvailableException(String message, Throwable cause) {\r\n        super(message, cause);\r\n    }\r\n\r\n    public NoMoreSecretsAvailableException(Throwable cause) {\r\n        super(cause);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/opencl/OpenCLBuilder.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2022 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.opencl;\r\n\r\nimport java.lang.reflect.Field;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.ByteOrder;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.stream.LongStream;\r\n\r\nimport com.google.common.collect.ImmutableList;\r\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\r\nimport org.apache.maven.artifact.versioning.ComparableVersion;\r\nimport static org.jocl.CL.CL_CONTEXT_PLATFORM;\r\nimport static org.jocl.CL.CL_DEVICE_ADDRESS_BITS;\r\nimport static org.jocl.CL.CL_DEVICE_ENDIAN_LITTLE;\r\nimport static org.jocl.CL.CL_DEVICE_ERROR_CORRECTION_SUPPORT;\r\nimport static org.jocl.CL.CL_DEVICE_EXTENSIONS;\r\nimport static org.jocl.CL.CL_DEVICE_GLOBAL_MEM_SIZE;\r\nimport static org.jocl.CL.CL_DEVICE_IMAGE2D_MAX_HEIGHT;\r\nimport static org.jocl.CL.CL_DEVICE_IMAGE2D_MAX_WIDTH;\r\nimport static org.jocl.CL.CL_DEVICE_IMAGE3D_MAX_DEPTH;\r\nimport static org.jocl.CL.CL_DEVICE_IMAGE3D_MAX_HEIGHT;\r\nimport static org.jocl.CL.CL_DEVICE_IMAGE3D_MAX_WIDTH;\r\nimport static org.jocl.CL.CL_DEVICE_IMAGE_SUPPORT;\r\nimport static org.jocl.CL.CL_DEVICE_LOCAL_MEM_SIZE;\r\nimport static org.jocl.CL.CL_DEVICE_LOCAL_MEM_TYPE;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_CLOCK_FREQUENCY;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_COMPUTE_UNITS;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_MEM_ALLOC_SIZE;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_READ_IMAGE_ARGS;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_WORK_GROUP_SIZE;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_WORK_ITEM_SIZES;\r\nimport static org.jocl.CL.CL_DEVICE_MAX_WRITE_IMAGE_ARGS;\r\nimport static org.jocl.CL.CL_DEVICE_NAME;\r\nimport static org.jocl.CL.CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR;\r\nimport static org.jocl.CL.CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE;\r\nimport static org.jocl.CL.CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT;\r\nimport static org.jocl.CL.CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT;\r\nimport static org.jocl.CL.CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG;\r\nimport static org.jocl.CL.CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT;\r\nimport static org.jocl.CL.CL_DEVICE_PROFILE;\r\nimport static org.jocl.CL.CL_DEVICE_QUEUE_PROPERTIES;\r\nimport static org.jocl.CL.CL_DEVICE_SINGLE_FP_CONFIG;\r\nimport static org.jocl.CL.CL_DEVICE_TYPE;\r\nimport static org.jocl.CL.CL_DEVICE_TYPE_ALL;\r\nimport static org.jocl.CL.CL_DEVICE_VENDOR;\r\nimport static org.jocl.CL.CL_DEVICE_VERSION;\r\nimport static org.jocl.CL.CL_DRIVER_VERSION;\r\nimport static org.jocl.CL.CL_PLATFORM_NAME;\r\nimport static org.jocl.CL.clGetDeviceIDs;\r\nimport static org.jocl.CL.clGetDeviceInfo;\r\nimport static org.jocl.CL.clGetPlatformIDs;\r\nimport static org.jocl.CL.clGetPlatformInfo;\r\nimport org.jocl.Pointer;\r\nimport org.jocl.Sizeof;\r\nimport org.jocl.cl_context_properties;\r\nimport org.jocl.cl_device_id;\r\nimport org.jocl.cl_platform_id;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\npublic class OpenCLBuilder {\r\n    \r\n    public static boolean TRANSFORM_TO_PRINT = true;\r\n    \r\n    public List<OpenCLPlatform> build() {\r\n        // Obtain the number of platforms\r\n        int[] numPlatforms = new int[1];\r\n        clGetPlatformIDs(0, null, numPlatforms);\r\n\r\n        // Obtain the platform IDs\r\n        List<OpenCLPlatform> openCLPlatforms = new ArrayList<>();\r\n        cl_platform_id[] platforms = new cl_platform_id[numPlatforms[0]];\r\n        clGetPlatformIDs(platforms.length, platforms, null);\r\n\r\n        for (int i=0; i<platforms.length; i++) {\r\n            // Collect all devices of all platforms\r\n            final cl_platform_id platformId = platforms[i];\r\n            \r\n            // Initialize the context properties\r\n            cl_context_properties contextProperties = new cl_context_properties();\r\n            contextProperties.addProperty(CL_CONTEXT_PLATFORM, platformId);\r\n\r\n            String platformName = getString(platformId, CL_PLATFORM_NAME);\r\n            \r\n            // Obtain the number of devices for the current platform\r\n            int[] numDevicesArray = new int[1];\r\n            clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, 0, null, numDevicesArray);\r\n            int numDevices = numDevicesArray[0];\r\n            \r\n            cl_device_id[] devicesArray = new cl_device_id[numDevices];\r\n            clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, numDevices, devicesArray, null);\r\n\r\n            List<OpenCLDevice> openCLDevices = new ArrayList<>();\r\n            for (cl_device_id device : devicesArray) {\r\n                OpenCLDevice openCLDevice = createOpenCLDevice(device);\r\n                openCLDevices.add(openCLDevice);\r\n            }\r\n\r\n            OpenCLPlatform openCLPlatform = new OpenCLPlatform(platformName, contextProperties, ImmutableList.copyOf(openCLDevices));\r\n            openCLPlatforms.add(openCLPlatform);\r\n        }\r\n        \r\n        return openCLPlatforms;\r\n    }\r\n\r\n    private OpenCLDevice createOpenCLDevice(cl_device_id device) {\r\n        String deviceName = getString(device, CL_DEVICE_NAME);\r\n        String deviceVendor = getString(device, CL_DEVICE_VENDOR);\r\n        String driverVersion = getString(device, CL_DRIVER_VERSION);\r\n        String deviceProfile = getString(device, CL_DEVICE_PROFILE);\r\n        String deviceVersion = getString(device, CL_DEVICE_VERSION);\r\n        String deviceExtensions = getString(device, CL_DEVICE_EXTENSIONS);\r\n        boolean endianLittle = getInt(device, CL_DEVICE_ENDIAN_LITTLE) == 1;\r\n        long deviceType = getLong(device, CL_DEVICE_TYPE);\r\n        int maxComputeUnits = getInt(device, CL_DEVICE_MAX_COMPUTE_UNITS);\r\n        long maxWorkItemDimensions = getLong(device, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS);\r\n        long[] maxWorkItemSizes = getSizes(device, CL_DEVICE_MAX_WORK_ITEM_SIZES, 3);\r\n        long maxWorkGroupSize = getSize(device, CL_DEVICE_MAX_WORK_GROUP_SIZE);\r\n        long maxClockFrequency = getLong(device, CL_DEVICE_MAX_CLOCK_FREQUENCY);\r\n        int addressBits = getInt(device, CL_DEVICE_ADDRESS_BITS);\r\n        long maxMemAllocSize = getLong(device, CL_DEVICE_MAX_MEM_ALLOC_SIZE);\r\n        long globalMemSize = getLong(device, CL_DEVICE_GLOBAL_MEM_SIZE);\r\n        int errorCorrectionSupport = getInt(device, CL_DEVICE_ERROR_CORRECTION_SUPPORT);\r\n        int localMemType = getInt(device, CL_DEVICE_LOCAL_MEM_TYPE);\r\n        long localMemSize = getLong(device, CL_DEVICE_LOCAL_MEM_SIZE);\r\n        long maxConstantBufferSize = getLong(device, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE);\r\n        long queueProperties = getLong(device, CL_DEVICE_QUEUE_PROPERTIES);\r\n        int imageSupport = getInt(device, CL_DEVICE_IMAGE_SUPPORT);\r\n        int maxReadImageArgs = getInt(device, CL_DEVICE_MAX_READ_IMAGE_ARGS);\r\n        int maxWriteImageArgs = getInt(device, CL_DEVICE_MAX_WRITE_IMAGE_ARGS);\r\n        long singleFpConfig = getLong(device, CL_DEVICE_SINGLE_FP_CONFIG);\r\n        long image2dMaxWidth = getSize(device, CL_DEVICE_IMAGE2D_MAX_WIDTH);\r\n        long image2dMaxHeight = getSize(device, CL_DEVICE_IMAGE2D_MAX_HEIGHT);\r\n        long image3dMaxWidth = getSize(device, CL_DEVICE_IMAGE3D_MAX_WIDTH);\r\n        long image3dMaxHeight = getSize(device, CL_DEVICE_IMAGE3D_MAX_HEIGHT);\r\n        long image3dMaxDepth = getSize(device, CL_DEVICE_IMAGE3D_MAX_DEPTH);\r\n        int preferredVectorWidthChar = getInt(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR);\r\n        int preferredVectorWidthShort = getInt(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT);\r\n        int preferredVectorWidthInt = getInt(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT);\r\n        int preferredVectorWidthLong = getInt(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG);\r\n        int preferredVectorWidthFloat = getInt(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT);\r\n        int preferredVectorWidthDouble = getInt(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE);\r\n        \r\n        OpenCLDevice openCLDevice = new OpenCLDevice(\r\n                device,\r\n                deviceName,\r\n                deviceVendor,\r\n                driverVersion,\r\n                deviceProfile,\r\n                deviceVersion,\r\n                deviceExtensions,\r\n                deviceType,\r\n                endianLittle,\r\n                maxComputeUnits,\r\n                maxWorkItemDimensions,\r\n                longsToImmutableList(maxWorkItemSizes),\r\n                maxWorkGroupSize,\r\n                maxClockFrequency,\r\n                addressBits,\r\n                maxMemAllocSize,\r\n                globalMemSize,\r\n                errorCorrectionSupport,\r\n                localMemType,\r\n                localMemSize,\r\n                maxConstantBufferSize,\r\n                queueProperties,\r\n                imageSupport,\r\n                maxReadImageArgs,\r\n                maxWriteImageArgs,\r\n                singleFpConfig,\r\n                image2dMaxWidth,\r\n                image2dMaxHeight,\r\n                image3dMaxWidth,\r\n                image3dMaxHeight,\r\n                image3dMaxDepth,\r\n                preferredVectorWidthChar,\r\n                preferredVectorWidthShort,\r\n                preferredVectorWidthInt,\r\n                preferredVectorWidthLong,\r\n                preferredVectorWidthFloat,\r\n                preferredVectorWidthDouble\r\n        );\r\n        \r\n        return openCLDevice;\r\n    }\r\n\r\n    private static ImmutableList<@NonNull Long> longsToImmutableList(long[] array) {\r\n        ImmutableList.Builder<@NonNull Long> b = ImmutableList.builderWithExpectedSize(array.length);\r\n        for (long l : array) {\r\n            b.add(l);\r\n        }\r\n        return b.build();\r\n    }\r\n\r\n    public static boolean isOpenCLnativeLibraryLoadable() {\r\n        try {\r\n            Class.forName(\"org.jocl.CL\");\r\n            Field field = org.jocl.CL.class.getDeclaredField(\"nativeLibraryLoaded\");\r\n            field.setAccessible(true);\r\n            return field.getBoolean(null);\r\n        } catch(java.lang.UnsatisfiedLinkError e) {\r\n            return false;\r\n        } catch (java.lang.NoClassDefFoundError e) {\r\n            return false;\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n            return false;\r\n        }\r\n    }\r\n    \r\n    public static boolean isOneOpenCL2_0OrGreaterDeviceAvailable(List<OpenCLPlatform> openCLPlatforms) {\r\n        for (OpenCLPlatform openCLPlatform : openCLPlatforms) {\r\n            List<OpenCLDevice> openCLDevices = openCLPlatform.openCLDevices();\r\n            for (OpenCLDevice openCLDevice : openCLDevices) {\r\n                if (isOpenCL2_0OrGreater(openCLDevice.getDeviceVersionAsComparableVersion())) {\r\n                    return true;\r\n                }\r\n            }\r\n        }\r\n        return false;\r\n    }\r\n\r\n    public static boolean isOpenCL2_0OrGreater(ComparableVersion openCLDeviceVersion) {\r\n        final ComparableVersion v2_0 = new ComparableVersion(\"2.0\");\r\n        return openCLDeviceVersion.compareTo(v2_0) >= 0;\r\n    }\r\n    \r\n    /**\r\n     * Returns the value of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @return The value\r\n     */\r\n    private static int getInt(cl_device_id device, int paramName)\r\n    {\r\n        return getInts(device, paramName, 1)[0];\r\n    }\r\n\r\n    /**\r\n     * Returns the values of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @param numValues The number of values\r\n     * @return The value\r\n     */\r\n    private static int[] getInts(cl_device_id device, int paramName, int numValues)\r\n    {\r\n        int[] values = new int[numValues];\r\n        clGetDeviceInfo(device, paramName, (long)Sizeof.cl_int * numValues, Pointer.to(values), null);\r\n        return values;\r\n    }\r\n\r\n    /**\r\n     * Returns the value of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @return The value\r\n     */\r\n    private static long getLong(cl_device_id device, int paramName)\r\n    {\r\n        return getLongs(device, paramName, 1)[0];\r\n    }\r\n\r\n    /**\r\n     * Returns the values of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @param numValues The number of values\r\n     * @return The value\r\n     */\r\n    private static long[] getLongs(cl_device_id device, int paramName, int numValues)\r\n    {\r\n        long[] values = new long[numValues];\r\n        clGetDeviceInfo(device, paramName, (long)Sizeof.cl_long * numValues, Pointer.to(values), null);\r\n        return values;\r\n    }\r\n\r\n    /**\r\n     * Returns the value of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @return The value\r\n     */\r\n    private static String getString(cl_device_id device, int paramName)\r\n    {\r\n        // Obtain the length of the string that will be queried\r\n        long[] size = new long[1];\r\n        clGetDeviceInfo(device, paramName, 0, null, size);\r\n\r\n        // Create a buffer of the appropriate size and fill it with the info\r\n        byte[] buffer = new byte[(int)size[0]];\r\n        clGetDeviceInfo(device, paramName, buffer.length, Pointer.to(buffer), null);\r\n\r\n        // Create a string from the buffer (excluding the trailing \\0 byte)\r\n        return new String(buffer, 0, buffer.length-1);\r\n    }\r\n\r\n    /**\r\n     * Returns the value of the platform info parameter with the given name\r\n     *\r\n     * @param platform The platform\r\n     * @param paramName The parameter name\r\n     * @return The value\r\n     */\r\n    private static String getString(cl_platform_id platform, int paramName)\r\n    {\r\n        // Obtain the length of the string that will be queried\r\n        long[] size = new long[1];\r\n        clGetPlatformInfo(platform, paramName, 0, null, size);\r\n\r\n        // Create a buffer of the appropriate size and fill it with the info\r\n        byte[] buffer = new byte[(int)size[0]];\r\n        clGetPlatformInfo(platform, paramName, buffer.length, Pointer.to(buffer), null);\r\n\r\n        // Create a string from the buffer (excluding the trailing \\0 byte)\r\n        return new String(buffer, 0, buffer.length-1);\r\n    }\r\n    \r\n    /**\r\n     * Returns the value of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @return The value\r\n     */\r\n    private static long getSize(cl_device_id device, int paramName)\r\n    {\r\n        return getSizes(device, paramName, 1)[0];\r\n    }\r\n    \r\n    /**\r\n     * Returns the values of the device info parameter with the given name\r\n     *\r\n     * @param device The device\r\n     * @param paramName The parameter name\r\n     * @param numValues The number of values\r\n     * @return The value\r\n     */\r\n    static long[] getSizes(cl_device_id device, int paramName, int numValues)\r\n    {\r\n        // The size of the returned data has to depend on \r\n        // the size of a size_t, which is handled here\r\n        long size = (long)numValues * Sizeof.size_t;\r\n        ByteBuffer buffer = ByteBuffer.allocate(\r\n            ByteBufferUtility.ensureByteBufferCapacityFitsInt(size)).order(ByteOrder.nativeOrder());\r\n        clGetDeviceInfo(device, paramName, size, \r\n            Pointer.to(buffer), null);\r\n        long[] values = new long[numValues];\r\n        if (Sizeof.size_t == 4)\r\n        {\r\n            for (int i=0; i<numValues; i++)\r\n            {\r\n                values[i] = buffer.getInt(i * Sizeof.size_t);\r\n            }\r\n        }\r\n        else\r\n        {\r\n            for (int i=0; i<numValues; i++)\r\n            {\r\n                values[i] = buffer.getLong(i * Sizeof.size_t);\r\n            }\r\n        }\r\n        return values;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/opencl/OpenCLDevice.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2022 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.opencl;\r\n\r\nimport java.io.ByteArrayOutputStream;\r\nimport java.io.PrintStream;\r\nimport java.io.Serializable;\r\nimport java.nio.ByteOrder;\r\nimport java.nio.charset.Charset;\r\nimport java.util.Collection;\r\nimport java.util.List;\r\n\r\nimport com.google.common.collect.ImmutableList;\r\nimport com.google.errorprone.annotations.Immutable;\r\nimport org.apache.maven.artifact.versioning.ComparableVersion;\r\nimport org.jocl.CL;\r\nimport org.jocl.cl_device_id;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\n/**\r\n * Represents an OpenCL device and its properties.\r\n *\r\n * @param device                     See {@link org.jocl.cl_device_id}\r\n * @param deviceName                 See {@link org.jocl.CL#CL_DEVICE_NAME}\r\n * @param deviceVendor               See {@link org.jocl.CL#CL_DEVICE_VENDOR}\r\n * @param driverVersion              See {@link org.jocl.CL#CL_DRIVER_VERSION}\r\n * @param deviceProfile              See {@link org.jocl.CL#CL_DEVICE_PROFILE}\r\n * @param deviceVersion              See {@link org.jocl.CL#CL_DEVICE_VERSION}\r\n * @param deviceExtensions           See {@link org.jocl.CL#CL_DEVICE_EXTENSIONS}\r\n * @param deviceType                 See {@link org.jocl.CL#CL_DEVICE_TYPE}\r\n * @param endianLittle               See {@link org.jocl.CL#CL_DEVICE_ENDIAN_LITTLE}\r\n * @param maxComputeUnits            See {@link org.jocl.CL#CL_DEVICE_MAX_COMPUTE_UNITS}\r\n * @param maxWorkItemDimensions      See {@link org.jocl.CL#CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS}\r\n * @param maxWorkItemSizes           See {@link org.jocl.CL#CL_DEVICE_MAX_WORK_ITEM_SIZES}\r\n * @param maxWorkGroupSize           See {@link org.jocl.CL#CL_DEVICE_MAX_WORK_GROUP_SIZE}\r\n * @param maxClockFrequency          See {@link org.jocl.CL#CL_DEVICE_MAX_CLOCK_FREQUENCY}\r\n * @param addressBits                See {@link org.jocl.CL#CL_DEVICE_ADDRESS_BITS}\r\n * @param maxMemAllocSize            See {@link org.jocl.CL#CL_DEVICE_MAX_MEM_ALLOC_SIZE}\r\n * @param globalMemSize              See {@link org.jocl.CL#CL_DEVICE_GLOBAL_MEM_SIZE}\r\n * @param errorCorrectionSupport     See {@link org.jocl.CL#CL_DEVICE_ERROR_CORRECTION_SUPPORT}\r\n * @param localMemType               See {@link org.jocl.CL#CL_DEVICE_LOCAL_MEM_TYPE}\r\n * @param localMemSize               See {@link org.jocl.CL#CL_DEVICE_LOCAL_MEM_SIZE}\r\n * @param maxConstantBufferSize      See {@link org.jocl.CL#CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE}\r\n * @param queueProperties            See {@link org.jocl.CL#CL_DEVICE_QUEUE_PROPERTIES}\r\n * @param imageSupport               See {@link org.jocl.CL#CL_DEVICE_IMAGE_SUPPORT}\r\n * @param maxReadImageArgs           See {@link org.jocl.CL#CL_DEVICE_MAX_READ_IMAGE_ARGS}\r\n * @param maxWriteImageArgs          See {@link org.jocl.CL#CL_DEVICE_MAX_WRITE_IMAGE_ARGS}\r\n * @param singleFpConfig             See {@link org.jocl.CL#CL_DEVICE_SINGLE_FP_CONFIG}\r\n * @param image2dMaxWidth            See {@link org.jocl.CL#CL_DEVICE_IMAGE2D_MAX_WIDTH}\r\n * @param image2dMaxHeight           See {@link org.jocl.CL#CL_DEVICE_IMAGE2D_MAX_HEIGHT}\r\n * @param image3dMaxWidth            See {@link org.jocl.CL#CL_DEVICE_IMAGE3D_MAX_WIDTH}\r\n * @param image3dMaxHeight           See {@link org.jocl.CL#CL_DEVICE_IMAGE3D_MAX_HEIGHT}\r\n * @param image3dMaxDepth            See {@link org.jocl.CL#CL_DEVICE_IMAGE3D_MAX_DEPTH}\r\n * @param preferredVectorWidthChar   See {@link org.jocl.CL#CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR}\r\n * @param preferredVectorWidthShort  See {@link org.jocl.CL#CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT}\r\n * @param preferredVectorWidthInt    See {@link org.jocl.CL#CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT}\r\n * @param preferredVectorWidthLong   See {@link org.jocl.CL#CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG}\r\n * @param preferredVectorWidthFloat  See {@link org.jocl.CL#CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT}\r\n * @param preferredVectorWidthDouble See {@link org.jocl.CL#CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE}\r\n */\r\n@Immutable\r\npublic record OpenCLDevice(\r\n    @SuppressWarnings(\"Immutable\")\r\n    cl_device_id device,\r\n    String deviceName,\r\n    String deviceVendor,\r\n    String driverVersion,\r\n    String deviceProfile,\r\n    String deviceVersion,\r\n    String deviceExtensions,\r\n    long deviceType,\r\n    boolean endianLittle,\r\n    int maxComputeUnits,\r\n    long maxWorkItemDimensions,\r\n    ImmutableList<@NonNull Long> maxWorkItemSizes,\r\n    long maxWorkGroupSize,\r\n    long maxClockFrequency,\r\n    int addressBits,\r\n    long maxMemAllocSize,\r\n    long globalMemSize,\r\n    long errorCorrectionSupport,\r\n    int localMemType,\r\n    long localMemSize,\r\n    long maxConstantBufferSize,\r\n    long queueProperties,\r\n    int imageSupport,\r\n    int maxReadImageArgs,\r\n    int maxWriteImageArgs,\r\n    long singleFpConfig,\r\n    long image2dMaxWidth,\r\n    long image2dMaxHeight,\r\n    long image3dMaxWidth,\r\n    long image3dMaxHeight,\r\n    long image3dMaxDepth,\r\n    int preferredVectorWidthChar,\r\n    int preferredVectorWidthShort,\r\n    int preferredVectorWidthInt,\r\n    int preferredVectorWidthLong,\r\n    int preferredVectorWidthFloat,\r\n    int preferredVectorWidthDouble\r\n) implements Serializable {\r\n    \r\n    public ByteOrder getByteOrder() {\r\n        if(endianLittle) {\r\n            return ByteOrder.LITTLE_ENDIAN;\r\n        }\r\n        return ByteOrder.BIG_ENDIAN;\r\n    }\r\n    \r\n    public String toStringPretty() {\r\n        final ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n        final Charset charset = java.nio.charset.StandardCharsets.UTF_8;\r\n\r\n        try (PrintStream ps = new PrintStream(baos, true, charset)) {\r\n            ps.println(\"--- Info for OpenCL device: \" + deviceName + \" ---\");\r\n            ps.printf(\"cl_device_id:                          %s%n\", device);\r\n            ps.printf(\"CL_DEVICE_NAME:                        %s%n\", deviceName);\r\n            ps.printf(\"CL_DEVICE_VENDOR:                      %s%n\", deviceVendor);\r\n            ps.printf(\"CL_DRIVER_VERSION:                     %s%n\", driverVersion);\r\n            ps.printf(\"CL_DEVICE_PROFILE:                     %s%n\", deviceProfile);\r\n            ps.printf(\"CL_DEVICE_VERSION:                     %s%n\", deviceVersion);\r\n            ps.printf(\"CL_DEVICE_EXTENSIONS:                  %s%n\", deviceExtensions);\r\n            ps.printf(\"CL_DEVICE_TYPE:                        %s%n\", CL.stringFor_cl_device_type(deviceType));\r\n            ps.printf(\"CL_DEVICE_ENDIAN_LITTLE:               %b%n\", endianLittle);\r\n            ps.printf(\"CL_DEVICE_MAX_COMPUTE_UNITS:           %d%n\", maxComputeUnits);\r\n            ps.printf(\"CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:    %d%n\", maxWorkItemDimensions);\r\n            ps.printf(\"CL_DEVICE_MAX_WORK_ITEM_SIZES:         %s%n\", formatWorkItemSizes(maxWorkItemSizes));\r\n            ps.printf(\"CL_DEVICE_MAX_WORK_GROUP_SIZE:         %d%n\", maxWorkGroupSize);\r\n            ps.printf(\"CL_DEVICE_MAX_CLOCK_FREQUENCY:         %d MHz%n\", maxClockFrequency);\r\n            ps.printf(\"CL_DEVICE_ADDRESS_BITS:                %d%n\", addressBits);\r\n            ps.printf(\"CL_DEVICE_MAX_MEM_ALLOC_SIZE:          %d MByte%n\", maxMemAllocSize / (1024 * 1024));\r\n            ps.printf(\"CL_DEVICE_GLOBAL_MEM_SIZE:             %d MByte%n\", globalMemSize / (1024 * 1024));\r\n            ps.printf(\"CL_DEVICE_ERROR_CORRECTION_SUPPORT:    %s%n\", errorCorrectionSupport != 0 ? \"yes\" : \"no\");\r\n            ps.printf(\"CL_DEVICE_LOCAL_MEM_TYPE:              %s%n\", CL.stringFor_cl_device_local_mem_type(localMemType));\r\n            ps.printf(\"CL_DEVICE_LOCAL_MEM_SIZE:              %d KByte%n\", localMemSize / 1024);\r\n            ps.printf(\"CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:    %d KByte%n\", maxConstantBufferSize / 1024);\r\n            ps.printf(\"CL_DEVICE_QUEUE_PROPERTIES:            %s%n\", CL.stringFor_cl_command_queue_properties(queueProperties));\r\n            ps.printf(\"CL_DEVICE_IMAGE_SUPPORT:               %d%n\", imageSupport);\r\n            ps.printf(\"CL_DEVICE_MAX_READ_IMAGE_ARGS:         %d%n\", maxReadImageArgs);\r\n            ps.printf(\"CL_DEVICE_MAX_WRITE_IMAGE_ARGS:        %d%n\", maxWriteImageArgs);\r\n            ps.printf(\"CL_DEVICE_SINGLE_FP_CONFIG:            %s%n\", CL.stringFor_cl_device_fp_config(singleFpConfig));\r\n            ps.printf(\"CL_DEVICE_IMAGE2D_MAX_WIDTH:           %d%n\", image2dMaxWidth);\r\n            ps.printf(\"CL_DEVICE_IMAGE2D_MAX_HEIGHT:          %d%n\", image2dMaxHeight);\r\n            ps.printf(\"CL_DEVICE_IMAGE3D_MAX_WIDTH:           %d%n\", image3dMaxWidth);\r\n            ps.printf(\"CL_DEVICE_IMAGE3D_MAX_HEIGHT:          %d%n\", image3dMaxHeight);\r\n            ps.printf(\"CL_DEVICE_IMAGE3D_MAX_DEPTH:           %d%n\", image3dMaxDepth);\r\n            ps.printf(\"CL_DEVICE_PREFERRED_VECTOR_WIDTHS:     CHAR %d, SHORT %d, INT %d, LONG %d, FLOAT %d, DOUBLE %d%n\",\r\n                preferredVectorWidthChar, preferredVectorWidthShort,\r\n                preferredVectorWidthInt, preferredVectorWidthLong,\r\n                preferredVectorWidthFloat, preferredVectorWidthDouble);\r\n        }\r\n\r\n        return baos.toString(charset);\r\n    }\r\n    \r\n    public static String formatWorkItemSizes(List<Long> sizes) {\r\n        if (sizes.isEmpty()) return \"(none)\";\r\n        StringBuilder sb = new StringBuilder();\r\n        for (int i = 0; i < sizes.size(); i++) {\r\n            sb.append(sizes.get(i));\r\n            if (i < sizes.size() - 1) sb.append(\" / \");\r\n        }\r\n        return sb.toString();\r\n    }\r\n    \r\n    public ComparableVersion getDeviceVersionAsComparableVersion() {\r\n        return getComparableVersionFromDeviceVersion(deviceVersion());\r\n    }\r\n    \r\n    public static ComparableVersion getComparableVersionFromDeviceVersion(String deviceVersion) {\r\n        String s = deviceVersion;\r\n        s = s.replace(\"OpenCL \", \"\");\r\n        s = s.replace(\"CUDA\", \"\");\r\n        return new ComparableVersion(s.trim());\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/opencl/OpenCLDeviceSelection.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.opencl;\n\nimport org.jocl.cl_context_properties;\n\npublic record OpenCLDeviceSelection(OpenCLPlatform platform, OpenCLDevice device,\n                                    cl_context_properties contextProperties) {\n\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/opencl/OpenCLPlatform.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2022 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.opencl;\r\n\r\nimport com.google.common.collect.ImmutableList;\r\nimport com.google.errorprone.annotations.Immutable;\r\nimport org.jocl.cl_context_properties;\r\nimport org.jspecify.annotations.NonNull;\r\n\r\nimport java.io.Serializable;\r\n\r\n/**\r\n * Represents an OpenCL platform and its associated devices.\r\n *\r\n * @param platformName      the name of the OpenCL platform\r\n * @param contextProperties the context properties of the OpenCL platform\r\n * @param openCLDevices     a list of associated OpenCL devices\r\n */\r\n@Immutable\r\npublic record OpenCLPlatform(\r\n    @NonNull String platformName,\r\n    @SuppressWarnings(\"Immutable\")\r\n    @NonNull cl_context_properties contextProperties,\r\n    @NonNull ImmutableList<@NonNull OpenCLDevice> openCLDevices\r\n) implements Serializable {\r\n\r\n    public OpenCLPlatform(String platformName, cl_context_properties contextProperties, ImmutableList<@NonNull OpenCLDevice> openCLDevices) {\r\n        this.platformName = platformName;\r\n        this.contextProperties = contextProperties;\r\n        this.openCLDevices = openCLDevices;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/opencl/OpenCLPlatformSelector.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.opencl;\n\nimport java.util.List;\n\npublic class OpenCLPlatformSelector {\n\n    /**\n     * Selects an OpenCLDevice based on the platform index and device type from the given list of platforms.\n     *\n     * @param platforms The list of available OpenCL platforms\n     * @param platformIndex The index of the platform to select\n     * @param deviceType The OpenCL device type (e.g., CL_DEVICE_TYPE_GPU)\n     * @param deviceIndex The index of the device within the platform\n     * @return A selected OpenCLDeviceSelection containing platform, device, and context properties\n     */\n    public OpenCLDeviceSelection select(List<OpenCLPlatform> platforms, int platformIndex, long deviceType, int deviceIndex) {\n        if (platformIndex < 0 || platformIndex >= platforms.size()) {\n            throw new IllegalArgumentException(\"Invalid platform index: \" + platformIndex);\n        }\n        \n        OpenCLPlatform selectedPlatform = platforms.get(platformIndex);\n        \n        List<OpenCLDevice> matchingDevices = selectedPlatform.openCLDevices().stream()\n            .filter(device -> (device.deviceType() & deviceType) != 0)\n            .toList();\n\n        if (deviceIndex < 0 || deviceIndex >= matchingDevices.size()) {\n            throw new IllegalArgumentException(\"Invalid device index: \" + deviceIndex + \" for deviceType: \" + deviceType);\n        }\n        \n        OpenCLDevice selectedDevice = matchingDevices.get(deviceIndex);\n        \n        return new OpenCLDeviceSelection(selectedPlatform, selectedDevice, selectedPlatform.contextProperties());\n    }\n}\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/persistence/Persistence.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.persistence;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.List;\r\nimport java.util.Map;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFileOutputFormat;\r\nimport org.bitcoinj.base.Coin;\r\n\r\npublic interface Persistence extends AutoCloseable {\r\n\r\n    void init();\r\n    boolean isClosed();\r\n    long count();\r\n    Coin getAmount(ByteBuffer hash160);\r\n    boolean containsAddress(ByteBuffer hash160);\r\n\r\n    void writeAllAmountsToAddressFile(File file, CAddressFileOutputFormat addressFileOutputFormat, AtomicBoolean shouldRun) throws IOException;\r\n\r\n    /**\r\n     * @param hash160 the hash160 to change its amount\r\n     * @param amountToChange positive means add, negative means substract the amount\r\n     */\r\n    void changeAmount(ByteBuffer hash160, Coin amountToChange);\r\n\r\n    void putNewAmount(ByteBuffer hash160, Coin toWrite);\r\n    void putAllAmounts(Map<ByteBuffer, Coin> amounts) throws IOException;\r\n\r\n    Coin getAllAmountsFromAddresses(List<ByteBuffer> hash160s);\r\n    \r\n    long getDatabaseSize();\r\n    \r\n    void increaseDatabaseSize(long toIncrease);\r\n    \r\n    /**\r\n     * Retrieves the current value of the increased counter.\r\n     *\r\n     * @return the value of the increased counter as a long.\r\n     */\r\n    long getIncreasedCounter();\r\n    \r\n    /**\r\n     * Returns the total sum of all increments applied to the persistence storage.\r\n     *\r\n     * @return the accumulated sum of all increment operations in the persistence storage\r\n     */\r\n    long getIncreasedSum();\r\n    \r\n    /**\r\n     * Attention: This method might me take a lot of time.\r\n     */\r\n    void logStats();\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/persistence/PersistenceUtils.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.persistence;\r\n\r\nimport java.nio.ByteBuffer;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\r\nimport org.bitcoinj.base.LegacyAddress;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.base.Sha256Hash;\r\n\r\npublic class PersistenceUtils {\r\n\r\n    @Deprecated\r\n    private final ByteBuffer emptyByteBuffer = ByteBuffer.allocateDirect(0).asReadOnlyBuffer();\r\n    private final ByteBuffer zeroByteBuffer = longValueToByteBufferDirectAsReadOnlyBuffer(0L);\r\n\r\n    public final Network network;\r\n\r\n    public PersistenceUtils(Network network) {\r\n        this.network = network;\r\n    }\r\n\r\n    public ByteBuffer longToByteBufferDirect(long longValue) {\r\n        if (longValue == 0) {\r\n            // use the cached zero value to reduce allocations\r\n            return zeroByteBuffer;\r\n        }\r\n        ByteBuffer newValue = ByteBuffer.allocateDirect(Long.BYTES);\r\n        newValue.putLong(longValue);\r\n        newValue.flip();\r\n        return newValue;\r\n    }\r\n\r\n    @Deprecated\r\n    private ByteBuffer addressListToByteBufferDirect(List<LegacyAddress> addresses) {\r\n        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(LegacyAddress.LENGTH * addresses.size());\r\n        for (LegacyAddress address : addresses) {\r\n            byteBuffer.put(address.getHash());\r\n        }\r\n        byteBuffer.flip();\r\n        return byteBuffer;\r\n    }\r\n\r\n    @Deprecated\r\n    private List<LegacyAddress> byteBufferToAddressList(ByteBuffer byteBuffer) {\r\n        List<LegacyAddress> addresses = new ArrayList<>();\r\n        int count = byteBuffer.remaining() / LegacyAddress.LENGTH;\r\n        for (int i = 0; i < count; i++) {\r\n            byte[] hash160 = new byte[LegacyAddress.LENGTH];\r\n            byteBuffer.get(hash160);\r\n            addresses.add(LegacyAddress.fromPubKeyHash(network, hash160));\r\n        }\r\n        return addresses;\r\n    }\r\n\r\n    @Deprecated\r\n    private ByteBuffer hashToByteBufferDirect(Sha256Hash hash) {\r\n        return new ByteBufferUtility(true).byteArrayToByteBuffer(hash.getBytes());\r\n    }\r\n\r\n    private ByteBuffer longValueToByteBufferDirectAsReadOnlyBuffer(long value) {\r\n        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(Long.BYTES);\r\n        byteBuffer.putLong(value);\r\n        return byteBuffer.asReadOnlyBuffer();\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/java/net/ladenthin/bitcoinaddressfinder/persistence/lmdb/LMDBPersistence.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.persistence.lmdb;\r\n\r\nimport com.google.common.hash.BloomFilter;\r\nimport com.google.common.hash.Funnels;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.Persistence;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.jspecify.annotations.Nullable;\r\nimport org.lmdbjava.CursorIterable;\r\nimport org.lmdbjava.Dbi;\r\nimport org.lmdbjava.Env;\r\nimport org.lmdbjava.EnvFlags;\r\nimport org.lmdbjava.KeyRange;\r\nimport org.lmdbjava.Txn;\r\n\r\nimport java.io.File;\r\nimport java.io.FileWriter;\r\nimport java.io.IOException;\r\nimport java.lang.reflect.Field;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.List;\r\nimport java.util.Map;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport java.util.concurrent.atomic.AtomicLongArray;\r\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\r\nimport net.ladenthin.bitcoinaddressfinder.ByteConversion;\r\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\r\nimport net.ladenthin.bitcoinaddressfinder.SeparatorFormat;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFileOutputFormat;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationReadOnly;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationWrite;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.bitcoinj.base.LegacyAddress;\r\nimport org.lmdbjava.BufferProxy;\r\nimport org.lmdbjava.ByteBufferProxy;\r\n\r\nimport static org.lmdbjava.DbiFlags.MDB_CREATE;\r\nimport static org.lmdbjava.Env.create;\r\nimport org.lmdbjava.EnvInfo;\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class LMDBPersistence implements Persistence {\r\n\r\n    private static final String DB_NAME_HASH160_TO_COINT = \"hash160toCoin\";\r\n    private static final int DB_COUNT = 1;\r\n    \r\n    private final Logger logger = LoggerFactory.getLogger(LMDBPersistence.class);\r\n\r\n    private final @NonNull PersistenceUtils persistenceUtils;\r\n    private final @Nullable CLMDBConfigurationWrite lmdbConfigurationWrite;\r\n    private final @Nullable CLMDBConfigurationReadOnly lmdbConfigurationReadOnly;\r\n    private final @NonNull KeyUtility keyUtility;\r\n    private @Nullable Env<ByteBuffer> env;\r\n    private @Nullable Dbi<ByteBuffer> lmdb_h160ToAmount;\r\n    private long increasedCounter = 0;\r\n    private long increasedSum = 0;\r\n    private @Nullable BloomFilter<byte[]> addressBloomFilter = null;\r\n\r\n\r\n    public LMDBPersistence(CLMDBConfigurationWrite lmdbConfigurationWrite, PersistenceUtils persistenceUtils) {\r\n        this.lmdbConfigurationReadOnly = null;\r\n        this.lmdbConfigurationWrite = lmdbConfigurationWrite;\r\n        this.persistenceUtils = persistenceUtils;\r\n        this.keyUtility = new KeyUtility(persistenceUtils.network, new ByteBufferUtility(true));\r\n    }\r\n\r\n    public LMDBPersistence(CLMDBConfigurationReadOnly lmdbConfigurationReadOnly, PersistenceUtils persistenceUtils) {\r\n        this.lmdbConfigurationReadOnly = lmdbConfigurationReadOnly;\r\n        lmdbConfigurationWrite = null;\r\n        this.persistenceUtils = persistenceUtils;\r\n        this.keyUtility = new KeyUtility(persistenceUtils.network, new ByteBufferUtility(true));\r\n    }\r\n    \r\n    @Override\r\n    public void init() {\r\n        if (lmdbConfigurationWrite != null) {\r\n            initWritable();\r\n        } else if (lmdbConfigurationReadOnly != null) {\r\n            initReadOnly();\r\n        } else {\r\n            throw new IllegalArgumentException(\"Neither write nor read-only configuration provided.\");\r\n        }\r\n        \r\n        \r\n        logStatsIfConfigured(true);\r\n    }\r\n    \r\n    public void buildAddressBloomFilter() {\r\n        logger.info(\"##### BEGIN: buildAddressBloomFilter #####\");\r\n        CLMDBConfigurationReadOnly localLmdbConfigurationReadOnly = Objects.requireNonNull(lmdbConfigurationReadOnly);\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n\r\n        var localEnv = Objects.requireNonNull(env);\r\n        // Attention: slow!\r\n        long count = count();\r\n\r\n        BloomFilter<byte[]> filter = BloomFilter.create(Funnels.byteArrayFunnel(), count, localLmdbConfigurationReadOnly.bloomFilterFpp);\r\n        long inserted = 0;\r\n\r\n        try (Txn<ByteBuffer> txn = localEnv.txnRead()) {\r\n            try (CursorIterable<ByteBuffer> iterable = localLmdb_h160ToAmount.iterate(txn, KeyRange.all())) {\r\n                for (CursorIterable.KeyVal<ByteBuffer> kv : iterable) {\r\n                    ByteBuffer key = kv.key();\r\n                    byte[] keyBytes = new byte[key.remaining()];\r\n                    key.get(keyBytes);\r\n                    key.rewind();\r\n                    filter.put(keyBytes);\r\n                    inserted++;\r\n                }\r\n            }\r\n        }\r\n\r\n        addressBloomFilter = filter;\r\n        long size = getApproximateSizeBytes(filter);\r\n        logger.info(\"Inserted {} addresses into BloomFilter with size of {}\", inserted, formatSize(size));\r\n        logger.info(\"##### END: buildAddressBloomFilter #####\");\r\n    }\r\n\r\n    public void unloadBloomFilter() {\r\n        addressBloomFilter = null;\r\n    }\r\n    \r\n    private void initReadOnly() {\r\n        CLMDBConfigurationReadOnly localLmdbConfigurationReadOnly = Objects.requireNonNull(lmdbConfigurationReadOnly);\r\n        BufferProxy<ByteBuffer> bufferProxy = getBufferProxyByUseProxyOptimal(localLmdbConfigurationReadOnly.useProxyOptimal);\r\n        env = create(bufferProxy).setMaxDbs(DB_COUNT).open(new File(localLmdbConfigurationReadOnly.lmdbDirectory), EnvFlags.MDB_RDONLY_ENV, EnvFlags.MDB_NOLOCK);\r\n        lmdb_h160ToAmount = env.openDbi(DB_NAME_HASH160_TO_COINT);\r\n        \r\n        if (localLmdbConfigurationReadOnly.useBloomFilter) {\r\n            buildAddressBloomFilter();\r\n        }\r\n    }\r\n\r\n    private void initWritable() {\r\n        CLMDBConfigurationWrite localLmdbConfigurationWrite = Objects.requireNonNull(lmdbConfigurationWrite);\r\n\r\n        // -Xmx10G -XX:MaxDirectMemorySize=5G\r\n        // We always need an Env. An Env owns a physical on-disk storage file. One\r\n        // Env can store many different databases (ie sorted maps).\r\n        File lmdbDirectory = new File(localLmdbConfigurationWrite.lmdbDirectory);\r\n        lmdbDirectory.mkdirs();\r\n        \r\n        BufferProxy<ByteBuffer> bufferProxy = getBufferProxyByUseProxyOptimal(localLmdbConfigurationWrite.useProxyOptimal);\r\n        \r\n        env = create(bufferProxy)\r\n                // LMDB also needs to know how large our DB might be. Over-estimating is OK.\r\n                .setMapSize(new ByteConversion().mibToBytes(localLmdbConfigurationWrite.initialMapSizeInMiB))\r\n                // LMDB also needs to know how many DBs (Dbi) we want to store in this Env.\r\n                .setMaxDbs(DB_COUNT)\r\n                // Now let's open the Env. The same path can be concurrently opened and\r\n                // used in different processes, but do not open the same path twice in\r\n                // the same process at the same time.\r\n                \r\n                //https://github.com/kentnl/CHI-Driver-LMDB\r\n                .open(lmdbDirectory, EnvFlags.MDB_NOSYNC, EnvFlags.MDB_NOMETASYNC, EnvFlags.MDB_WRITEMAP, EnvFlags.MDB_MAPASYNC);\r\n        // We need a Dbi for each DB. A Dbi roughly equates to a sorted map. The\r\n        // MDB_CREATE flag causes the DB to be created if it doesn't already exist.\r\n        lmdb_h160ToAmount = env.openDbi(DB_NAME_HASH160_TO_COINT, MDB_CREATE);\r\n    }\r\n\r\n    /**\r\n     * Returns the appropriate ByteBuffer proxy implementation based on the optimization preference.\r\n     * <p>\r\n     * LMDB requires a proxy to handle direct ByteBuffers. Two implementations are available:\r\n     * - PROXY_OPTIMAL: Uses JNI and unsafe operations for better performance but requires specific JVM permissions\r\n     * - PROXY_SAFE: Uses pure Java implementation that's more portable but slower\r\n     * <p>\r\n     * For more details, see: https://github.com/lmdbjava/lmdbjava/wiki/Buffers\r\n     *\r\n     * @param useProxyOptimal true to use the optimized JNI implementation (PROXY_OPTIMAL),\r\n     *                        false to use the safe Java implementation (PROXY_SAFE)\r\n     * @return the selected {@link BufferProxy} implementation for ByteBuffer operations\r\n     */\r\n    private BufferProxy<ByteBuffer> getBufferProxyByUseProxyOptimal(boolean useProxyOptimal) {\r\n        if (useProxyOptimal) {\r\n            return ByteBufferProxy.PROXY_OPTIMAL;\r\n        } else {\r\n            return ByteBufferProxy.PROXY_SAFE;\r\n        }\r\n    }\r\n    \r\n    private void logStatsIfConfigured(boolean onInit) {\r\n        if (isLoggingEnabled(lmdbConfigurationWrite, onInit) || isLoggingEnabled(lmdbConfigurationReadOnly, onInit)) {\r\n            logStats();\r\n        }\r\n    }\r\n\r\n    private boolean isLoggingEnabled(@Nullable CLMDBConfigurationReadOnly config, boolean onInit) {\r\n        return config != null && (onInit ? config.logStatsOnInit : config.logStatsOnClose);\r\n    }\r\n\r\n    @Override\r\n    public void close() {\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        logStatsIfConfigured(false);\r\n        localLmdb_h160ToAmount.close();\r\n        localEnv.close();\r\n    }\r\n    \r\n    @Override\r\n    public boolean isClosed() {\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n        return localEnv.isClosed();\r\n    }\r\n\r\n    @Override\r\n    public Coin getAmount(ByteBuffer hash160) {\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        try (Txn<ByteBuffer> txn = localEnv.txnRead()) {\r\n            ByteBuffer byteBuffer = localLmdb_h160ToAmount.get(txn, hash160);\r\n            return getCoinFromByteBuffer(byteBuffer);\r\n        }\r\n    }\r\n    \r\n    private Coin getCoinFromByteBuffer(ByteBuffer byteBuffer) {\r\n        if (byteBuffer == null || byteBuffer.capacity() == 0) {\r\n            return Coin.ZERO;\r\n        }\r\n        return Coin.valueOf(byteBuffer.getLong());\r\n    }\r\n\r\n    @Override\r\n    public boolean containsAddress(ByteBuffer hash160) {\r\n        CLMDBConfigurationReadOnly localLmdbConfigurationReadOnly = Objects.requireNonNull(lmdbConfigurationReadOnly);\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        if (localLmdbConfigurationReadOnly.disableAddressLookup) {\r\n            return false;\r\n        }\r\n        \r\n        byte[] hash160AsByteArray = new byte[hash160.remaining()];\r\n        hash160.get(hash160AsByteArray);\r\n        hash160.rewind();\r\n        \r\n        // Use Bloom filter if available for fast pre-check\r\n        if (addressBloomFilter != null) {\r\n            boolean mightContain = addressBloomFilter.mightContain(hash160AsByteArray);\r\n            if (!mightContain) {\r\n                return false; // definitely not present\r\n            }\r\n            // Possibly in DB, proceed to verify\r\n        }\r\n        \r\n        // Perform LMDB lookup (always happens if no Bloom filter is present)\r\n        try (Txn<ByteBuffer> txn = localEnv.txnRead()) {\r\n            ByteBuffer byteBuffer = localLmdb_h160ToAmount.get(txn, hash160);\r\n            return byteBuffer != null;\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void writeAllAmountsToAddressFile(File file, CAddressFileOutputFormat addressFileOutputFormat, AtomicBoolean shouldRun) throws IOException {\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        try (Txn<ByteBuffer> txn = localEnv.txnRead()) {\r\n            try (CursorIterable<ByteBuffer> iterable = localLmdb_h160ToAmount.iterate(txn, KeyRange.all())) {\r\n                try (FileWriter writer = new FileWriter(file)) {\r\n                    for (final CursorIterable.KeyVal<ByteBuffer> kv : iterable) {\r\n                        if (!shouldRun.get()) {\r\n                            return;\r\n                        }\r\n                        ByteBuffer addressAsByteBuffer = kv.key();\r\n                        if(logger.isTraceEnabled()) {\r\n                            String hexFromByteBuffer = new ByteBufferUtility(false).getHexFromByteBuffer(addressAsByteBuffer);\r\n                            logger.trace(\"Process address: \" + hexFromByteBuffer);\r\n                        }\r\n                        LegacyAddress address = keyUtility.byteBufferToAddress(addressAsByteBuffer);\r\n                        final String line;\r\n                        switch(addressFileOutputFormat) {\r\n                            case HexHash:\r\n                                line = Hex.encodeHexString(address.getHash()) + System.lineSeparator();\r\n                                break;\r\n                            case FixedWidthBase58BitcoinAddress:\r\n                                line = String.format(\"%-34s\", address.toBase58()) + System.lineSeparator();\r\n                                break;\r\n                            case DynamicWidthBase58BitcoinAddressWithAmount:\r\n                                ByteBuffer value = kv.val();\r\n                                Coin coin = getCoinFromByteBuffer(value);\r\n                                line = address.toBase58() + SeparatorFormat.COMMA.getSymbol() + coin.getValue() + System.lineSeparator();\r\n                                break;\r\n                            default:\r\n                                throw new IllegalArgumentException(\"Unknown addressFileOutputFormat: \" + addressFileOutputFormat);\r\n                        }\r\n                        writer.write(line);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void putAllAmounts(Map<ByteBuffer, Coin> amounts) throws IOException {\r\n        for (Map.Entry<ByteBuffer, Coin> entry : amounts.entrySet()) {\r\n            ByteBuffer hash160 = entry.getKey();\r\n            Coin coin = entry.getValue();\r\n            putNewAmount(hash160, coin);\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public void changeAmount(ByteBuffer hash160, Coin amountToChange) {\r\n        Coin valueInDB = getAmount(hash160);\r\n        Coin toWrite = valueInDB.add(amountToChange);\r\n        putNewAmount(hash160, toWrite);\r\n    }\r\n\r\n    @Override\r\n    public void putNewAmount(ByteBuffer hash160, Coin amount) {\r\n        putNewAmountWithAutoIncrease(hash160, amount);\r\n    }\r\n\r\n    /**\r\n     * Inserts a value into LMDB and optionally grows the map if it is full.\r\n     *\r\n     * <p>If {@link org.lmdbjava.Env.MapFullException} occurs and\r\n     * {@link CLMDBConfigurationWrite#increaseMapAutomatically} is enabled,\r\n     * the map size is increased by {@link CLMDBConfigurationWrite#increaseSizeInMiB}\r\n     * and the insert is retried once.\r\n     *\r\n     * <p>If the second attempt also fails, the configured increase size is too small.\r\n     * If automatic growth is disabled, the original exception is rethrown.\r\n     */\r\n    private void putNewAmountWithAutoIncrease(ByteBuffer hash160, Coin amount) {\r\n        CLMDBConfigurationWrite localLmdbConfigurationWrite = Objects.requireNonNull(lmdbConfigurationWrite);\r\n\r\n        try {\r\n            putNewAmountUnsafe(hash160, amount);\r\n        } catch (org.lmdbjava.Env.MapFullException e) {\r\n            if (localLmdbConfigurationWrite.increaseMapAutomatically) {\r\n                increaseDatabaseSize(new ByteConversion().mibToBytes(lmdbConfigurationWrite.increaseSizeInMiB));\r\n                // It is possible that the exception will be thrown again, in this case increaseSizeInMiB should be changed and it's a configuration issue.\r\n                // See {@link CLMDBConfigurationWrite#increaseSizeInMiB}.\r\n                putNewAmountUnsafe(hash160, amount);\r\n            } else {\r\n                throw e;\r\n            }\r\n        }\r\n    }\r\n    \r\n    private void putNewAmountUnsafe(ByteBuffer hash160, Coin amount) {\r\n        CLMDBConfigurationWrite localLmdbConfigurationWrite = Objects.requireNonNull(lmdbConfigurationWrite);\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        try (Txn<ByteBuffer> txn = localEnv.txnWrite()) {\r\n            if (localLmdbConfigurationWrite.deleteEmptyAddresses && amount.isZero()) {\r\n                localLmdb_h160ToAmount.delete(txn, hash160);\r\n            } else {\r\n                long amountAsLong = amount.longValue();\r\n                if (localLmdbConfigurationWrite.useStaticAmount) {\r\n                    amountAsLong = lmdbConfigurationWrite.staticAmount;\r\n                }\r\n                localLmdb_h160ToAmount.put(txn, hash160, persistenceUtils.longToByteBufferDirect(amountAsLong));\r\n            }\r\n            txn.commit();\r\n        }\r\n    }\r\n\r\n    @Override\r\n    public Coin getAllAmountsFromAddresses(List<ByteBuffer> hash160s) {\r\n        Coin allAmounts = Coin.ZERO;\r\n        for (ByteBuffer hash160 : hash160s) {\r\n            allAmounts = allAmounts.add(getAmount(hash160));\r\n        }\r\n        return allAmounts;\r\n    }\r\n\r\n    @Override\r\n    public long count() {\r\n        Dbi<ByteBuffer> localLmdb_h160ToAmount = Objects.requireNonNull(lmdb_h160ToAmount);\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        long count = 0;\r\n        try (Txn<ByteBuffer> txn = localEnv.txnRead()) {\r\n            try (CursorIterable<ByteBuffer> iterable = localLmdb_h160ToAmount.iterate(txn, KeyRange.all())) {\r\n                for (final CursorIterable.KeyVal<ByteBuffer> kv : iterable) {\r\n                    count++;\r\n                }\r\n            }\r\n        }\r\n        return count;\r\n    }\r\n\r\n    @Override\r\n    public long getDatabaseSize() {\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        EnvInfo info = localEnv.info();\r\n        return info.mapSize;\r\n    }\r\n\r\n    @Override\r\n    public void increaseDatabaseSize(long toIncrease) {\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        increasedCounter++;\r\n        increasedSum += toIncrease;\r\n        long newSize = getDatabaseSize() + toIncrease;\r\n        localEnv.setMapSize(newSize);\r\n    }\r\n\r\n    @Override\r\n    public long getIncreasedCounter() {\r\n        return increasedCounter;\r\n    }\r\n\r\n    @Override\r\n    public long getIncreasedSum() {\r\n        return increasedSum;\r\n    }\r\n    \r\n    @Override\r\n    public void logStats() {\r\n        Env<ByteBuffer> localEnv = Objects.requireNonNull(env);\r\n\r\n        logger.info(\"##### BEGIN: LMDB stats #####\");\r\n        logger.info(\"... this may take a lot of time ...\");\r\n        logger.info(\"DatabaseSize: \" + new ByteConversion().bytesToMib(getDatabaseSize()) + \" MiB\");\r\n        logger.info(\"IncreasedCounter: \" + getIncreasedCounter());\r\n        logger.info(\"IncreasedSum: \" + new ByteConversion().bytesToMib(getIncreasedSum()) + \" MiB\");\r\n        logger.info(\"Stat: \" + localEnv.stat());\r\n        // Attention: slow!\r\n        long count = count();\r\n        logger.info(\"LMDB contains \" + count + \" unique entries.\");\r\n        logger.info(\"##### END: LMDB stats #####\");\r\n    }\r\n\r\n    public static long getApproximateSizeBytes(BloomFilter<?> bloomFilter) {\r\n        try {\r\n            // Access private field: bits\r\n            Field bitsField = BloomFilter.class.getDeclaredField(\"bits\");\r\n            bitsField.setAccessible(true);\r\n            Object bits = bitsField.get(bloomFilter);\r\n\r\n            // Access internal AtomicLongArray: data\r\n            Field dataField = bits.getClass().getDeclaredField(\"data\");\r\n            dataField.setAccessible(true);\r\n            AtomicLongArray data = (AtomicLongArray) dataField.get(bits);\r\n\r\n            return (long) data.length() * Long.BYTES; // 8 bytes per long\r\n        } catch (Exception e) {\r\n            throw new RuntimeException(\"Failed to estimate BloomFilter size\", e);\r\n        }\r\n    }\r\n\r\n    public static String formatSize(long sizeInBytes) {\r\n        if (sizeInBytes >= 1024 * 1024) {\r\n            return String.format(\"%.2f MB\", sizeInBytes / 1024.0 / 1024.0);\r\n        } else if (sizeInBytes >= 1024) {\r\n            return String.format(\"%.2f KB\", sizeInBytes / 1024.0);\r\n        } else {\r\n            return sizeInBytes + \" bytes\";\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_common.cl",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#include \"inc_vendor.h\"\n#include \"inc_types.h\"\n#include \"inc_platform.h\"\n#include \"inc_common.h\"\n\n/**\n * vendor specific (or generic) functions\n */\n\nDECLSPEC u8 v8a_from_v32_S (const u32 v32)\n{\n  vconv32_t v;\n\n  v.v32 = v32;\n\n  return v.v8.a;\n}\n\nDECLSPEC u8 v8b_from_v32_S (const u32 v32)\n{\n  vconv32_t v;\n\n  v.v32 = v32;\n\n  return v.v8.b;\n}\n\nDECLSPEC u8 v8c_from_v32_S (const u32 v32)\n{\n  vconv32_t v;\n\n  v.v32 = v32;\n\n  return v.v8.c;\n}\n\nDECLSPEC u8 v8d_from_v32_S (const u32 v32)\n{\n  vconv32_t v;\n\n  v.v32 = v32;\n\n  return v.v8.d;\n}\n\nDECLSPEC u8 v8a_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.a;\n}\n\nDECLSPEC u8 v8b_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.b;\n}\n\nDECLSPEC u8 v8c_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.c;\n}\n\nDECLSPEC u8 v8d_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.d;\n}\n\nDECLSPEC u8 v8e_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.e;\n}\n\nDECLSPEC u8 v8f_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.f;\n}\n\nDECLSPEC u8 v8g_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.g;\n}\n\nDECLSPEC u8 v8h_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v8.h;\n}\n\nDECLSPEC u8x v8a_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8a_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8a_from_v64_S (a.s0);\n  r.s1 = v8a_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8a_from_v64_S (a.s2);\n  r.s3 = v8a_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8a_from_v64_S (a.s4);\n  r.s5 = v8a_from_v64_S (a.s5);\n  r.s6 = v8a_from_v64_S (a.s6);\n  r.s7 = v8a_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8a_from_v64_S (a.s8);\n  r.s9 = v8a_from_v64_S (a.s9);\n  r.sa = v8a_from_v64_S (a.sa);\n  r.sb = v8a_from_v64_S (a.sb);\n  r.sc = v8a_from_v64_S (a.sc);\n  r.sd = v8a_from_v64_S (a.sd);\n  r.se = v8a_from_v64_S (a.se);\n  r.sf = v8a_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8b_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8b_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8b_from_v64_S (a.s0);\n  r.s1 = v8b_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8b_from_v64_S (a.s2);\n  r.s3 = v8b_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8b_from_v64_S (a.s4);\n  r.s5 = v8b_from_v64_S (a.s5);\n  r.s6 = v8b_from_v64_S (a.s6);\n  r.s7 = v8b_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8b_from_v64_S (a.s8);\n  r.s9 = v8b_from_v64_S (a.s9);\n  r.sa = v8b_from_v64_S (a.sa);\n  r.sb = v8b_from_v64_S (a.sb);\n  r.sc = v8b_from_v64_S (a.sc);\n  r.sd = v8b_from_v64_S (a.sd);\n  r.se = v8b_from_v64_S (a.se);\n  r.sf = v8b_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8c_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8c_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8c_from_v64_S (a.s0);\n  r.s1 = v8c_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8c_from_v64_S (a.s2);\n  r.s3 = v8c_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8c_from_v64_S (a.s4);\n  r.s5 = v8c_from_v64_S (a.s5);\n  r.s6 = v8c_from_v64_S (a.s6);\n  r.s7 = v8c_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8c_from_v64_S (a.s8);\n  r.s9 = v8c_from_v64_S (a.s9);\n  r.sa = v8c_from_v64_S (a.sa);\n  r.sb = v8c_from_v64_S (a.sb);\n  r.sc = v8c_from_v64_S (a.sc);\n  r.sd = v8c_from_v64_S (a.sd);\n  r.se = v8c_from_v64_S (a.se);\n  r.sf = v8c_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8d_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8d_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8d_from_v64_S (a.s0);\n  r.s1 = v8d_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8d_from_v64_S (a.s2);\n  r.s3 = v8d_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8d_from_v64_S (a.s4);\n  r.s5 = v8d_from_v64_S (a.s5);\n  r.s6 = v8d_from_v64_S (a.s6);\n  r.s7 = v8d_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8d_from_v64_S (a.s8);\n  r.s9 = v8d_from_v64_S (a.s9);\n  r.sa = v8d_from_v64_S (a.sa);\n  r.sb = v8d_from_v64_S (a.sb);\n  r.sc = v8d_from_v64_S (a.sc);\n  r.sd = v8d_from_v64_S (a.sd);\n  r.se = v8d_from_v64_S (a.se);\n  r.sf = v8d_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8e_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8e_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8e_from_v64_S (a.s0);\n  r.s1 = v8e_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8e_from_v64_S (a.s2);\n  r.s3 = v8e_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8e_from_v64_S (a.s4);\n  r.s5 = v8e_from_v64_S (a.s5);\n  r.s6 = v8e_from_v64_S (a.s6);\n  r.s7 = v8e_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8e_from_v64_S (a.s8);\n  r.s9 = v8e_from_v64_S (a.s9);\n  r.sa = v8e_from_v64_S (a.sa);\n  r.sb = v8e_from_v64_S (a.sb);\n  r.sc = v8e_from_v64_S (a.sc);\n  r.sd = v8e_from_v64_S (a.sd);\n  r.se = v8e_from_v64_S (a.se);\n  r.sf = v8e_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8f_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8f_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8f_from_v64_S (a.s0);\n  r.s1 = v8f_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8f_from_v64_S (a.s2);\n  r.s3 = v8f_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8f_from_v64_S (a.s4);\n  r.s5 = v8f_from_v64_S (a.s5);\n  r.s6 = v8f_from_v64_S (a.s6);\n  r.s7 = v8f_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8f_from_v64_S (a.s8);\n  r.s9 = v8f_from_v64_S (a.s9);\n  r.sa = v8f_from_v64_S (a.sa);\n  r.sb = v8f_from_v64_S (a.sb);\n  r.sc = v8f_from_v64_S (a.sc);\n  r.sd = v8f_from_v64_S (a.sd);\n  r.se = v8f_from_v64_S (a.se);\n  r.sf = v8f_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8g_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8g_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8g_from_v64_S (a.s0);\n  r.s1 = v8g_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8g_from_v64_S (a.s2);\n  r.s3 = v8g_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8g_from_v64_S (a.s4);\n  r.s5 = v8g_from_v64_S (a.s5);\n  r.s6 = v8g_from_v64_S (a.s6);\n  r.s7 = v8g_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8g_from_v64_S (a.s8);\n  r.s9 = v8g_from_v64_S (a.s9);\n  r.sa = v8g_from_v64_S (a.sa);\n  r.sb = v8g_from_v64_S (a.sb);\n  r.sc = v8g_from_v64_S (a.sc);\n  r.sd = v8g_from_v64_S (a.sd);\n  r.se = v8g_from_v64_S (a.se);\n  r.sf = v8g_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u8x v8h_from_v64 (u64x a)\n{\n  u8x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = v8h_from_v64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v8h_from_v64_S (a.s0);\n  r.s1 = v8h_from_v64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v8h_from_v64_S (a.s2);\n  r.s3 = v8h_from_v64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v8h_from_v64_S (a.s4);\n  r.s5 = v8h_from_v64_S (a.s5);\n  r.s6 = v8h_from_v64_S (a.s6);\n  r.s7 = v8h_from_v64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v8h_from_v64_S (a.s8);\n  r.s9 = v8h_from_v64_S (a.s9);\n  r.sa = v8h_from_v64_S (a.sa);\n  r.sb = v8h_from_v64_S (a.sb);\n  r.sc = v8h_from_v64_S (a.sc);\n  r.sd = v8h_from_v64_S (a.sd);\n  r.se = v8h_from_v64_S (a.se);\n  r.sf = v8h_from_v64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u16 v16a_from_v32_S (const u32 v32)\n{\n  vconv32_t v;\n\n  v.v32 = v32;\n\n  return v.v16.a;\n}\n\nDECLSPEC u16 v16b_from_v32_S (const u32 v32)\n{\n  vconv32_t v;\n\n  v.v32 = v32;\n\n  return v.v16.b;\n}\n\nDECLSPEC u32 v32_from_v16ab_S (const u16 v16a, const u16 v16b)\n{\n  vconv32_t v;\n\n  v.v16.a = v16a;\n  v.v16.b = v16b;\n\n  return v.v32;\n}\n\nDECLSPEC u32 v32a_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v32.a;\n}\n\nDECLSPEC u32 v32b_from_v64_S (const u64 v64)\n{\n  vconv64_t v;\n\n  v.v64 = v64;\n\n  return v.v32.b;\n}\n\nDECLSPEC u64 v64_from_v32ab_S (const u32 v32a, const u32 v32b)\n{\n  vconv64_t v;\n\n  v.v32.a = v32a;\n  v.v32.b = v32b;\n\n  return v.v64;\n}\n\n// unpack function are similar, but always return u32\n\nDECLSPEC u32x unpack_v8a_from_v32 (const u32x v32)\n{\n  u32x r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n\n  #if VECT_SIZE == 1\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r) : \"r\"(v32));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s0) : \"r\"(v32.s0));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s1) : \"r\"(v32.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s2) : \"r\"(v32.s2));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s3) : \"r\"(v32.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s4) : \"r\"(v32.s4));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s5) : \"r\"(v32.s5));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s6) : \"r\"(v32.s6));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s7) : \"r\"(v32.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s8) : \"r\"(v32.s8));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.s9) : \"r\"(v32.s9));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.sa) : \"r\"(v32.sa));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.sb) : \"r\"(v32.sb));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.sc) : \"r\"(v32.sc));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.sd) : \"r\"(v32.sd));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.se) : \"r\"(v32.se));\n  asm volatile (\"bfe.u32 %0, %1,  0, 8;\" : \"=r\"(r.sf) : \"r\"(v32.sf));\n  #endif\n\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 0, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 0) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32x unpack_v8b_from_v32 (const u32x v32)\n{\n  u32x r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n\n  #if VECT_SIZE == 1\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r) : \"r\"(v32));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s0) : \"r\"(v32.s0));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s1) : \"r\"(v32.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s2) : \"r\"(v32.s2));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s3) : \"r\"(v32.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s4) : \"r\"(v32.s4));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s5) : \"r\"(v32.s5));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s6) : \"r\"(v32.s6));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s7) : \"r\"(v32.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s8) : \"r\"(v32.s8));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.s9) : \"r\"(v32.s9));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.sa) : \"r\"(v32.sa));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.sb) : \"r\"(v32.sb));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.sc) : \"r\"(v32.sc));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.sd) : \"r\"(v32.sd));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.se) : \"r\"(v32.se));\n  asm volatile (\"bfe.u32 %0, %1,  8, 8;\" : \"=r\"(r.sf) : \"r\"(v32.sf));\n  #endif\n\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 8, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 8) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32x unpack_v8c_from_v32 (const u32x v32)\n{\n  u32x r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n\n  #if VECT_SIZE == 1\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r) : \"r\"(v32));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s0) : \"r\"(v32.s0));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s1) : \"r\"(v32.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s2) : \"r\"(v32.s2));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s3) : \"r\"(v32.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s4) : \"r\"(v32.s4));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s5) : \"r\"(v32.s5));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s6) : \"r\"(v32.s6));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s7) : \"r\"(v32.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s8) : \"r\"(v32.s8));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.s9) : \"r\"(v32.s9));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.sa) : \"r\"(v32.sa));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.sb) : \"r\"(v32.sb));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.sc) : \"r\"(v32.sc));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.sd) : \"r\"(v32.sd));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.se) : \"r\"(v32.se));\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r.sf) : \"r\"(v32.sf));\n  #endif\n\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 16, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 16) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32x unpack_v8d_from_v32 (const u32x v32)\n{\n  u32x r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n\n  #if VECT_SIZE == 1\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r) : \"r\"(v32));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s0) : \"r\"(v32.s0));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s1) : \"r\"(v32.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s2) : \"r\"(v32.s2));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s3) : \"r\"(v32.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s4) : \"r\"(v32.s4));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s5) : \"r\"(v32.s5));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s6) : \"r\"(v32.s6));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s7) : \"r\"(v32.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s8) : \"r\"(v32.s8));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.s9) : \"r\"(v32.s9));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.sa) : \"r\"(v32.sa));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.sb) : \"r\"(v32.sb));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.sc) : \"r\"(v32.sc));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.sd) : \"r\"(v32.sd));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.se) : \"r\"(v32.se));\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r.sf) : \"r\"(v32.sf));\n  #endif\n\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 24, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 24) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 unpack_v8a_from_v32_S (const u32 v32)\n{\n  u32 r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n  asm volatile (\"bfe.u32 %0, %1, 0, 8;\" : \"=r\"(r) : \"r\"(v32));\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 0, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 0) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 unpack_v8b_from_v32_S (const u32 v32)\n{\n  u32 r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n  asm volatile (\"bfe.u32 %0, %1, 8, 8;\" : \"=r\"(r) : \"r\"(v32));\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 8, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 8) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 unpack_v8c_from_v32_S (const u32 v32)\n{\n  u32 r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n  asm volatile (\"bfe.u32 %0, %1, 16, 8;\" : \"=r\"(r) : \"r\"(v32));\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 16, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 16) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 unpack_v8d_from_v32_S (const u32 v32)\n{\n  u32 r = 0;\n\n  #if   defined IS_NV  && HAS_BFE  == 1\n  asm volatile (\"bfe.u32 %0, %1, 24, 8;\" : \"=r\"(r) : \"r\"(v32));\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VBFE == 1\n  //__asm__ __volatile__ (\"V_BFE_U32 %0, %1, 24, 8;\" : \"=v\"(r) : \"v\"(v32));\n  #else\n  r = (v32 >> 24) & 0xff;\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 l32_from_64_S (u64 a)\n{\n  return v32a_from_v64_S (a);\n}\n\nDECLSPEC u32 h32_from_64_S (u64 a)\n{\n  return v32b_from_v64_S (a);\n}\n\nDECLSPEC u64 hl32_to_64_S (const u32 a, const u32 b)\n{\n  return v64_from_v32ab_S (b, a);\n}\n\nDECLSPEC u32x l32_from_64 (u64x a)\n{\n  u32x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = l32_from_64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = l32_from_64_S (a.s0);\n  r.s1 = l32_from_64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = l32_from_64_S (a.s2);\n  r.s3 = l32_from_64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = l32_from_64_S (a.s4);\n  r.s5 = l32_from_64_S (a.s5);\n  r.s6 = l32_from_64_S (a.s6);\n  r.s7 = l32_from_64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = l32_from_64_S (a.s8);\n  r.s9 = l32_from_64_S (a.s9);\n  r.sa = l32_from_64_S (a.sa);\n  r.sb = l32_from_64_S (a.sb);\n  r.sc = l32_from_64_S (a.sc);\n  r.sd = l32_from_64_S (a.sd);\n  r.se = l32_from_64_S (a.se);\n  r.sf = l32_from_64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32x h32_from_64 (u64x a)\n{\n  u32x r = 0;\n\n  #if VECT_SIZE == 1\n  r    = h32_from_64_S (a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = h32_from_64_S (a.s0);\n  r.s1 = h32_from_64_S (a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = h32_from_64_S (a.s2);\n  r.s3 = h32_from_64_S (a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = h32_from_64_S (a.s4);\n  r.s5 = h32_from_64_S (a.s5);\n  r.s6 = h32_from_64_S (a.s6);\n  r.s7 = h32_from_64_S (a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = h32_from_64_S (a.s8);\n  r.s9 = h32_from_64_S (a.s9);\n  r.sa = h32_from_64_S (a.sa);\n  r.sb = h32_from_64_S (a.sb);\n  r.sc = h32_from_64_S (a.sc);\n  r.sd = h32_from_64_S (a.sd);\n  r.se = h32_from_64_S (a.se);\n  r.sf = h32_from_64_S (a.sf);\n  #endif\n\n  return r;\n}\n\nDECLSPEC u64x hl32_to_64 (const u32x a, const u32x b)\n{\n  u64x r;\n\n  #if VECT_SIZE == 1\n  r    = v64_from_v32ab_S  (b   , a);\n  #endif\n\n  #if VECT_SIZE >= 2\n  r.s0 = v64_from_v32ab_S  (b.s0, a.s0);\n  r.s1 = v64_from_v32ab_S  (b.s1, a.s1);\n  #endif\n\n  #if VECT_SIZE >= 4\n  r.s2 = v64_from_v32ab_S  (b.s2, a.s2);\n  r.s3 = v64_from_v32ab_S  (b.s3, a.s3);\n  #endif\n\n  #if VECT_SIZE >= 8\n  r.s4 = v64_from_v32ab_S  (b.s4, a.s4);\n  r.s5 = v64_from_v32ab_S  (b.s5, a.s5);\n  r.s6 = v64_from_v32ab_S  (b.s6, a.s6);\n  r.s7 = v64_from_v32ab_S  (b.s7, a.s7);\n  #endif\n\n  #if VECT_SIZE >= 16\n  r.s8 = v64_from_v32ab_S  (b.s8, a.s8);\n  r.s9 = v64_from_v32ab_S  (b.s9, a.s9);\n  r.sa = v64_from_v32ab_S  (b.sa, a.sa);\n  r.sb = v64_from_v32ab_S  (b.sb, a.sb);\n  r.sc = v64_from_v32ab_S  (b.sc, a.sc);\n  r.sd = v64_from_v32ab_S  (b.sd, a.sd);\n  r.se = v64_from_v32ab_S  (b.se, a.se);\n  r.sf = v64_from_v32ab_S  (b.sf, a.sf);\n  #endif\n\n  return r;\n}\n\n// bit rotates\n//\n// For HC_CPU_OPENCL_EMU_H we dont need to care about vector functions\n// The VECT_SIZE is guaranteed to be set to 1 from cpu_opencl_emu.h\n\nDECLSPEC u32x hc_rotl32 (const u32x a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotl32 (a, n);\n  #elif defined IS_CUDA || defined IS_HIP\n  return rotl32 (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, make_u32x (n));\n  #else\n  return ((a << n) | (a >> (32 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u32x hc_rotr32 (const u32x a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotr32 (a, n);\n  #elif defined IS_CUDA || defined IS_HIP\n  return rotr32 (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, make_u32x (32 - n));\n  #else\n  return ((a >> n) | (a << (32 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u32 hc_rotl32_S (const u32 a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotl32 (a, n);\n  #elif defined IS_CUDA || defined IS_HIP\n  return rotl32_S (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, (u32) (n));\n  #else\n  return ((a << n) | (a >> (32 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u32 hc_rotr32_S (const u32 a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotr32 (a, n);\n  #elif defined IS_CUDA || defined IS_HIP\n  return rotr32_S (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, (u32) (32 - n));\n  #else\n  return ((a >> n) | (a << (32 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u64x hc_rotl64 (const u64x a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotl64 (a, n);\n  #elif defined IS_CUDA\n  return rotl64 (a, n);\n  #elif (defined IS_AMD || defined IS_HIP)\n  return rotl64 (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, make_u64x (n));\n  #else\n  return ((a << n) | (a >> (64 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u64x hc_rotr64 (const u64x a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotr64 (a, n);\n  #elif defined IS_CUDA\n  return rotr64 (a, n);\n  #elif (defined IS_AMD || defined IS_HIP)\n  return rotr64 (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, make_u64x (64 - n));\n  #else\n  return ((a >> n) | (a << (64 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u64 hc_rotl64_S (const u64 a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotl64 (a, n);\n  #elif defined IS_CUDA\n  return rotl64_S (a, n);\n  #elif (defined IS_AMD || defined IS_HIP)\n  return rotl64_S (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, (u64) (n));\n  #else\n  return ((a << n) | (a >> (64 - n)));\n  #endif\n  #endif\n}\n\nDECLSPEC u64 hc_rotr64_S (const u64 a, const int n)\n{\n  #if   defined HC_CPU_OPENCL_EMU_H\n  return rotr64 (a, n);\n  #elif defined IS_CUDA\n  return rotr64_S (a, n);\n  #elif (defined IS_AMD || defined IS_HIP)\n  return rotr64_S (a, n);\n  #else\n  #ifdef USE_ROTATE\n  return rotate (a, (u64) (64 - n));\n  #else\n  return ((a >> n) | (a << (64 - n)));\n  #endif\n  #endif\n}\n\n// bitwise swap\n\nDECLSPEC u32x hc_swap32 (const u32x v)\n{\n  u32x r;\n\n  #ifdef HC_CPU_OPENCL_EMU_H\n  r = byte_swap_32 (v);\n  #else\n  #if   (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  const u32 m = 0x00010203;\n\n  #if VECT_SIZE == 1\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r) : \"v\"(v), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 2\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s0) : \"v\"(v.s0), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s1) : \"v\"(v.s1), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 4\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s2) : \"v\"(v.s2), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s3) : \"v\"(v.s3), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 8\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s4) : \"v\"(v.s4), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s5) : \"v\"(v.s5), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s6) : \"v\"(v.s6), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s7) : \"v\"(v.s7), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 16\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s8) : \"v\"(v.s8), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.s9) : \"v\"(v.s9), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.sa) : \"v\"(v.sa), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.sb) : \"v\"(v.sb), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.sc) : \"v\"(v.sc), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.sd) : \"v\"(v.sd), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.se) : \"v\"(v.se), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r.sf) : \"v\"(v.sf), \"v\"(m));\n  #endif\n\n  #elif defined IS_NV  && HAS_PRMT  == 1\n\n  #if VECT_SIZE == 1\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r) : \"r\"(v));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s0) : \"r\"(v.s0));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s1) : \"r\"(v.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s2) : \"r\"(v.s2));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s3) : \"r\"(v.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s4) : \"r\"(v.s4));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s5) : \"r\"(v.s5));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s6) : \"r\"(v.s6));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s7) : \"r\"(v.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s8) : \"r\"(v.s8));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.s9) : \"r\"(v.s9));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.sa) : \"r\"(v.sa));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.sb) : \"r\"(v.sb));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.sc) : \"r\"(v.sc));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.sd) : \"r\"(v.sd));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.se) : \"r\"(v.se));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r.sf) : \"r\"(v.sf));\n  #endif\n\n  #else\n\n  #if defined USE_BITSELECT && defined USE_ROTATE\n  r = bitselect (rotate (v, make_u32x (24)),\n                 rotate (v, make_u32x ( 8)),\n                            make_u32x (0x00ff00ff));\n  #else\n  r = ((v & make_u32x (0xff000000)) >> 24)\n    | ((v & make_u32x (0x00ff0000)) >>  8)\n    | ((v & make_u32x (0x0000ff00)) <<  8)\n    | ((v & make_u32x (0x000000ff)) << 24);\n  #endif\n\n  #endif\n\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 hc_swap32_S (const u32 v)\n{\n  u32 r;\n\n  #ifdef HC_CPU_OPENCL_EMU_H\n  r = byte_swap_32 (v);\n  #else\n  #if   (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(r) : \"v\"(v), \"v\"(0x00010203));\n  #elif defined IS_NV  && HAS_PRMT  == 1\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(r) : \"r\"(v));\n  #else\n  #ifdef USE_SWIZZLE\n  r = as_uint (as_uchar4 (v).s3210);\n  #else\n  r = ((v & 0xff000000) >> 24)\n    | ((v & 0x00ff0000) >>  8)\n    | ((v & 0x0000ff00) <<  8)\n    | ((v & 0x000000ff) << 24);\n  #endif\n  #endif\n  #endif\n\n  return r;\n}\n\nDECLSPEC u64x hc_swap64 (const u64x v)\n{\n  u64x r;\n\n  #ifdef HC_CPU_OPENCL_EMU_H\n  r = byte_swap_64 (v);\n  #else\n  #if   (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  const u32 m = 0x00010203;\n\n  const u32x a0 = h32_from_64 (v);\n  const u32x a1 = l32_from_64 (v);\n\n  u32x t0;\n  u32x t1;\n\n  #if VECT_SIZE == 1\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0) : \"v\"(0), \"v\"(a0), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1) : \"v\"(0), \"v\"(a1), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 2\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s0) : \"v\"(0), \"v\"(a0.s0), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s0) : \"v\"(0), \"v\"(a1.s0), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s1) : \"v\"(0), \"v\"(a0.s1), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s1) : \"v\"(0), \"v\"(a1.s1), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 4\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s2) : \"v\"(0), \"v\"(a0.s2), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s2) : \"v\"(0), \"v\"(a1.s2), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s3) : \"v\"(0), \"v\"(a0.s3), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s3) : \"v\"(0), \"v\"(a1.s3), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 8\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s4) : \"v\"(0), \"v\"(a0.s4), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s4) : \"v\"(0), \"v\"(a1.s4), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s5) : \"v\"(0), \"v\"(a0.s5), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s5) : \"v\"(0), \"v\"(a1.s5), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s6) : \"v\"(0), \"v\"(a0.s6), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s6) : \"v\"(0), \"v\"(a1.s6), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s7) : \"v\"(0), \"v\"(a0.s7), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s7) : \"v\"(0), \"v\"(a1.s7), \"v\"(m));\n  #endif\n\n  #if VECT_SIZE >= 16\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s8) : \"v\"(0), \"v\"(a0.s8), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s8) : \"v\"(0), \"v\"(a1.s8), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.s9) : \"v\"(0), \"v\"(a0.s9), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.s9) : \"v\"(0), \"v\"(a1.s9), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.sa) : \"v\"(0), \"v\"(a0.sa), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.sa) : \"v\"(0), \"v\"(a1.sa), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.sb) : \"v\"(0), \"v\"(a0.sb), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.sb) : \"v\"(0), \"v\"(a1.sb), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.sc) : \"v\"(0), \"v\"(a0.sc), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.sc) : \"v\"(0), \"v\"(a1.sc), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.sd) : \"v\"(0), \"v\"(a0.sd), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.sd) : \"v\"(0), \"v\"(a1.sd), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.se) : \"v\"(0), \"v\"(a0.se), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.se) : \"v\"(0), \"v\"(a1.se), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t0.sf) : \"v\"(0), \"v\"(a0.sf), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(t1.sf) : \"v\"(0), \"v\"(a1.sf), \"v\"(m));\n  #endif\n\n  r = hl32_to_64 (t1, t0);\n\n  #elif defined IS_NV && HAS_MOV64 == 1 && HAS_PRMT == 1\n\n  u32x il;\n  u32x ir;\n\n  #if VECT_SIZE == 1\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il), \"=r\"(ir) : \"l\"(v));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s0), \"=r\"(ir.s0) : \"l\"(v.s0));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s1), \"=r\"(ir.s1) : \"l\"(v.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s2), \"=r\"(ir.s2) : \"l\"(v.s2));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s3), \"=r\"(ir.s3) : \"l\"(v.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s4), \"=r\"(ir.s4) : \"l\"(v.s4));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s5), \"=r\"(ir.s5) : \"l\"(v.s5));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s6), \"=r\"(ir.s6) : \"l\"(v.s6));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s7), \"=r\"(ir.s7) : \"l\"(v.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s8), \"=r\"(ir.s8) : \"l\"(v.s8));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.s9), \"=r\"(ir.s9) : \"l\"(v.s9));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.sa), \"=r\"(ir.sa) : \"l\"(v.sa));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.sb), \"=r\"(ir.sb) : \"l\"(v.sb));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.sc), \"=r\"(ir.sc) : \"l\"(v.sc));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.sd), \"=r\"(ir.sd) : \"l\"(v.sd));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.se), \"=r\"(ir.se) : \"l\"(v.se));\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il.sf), \"=r\"(ir.sf) : \"l\"(v.sf));\n  #endif\n\n  u32x tl;\n  u32x tr;\n\n  #if VECT_SIZE == 1\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl) : \"r\"(il));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr) : \"r\"(ir));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s0) : \"r\"(il.s0));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s0) : \"r\"(ir.s0));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s1) : \"r\"(il.s1));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s1) : \"r\"(ir.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s2) : \"r\"(il.s2));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s2) : \"r\"(ir.s2));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s3) : \"r\"(il.s3));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s3) : \"r\"(ir.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s4) : \"r\"(il.s4));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s4) : \"r\"(ir.s4));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s5) : \"r\"(il.s5));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s5) : \"r\"(ir.s5));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s6) : \"r\"(il.s6));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s6) : \"r\"(ir.s6));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s7) : \"r\"(il.s7));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s7) : \"r\"(ir.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s8) : \"r\"(il.s8));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s8) : \"r\"(ir.s8));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.s9) : \"r\"(il.s9));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.s9) : \"r\"(ir.s9));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.sa) : \"r\"(il.sa));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.sa) : \"r\"(ir.sa));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.sb) : \"r\"(il.sb));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.sb) : \"r\"(ir.sb));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.sc) : \"r\"(il.sc));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.sc) : \"r\"(ir.sc));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.sd) : \"r\"(il.sd));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.sd) : \"r\"(ir.sd));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.se) : \"r\"(il.se));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.se) : \"r\"(ir.se));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl.sf) : \"r\"(il.sf));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr.sf) : \"r\"(ir.sf));\n  #endif\n\n  #if VECT_SIZE == 1\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r) : \"r\"(tr), \"r\"(tl));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s0) : \"r\"(tr.s0), \"r\"(tl.s0));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s1) : \"r\"(tr.s1), \"r\"(tl.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s2) : \"r\"(tr.s2), \"r\"(tl.s2));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s3) : \"r\"(tr.s3), \"r\"(tl.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s4) : \"r\"(tr.s4), \"r\"(tl.s4));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s5) : \"r\"(tr.s5), \"r\"(tl.s5));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s6) : \"r\"(tr.s6), \"r\"(tl.s6));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s7) : \"r\"(tr.s7), \"r\"(tl.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s8) : \"r\"(tr.s8), \"r\"(tl.s8));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.s9) : \"r\"(tr.s9), \"r\"(tl.s9));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.sa) : \"r\"(tr.sa), \"r\"(tl.sa));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.sb) : \"r\"(tr.sb), \"r\"(tl.sb));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.sc) : \"r\"(tr.sc), \"r\"(tl.sc));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.sd) : \"r\"(tr.sd), \"r\"(tl.sd));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.se) : \"r\"(tr.se), \"r\"(tl.se));\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r.sf) : \"r\"(tr.sf), \"r\"(tl.sf));\n  #endif\n\n  #elif defined IS_METAL\n\n  const u32x a0 = h32_from_64 (v);\n  const u32x a1 = l32_from_64 (v);\n\n  u32x t0 = hc_swap32 (a0);\n  u32x t1 = hc_swap32 (a1);\n\n  r = hl32_to_64 (t1, t0);\n\n  #else\n\n  #if defined USE_BITSELECT && defined USE_ROTATE\n\n  r = bitselect (bitselect (rotate (v, make_u64x (24)),\n                            rotate (v, make_u64x ( 8)),\n                                       make_u64x (0x000000ff000000ffUL)),\n                 bitselect (rotate (v, make_u64x (56)),\n                            rotate (v, make_u64x (40)),\n                                       make_u64x (0x00ff000000ff0000UL)),\n                                       make_u64x (0xffff0000ffff0000UL));\n  #else\n\n  r = ((v & make_u64x (0xff00000000000000UL)) >> 56)\n    | ((v & make_u64x (0x00ff000000000000UL)) >> 40)\n    | ((v & make_u64x (0x0000ff0000000000UL)) >> 24)\n    | ((v & make_u64x (0x000000ff00000000UL)) >>  8)\n    | ((v & make_u64x (0x00000000ff000000UL)) <<  8)\n    | ((v & make_u64x (0x0000000000ff0000UL)) << 24)\n    | ((v & make_u64x (0x000000000000ff00UL)) << 40)\n    | ((v & make_u64x (0x00000000000000ffUL)) << 56);\n\n  #endif\n\n  #endif\n  #endif\n\n  return r;\n}\n\nDECLSPEC u64 hc_swap64_S (const u64 v)\n{\n  u64 r;\n\n  #ifdef HC_CPU_OPENCL_EMU_H\n  r = byte_swap_64 (v);\n  #else\n  #if   (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n  const u32 m = 0x00010203;\n\n  const u32 v0 = h32_from_64_S (v);\n  const u32 v1 = l32_from_64_S (v);\n\n  u32 t0;\n  u32 t1;\n\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(t0) : \"v\"(v0), \"v\"(m));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, 0, %1, %2;\" : \"=v\"(t1) : \"v\"(v1), \"v\"(m));\n\n  r = hl32_to_64_S (t1, t0);\n  #elif defined IS_NV  && HAS_PRMT  == 1\n  u32 il;\n  u32 ir;\n\n  asm volatile (\"mov.b64 {%0, %1}, %2;\" : \"=r\"(il), \"=r\"(ir) : \"l\"(v));\n\n  u32 tl;\n  u32 tr;\n\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tl) : \"r\"(il));\n  asm volatile (\"prmt.b32 %0, %1, 0, 0x0123;\" : \"=r\"(tr) : \"r\"(ir));\n\n  asm volatile (\"mov.b64 %0, {%1, %2};\" : \"=l\"(r) : \"r\"(tr), \"r\"(tl));\n\n  #elif defined IS_METAL\n\n  const u32 v0 = h32_from_64_S (v);\n  const u32 v1 = l32_from_64_S (v);\n\n  u32 t0 = hc_swap32_S (v0);\n  u32 t1 = hc_swap32_S (v1);\n\n  r = hl32_to_64_S (t1, t0);\n\n  #else\n\n  #ifdef USE_SWIZZLE\n  r = as_ulong (as_uchar8 (v).s76543210);\n  #else\n  r = ((v & (u64) 0xff00000000000000UL) >> 56)\n    | ((v & (u64) 0x00ff000000000000UL) >> 40)\n    | ((v & (u64) 0x0000ff0000000000UL) >> 24)\n    | ((v & (u64) 0x000000ff00000000UL) >>  8)\n    | ((v & (u64) 0x00000000ff000000UL) <<  8)\n    | ((v & (u64) 0x0000000000ff0000UL) << 24)\n    | ((v & (u64) 0x000000000000ff00UL) << 40)\n    | ((v & (u64) 0x00000000000000ffUL) << 56);\n  #endif\n  #endif\n  #endif\n\n  return r;\n}\n\n#if (defined IS_AMD || defined IS_HIP)\n\nDECLSPEC u32x hc_bfe (const u32x a, const u32x b, const u32x c)\n{\n  #define BIT(x)      (make_u32x (1u) << (x))\n  #define BIT_MASK(x) (BIT (x) - 1)\n  #define BFE(x,y,z)  (((x) >> (y)) & BIT_MASK (z))\n\n  return BFE (a, b, c);\n\n  #undef BIT\n  #undef BIT_MASK\n  #undef BFE\n}\n\nDECLSPEC u32 hc_bfe_S (const u32 a, const u32 b, const u32 c)\n{\n  #define BIT(x)      (1u << (x))\n  #define BIT_MASK(x) (BIT (x) - 1)\n  #define BFE(x,y,z)  (((x) >> (y)) & BIT_MASK (z))\n\n  return BFE (a, b, c);\n\n  #undef BIT\n  #undef BIT_MASK\n  #undef BFE\n}\n\nDECLSPEC u32x hc_bytealign_be (const u32x a, const u32x b, const int c)\n{\n  u32x r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a << 24) | (b >>  8); }\n  else if (cm == 2) { r = (a << 16) | (b >> 16); }\n  else if (cm == 3) { r = (a <<  8) | (b >> 24); }\n\n  return r;\n}\n\nDECLSPEC u32 hc_bytealign_be_S (const u32 a, const u32 b, const int c)\n{\n  u32 r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a << 24) | (b >>  8); }\n  else if (cm == 2) { r = (a << 16) | (b >> 16); }\n  else if (cm == 3) { r = (a <<  8) | (b >> 24); }\n\n  return r;\n}\n\nDECLSPEC u32x hc_bytealign (const u32x a, const u32x b, const int c)\n{\n  u32x r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a >> 24) | (b <<  8); }\n  else if (cm == 2) { r = (a >> 16) | (b << 16); }\n  else if (cm == 3) { r = (a >>  8) | (b << 24); }\n\n  return r;\n}\n\nDECLSPEC u32 hc_bytealign_S (const u32 a, const u32 b, const int c)\n{\n  u32 r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a >> 24) | (b <<  8); }\n  else if (cm == 2) { r = (a >> 16) | (b << 16); }\n  else if (cm == 3) { r = (a >>  8) | (b << 24); }\n\n  return r;\n}\n\n#if HAS_VPERM == 1\nDECLSPEC u32x hc_byte_perm (const u32x a, const u32x b, const int c)\n{\n  u32x r = 0;\n\n  #if VECT_SIZE == 1\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r) : \"v\"(b), \"v\"(a), \"v\"(c));\n  #endif\n\n  #if VECT_SIZE >= 2\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s0) : \"v\"(b.s0), \"v\"(a.s0), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s1) : \"v\"(b.s1), \"v\"(a.s1), \"v\"(c));\n  #endif\n\n  #if VECT_SIZE >= 4\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s2) : \"v\"(b.s2), \"v\"(a.s2), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s3) : \"v\"(b.s3), \"v\"(a.s3), \"v\"(c));\n  #endif\n\n  #if VECT_SIZE >= 8\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s4) : \"v\"(b.s4), \"v\"(a.s4), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s5) : \"v\"(b.s5), \"v\"(a.s5), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s6) : \"v\"(b.s6), \"v\"(a.s6), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s7) : \"v\"(b.s7), \"v\"(a.s7), \"v\"(c));\n  #endif\n\n  #if VECT_SIZE >= 16\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s8) : \"v\"(b.s8), \"v\"(a.s8), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.s9) : \"v\"(b.s9), \"v\"(a.s9), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.sa) : \"v\"(b.sa), \"v\"(a.sa), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.sb) : \"v\"(b.sb), \"v\"(a.sb), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.sc) : \"v\"(b.sc), \"v\"(a.sc), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.sd) : \"v\"(b.sd), \"v\"(a.sd), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.se) : \"v\"(b.se), \"v\"(a.se), \"v\"(c));\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r.sf) : \"v\"(b.sf), \"v\"(a.sf), \"v\"(c));\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 hc_byte_perm_S (const u32 a, const u32 b, const int c)\n{\n  u32 r = 0;\n\n  __asm__ __volatile__ (\"V_PERM_B32 %0, %1, %2, %3;\" : \"=v\"(r) : \"v\"(b), \"v\"(a), \"v\"(c));\n\n  return r;\n}\n#endif\n\n#if HAS_VADD3 == 1\nDECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)\n{\n  /*\n  u32x r = 0;\n\n  #if VECT_SIZE == 1\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r) : \"v\"(b), \"v\"(a), \"v\"(c));\n  #endif\n\n  #if VECT_SIZE >= 2\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s0) : \"v\"(b.s0), \"v\"(a.s0), \"v\"(c.s0));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s1) : \"v\"(b.s1), \"v\"(a.s1), \"v\"(c.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s2) : \"v\"(b.s2), \"v\"(a.s2), \"v\"(c.s2));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s3) : \"v\"(b.s3), \"v\"(a.s3), \"v\"(c.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s4) : \"v\"(b.s4), \"v\"(a.s4), \"v\"(c.s4));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s5) : \"v\"(b.s5), \"v\"(a.s5), \"v\"(c.s5));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s6) : \"v\"(b.s6), \"v\"(a.s6), \"v\"(c.s6));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s7) : \"v\"(b.s7), \"v\"(a.s7), \"v\"(c.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s8) : \"v\"(b.s8), \"v\"(a.s8), \"v\"(c.s8));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.s9) : \"v\"(b.s9), \"v\"(a.s9), \"v\"(c.s9));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.sa) : \"v\"(b.sa), \"v\"(a.sa), \"v\"(c.sa));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.sb) : \"v\"(b.sb), \"v\"(a.sb), \"v\"(c.sb));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.sc) : \"v\"(b.sc), \"v\"(a.sc), \"v\"(c.sc));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.sd) : \"v\"(b.sd), \"v\"(a.sd), \"v\"(c.sd));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.se) : \"v\"(b.se), \"v\"(a.se), \"v\"(c.se));\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r.sf) : \"v\"(b.sf), \"v\"(a.sf), \"v\"(c.sf));\n  #endif\n\n  return r;\n  */\n\n  return a + b + c;\n}\n\nDECLSPEC u32 hc_add3_S (const u32 a, const u32 b, const u32 c)\n{\n  /*\n  u32 r = 0;\n\n  __asm__ __volatile__ (\"V_ADD3_U32 %0, %1, %2, %3;\" : \"=v\"(r) : \"v\"(b), \"v\"(a), \"v\"(c));\n\n  return r;\n  */\n\n  return a + b + c;\n}\n#else\nDECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)\n{\n  return a + b + c;\n}\n\nDECLSPEC u32 hc_add3_S (const u32 a, const u32 b, const u32 c)\n{\n  return a + b + c;\n}\n#endif\n\nDECLSPEC u32x hc_lop_0x96 (const u32x a, const u32x b, const u32x c)\n{\n  return a ^ b ^ c;\n}\n\nDECLSPEC u32 hc_lop_0x96_S (const u32 a, const u32 b, const u32 c)\n{\n  return a ^ b ^ c;\n}\n\n#endif\n\n#ifdef IS_NV\n\nDECLSPEC u32x hc_byte_perm (const u32x a, const u32x b, const int c)\n{\n  u32x r = 0;\n\n  #if VECT_SIZE == 1\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r)    : \"r\"(a),    \"r\"(b),    \"r\"(c));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s0) : \"r\"(a.s0), \"r\"(b.s0), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s1) : \"r\"(a.s1), \"r\"(b.s1), \"r\"(c));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s2) : \"r\"(a.s2), \"r\"(b.s2), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s3) : \"r\"(a.s3), \"r\"(b.s3), \"r\"(c));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s4) : \"r\"(a.s4), \"r\"(b.s4), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s5) : \"r\"(a.s5), \"r\"(b.s5), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s6) : \"r\"(a.s6), \"r\"(b.s6), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s7) : \"r\"(a.s7), \"r\"(b.s7), \"r\"(c));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s8) : \"r\"(a.s8), \"r\"(b.s8), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.s9) : \"r\"(a.s9), \"r\"(b.s9), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.sa) : \"r\"(a.sa), \"r\"(b.sa), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.sb) : \"r\"(a.sb), \"r\"(b.sb), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.sc) : \"r\"(a.sc), \"r\"(b.sc), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.sd) : \"r\"(a.sd), \"r\"(b.sd), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.se) : \"r\"(a.se), \"r\"(b.se), \"r\"(c));\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r.sf) : \"r\"(a.sf), \"r\"(b.sf), \"r\"(c));\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 hc_byte_perm_S (const u32 a, const u32 b, const int c)\n{\n  u32 r = 0;\n\n  asm volatile (\"prmt.b32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(c));\n\n  return r;\n}\n\nDECLSPEC u32x hc_bfe (const u32x a, const u32x b, const u32x c)\n{\n  u32x r = 0;\n\n  #if VECT_SIZE == 1\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r)    : \"r\"(a),    \"r\"(b),    \"r\"(c));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s0) : \"r\"(a.s0), \"r\"(b.s0), \"r\"(c.s0));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s1) : \"r\"(a.s1), \"r\"(b.s1), \"r\"(c.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s2) : \"r\"(a.s2), \"r\"(b.s2), \"r\"(c.s2));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s3) : \"r\"(a.s3), \"r\"(b.s3), \"r\"(c.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s4) : \"r\"(a.s4), \"r\"(b.s4), \"r\"(c.s4));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s5) : \"r\"(a.s5), \"r\"(b.s5), \"r\"(c.s5));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s6) : \"r\"(a.s6), \"r\"(b.s6), \"r\"(c.s6));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s7) : \"r\"(a.s7), \"r\"(b.s7), \"r\"(c.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s8) : \"r\"(a.s8), \"r\"(b.s8), \"r\"(c.s8));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.s9) : \"r\"(a.s9), \"r\"(b.s9), \"r\"(c.s9));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.sa) : \"r\"(a.sa), \"r\"(b.sa), \"r\"(c.sa));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.sb) : \"r\"(a.sb), \"r\"(b.sb), \"r\"(c.sb));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.sc) : \"r\"(a.sc), \"r\"(b.sc), \"r\"(c.sc));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.sd) : \"r\"(a.sd), \"r\"(b.sd), \"r\"(c.sd));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.se) : \"r\"(a.se), \"r\"(b.se), \"r\"(c.se));\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r.sf) : \"r\"(a.sf), \"r\"(b.sf), \"r\"(c.sf));\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 hc_bfe_S (const u32 a, const u32 b, const u32 c)\n{\n  u32 r = 0;\n\n  asm volatile (\"bfe.u32 %0, %1, %2, %3;\" : \"=r\"(r) : \"r\"(a), \"r\"(b), \"r\"(c));\n\n  return r;\n}\n\nDECLSPEC u32 hc_bytealign_be_S (const u32 a, const u32 b, const int c)\n{\n  const int c_mod_4 = c & 3;\n\n  const u32 r = hc_byte_perm_S (b, a, (0x76543210 >> (c_mod_4 * 4)) & 0xffff);\n\n  return r;\n}\n\nDECLSPEC u32x hc_bytealign (const u32x a, const u32x b, const int c)\n{\n  const int c_mod_4 = c & 3;\n\n  const int c_minus_4 = 4 - c_mod_4;\n\n  const u32x r = hc_byte_perm (a, b, (0x76543210 >> (c_minus_4 * 4)) & 0xffff);\n\n  return r;\n}\n\nDECLSPEC u32 hc_bytealign_S (const u32 a, const u32 b, const int c)\n{\n  const int c_mod_4 = c & 3;\n\n  const int c_minus_4 = 4 - c_mod_4;\n\n  const u32 r = hc_byte_perm_S (a, b, (0x76543210 >> (c_minus_4 * 4)) & 0xffff);\n\n  return r;\n}\n\nDECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)\n{\n  return a + b + c;\n}\n\nDECLSPEC u32 hc_add3_S (const u32 a, const u32 b, const u32 c)\n{\n  return a + b + c;\n}\n\nDECLSPEC u32x hc_lop_0x96 (const u32x a, const u32x b, const u32x c)\n{\n  u32x r = 0;\n\n  #if CUDA_ARCH >= 500\n\n  #if VECT_SIZE == 1\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r): \"r\"(a), \"r\"(b), \"r\"(c));\n  #endif\n\n  #if VECT_SIZE >= 2\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s0): \"r\"(a.s0), \"r\"(b.s0), \"r\"(c.s0));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s1): \"r\"(a.s1), \"r\"(b.s1), \"r\"(c.s1));\n  #endif\n\n  #if VECT_SIZE >= 4\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s2): \"r\"(a.s2), \"r\"(b.s2), \"r\"(c.s2));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s3): \"r\"(a.s3), \"r\"(b.s3), \"r\"(c.s3));\n  #endif\n\n  #if VECT_SIZE >= 8\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s4): \"r\"(a.s4), \"r\"(b.s4), \"r\"(c.s4));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s5): \"r\"(a.s5), \"r\"(b.s5), \"r\"(c.s5));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s6): \"r\"(a.s6), \"r\"(b.s6), \"r\"(c.s6));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s7): \"r\"(a.s7), \"r\"(b.s7), \"r\"(c.s7));\n  #endif\n\n  #if VECT_SIZE >= 16\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s8): \"r\"(a.s8), \"r\"(b.s8), \"r\"(c.s8));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.s9): \"r\"(a.s9), \"r\"(b.s9), \"r\"(c.s9));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.sa): \"r\"(a.sa), \"r\"(b.sa), \"r\"(c.sa));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.sb): \"r\"(a.sb), \"r\"(b.sb), \"r\"(c.sb));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.sc): \"r\"(a.sc), \"r\"(b.sc), \"r\"(c.sc));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.sd): \"r\"(a.sd), \"r\"(b.sd), \"r\"(c.sd));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.se): \"r\"(a.se), \"r\"(b.se), \"r\"(c.se));\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r.sf): \"r\"(a.sf), \"r\"(b.sf), \"r\"(c.sf));\n  #endif\n\n  #else\n\n  r = a ^ b ^ c;\n\n  #endif\n\n  return r;\n}\n\nDECLSPEC u32 hc_lop_0x96_S (const u32 a, const u32 b, const u32 c)\n{\n  u32 r = 0;\n\n  #if CUDA_ARCH >= 500\n\n  asm volatile (\"lop3.b32 %0, %1, %2, %3, 0x96;\" : \"=r\"(r): \"r\"(a), \"r\"(b), \"r\"(c));\n\n  #else\n\n  r = a ^ b ^ c;\n\n  #endif\n\n  return r;\n}\n\n#endif\n\n#ifdef IS_GENERIC\n\nDECLSPEC u32x hc_bfe (const u32x a, const u32x b, const u32x c)\n{\n  #define BIT(x)      (make_u32x (1u) << (x))\n  #define BIT_MASK(x) (BIT (x) - 1)\n  #define BFE(x,y,z)  (((x) >> (y)) & BIT_MASK (z))\n\n  return BFE (a, b, c);\n\n  #undef BIT\n  #undef BIT_MASK\n  #undef BFE\n}\n\nDECLSPEC u32 hc_bfe_S (const u32 a, const u32 b, const u32 c)\n{\n  #define BIT(x)      (1u << (x))\n  #define BIT_MASK(x) (BIT (x) - 1)\n  #define BFE(x,y,z)  (((x) >> (y)) & BIT_MASK (z))\n\n  return BFE (a, b, c);\n\n  #undef BIT\n  #undef BIT_MASK\n  #undef BFE\n}\n\nDECLSPEC u32x hc_bytealign_be (const u32x a, const u32x b, const int c)\n{\n  u32x r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a << 24) | (b >>  8); }\n  else if (cm == 2) { r = (a << 16) | (b >> 16); }\n  else if (cm == 3) { r = (a <<  8) | (b >> 24); }\n\n  return r;\n}\n\nDECLSPEC u32 hc_bytealign_be_S (const u32 a, const u32 b, const int c)\n{\n  u32 r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a << 24) | (b >>  8); }\n  else if (cm == 2) { r = (a << 16) | (b >> 16); }\n  else if (cm == 3) { r = (a <<  8) | (b >> 24); }\n\n  return r;\n}\n\nDECLSPEC u32x hc_bytealign (const u32x a, const u32x b, const int c)\n{\n  u32x r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a >> 24) | (b <<  8); }\n  else if (cm == 2) { r = (a >> 16) | (b << 16); }\n  else if (cm == 3) { r = (a >>  8) | (b << 24); }\n\n  return r;\n}\n\nDECLSPEC u32 hc_bytealign_S (const u32 a, const u32 b, const int c)\n{\n  u32 r = 0;\n\n  const int cm = c & 3;\n\n       if (cm == 0) { r = b;                     }\n  else if (cm == 1) { r = (a >> 24) | (b <<  8); }\n  else if (cm == 2) { r = (a >> 16) | (b << 16); }\n  else if (cm == 3) { r = (a >>  8) | (b << 24); }\n\n  return r;\n}\n\nDECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)\n{\n  return a + b + c;\n}\n\nDECLSPEC u32 hc_add3_S (const u32 a, const u32 b, const u32 c)\n{\n  return a + b + c;\n}\n\nDECLSPEC u32x hc_lop_0x96 (const u32x a, const u32x b, const u32x c)\n{\n  return a ^ b ^ c;\n}\n\nDECLSPEC u32 hc_lop_0x96_S (const u32 a, const u32 b, const u32 c)\n{\n  return a ^ b ^ c;\n}\n\n#endif\n\n/**\n * pure scalar functions\n */\n\nDECLSPEC int ffz (const u32 v)\n{\n  #ifdef _unroll\n  #pragma unroll\n  #endif\n  for (int i = 0; i < 32; i++)\n  {\n    if ((v >> i) & 1) continue;\n\n    return i;\n  }\n\n  return -1;\n}\n\n#ifdef KERNEL_STATIC\nDECLSPEC int hash_comp (PRIVATE_AS const u32 *d1, GLOBAL_AS const u32 *d2)\n{\n  if (d1[3] > d2[DGST_R3]) return ( 1);\n  if (d1[3] < d2[DGST_R3]) return (-1);\n  if (d1[2] > d2[DGST_R2]) return ( 1);\n  if (d1[2] < d2[DGST_R2]) return (-1);\n  if (d1[1] > d2[DGST_R1]) return ( 1);\n  if (d1[1] < d2[DGST_R1]) return (-1);\n  if (d1[0] > d2[DGST_R0]) return ( 1);\n  if (d1[0] < d2[DGST_R0]) return (-1);\n\n  return (0);\n}\n\nDECLSPEC int find_hash (PRIVATE_AS const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf)\n{\n  for (u32 l = 0, r = digests_cnt; r; r >>= 1)\n  {\n    const u32 m = r >> 1;\n\n    const u32 c = l + m;\n\n    const int cmp = hash_comp (digest, digests_buf[c].digest_buf);\n\n    if (cmp > 0)\n    {\n      l += m + 1;\n\n      r--;\n    }\n\n    if (cmp == 0) return (c);\n  }\n\n  return (-1);\n}\n#endif\n\n// Input has to be zero padded and buffer size has to be multiple of 4 and at least of length 24\n// We simply ignore buffer length for the first 24 bytes for some extra speed boost :)\n// Number of unrolls found by simply testing what gave best results\n\nDECLSPEC int hc_enc_scan (PRIVATE_AS const u32 *buf, const int len)\n{\n  if (buf[0] & 0x80808080) return 1;\n  if (buf[1] & 0x80808080) return 1;\n  if (buf[2] & 0x80808080) return 1;\n  if (buf[3] & 0x80808080) return 1;\n  if (buf[4] & 0x80808080) return 1;\n  if (buf[5] & 0x80808080) return 1;\n\n  for (int i = 24, j = 6; i < len; i += 4, j += 1)\n  {\n    if (buf[j] & 0x80808080) return 1;\n  }\n\n  return 0;\n}\n\nDECLSPEC int hc_enc_scan_global (GLOBAL_AS const u32 *buf, const int len)\n{\n  if (buf[0] & 0x80808080) return 1;\n  if (buf[1] & 0x80808080) return 1;\n  if (buf[2] & 0x80808080) return 1;\n  if (buf[3] & 0x80808080) return 1;\n  if (buf[4] & 0x80808080) return 1;\n  if (buf[5] & 0x80808080) return 1;\n\n  for (int i = 24, j = 6; i < len; i += 4, j += 1)\n  {\n    if (buf[j] & 0x80808080) return 1;\n  }\n\n  return 0;\n}\n\n// Constants and some code snippets from unicode.org's ConvertUTF.c\n// Compiler can perfectly translate some of the branches and switch cases this into MOVC\n// which is faster than lookup tables\n\n#define halfShift 10\n\n#define halfBase 0x0010000\n#define halfMask 0x3FF\n\n#define UNI_MAX_BMP          0xFFFF\n#define UNI_SUR_HIGH_START   0xD800\n#define UNI_SUR_HIGH_END     0xDBFF\n#define UNI_SUR_LOW_START    0xDC00\n#define UNI_SUR_LOW_END      0xDFFF\n\n/*\n * Magic values subtracted from a buffer value during UTF8 conversion.\n * This table contains as many values as there might be trailing bytes\n * in a UTF-8 sequence.\n */\n\n#define offsetsFromUTF8_0 0x00000000UL\n#define offsetsFromUTF8_1 0x00003080UL\n#define offsetsFromUTF8_2 0x000E2080UL\n#define offsetsFromUTF8_3 0x03C82080UL\n#define offsetsFromUTF8_4 0xFA082080UL\n#define offsetsFromUTF8_5 0x82082080UL\n\nDECLSPEC void hc_enc_init (PRIVATE_AS hc_enc_t *hc_enc)\n{\n  hc_enc->pos = 0;\n\n  hc_enc->cbuf = 0;\n  hc_enc->clen = 0;\n}\n\nDECLSPEC int hc_enc_has_next (PRIVATE_AS hc_enc_t *hc_enc, const int sz)\n{\n  if (hc_enc->pos < sz) return 1;\n\n  if (hc_enc->clen) return 1;\n\n  return 0;\n}\n\nDECLSPEC int hc_enc_validate_utf8 (PRIVATE_AS const u32 *src_buf, const int src_pos, const int extraBytesToRead)\n{\n  PRIVATE_AS const u8 *src_ptr = (PRIVATE_AS const u8 *) src_buf;\n\n  if (extraBytesToRead == 0)\n  {\n    const u8 c0 = src_ptr[src_pos + 0]; if (c0 >= 0x80) return 0;\n  }\n  else if (extraBytesToRead == 1)\n  {\n    const u8 c0 = src_ptr[src_pos + 0]; if ((c0 < 0xc2) || (c0 > 0xdf)) return 0;\n    const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n  }\n  else if (extraBytesToRead == 2)\n  {\n    const u8 c0 = src_ptr[src_pos + 0];\n\n    if ((c0 >= 0xe0) && (c0 <= 0xe0))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0xa0) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xe1) && (c0 <= 0xec))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xed) && (c0 <= 0xed))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0x9f)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xee) && (c0 <= 0xef))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else\n    {\n      return 0;\n    }\n  }\n  else if (extraBytesToRead == 3)\n  {\n    const u8 c0 = src_ptr[src_pos + 0];\n\n    if ((c0 >= 0xf0) && (c0 <= 0xf0))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x90) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n      const u8 c3 = src_ptr[src_pos + 3]; if ((c3 < 0x80) || (c3 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xf1) && (c0 <= 0xf3))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n      const u8 c3 = src_ptr[src_pos + 3]; if ((c3 < 0x80) || (c3 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xf4) && (c0 <= 0xf4))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n      const u8 c3 = src_ptr[src_pos + 3]; if ((c3 < 0x80) || (c3 > 0xbf)) return 0;\n    }\n    else\n    {\n      return 0;\n    }\n  }\n\n  return 1;\n}\n\nDECLSPEC int hc_enc_validate_utf8_global (GLOBAL_AS const u32 *src_buf, const int src_pos, const int extraBytesToRead)\n{\n  GLOBAL_AS const u8 *src_ptr = (GLOBAL_AS const u8 *) src_buf;\n\n  if (extraBytesToRead == 0)\n  {\n    const u8 c0 = src_ptr[src_pos + 0]; if (c0 >= 0x80) return 0;\n  }\n  else if (extraBytesToRead == 1)\n  {\n    const u8 c0 = src_ptr[src_pos + 0]; if ((c0 < 0xc2) || (c0 > 0xdf)) return 0;\n    const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n  }\n  else if (extraBytesToRead == 2)\n  {\n    const u8 c0 = src_ptr[src_pos + 0];\n\n    if ((c0 >= 0xe0) && (c0 <= 0xe0))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0xa0) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xe1) && (c0 <= 0xec))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xed) && (c0 <= 0xed))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0x9f)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xee) && (c0 <= 0xef))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n    }\n    else\n    {\n      return 0;\n    }\n  }\n  else if (extraBytesToRead == 3)\n  {\n    const u8 c0 = src_ptr[src_pos + 0];\n\n    if ((c0 >= 0xf0) && (c0 <= 0xf0))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x90) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n      const u8 c3 = src_ptr[src_pos + 3]; if ((c3 < 0x80) || (c3 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xf1) && (c0 <= 0xf3))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n      const u8 c3 = src_ptr[src_pos + 3]; if ((c3 < 0x80) || (c3 > 0xbf)) return 0;\n    }\n    else if ((c0 >= 0xf4) && (c0 <= 0xf4))\n    {\n      const u8 c1 = src_ptr[src_pos + 1]; if ((c1 < 0x80) || (c1 > 0xbf)) return 0;\n      const u8 c2 = src_ptr[src_pos + 2]; if ((c2 < 0x80) || (c2 > 0xbf)) return 0;\n      const u8 c3 = src_ptr[src_pos + 3]; if ((c3 < 0x80) || (c3 > 0xbf)) return 0;\n    }\n    else\n    {\n      return 0;\n    }\n  }\n\n  return 1;\n}\n\n// Input buffer and Output buffer size has to be multiple of 4 and at least of size 4.\n// The output buffer is not zero padded, so entire buffer has to be set all zero before entering this function or truncated afterwards.\n\nDECLSPEC int hc_enc_next (PRIVATE_AS hc_enc_t *hc_enc, PRIVATE_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz)\n{\n  PRIVATE_AS const u8 *src_ptr = (PRIVATE_AS const u8 *) src_buf;\n  PRIVATE_AS       u8 *dst_ptr = (PRIVATE_AS       u8 *) dst_buf;\n\n  int src_pos = hc_enc->pos;\n\n  #if VENDOR_ID == 8\n  // Work around segmentation fault in Intel JiT\n  // Tested with 2021.12.6.0.19_160000\n  volatile\n  #endif\n\n  int dst_pos = hc_enc->clen;\n\n  dst_buf[0] = hc_enc->cbuf;\n\n  hc_enc->clen = 0;\n  hc_enc->cbuf = 0;\n\n  while ((src_pos < src_len) && (dst_pos < dst_sz))\n  {\n    const u8 c = src_ptr[src_pos];\n\n    int extraBytesToRead = 0;\n\n    if (c >= 0xfc)\n    {\n      // old version, doesnt work with https://github.com/hashcat/hashcat/issues/3592\n      //extraBytesToRead = 5;\n    }\n    else if (c >= 0xf8)\n    {\n      // old version, doesnt work with https://github.com/hashcat/hashcat/issues/3592\n      //extraBytesToRead = 4;\n    }\n    else if (c >= 0xf0)\n    {\n      extraBytesToRead = 3;\n    }\n    else if (c >= 0xe0)\n    {\n      extraBytesToRead = 2;\n    }\n    else if (c >= 0xc0)\n    {\n      extraBytesToRead = 1;\n    }\n\n    if ((src_pos + extraBytesToRead) >= src_sz)\n    {\n      // broken input\n\n      hc_enc->pos = src_len;\n\n      return -1;\n    }\n\n    if (hc_enc_validate_utf8 (src_buf, src_pos, extraBytesToRead) == 0)\n    {\n      // broken input\n\n      hc_enc->pos = src_len;\n\n      return -1;\n    }\n\n    u32 ch = 0;\n\n    switch (extraBytesToRead)\n    {\n      // old version, doesnt work with https://github.com/hashcat/hashcat/issues/3592\n      /*\n      case 5:\n        ch += src_ptr[src_pos++]; ch <<= 6; // remember, illegal UTF-8\n        ch += src_ptr[src_pos++]; ch <<= 6; // remember, illegal UTF-8\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_5;\n        break;\n      case 4:\n        ch += src_ptr[src_pos++]; ch <<= 6; // remember, illegal UTF-8\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_4;\n        break;\n      */\n      case 3:\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_3;\n        break;\n      case 2:\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_2;\n        break;\n      case 1:\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_1;\n        break;\n      case 0:\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_0;\n        break;\n    }\n\n    /* Target is a character <= 0xFFFF */\n    if (ch <= UNI_MAX_BMP)\n    {\n      dst_ptr[dst_pos++] = (ch >> 0) & 0xff;\n      dst_ptr[dst_pos++] = (ch >> 8) & 0xff;\n    }\n    else\n    {\n      ch -= halfBase;\n\n      const u32 a = ((ch >> halfShift) + UNI_SUR_HIGH_START);\n      const u32 b = ((ch  & halfMask)  + UNI_SUR_LOW_START);\n\n      if ((dst_pos + 2) == dst_sz)\n      {\n        dst_ptr[dst_pos++] = (a >> 0) & 0xff;\n        dst_ptr[dst_pos++] = (a >> 8) & 0xff;\n\n        hc_enc->cbuf = b & 0xffff;\n        hc_enc->clen = 2;\n      }\n      else\n      {\n        dst_ptr[dst_pos++] = (a >> 0) & 0xff;\n        dst_ptr[dst_pos++] = (a >> 8) & 0xff;\n        dst_ptr[dst_pos++] = (b >> 0) & 0xff;\n        dst_ptr[dst_pos++] = (b >> 8) & 0xff;\n      }\n    }\n  }\n\n  hc_enc->pos = src_pos;\n\n  return dst_pos;\n}\n\nDECLSPEC int hc_enc_next_global (PRIVATE_AS hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz)\n{\n  GLOBAL_AS  const u8 *src_ptr = (GLOBAL_AS  const u8 *) src_buf;\n  PRIVATE_AS       u8 *dst_ptr = (PRIVATE_AS       u8 *) dst_buf;\n\n  int src_pos = hc_enc->pos;\n\n  #if VENDOR_ID == 8\n  // Work around segmentation fault in Intel JiT\n  // Tested with 2021.12.6.0.19_160000\n  volatile\n  #endif\n\n  int dst_pos = hc_enc->clen;\n\n  dst_buf[0] = hc_enc->cbuf;\n\n  hc_enc->clen = 0;\n  hc_enc->cbuf = 0;\n\n  while ((src_pos < src_len) && (dst_pos < dst_sz))\n  {\n    const u8 c = src_ptr[src_pos];\n\n    int extraBytesToRead = 0;\n\n    if (c >= 0xfc)\n    {\n      // old version, doesnt work with https://github.com/hashcat/hashcat/issues/3592\n      //extraBytesToRead = 5;\n    }\n    else if (c >= 0xf8)\n    {\n      // old version, doesnt work with https://github.com/hashcat/hashcat/issues/3592\n      //extraBytesToRead = 4;\n    }\n    else if (c >= 0xf0)\n    {\n      extraBytesToRead = 3;\n    }\n    else if (c >= 0xe0)\n    {\n      extraBytesToRead = 2;\n    }\n    else if (c >= 0xc0)\n    {\n      extraBytesToRead = 1;\n    }\n\n    if ((src_pos + extraBytesToRead) >= src_sz)\n    {\n      // broken input\n\n      hc_enc->pos = src_len;\n\n      return -1;\n    }\n\n    if (hc_enc_validate_utf8_global (src_buf, src_pos, extraBytesToRead) == 0)\n    {\n      // broken input\n\n      hc_enc->pos = src_len;\n\n      return -1;\n    }\n\n    u32 ch = 0;\n\n    switch (extraBytesToRead)\n    {\n      // old version, doesnt work with https://github.com/hashcat/hashcat/issues/3592\n      /*\n      case 5:\n        ch += src_ptr[src_pos++]; ch <<= 6; // remember, illegal UTF-8\n        ch += src_ptr[src_pos++]; ch <<= 6; // remember, illegal UTF-8\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_5;\n        break;\n      case 4:\n        ch += src_ptr[src_pos++]; ch <<= 6; // remember, illegal UTF-8\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_4;\n        break;\n      */\n      case 3:\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_3;\n        break;\n      case 2:\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_2;\n        break;\n      case 1:\n        ch += src_ptr[src_pos++]; ch <<= 6;\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_1;\n        break;\n      case 0:\n        ch += src_ptr[src_pos++];\n        ch -= offsetsFromUTF8_0;\n        break;\n    }\n\n    /* Target is a character <= 0xFFFF */\n    if (ch <= UNI_MAX_BMP)\n    {\n      dst_ptr[dst_pos++] = (ch >> 0) & 0xff;\n      dst_ptr[dst_pos++] = (ch >> 8) & 0xff;\n    }\n    else\n    {\n      ch -= halfBase;\n\n      const u32 a = ((ch >> halfShift) + UNI_SUR_HIGH_START);\n      const u32 b = ((ch  & halfMask)  + UNI_SUR_LOW_START);\n\n      if ((dst_pos + 2) == dst_sz)\n      {\n        // this section seems to break intel opencl runtime but is unknown why\n\n        dst_ptr[dst_pos++] = (a >> 0) & 0xff;\n        dst_ptr[dst_pos++] = (a >> 8) & 0xff;\n\n        hc_enc->cbuf = b & 0xffff;\n        hc_enc->clen = 2;\n      }\n      else\n      {\n        dst_ptr[dst_pos++] = (a >> 0) & 0xff;\n        dst_ptr[dst_pos++] = (a >> 8) & 0xff;\n        dst_ptr[dst_pos++] = (b >> 0) & 0xff;\n        dst_ptr[dst_pos++] = (b >> 8) & 0xff;\n      }\n    }\n  }\n\n  hc_enc->pos = src_pos;\n\n  return dst_pos;\n}\n\n#undef halfShift\n\n#undef halfBase\n#undef halfMask\n\n#undef UNI_MAX_BMP\n#undef UNI_SUR_HIGH_START\n#undef UNI_SUR_HIGH_END\n#undef UNI_SUR_LOW_START\n#undef UNI_SUR_LOW_END\n\n#undef offsetsFromUTF8_0\n#undef offsetsFromUTF8_1\n#undef offsetsFromUTF8_2\n#undef offsetsFromUTF8_3\n#undef offsetsFromUTF8_4\n#undef offsetsFromUTF8_5\n\nDECLSPEC int pkcs_padding_bs8 (PRIVATE_AS const u32 *data_buf, const int data_len)\n{\n  if (data_len == 0) return -1; // cannot have zero length, is important to avoid out of boundary reads\n\n  if (data_len % 8) return -1; // has to be a multiple of block size\n\n  const int last_pad_pos = data_len - 1;\n\n  const int last_pad_elem = last_pad_pos / 4;\n\n  const u32 pad = data_buf[last_pad_elem] >> 24; // guaranteed by pkcs structure\n\n  if ((pad < 1) || (pad > 8)) return -1; // pkcs pads are not zero based\n\n  const u32 padm = (pad <<  0)\n                 | (pad <<  8)\n                 | (pad << 16)\n                 | (pad << 24);\n\n  u32 mask0 = 0;\n  u32 mask1 = 0;\n\n  switch (pad)\n  {\n    case  1:  mask0 = 0x00000000; mask1 = 0xff000000; break;\n    case  2:  mask0 = 0x00000000; mask1 = 0xffff0000; break;\n    case  3:  mask0 = 0x00000000; mask1 = 0xffffff00; break;\n    case  4:  mask0 = 0x00000000; mask1 = 0xffffffff; break;\n    case  5:  mask0 = 0xff000000; mask1 = 0xffffffff; break;\n    case  6:  mask0 = 0xffff0000; mask1 = 0xffffffff; break;\n    case  7:  mask0 = 0xffffff00; mask1 = 0xffffffff; break;\n    case  8:  mask0 = 0xffffffff; mask1 = 0xffffffff; break;\n  }\n\n  const u32 data0 = data_buf[last_pad_elem - 1];\n  const u32 data1 = data_buf[last_pad_elem - 0];\n\n  if ((data0 & mask0) != (padm & mask0)) return -1;\n  if ((data1 & mask1) != (padm & mask1)) return -1;\n\n  const int real_len = data_len - pad;\n\n  return real_len;\n}\n\nDECLSPEC int pkcs_padding_bs16 (PRIVATE_AS const u32 *data_buf, const int data_len)\n{\n  if (data_len == 0) return -1; // cannot have zero length, is important to avoid out of boundary reads\n\n  if (data_len % 16) return -1; // has to be a multiple of block size\n\n  const int last_pad_pos = data_len - 1;\n\n  const int last_pad_elem = last_pad_pos / 4;\n\n  const u32 pad = data_buf[last_pad_elem] >> 24; // guaranteed by pkcs structure\n\n  if ((pad < 1) || (pad > 16)) return -1; // pkcs pads are not zero based\n\n  const u32 padm = (pad <<  0)\n                 | (pad <<  8)\n                 | (pad << 16)\n                 | (pad << 24);\n\n  u32 mask0 = 0;\n  u32 mask1 = 0;\n  u32 mask2 = 0;\n  u32 mask3 = 0;\n\n  switch (pad)\n  {\n    case  1:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0x00000000; mask3 = 0xff000000; break;\n    case  2:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0x00000000; mask3 = 0xffff0000; break;\n    case  3:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0x00000000; mask3 = 0xffffff00; break;\n    case  4:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0x00000000; mask3 = 0xffffffff; break;\n    case  5:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0xff000000; mask3 = 0xffffffff; break;\n    case  6:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0xffff0000; mask3 = 0xffffffff; break;\n    case  7:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0xffffff00; mask3 = 0xffffffff; break;\n    case  8:  mask0 = 0x00000000; mask1 = 0x00000000; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case  9:  mask0 = 0x00000000; mask1 = 0xff000000; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 10:  mask0 = 0x00000000; mask1 = 0xffff0000; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 11:  mask0 = 0x00000000; mask1 = 0xffffff00; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 12:  mask0 = 0x00000000; mask1 = 0xffffffff; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 13:  mask0 = 0xff000000; mask1 = 0xffffffff; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 14:  mask0 = 0xffff0000; mask1 = 0xffffffff; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 15:  mask0 = 0xffffff00; mask1 = 0xffffffff; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n    case 16:  mask0 = 0xffffffff; mask1 = 0xffffffff; mask2 = 0xffffffff; mask3 = 0xffffffff; break;\n  }\n\n  const u32 data0 = data_buf[last_pad_elem - 3];\n  const u32 data1 = data_buf[last_pad_elem - 2];\n  const u32 data2 = data_buf[last_pad_elem - 1];\n  const u32 data3 = data_buf[last_pad_elem - 0];\n\n  if ((data0 & mask0) != (padm & mask0)) return -1;\n  if ((data1 & mask1) != (padm & mask1)) return -1;\n  if ((data2 & mask2) != (padm & mask2)) return -1;\n  if ((data3 & mask3) != (padm & mask3)) return -1;\n\n  const int real_len = data_len - pad;\n\n  return real_len;\n}\n\nDECLSPEC int asn1_detect (PRIVATE_AS const u32 *buf, const int len)\n{\n  if (len < 128)\n  {\n    if ((buf[0] & 0x00ff80ff) != 0x00020030) return 0;\n  }\n  else if (len < 256)\n  {\n    if ((buf[0] & 0xff00ffff) != 0x02008130) return 0;\n  }\n  else if (len < 65536)\n  {\n    if ((buf[0] & 0x0000ffff) != 0x00008230) return 0;\n    if ((buf[1] & 0x000000ff) != 0x00000002) return 0;\n  }\n\n  if (len < 128)\n  {\n    const int lenb = ((buf[0] & 0x00007f00) >>  8);\n\n    if ((lenb + 2) != len) return 0;\n  }\n  else if (len < 256)\n  {\n    const int lenb = ((buf[0] & 0x00ff0000) >> 16);\n\n    if ((lenb + 3) != len) return 0;\n  }\n  else if (len < 65536)\n  {\n    const int lenb = ((buf[0] & 0xff000000) >> 24)\n                   | ((buf[0] & 0x00ff0000) >>  8);\n\n    if ((lenb + 4) != len) return 0;\n  }\n\n  return 1;\n}\n\nDECLSPEC u32 check_bitmap (GLOBAL_AS const u32 *bitmap, const u32 bitmap_mask, const u32 bitmap_shift, const u32 digest)\n{\n  return (bitmap[(digest >> bitmap_shift) & bitmap_mask] & (1 << (digest & 0x1f)));\n}\n\nDECLSPEC u32 check (PRIVATE_AS const u32 *digest, GLOBAL_AS const u32 *bitmap_s1_a, GLOBAL_AS const u32 *bitmap_s1_b, GLOBAL_AS const u32 *bitmap_s1_c, GLOBAL_AS const u32 *bitmap_s1_d, GLOBAL_AS const u32 *bitmap_s2_a, GLOBAL_AS const u32 *bitmap_s2_b, GLOBAL_AS const u32 *bitmap_s2_c, GLOBAL_AS const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2)\n{\n  if (check_bitmap (bitmap_s1_a, bitmap_mask, bitmap_shift1, digest[0]) == 0) return (0);\n  if (check_bitmap (bitmap_s1_b, bitmap_mask, bitmap_shift1, digest[1]) == 0) return (0);\n  if (check_bitmap (bitmap_s1_c, bitmap_mask, bitmap_shift1, digest[2]) == 0) return (0);\n  if (check_bitmap (bitmap_s1_d, bitmap_mask, bitmap_shift1, digest[3]) == 0) return (0);\n\n  if (check_bitmap (bitmap_s2_a, bitmap_mask, bitmap_shift2, digest[0]) == 0) return (0);\n  if (check_bitmap (bitmap_s2_b, bitmap_mask, bitmap_shift2, digest[1]) == 0) return (0);\n  if (check_bitmap (bitmap_s2_c, bitmap_mask, bitmap_shift2, digest[2]) == 0) return (0);\n  if (check_bitmap (bitmap_s2_d, bitmap_mask, bitmap_shift2, digest[3]) == 0) return (0);\n\n  return (1);\n}\n\nDECLSPEC void mark_hash (GLOBAL_AS plain_t *plains_buf, GLOBAL_AS u32 *d_result, const u32 salt_pos, const u32 digests_cnt, const u32 digest_pos, const u32 hash_pos, const u64 gid, const u32 il_pos, const u32 extra1, const u32 extra2)\n{\n  const u32 idx = hc_atomic_inc (d_result);\n\n  #if ATTACK_MODE == 9\n\n  #else\n  if (idx >= digests_cnt)\n  {\n    // this is kind of tricky: we *must* call hc_atomic_inc() to know about the current value from a multi-thread perspective\n    // this action creates a buffer overflow, so we need to fix it here\n\n    hc_atomic_dec (d_result);\n\n    return;\n  }\n  #endif\n\n  plains_buf[idx].salt_pos   = salt_pos;\n  plains_buf[idx].digest_pos = digest_pos;  // relative\n  plains_buf[idx].hash_pos   = hash_pos;    // absolute\n  plains_buf[idx].gidvid     = gid;\n  plains_buf[idx].il_pos     = il_pos;\n  plains_buf[idx].extra1     = extra1;      // unused so far\n  plains_buf[idx].extra2     = extra2;      // unused so far\n}\n\nDECLSPEC int hc_count_char (PRIVATE_AS const u32 *buf, const int elems, const u32 c)\n{\n  int r = 0;\n\n  for (int i = 0; i < elems; i++)\n  {\n    const u32 v = buf[i];\n\n    if (((v >>  0) & 0xff) == c) r++;\n    if (((v >>  8) & 0xff) == c) r++;\n    if (((v >> 16) & 0xff) == c) r++;\n    if (((v >> 24) & 0xff) == c) r++;\n  }\n\n  return r;\n}\n\nDECLSPEC float hc_get_entropy (PRIVATE_AS const u32 *buf, const int elems)\n{\n  const int length = elems * 4;\n\n  float entropy = 0.0f;\n\n  #ifdef _unroll\n  #pragma unroll\n  #endif\n  for (u32 c = 0; c < 256; c++)\n  {\n    const int r = hc_count_char (buf, elems, c);\n\n    if (r == 0) continue;\n\n    float w = (float) r / length;\n\n    entropy += -w * log2 (w);\n  }\n\n  return entropy;\n}\n\nDECLSPEC int is_valid_hex_8 (const u8 v)\n{\n  // direct lookup table is slower thanks to CMOV\n\n  if ((v >= (u8) '0') && (v <= (u8) '9')) return 1;\n  if ((v >= (u8) 'a') && (v <= (u8) 'f')) return 1;\n\n  return 0;\n}\n\nDECLSPEC int is_valid_hex_32 (const u32 v)\n{\n  if (is_valid_hex_8 ((u8) (v >>  0)) == 0) return 0;\n  if (is_valid_hex_8 ((u8) (v >>  8)) == 0) return 0;\n  if (is_valid_hex_8 ((u8) (v >> 16)) == 0) return 0;\n  if (is_valid_hex_8 ((u8) (v >> 24)) == 0) return 0;\n\n  return 1;\n}\n\nDECLSPEC int is_valid_base58_8 (const u8 v)\n{\n  if (v > (u8) 'z') return 0;\n  if (v < (u8) '1') return 0;\n  if ((v > (u8) '9') && (v < (u8) 'A')) return 0;\n  if ((v > (u8) 'Z') && (v < (u8) 'a')) return 0;\n\n  // https://github.com/hashcat/hashcat/issues/3878\n  if (v == 'O') return 0;\n  if (v == 'I') return 0;\n  if (v == 'l') return 0;\n\n  return 1;\n}\n\nDECLSPEC int is_valid_base58_32 (const u32 v)\n{\n  if (is_valid_base58_8 ((u8) (v >>  0)) == 0) return 0;\n  if (is_valid_base58_8 ((u8) (v >>  8)) == 0) return 0;\n  if (is_valid_base58_8 ((u8) (v >> 16)) == 0) return 0;\n  if (is_valid_base58_8 ((u8) (v >> 24)) == 0) return 0;\n\n  return 1;\n}\n\nDECLSPEC int is_valid_printable_8 (const u8 v)\n{\n  if (v > (u8) 0x7e) return 0;\n  if (v < (u8) 0x20) return 0;\n\n  return 1;\n}\n\nDECLSPEC int is_valid_printable_32 (const u32 v)\n{\n  if (is_valid_printable_8 ((u8) (v >>  0)) == 0) return 0;\n  if (is_valid_printable_8 ((u8) (v >>  8)) == 0) return 0;\n  if (is_valid_printable_8 ((u8) (v >> 16)) == 0) return 0;\n  if (is_valid_printable_8 ((u8) (v >> 24)) == 0) return 0;\n\n  return 1;\n}\n\nDECLSPEC int hc_find_keyboard_layout_map (const u32 search, const int search_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt)\n{\n  for (int idx = 0; idx < keyboard_layout_mapping_cnt; idx++)\n  {\n    const u32 src_char = s_keyboard_layout_mapping_buf[idx].src_char;\n    const int src_len  = s_keyboard_layout_mapping_buf[idx].src_len;\n\n    if (src_len == search_len)\n    {\n      const u32 mask = 0xffffffff >> ((4 - search_len) * 8);\n\n      if ((src_char & mask) == (search & mask)) return idx;\n    }\n  }\n\n  return -1;\n}\n\nDECLSPEC int hc_execute_keyboard_layout_mapping (PRIVATE_AS u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt)\n{\n  u32 out_buf[32] = { 0 };\n\n  PRIVATE_AS u8 *out_ptr = (PRIVATE_AS u8 *) out_buf;\n\n  int out_len = 0;\n\n  // TC/VC passwords are limited to 128\n\n  PRIVATE_AS u8 *w_ptr = (PRIVATE_AS u8 *) w;\n\n  int pw_pos = 0;\n\n  while (pw_pos < pw_len)\n  {\n    u32 src0 = 0;\n    u32 src1 = 0;\n    u32 src2 = 0;\n    u32 src3 = 0;\n\n    #define MIN(a,b) (((a) < (b)) ? (a) : (b))\n\n    const int rem = MIN (pw_len - pw_pos, 4);\n\n    #undef MIN\n\n    if (rem > 0) src0 = w_ptr[pw_pos + 0];\n    if (rem > 1) src1 = w_ptr[pw_pos + 1];\n    if (rem > 2) src2 = w_ptr[pw_pos + 2];\n    if (rem > 3) src3 = w_ptr[pw_pos + 3];\n\n    const u32 src = (src0 <<  0)\n                  | (src1 <<  8)\n                  | (src2 << 16)\n                  | (src3 << 24);\n\n    int src_len;\n\n    for (src_len = rem; src_len > 0; src_len--)\n    {\n      const int idx = hc_find_keyboard_layout_map (src, src_len, s_keyboard_layout_mapping_buf, keyboard_layout_mapping_cnt);\n\n      if (idx == -1) continue;\n\n      u32 dst_char = s_keyboard_layout_mapping_buf[idx].dst_char;\n      int dst_len  = s_keyboard_layout_mapping_buf[idx].dst_len;\n\n      switch (dst_len)\n      {\n        case 1:\n          out_ptr[out_len++] = (dst_char >>  0) & 0xff;\n          break;\n        case 2:\n          out_ptr[out_len++] = (dst_char >>  0) & 0xff;\n          out_ptr[out_len++] = (dst_char >>  8) & 0xff;\n          break;\n        case 3:\n          out_ptr[out_len++] = (dst_char >>  0) & 0xff;\n          out_ptr[out_len++] = (dst_char >>  8) & 0xff;\n          out_ptr[out_len++] = (dst_char >> 16) & 0xff;\n          break;\n        case 4:\n          out_ptr[out_len++] = (dst_char >>  0) & 0xff;\n          out_ptr[out_len++] = (dst_char >>  8) & 0xff;\n          out_ptr[out_len++] = (dst_char >> 16) & 0xff;\n          out_ptr[out_len++] = (dst_char >> 24) & 0xff;\n          break;\n      }\n\n      pw_pos += src_len;\n\n      break;\n    }\n\n    // not matched, keep original\n\n    if (src_len == 0)\n    {\n      out_ptr[out_len] = w_ptr[pw_pos];\n\n      out_len++;\n\n      pw_pos++;\n    }\n  }\n\n  w[ 0] = out_buf[ 0];\n  w[ 1] = out_buf[ 1];\n  w[ 2] = out_buf[ 2];\n  w[ 3] = out_buf[ 3];\n  w[ 4] = out_buf[ 4];\n  w[ 5] = out_buf[ 5];\n  w[ 6] = out_buf[ 6];\n  w[ 7] = out_buf[ 7];\n  w[ 8] = out_buf[ 8];\n  w[ 9] = out_buf[ 9];\n  w[10] = out_buf[10];\n  w[11] = out_buf[11];\n  w[12] = out_buf[12];\n  w[13] = out_buf[13];\n  w[14] = out_buf[14];\n  w[15] = out_buf[15];\n  w[16] = out_buf[16];\n  w[17] = out_buf[17];\n  w[18] = out_buf[18];\n  w[19] = out_buf[19];\n  w[20] = out_buf[20];\n  w[21] = out_buf[21];\n  w[22] = out_buf[22];\n  w[23] = out_buf[23];\n  w[24] = out_buf[24];\n  w[25] = out_buf[25];\n  w[26] = out_buf[26];\n  w[27] = out_buf[27];\n  w[28] = out_buf[28];\n  w[29] = out_buf[29];\n  w[30] = out_buf[30];\n  w[31] = out_buf[31];\n\n  return out_len;\n}\n\nDECLSPEC int count_bits_32 (const u32 v0, const u32 v1)\n{\n  u32 r = v0 ^ v1;\n\n  if (r == 0) return 0;\n\n  // from https://stackoverflow.com/questions/109023/count-the-number-of-set-bits-in-a-32-bit-integer\n\n  r = r - ((r >> 1) & 0x55555555);                  // add pairs of bits\n  r = (r & 0x33333333) + ((r >> 2) & 0x33333333);   // quads\n  r = (r + (r >> 4)) & 0x0F0F0F0F;                  // groups of 8\n  r *= 0x01010101;                                  // horizontal sum of bytes\n\n  // return just that top byte (after truncating to 32-bit even when int is wider than uint32_t)\n\n  return r >> 24;\n}\n\n/**\n * vector functions\n */\n\nDECLSPEC void make_utf16be (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x3727);\n  out2[2] = hc_byte_perm (in[3], 0, 0x1707);\n  out2[1] = hc_byte_perm (in[2], 0, 0x3727);\n  out2[0] = hc_byte_perm (in[2], 0, 0x1707);\n  out1[3] = hc_byte_perm (in[1], 0, 0x3727);\n  out1[2] = hc_byte_perm (in[1], 0, 0x1707);\n  out1[1] = hc_byte_perm (in[0], 0, 0x3727);\n  out1[0] = hc_byte_perm (in[0], 0, 0x1707);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x03070207);\n  out2[2] = hc_byte_perm (in[3], 0, 0x01070007);\n  out2[1] = hc_byte_perm (in[2], 0, 0x03070207);\n  out2[0] = hc_byte_perm (in[2], 0, 0x01070007);\n  out1[3] = hc_byte_perm (in[1], 0, 0x03070207);\n  out1[2] = hc_byte_perm (in[1], 0, 0x01070007);\n  out1[1] = hc_byte_perm (in[0], 0, 0x03070207);\n  out1[0] = hc_byte_perm (in[0], 0, 0x01070007);\n\n  #else\n\n  out2[3] = ((in[3] >>  0) & 0xFF000000) | ((in[3] >> 8) & 0x0000FF00);\n  out2[2] = ((in[3] << 16) & 0xFF000000) | ((in[3] << 8) & 0x0000FF00);\n  out2[1] = ((in[2] >>  0) & 0xFF000000) | ((in[2] >> 8) & 0x0000FF00);\n  out2[0] = ((in[2] << 16) & 0xFF000000) | ((in[2] << 8) & 0x0000FF00);\n  out1[3] = ((in[1] >>  0) & 0xFF000000) | ((in[1] >> 8) & 0x0000FF00);\n  out1[2] = ((in[1] << 16) & 0xFF000000) | ((in[1] << 8) & 0x0000FF00);\n  out1[1] = ((in[0] >>  0) & 0xFF000000) | ((in[0] >> 8) & 0x0000FF00);\n  out1[0] = ((in[0] << 16) & 0xFF000000) | ((in[0] << 8) & 0x0000FF00);\n\n  #endif\n}\n\nDECLSPEC void make_utf16beN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x1707);\n  out2[2] = hc_byte_perm (in[3], 0, 0x3727);\n  out2[1] = hc_byte_perm (in[2], 0, 0x1707);\n  out2[0] = hc_byte_perm (in[2], 0, 0x3727);\n  out1[3] = hc_byte_perm (in[1], 0, 0x1707);\n  out1[2] = hc_byte_perm (in[1], 0, 0x3727);\n  out1[1] = hc_byte_perm (in[0], 0, 0x1707);\n  out1[0] = hc_byte_perm (in[0], 0, 0x3727);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x01070007);\n  out2[2] = hc_byte_perm (in[3], 0, 0x03070207);\n  out2[1] = hc_byte_perm (in[2], 0, 0x01070007);\n  out2[0] = hc_byte_perm (in[2], 0, 0x03070207);\n  out1[3] = hc_byte_perm (in[1], 0, 0x01070007);\n  out1[2] = hc_byte_perm (in[1], 0, 0x03070207);\n  out1[1] = hc_byte_perm (in[0], 0, 0x01070007);\n  out1[0] = hc_byte_perm (in[0], 0, 0x03070207);\n\n  #else\n\n  out2[3] = ((in[3] << 16) & 0xFF000000) | ((in[3] << 8) & 0x0000FF00);\n  out2[2] = ((in[3] >>  0) & 0xFF000000) | ((in[3] >> 8) & 0x0000FF00);\n  out2[1] = ((in[2] << 16) & 0xFF000000) | ((in[2] << 8) & 0x0000FF00);\n  out2[0] = ((in[2] >>  0) & 0xFF000000) | ((in[2] >> 8) & 0x0000FF00);\n  out1[3] = ((in[1] << 16) & 0xFF000000) | ((in[1] << 8) & 0x0000FF00);\n  out1[2] = ((in[1] >>  0) & 0xFF000000) | ((in[1] >> 8) & 0x0000FF00);\n  out1[1] = ((in[0] << 16) & 0xFF000000) | ((in[0] << 8) & 0x0000FF00);\n  out1[0] = ((in[0] >>  0) & 0xFF000000) | ((in[0] >> 8) & 0x0000FF00);\n\n  #endif\n}\n\nDECLSPEC void make_utf16le (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x7372);\n  out2[2] = hc_byte_perm (in[3], 0, 0x7170);\n  out2[1] = hc_byte_perm (in[2], 0, 0x7372);\n  out2[0] = hc_byte_perm (in[2], 0, 0x7170);\n  out1[3] = hc_byte_perm (in[1], 0, 0x7372);\n  out1[2] = hc_byte_perm (in[1], 0, 0x7170);\n  out1[1] = hc_byte_perm (in[0], 0, 0x7372);\n  out1[0] = hc_byte_perm (in[0], 0, 0x7170);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x07030702);\n  out2[2] = hc_byte_perm (in[3], 0, 0x07010700);\n  out2[1] = hc_byte_perm (in[2], 0, 0x07030702);\n  out2[0] = hc_byte_perm (in[2], 0, 0x07010700);\n  out1[3] = hc_byte_perm (in[1], 0, 0x07030702);\n  out1[2] = hc_byte_perm (in[1], 0, 0x07010700);\n  out1[1] = hc_byte_perm (in[0], 0, 0x07030702);\n  out1[0] = hc_byte_perm (in[0], 0, 0x07010700);\n\n  #else\n\n  out2[3] = ((in[3] >> 8) & 0x00FF0000) | ((in[3] >> 16) & 0x000000FF);\n  out2[2] = ((in[3] << 8) & 0x00FF0000) | ((in[3] >>  0) & 0x000000FF);\n  out2[1] = ((in[2] >> 8) & 0x00FF0000) | ((in[2] >> 16) & 0x000000FF);\n  out2[0] = ((in[2] << 8) & 0x00FF0000) | ((in[2] >>  0) & 0x000000FF);\n  out1[3] = ((in[1] >> 8) & 0x00FF0000) | ((in[1] >> 16) & 0x000000FF);\n  out1[2] = ((in[1] << 8) & 0x00FF0000) | ((in[1] >>  0) & 0x000000FF);\n  out1[1] = ((in[0] >> 8) & 0x00FF0000) | ((in[0] >> 16) & 0x000000FF);\n  out1[0] = ((in[0] << 8) & 0x00FF0000) | ((in[0] >>  0) & 0x000000FF);\n\n  #endif\n}\n\nDECLSPEC void make_utf16leN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x7170);\n  out2[2] = hc_byte_perm (in[3], 0, 0x7372);\n  out2[1] = hc_byte_perm (in[2], 0, 0x7170);\n  out2[0] = hc_byte_perm (in[2], 0, 0x7372);\n  out1[3] = hc_byte_perm (in[1], 0, 0x7170);\n  out1[2] = hc_byte_perm (in[1], 0, 0x7372);\n  out1[1] = hc_byte_perm (in[0], 0, 0x7170);\n  out1[0] = hc_byte_perm (in[0], 0, 0x7372);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm (in[3], 0, 0x07010700);\n  out2[2] = hc_byte_perm (in[3], 0, 0x07030702);\n  out2[1] = hc_byte_perm (in[2], 0, 0x07010700);\n  out2[0] = hc_byte_perm (in[2], 0, 0x07030702);\n  out1[3] = hc_byte_perm (in[1], 0, 0x07010700);\n  out1[2] = hc_byte_perm (in[1], 0, 0x07030702);\n  out1[1] = hc_byte_perm (in[0], 0, 0x07010700);\n  out1[0] = hc_byte_perm (in[0], 0, 0x07030702);\n\n  #else\n\n  out2[3] = ((in[3] << 8) & 0x00FF0000) | ((in[3] >>  0) & 0x000000FF);\n  out2[2] = ((in[3] >> 8) & 0x00FF0000) | ((in[3] >> 16) & 0x000000FF);\n  out2[1] = ((in[2] << 8) & 0x00FF0000) | ((in[2] >>  0) & 0x000000FF);\n  out2[0] = ((in[2] >> 8) & 0x00FF0000) | ((in[2] >> 16) & 0x000000FF);\n  out1[3] = ((in[1] << 8) & 0x00FF0000) | ((in[1] >>  0) & 0x000000FF);\n  out1[2] = ((in[1] >> 8) & 0x00FF0000) | ((in[1] >> 16) & 0x000000FF);\n  out1[1] = ((in[0] << 8) & 0x00FF0000) | ((in[0] >>  0) & 0x000000FF);\n  out1[0] = ((in[0] >> 8) & 0x00FF0000) | ((in[0] >> 16) & 0x000000FF);\n\n  #endif\n}\n\nDECLSPEC void undo_utf16be (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out)\n{\n  #if defined IS_NV\n\n  out[0] = hc_byte_perm (in1[0], in1[1], 0x4602);\n  out[1] = hc_byte_perm (in1[2], in1[3], 0x4602);\n  out[2] = hc_byte_perm (in2[0], in2[1], 0x4602);\n  out[3] = hc_byte_perm (in2[2], in2[3], 0x4602);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out[0] = hc_byte_perm (in1[0], in1[1], 0x04060002);\n  out[1] = hc_byte_perm (in1[2], in1[3], 0x04060002);\n  out[2] = hc_byte_perm (in2[0], in2[1], 0x04060002);\n  out[3] = hc_byte_perm (in2[2], in2[3], 0x04060002);\n\n  #else\n\n  out[0] = ((in1[0] & 0x0000ff00) >>  8) | ((in1[0] & 0xff000000) >> 16)\n         | ((in1[1] & 0x0000ff00) <<  8) | ((in1[1] & 0xff000000) <<  0);\n  out[1] = ((in1[2] & 0x0000ff00) >>  8) | ((in1[2] & 0xff000000) >> 16)\n         | ((in1[3] & 0x0000ff00) <<  8) | ((in1[3] & 0xff000000) <<  0);\n  out[2] = ((in2[0] & 0x0000ff00) >>  8) | ((in2[0] & 0xff000000) >> 16)\n         | ((in2[1] & 0x0000ff00) <<  8) | ((in2[1] & 0xff000000) <<  0);\n  out[3] = ((in2[2] & 0x0000ff00) >>  8) | ((in2[2] & 0xff000000) >> 16)\n         | ((in2[3] & 0x0000ff00) <<  8) | ((in2[3] & 0xff000000) <<  0);\n\n  #endif\n}\n\nDECLSPEC void undo_utf16le (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out)\n{\n  #if defined IS_NV\n\n  out[0] = hc_byte_perm (in1[0], in1[1], 0x6420);\n  out[1] = hc_byte_perm (in1[2], in1[3], 0x6420);\n  out[2] = hc_byte_perm (in2[0], in2[1], 0x6420);\n  out[3] = hc_byte_perm (in2[2], in2[3], 0x6420);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out[0] = hc_byte_perm (in1[0], in1[1], 0x06040200);\n  out[1] = hc_byte_perm (in1[2], in1[3], 0x06040200);\n  out[2] = hc_byte_perm (in2[0], in2[1], 0x06040200);\n  out[3] = hc_byte_perm (in2[2], in2[3], 0x06040200);\n\n  #else\n\n  out[0] = ((in1[0] & 0x000000ff) >>  0) | ((in1[0] & 0x00ff0000) >>  8)\n         | ((in1[1] & 0x000000ff) << 16) | ((in1[1] & 0x00ff0000) <<  8);\n  out[1] = ((in1[2] & 0x000000ff) >>  0) | ((in1[2] & 0x00ff0000) >>  8)\n         | ((in1[3] & 0x000000ff) << 16) | ((in1[3] & 0x00ff0000) <<  8);\n  out[2] = ((in2[0] & 0x000000ff) >>  0) | ((in2[0] & 0x00ff0000) >>  8)\n         | ((in2[1] & 0x000000ff) << 16) | ((in2[1] & 0x00ff0000) <<  8);\n  out[3] = ((in2[2] & 0x000000ff) >>  0) | ((in2[2] & 0x00ff0000) >>  8)\n         | ((in2[3] & 0x000000ff) << 16) | ((in2[3] & 0x00ff0000) <<  8);\n\n  #endif\n}\n\nDECLSPEC void set_mark_1x4 (PRIVATE_AS u32 *v, const u32 offset)\n{\n  const u32 c = (offset & 15) / 4;\n  const u32 r = 0xff << ((offset & 3) * 8);\n\n  v[0] = (c == 0) ? r : 0;\n  v[1] = (c == 1) ? r : 0;\n  v[2] = (c == 2) ? r : 0;\n  v[3] = (c == 3) ? r : 0;\n}\n\nDECLSPEC void append_helper_1x4 (PRIVATE_AS u32x *r, const u32 v, PRIVATE_AS const u32 *m)\n{\n  r[0] |= v & m[0];\n  r[1] |= v & m[1];\n  r[2] |= v & m[2];\n  r[3] |= v & m[3];\n}\n\nDECLSPEC void append_0x80_1x4 (PRIVATE_AS u32x *w0, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4 (v, offset);\n\n  append_helper_1x4 (w0, 0x80808080, v);\n}\n\nDECLSPEC void append_0x80_2x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4 (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4 (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_3x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4 (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4 (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w2, ((offset16 == 2) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_4x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4 (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4 (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w2, ((offset16 == 2) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w3, ((offset16 == 3) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_8x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4 (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4 (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w2, ((offset16 == 2) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w3, ((offset16 == 3) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w4, ((offset16 == 4) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w5, ((offset16 == 5) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w6, ((offset16 == 6) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w7, ((offset16 == 7) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_1x16 (PRIVATE_AS u32x *w, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4 (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4 (w +  0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w +  4, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w +  8, ((offset16 == 2) ? 0x80808080 : 0), v);\n  append_helper_1x4 (w + 12, ((offset16 == 3) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void switch_buffer_by_offset_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_bytealign (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w3[3] = hc_bytealign (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_bytealign (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_bytealign (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_bytealign (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_bytealign (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_bytealign (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_bytealign (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_bytealign (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_bytealign (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_bytealign (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_bytealign (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_bytealign (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_bytealign (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_bytealign (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_bytealign (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[0] = hc_byte_perm (    0, w0[0], selector);\n\n      break;\n\n    case  1:\n      w3[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[1] = hc_byte_perm (    0, w0[0], selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[2] = hc_byte_perm (    0, w0[0], selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[3] = hc_byte_perm (    0, w0[0], selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[0] = hc_byte_perm (    0, w0[0], selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[1] = hc_byte_perm (    0, w0[0], selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[2] = hc_byte_perm (    0, w0[0], selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[3] = hc_byte_perm (    0, w0[0], selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[0] = hc_byte_perm (    0, w0[0], selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[1] = hc_byte_perm (    0, w0[0], selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[2] = hc_byte_perm (    0, w0[0], selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[3] = hc_byte_perm (    0, w0[0], selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[0] = hc_byte_perm (    0, w0[0], selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[1] = hc_byte_perm (    0, w0[0], selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[2] = hc_byte_perm (    0, w0[0], selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_byte_perm (    0, w0[0], selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign (w3[3],     0, offset);\n      w3[3] = hc_bytealign (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign (w3[3],     0, offset);\n      c0[0] = hc_bytealign (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign (w3[3],     0, offset);\n      c0[1] = hc_bytealign (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign (w3[3],     0, offset);\n      c0[2] = hc_bytealign (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign (w3[3],     0, offset);\n      c0[3] = hc_bytealign (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign (w3[3],     0, offset);\n      c1[0] = hc_bytealign (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign (w3[3],     0, offset);\n      c1[1] = hc_bytealign (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign (w3[3],     0, offset);\n      c1[2] = hc_bytealign (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign (w3[3],     0, offset);\n      c1[3] = hc_bytealign (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign (w3[3],     0, offset);\n      c2[0] = hc_bytealign (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign (w3[3],     0, offset);\n      c2[1] = hc_bytealign (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign (w3[3],     0, offset);\n      c2[2] = hc_bytealign (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign (w3[3],     0, offset);\n      c2[3] = hc_bytealign (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign (w3[3],     0, offset);\n      c3[0] = hc_bytealign (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign (w3[3],     0, offset);\n      c3[1] = hc_bytealign (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign (w3[3],     0, offset);\n      c3[2] = hc_bytealign (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #ifdef IS_NV\n  // atm only same code as for AMD, but could be improved\n  switch (offset_switch)\n  {\n    case 0:\n      c0[0] = hc_bytealign (w3[3],     0, offset);\n      w3[3] = hc_bytealign (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign (    0, w0[0], offset);\n\n      break;\n\n    case 1:\n      c0[1] = hc_bytealign (w3[3],     0, offset);\n      c0[0] = hc_bytealign (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case 2:\n      c0[2] = hc_bytealign (w3[3],     0, offset);\n      c0[1] = hc_bytealign (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 3:\n      c0[3] = hc_bytealign (w3[3],     0, offset);\n      c0[2] = hc_bytealign (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 4:\n      c1[0] = hc_bytealign (w3[3],     0, offset);\n      c0[3] = hc_bytealign (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 5:\n      c1[1] = hc_bytealign (w3[3],     0, offset);\n      c1[0] = hc_bytealign (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 6:\n      c1[2] = hc_bytealign (w3[3],     0, offset);\n      c1[1] = hc_bytealign (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 7:\n      c1[3] = hc_bytealign (w3[3],     0, offset);\n      c1[2] = hc_bytealign (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 8:\n      c2[0] = hc_bytealign (w3[3],     0, offset);\n      c1[3] = hc_bytealign (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 9:\n      c2[1] = hc_bytealign (w3[3],     0, offset);\n      c2[0] = hc_bytealign (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign (w3[3],     0, offset);\n      c2[1] = hc_bytealign (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign (w3[3],     0, offset);\n      c2[2] = hc_bytealign (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign (w3[3],     0, offset);\n      c2[3] = hc_bytealign (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign (w3[3],     0, offset);\n      c3[0] = hc_bytealign (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign (w3[3],     0, offset);\n      c3[1] = hc_bytealign (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign (w3[3],     0, offset);\n      c3[2] = hc_bytealign (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w3[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_bytealign_be (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      w3[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_byte_perm (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign_be (w3[3],     0, offset);\n      w3[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign_be (w3[3],     0, offset);\n      c0[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign_be (w3[3],     0, offset);\n      c0[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign_be (w3[3],     0, offset);\n      c0[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign_be (w3[3],     0, offset);\n      c0[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign_be (w3[3],     0, offset);\n      c1[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign_be (w3[3],     0, offset);\n      c1[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign_be (w3[3],     0, offset);\n      c1[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign_be (w3[3],     0, offset);\n      c1[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign_be (w3[3],     0, offset);\n      c2[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_be (w3[3],     0, offset);\n      c2[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_be (w3[3],     0, offset);\n      c2[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_be (w3[3],     0, offset);\n      c2[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_be (w3[3],     0, offset);\n      c3[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_be (w3[3],     0, offset);\n      c3[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_be (w3[3],     0, offset);\n      c3[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_be (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_byte_perm (    0, w3[3], selector);\n      w3[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      c0[1] = hc_byte_perm (    0, w3[3], selector);\n      c0[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_byte_perm (    0, w3[3], selector);\n      c0[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_byte_perm (    0, w3[3], selector);\n      c0[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_byte_perm (    0, w3[3], selector);\n      c0[3] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[2] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[1] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_byte_perm (    0, w3[3], selector);\n      c1[0] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[3] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[2] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[1] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_byte_perm (    0, w3[3], selector);\n      c1[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[0] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[3] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[2] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[1] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_byte_perm (    0, w3[3], selector);\n      c1[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[0] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[3] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[2] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[1] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_byte_perm (    0, w3[3], selector);\n      c1[3] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[2] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[1] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[0] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[3] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[2] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[1] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_byte_perm (    0, w3[3], selector);\n      c2[0] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[3] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[2] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[1] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[0] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[3] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[2] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[1] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_byte_perm (    0, w3[3], selector);\n      c2[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[0] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[3] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[2] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[1] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[0] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[3] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[2] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[1] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_byte_perm (    0, w3[3], selector);\n      c2[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[0] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[3] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[2] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[1] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[0] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[3] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[2] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[1] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_byte_perm (    0, w3[3], selector);\n      c2[3] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[2] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[1] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[0] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[3] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[2] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[1] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[0] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[3] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[2] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[1] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_byte_perm (    0, w3[3], selector);\n      c3[0] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[3] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[2] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[1] = hc_byte_perm (w3[0], w2[3], selector);\n      c2[0] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[3] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[2] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[1] = hc_byte_perm (w2[0], w1[3], selector);\n      c1[0] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[3] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[2] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[1] = hc_byte_perm (w1[0], w0[3], selector);\n      c0[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_byte_perm (    0, w3[3], selector);\n      c3[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c3[0] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[3] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[2] = hc_byte_perm (w3[0], w2[3], selector);\n      c2[1] = hc_byte_perm (w2[3], w2[2], selector);\n      c2[0] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[3] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[2] = hc_byte_perm (w2[0], w1[3], selector);\n      c1[1] = hc_byte_perm (w1[3], w1[2], selector);\n      c1[0] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[3] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[2] = hc_byte_perm (w1[0], w0[3], selector);\n      c0[1] = hc_byte_perm (w0[3], w0[2], selector);\n      c0[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_byte_perm (    0, w3[3], selector);\n      c3[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c3[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c3[0] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[3] = hc_byte_perm (w3[0], w2[3], selector);\n      c2[2] = hc_byte_perm (w2[3], w2[2], selector);\n      c2[1] = hc_byte_perm (w2[2], w2[1], selector);\n      c2[0] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[3] = hc_byte_perm (w2[0], w1[3], selector);\n      c1[2] = hc_byte_perm (w1[3], w1[2], selector);\n      c1[1] = hc_byte_perm (w1[2], w1[1], selector);\n      c1[0] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[3] = hc_byte_perm (w1[0], w0[3], selector);\n      c0[2] = hc_byte_perm (w0[3], w0[2], selector);\n      c0[1] = hc_byte_perm (w0[2], w0[1], selector);\n      c0[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[3] = hc_byte_perm (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w7[3] = hc_bytealign (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w7[3] = hc_bytealign (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w7[3] = hc_bytealign (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w7[3] = hc_bytealign (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w7[3] = hc_bytealign (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w7[3] = hc_bytealign (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w7[3] = hc_bytealign (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w7[3] = hc_bytealign (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w7[3] = hc_bytealign (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w7[3] = hc_bytealign (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w7[3] = hc_bytealign (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w7[3] = hc_bytealign (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w7[3] = hc_bytealign (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w7[3] = hc_bytealign (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w7[3] = hc_bytealign (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w7[3] = hc_bytealign (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      w7[3] = hc_bytealign (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      w7[3] = hc_bytealign (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      w7[3] = hc_bytealign (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      w7[3] = hc_bytealign (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      w7[3] = hc_bytealign (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      w7[3] = hc_bytealign (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      w7[3] = hc_bytealign (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      w7[3] = hc_bytealign (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      w7[3] = hc_bytealign (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      w7[3] = hc_bytealign (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      w7[3] = hc_bytealign (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      w7[3] = hc_bytealign (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      w7[3] = hc_bytealign (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      w7[3] = hc_bytealign (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      w7[3] = hc_bytealign (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      w7[3] = hc_bytealign (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case 0:\n      w7[3] = hc_byte_perm (w7[2], w7[3], selector);\n      w7[2] = hc_byte_perm (w7[1], w7[2], selector);\n      w7[1] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[0] = hc_byte_perm (w6[3], w7[0], selector);\n      w6[3] = hc_byte_perm (w6[2], w6[3], selector);\n      w6[2] = hc_byte_perm (w6[1], w6[2], selector);\n      w6[1] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[0] = hc_byte_perm (w5[3], w6[0], selector);\n      w5[3] = hc_byte_perm (w5[2], w5[3], selector);\n      w5[2] = hc_byte_perm (w5[1], w5[2], selector);\n      w5[1] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w4[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w4[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w4[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w3[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[0] = hc_byte_perm (    0, w0[0], selector);\n      break;\n\n    case 1:\n      w7[3] = hc_byte_perm (w7[1], w7[2], selector);\n      w7[2] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[1] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[0] = hc_byte_perm (w6[2], w6[3], selector);\n      w6[3] = hc_byte_perm (w6[1], w6[2], selector);\n      w6[2] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[1] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[0] = hc_byte_perm (w5[2], w5[3], selector);\n      w5[3] = hc_byte_perm (w5[1], w5[2], selector);\n      w5[2] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[1] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w4[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w4[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w3[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[1] = hc_byte_perm (    0, w0[0], selector);\n      w0[0] = 0;\n      break;\n\n    case 2:\n      w7[3] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[2] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[1] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[0] = hc_byte_perm (w6[1], w6[2], selector);\n      w6[3] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[2] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[1] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[0] = hc_byte_perm (w5[1], w5[2], selector);\n      w5[3] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[2] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[1] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w4[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[2] = hc_byte_perm (    0, w0[0], selector);\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 3:\n      w7[3] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[2] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[1] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[0] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[3] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[2] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[1] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[0] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[3] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[2] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[1] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[3] = hc_byte_perm (    0, w0[0], selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 4:\n      w7[3] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[2] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[1] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[0] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[3] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[2] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[1] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[0] = hc_byte_perm (    0, w0[0], selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 5:\n      w7[3] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[2] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[1] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[0] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[3] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[2] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[1] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[1] = hc_byte_perm (    0, w0[0], selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 6:\n      w7[3] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[2] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[1] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[0] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[3] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[2] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[1] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[2] = hc_byte_perm (    0, w0[0], selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 7:\n      w7[3] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[2] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[1] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[0] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[3] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[2] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[1] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[3] = hc_byte_perm (    0, w0[0], selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 8:\n      w7[3] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[2] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[1] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[0] = hc_byte_perm (    0, w0[0], selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 9:\n      w7[3] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[2] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[1] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[1] = hc_byte_perm (    0, w0[0], selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 10:\n      w7[3] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[2] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[1] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[2] = hc_byte_perm (    0, w0[0], selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 11:\n      w7[3] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[2] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[1] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[3] = hc_byte_perm (    0, w0[0], selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 12:\n      w7[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[0] = hc_byte_perm (    0, w0[0], selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 13:\n      w7[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[1] = hc_byte_perm (    0, w0[0], selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 14:\n      w7[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w7[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w6[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w5[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w4[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[2] = hc_byte_perm (    0, w0[0], selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 15:\n      w7[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w7[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w7[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w6[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w6[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w5[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w5[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w4[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w4[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[3] = hc_byte_perm (    0, w0[0], selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign (w7[3],     0, offset);\n      w7[3] = hc_bytealign (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign (w7[3],     0, offset);\n      c0[0] = hc_bytealign (w7[2], w7[3], offset);\n      w7[3] = hc_bytealign (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign (w7[3],     0, offset);\n      c0[1] = hc_bytealign (w7[2], w7[3], offset);\n      c0[0] = hc_bytealign (w7[1], w7[2], offset);\n      w7[3] = hc_bytealign (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign (w7[3],     0, offset);\n      c0[2] = hc_bytealign (w7[2], w7[3], offset);\n      c0[1] = hc_bytealign (w7[1], w7[2], offset);\n      c0[0] = hc_bytealign (w7[0], w7[1], offset);\n      w7[3] = hc_bytealign (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign (w7[3],     0, offset);\n      c0[3] = hc_bytealign (w7[2], w7[3], offset);\n      c0[2] = hc_bytealign (w7[1], w7[2], offset);\n      c0[1] = hc_bytealign (w7[0], w7[1], offset);\n      c0[0] = hc_bytealign (w6[3], w7[0], offset);\n      w7[3] = hc_bytealign (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign (w7[3],     0, offset);\n      c1[0] = hc_bytealign (w7[2], w7[3], offset);\n      c0[3] = hc_bytealign (w7[1], w7[2], offset);\n      c0[2] = hc_bytealign (w7[0], w7[1], offset);\n      c0[1] = hc_bytealign (w6[3], w7[0], offset);\n      c0[0] = hc_bytealign (w6[2], w6[3], offset);\n      w7[3] = hc_bytealign (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign (w7[3],     0, offset);\n      c1[1] = hc_bytealign (w7[2], w7[3], offset);\n      c1[0] = hc_bytealign (w7[1], w7[2], offset);\n      c0[3] = hc_bytealign (w7[0], w7[1], offset);\n      c0[2] = hc_bytealign (w6[3], w7[0], offset);\n      c0[1] = hc_bytealign (w6[2], w6[3], offset);\n      c0[0] = hc_bytealign (w6[1], w6[2], offset);\n      w7[3] = hc_bytealign (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign (w7[3],     0, offset);\n      c1[2] = hc_bytealign (w7[2], w7[3], offset);\n      c1[1] = hc_bytealign (w7[1], w7[2], offset);\n      c1[0] = hc_bytealign (w7[0], w7[1], offset);\n      c0[3] = hc_bytealign (w6[3], w7[0], offset);\n      c0[2] = hc_bytealign (w6[2], w6[3], offset);\n      c0[1] = hc_bytealign (w6[1], w6[2], offset);\n      c0[0] = hc_bytealign (w6[0], w6[1], offset);\n      w7[3] = hc_bytealign (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign (w7[3],     0, offset);\n      c1[3] = hc_bytealign (w7[2], w7[3], offset);\n      c1[2] = hc_bytealign (w7[1], w7[2], offset);\n      c1[1] = hc_bytealign (w7[0], w7[1], offset);\n      c1[0] = hc_bytealign (w6[3], w7[0], offset);\n      c0[3] = hc_bytealign (w6[2], w6[3], offset);\n      c0[2] = hc_bytealign (w6[1], w6[2], offset);\n      c0[1] = hc_bytealign (w6[0], w6[1], offset);\n      c0[0] = hc_bytealign (w5[3], w6[0], offset);\n      w7[3] = hc_bytealign (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign (w7[3],     0, offset);\n      c2[0] = hc_bytealign (w7[2], w7[3], offset);\n      c1[3] = hc_bytealign (w7[1], w7[2], offset);\n      c1[2] = hc_bytealign (w7[0], w7[1], offset);\n      c1[1] = hc_bytealign (w6[3], w7[0], offset);\n      c1[0] = hc_bytealign (w6[2], w6[3], offset);\n      c0[3] = hc_bytealign (w6[1], w6[2], offset);\n      c0[2] = hc_bytealign (w6[0], w6[1], offset);\n      c0[1] = hc_bytealign (w5[3], w6[0], offset);\n      c0[0] = hc_bytealign (w5[2], w5[3], offset);\n      w7[3] = hc_bytealign (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign (w7[3],     0, offset);\n      c2[1] = hc_bytealign (w7[2], w7[3], offset);\n      c2[0] = hc_bytealign (w7[1], w7[2], offset);\n      c1[3] = hc_bytealign (w7[0], w7[1], offset);\n      c1[2] = hc_bytealign (w6[3], w7[0], offset);\n      c1[1] = hc_bytealign (w6[2], w6[3], offset);\n      c1[0] = hc_bytealign (w6[1], w6[2], offset);\n      c0[3] = hc_bytealign (w6[0], w6[1], offset);\n      c0[2] = hc_bytealign (w5[3], w6[0], offset);\n      c0[1] = hc_bytealign (w5[2], w5[3], offset);\n      c0[0] = hc_bytealign (w5[1], w5[2], offset);\n      w7[3] = hc_bytealign (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign (w7[3],     0, offset);\n      c2[2] = hc_bytealign (w7[2], w7[3], offset);\n      c2[1] = hc_bytealign (w7[1], w7[2], offset);\n      c2[0] = hc_bytealign (w7[0], w7[1], offset);\n      c1[3] = hc_bytealign (w6[3], w7[0], offset);\n      c1[2] = hc_bytealign (w6[2], w6[3], offset);\n      c1[1] = hc_bytealign (w6[1], w6[2], offset);\n      c1[0] = hc_bytealign (w6[0], w6[1], offset);\n      c0[3] = hc_bytealign (w5[3], w6[0], offset);\n      c0[2] = hc_bytealign (w5[2], w5[3], offset);\n      c0[1] = hc_bytealign (w5[1], w5[2], offset);\n      c0[0] = hc_bytealign (w5[0], w5[1], offset);\n      w7[3] = hc_bytealign (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign (w7[3],     0, offset);\n      c2[3] = hc_bytealign (w7[2], w7[3], offset);\n      c2[2] = hc_bytealign (w7[1], w7[2], offset);\n      c2[1] = hc_bytealign (w7[0], w7[1], offset);\n      c2[0] = hc_bytealign (w6[3], w7[0], offset);\n      c1[3] = hc_bytealign (w6[2], w6[3], offset);\n      c1[2] = hc_bytealign (w6[1], w6[2], offset);\n      c1[1] = hc_bytealign (w6[0], w6[1], offset);\n      c1[0] = hc_bytealign (w5[3], w6[0], offset);\n      c0[3] = hc_bytealign (w5[2], w5[3], offset);\n      c0[2] = hc_bytealign (w5[1], w5[2], offset);\n      c0[1] = hc_bytealign (w5[0], w5[1], offset);\n      c0[0] = hc_bytealign (w4[3], w5[0], offset);\n      w7[3] = hc_bytealign (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign (w7[3],     0, offset);\n      c3[0] = hc_bytealign (w7[2], w7[3], offset);\n      c2[3] = hc_bytealign (w7[1], w7[2], offset);\n      c2[2] = hc_bytealign (w7[0], w7[1], offset);\n      c2[1] = hc_bytealign (w6[3], w7[0], offset);\n      c2[0] = hc_bytealign (w6[2], w6[3], offset);\n      c1[3] = hc_bytealign (w6[1], w6[2], offset);\n      c1[2] = hc_bytealign (w6[0], w6[1], offset);\n      c1[1] = hc_bytealign (w5[3], w6[0], offset);\n      c1[0] = hc_bytealign (w5[2], w5[3], offset);\n      c0[3] = hc_bytealign (w5[1], w5[2], offset);\n      c0[2] = hc_bytealign (w5[0], w5[1], offset);\n      c0[1] = hc_bytealign (w4[3], w5[0], offset);\n      c0[0] = hc_bytealign (w4[2], w4[3], offset);\n      w7[3] = hc_bytealign (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign (w7[3],     0, offset);\n      c3[1] = hc_bytealign (w7[2], w7[3], offset);\n      c3[0] = hc_bytealign (w7[1], w7[2], offset);\n      c2[3] = hc_bytealign (w7[0], w7[1], offset);\n      c2[2] = hc_bytealign (w6[3], w7[0], offset);\n      c2[1] = hc_bytealign (w6[2], w6[3], offset);\n      c2[0] = hc_bytealign (w6[1], w6[2], offset);\n      c1[3] = hc_bytealign (w6[0], w6[1], offset);\n      c1[2] = hc_bytealign (w5[3], w6[0], offset);\n      c1[1] = hc_bytealign (w5[2], w5[3], offset);\n      c1[0] = hc_bytealign (w5[1], w5[2], offset);\n      c0[3] = hc_bytealign (w5[0], w5[1], offset);\n      c0[2] = hc_bytealign (w4[3], w5[0], offset);\n      c0[1] = hc_bytealign (w4[2], w4[3], offset);\n      c0[0] = hc_bytealign (w4[1], w4[2], offset);\n      w7[3] = hc_bytealign (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign (w7[3],     0, offset);\n      c3[2] = hc_bytealign (w7[2], w7[3], offset);\n      c3[1] = hc_bytealign (w7[1], w7[2], offset);\n      c3[0] = hc_bytealign (w7[0], w7[1], offset);\n      c2[3] = hc_bytealign (w6[3], w7[0], offset);\n      c2[2] = hc_bytealign (w6[2], w6[3], offset);\n      c2[1] = hc_bytealign (w6[1], w6[2], offset);\n      c2[0] = hc_bytealign (w6[0], w6[1], offset);\n      c1[3] = hc_bytealign (w5[3], w6[0], offset);\n      c1[2] = hc_bytealign (w5[2], w5[3], offset);\n      c1[1] = hc_bytealign (w5[1], w5[2], offset);\n      c1[0] = hc_bytealign (w5[0], w5[1], offset);\n      c0[3] = hc_bytealign (w4[3], w5[0], offset);\n      c0[2] = hc_bytealign (w4[2], w4[3], offset);\n      c0[1] = hc_bytealign (w4[1], w4[2], offset);\n      c0[0] = hc_bytealign (w4[0], w4[1], offset);\n      w7[3] = hc_bytealign (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_bytealign (w7[3],     0, offset);\n      c3[3] = hc_bytealign (w7[2], w7[3], offset);\n      c3[2] = hc_bytealign (w7[1], w7[2], offset);\n      c3[1] = hc_bytealign (w7[0], w7[1], offset);\n      c3[0] = hc_bytealign (w6[3], w7[0], offset);\n      c2[3] = hc_bytealign (w6[2], w6[3], offset);\n      c2[2] = hc_bytealign (w6[1], w6[2], offset);\n      c2[1] = hc_bytealign (w6[0], w6[1], offset);\n      c2[0] = hc_bytealign (w5[3], w6[0], offset);\n      c1[3] = hc_bytealign (w5[2], w5[3], offset);\n      c1[2] = hc_bytealign (w5[1], w5[2], offset);\n      c1[1] = hc_bytealign (w5[0], w5[1], offset);\n      c1[0] = hc_bytealign (w4[3], w5[0], offset);\n      c0[3] = hc_bytealign (w4[2], w4[3], offset);\n      c0[2] = hc_bytealign (w4[1], w4[2], offset);\n      c0[1] = hc_bytealign (w4[0], w4[1], offset);\n      c0[0] = hc_bytealign (w3[3], w4[0], offset);\n      w7[3] = hc_bytealign (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_bytealign (w7[3],     0, offset);\n      c4[0] = hc_bytealign (w7[2], w7[3], offset);\n      c3[3] = hc_bytealign (w7[1], w7[2], offset);\n      c3[2] = hc_bytealign (w7[0], w7[1], offset);\n      c3[1] = hc_bytealign (w6[3], w7[0], offset);\n      c3[0] = hc_bytealign (w6[2], w6[3], offset);\n      c2[3] = hc_bytealign (w6[1], w6[2], offset);\n      c2[2] = hc_bytealign (w6[0], w6[1], offset);\n      c2[1] = hc_bytealign (w5[3], w6[0], offset);\n      c2[0] = hc_bytealign (w5[2], w5[3], offset);\n      c1[3] = hc_bytealign (w5[1], w5[2], offset);\n      c1[2] = hc_bytealign (w5[0], w5[1], offset);\n      c1[1] = hc_bytealign (w4[3], w5[0], offset);\n      c1[0] = hc_bytealign (w4[2], w4[3], offset);\n      c0[3] = hc_bytealign (w4[1], w4[2], offset);\n      c0[2] = hc_bytealign (w4[0], w4[1], offset);\n      c0[1] = hc_bytealign (w3[3], w4[0], offset);\n      c0[0] = hc_bytealign (w3[2], w3[3], offset);\n      w7[3] = hc_bytealign (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_bytealign (w7[3],     0, offset);\n      c4[1] = hc_bytealign (w7[2], w7[3], offset);\n      c4[0] = hc_bytealign (w7[1], w7[2], offset);\n      c3[3] = hc_bytealign (w7[0], w7[1], offset);\n      c3[2] = hc_bytealign (w6[3], w7[0], offset);\n      c3[1] = hc_bytealign (w6[2], w6[3], offset);\n      c3[0] = hc_bytealign (w6[1], w6[2], offset);\n      c2[3] = hc_bytealign (w6[0], w6[1], offset);\n      c2[2] = hc_bytealign (w5[3], w6[0], offset);\n      c2[1] = hc_bytealign (w5[2], w5[3], offset);\n      c2[0] = hc_bytealign (w5[1], w5[2], offset);\n      c1[3] = hc_bytealign (w5[0], w5[1], offset);\n      c1[2] = hc_bytealign (w4[3], w5[0], offset);\n      c1[1] = hc_bytealign (w4[2], w4[3], offset);\n      c1[0] = hc_bytealign (w4[1], w4[2], offset);\n      c0[3] = hc_bytealign (w4[0], w4[1], offset);\n      c0[2] = hc_bytealign (w3[3], w4[0], offset);\n      c0[1] = hc_bytealign (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign (w3[1], w3[2], offset);\n      w7[3] = hc_bytealign (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_bytealign (w7[3],     0, offset);\n      c4[2] = hc_bytealign (w7[2], w7[3], offset);\n      c4[1] = hc_bytealign (w7[1], w7[2], offset);\n      c4[0] = hc_bytealign (w7[0], w7[1], offset);\n      c3[3] = hc_bytealign (w6[3], w7[0], offset);\n      c3[2] = hc_bytealign (w6[2], w6[3], offset);\n      c3[1] = hc_bytealign (w6[1], w6[2], offset);\n      c3[0] = hc_bytealign (w6[0], w6[1], offset);\n      c2[3] = hc_bytealign (w5[3], w6[0], offset);\n      c2[2] = hc_bytealign (w5[2], w5[3], offset);\n      c2[1] = hc_bytealign (w5[1], w5[2], offset);\n      c2[0] = hc_bytealign (w5[0], w5[1], offset);\n      c1[3] = hc_bytealign (w4[3], w5[0], offset);\n      c1[2] = hc_bytealign (w4[2], w4[3], offset);\n      c1[1] = hc_bytealign (w4[1], w4[2], offset);\n      c1[0] = hc_bytealign (w4[0], w4[1], offset);\n      c0[3] = hc_bytealign (w3[3], w4[0], offset);\n      c0[2] = hc_bytealign (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign (w3[0], w3[1], offset);\n      w7[3] = hc_bytealign (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_bytealign (w7[3],     0, offset);\n      c4[3] = hc_bytealign (w7[2], w7[3], offset);\n      c4[2] = hc_bytealign (w7[1], w7[2], offset);\n      c4[1] = hc_bytealign (w7[0], w7[1], offset);\n      c4[0] = hc_bytealign (w6[3], w7[0], offset);\n      c3[3] = hc_bytealign (w6[2], w6[3], offset);\n      c3[2] = hc_bytealign (w6[1], w6[2], offset);\n      c3[1] = hc_bytealign (w6[0], w6[1], offset);\n      c3[0] = hc_bytealign (w5[3], w6[0], offset);\n      c2[3] = hc_bytealign (w5[2], w5[3], offset);\n      c2[2] = hc_bytealign (w5[1], w5[2], offset);\n      c2[1] = hc_bytealign (w5[0], w5[1], offset);\n      c2[0] = hc_bytealign (w4[3], w5[0], offset);\n      c1[3] = hc_bytealign (w4[2], w4[3], offset);\n      c1[2] = hc_bytealign (w4[1], w4[2], offset);\n      c1[1] = hc_bytealign (w4[0], w4[1], offset);\n      c1[0] = hc_bytealign (w3[3], w4[0], offset);\n      c0[3] = hc_bytealign (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign (w2[3], w3[0], offset);\n      w7[3] = hc_bytealign (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_bytealign (w7[3],     0, offset);\n      c5[0] = hc_bytealign (w7[2], w7[3], offset);\n      c4[3] = hc_bytealign (w7[1], w7[2], offset);\n      c4[2] = hc_bytealign (w7[0], w7[1], offset);\n      c4[1] = hc_bytealign (w6[3], w7[0], offset);\n      c4[0] = hc_bytealign (w6[2], w6[3], offset);\n      c3[3] = hc_bytealign (w6[1], w6[2], offset);\n      c3[2] = hc_bytealign (w6[0], w6[1], offset);\n      c3[1] = hc_bytealign (w5[3], w6[0], offset);\n      c3[0] = hc_bytealign (w5[2], w5[3], offset);\n      c2[3] = hc_bytealign (w5[1], w5[2], offset);\n      c2[2] = hc_bytealign (w5[0], w5[1], offset);\n      c2[1] = hc_bytealign (w4[3], w5[0], offset);\n      c2[0] = hc_bytealign (w4[2], w4[3], offset);\n      c1[3] = hc_bytealign (w4[1], w4[2], offset);\n      c1[2] = hc_bytealign (w4[0], w4[1], offset);\n      c1[1] = hc_bytealign (w3[3], w4[0], offset);\n      c1[0] = hc_bytealign (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign (w2[2], w2[3], offset);\n      w7[3] = hc_bytealign (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_bytealign (w7[3],     0, offset);\n      c5[1] = hc_bytealign (w7[2], w7[3], offset);\n      c5[0] = hc_bytealign (w7[1], w7[2], offset);\n      c4[3] = hc_bytealign (w7[0], w7[1], offset);\n      c4[2] = hc_bytealign (w6[3], w7[0], offset);\n      c4[1] = hc_bytealign (w6[2], w6[3], offset);\n      c4[0] = hc_bytealign (w6[1], w6[2], offset);\n      c3[3] = hc_bytealign (w6[0], w6[1], offset);\n      c3[2] = hc_bytealign (w5[3], w6[0], offset);\n      c3[1] = hc_bytealign (w5[2], w5[3], offset);\n      c3[0] = hc_bytealign (w5[1], w5[2], offset);\n      c2[3] = hc_bytealign (w5[0], w5[1], offset);\n      c2[2] = hc_bytealign (w4[3], w5[0], offset);\n      c2[1] = hc_bytealign (w4[2], w4[3], offset);\n      c2[0] = hc_bytealign (w4[1], w4[2], offset);\n      c1[3] = hc_bytealign (w4[0], w4[1], offset);\n      c1[2] = hc_bytealign (w3[3], w4[0], offset);\n      c1[1] = hc_bytealign (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign (w2[1], w2[2], offset);\n      w7[3] = hc_bytealign (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_bytealign (w7[3],     0, offset);\n      c5[2] = hc_bytealign (w7[2], w7[3], offset);\n      c5[1] = hc_bytealign (w7[1], w7[2], offset);\n      c5[0] = hc_bytealign (w7[0], w7[1], offset);\n      c4[3] = hc_bytealign (w6[3], w7[0], offset);\n      c4[2] = hc_bytealign (w6[2], w6[3], offset);\n      c4[1] = hc_bytealign (w6[1], w6[2], offset);\n      c4[0] = hc_bytealign (w6[0], w6[1], offset);\n      c3[3] = hc_bytealign (w5[3], w6[0], offset);\n      c3[2] = hc_bytealign (w5[2], w5[3], offset);\n      c3[1] = hc_bytealign (w5[1], w5[2], offset);\n      c3[0] = hc_bytealign (w5[0], w5[1], offset);\n      c2[3] = hc_bytealign (w4[3], w5[0], offset);\n      c2[2] = hc_bytealign (w4[2], w4[3], offset);\n      c2[1] = hc_bytealign (w4[1], w4[2], offset);\n      c2[0] = hc_bytealign (w4[0], w4[1], offset);\n      c1[3] = hc_bytealign (w3[3], w4[0], offset);\n      c1[2] = hc_bytealign (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign (w2[0], w2[1], offset);\n      w7[3] = hc_bytealign (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_bytealign (w7[3],     0, offset);\n      c5[3] = hc_bytealign (w7[2], w7[3], offset);\n      c5[2] = hc_bytealign (w7[1], w7[2], offset);\n      c5[1] = hc_bytealign (w7[0], w7[1], offset);\n      c5[0] = hc_bytealign (w6[3], w7[0], offset);\n      c4[3] = hc_bytealign (w6[2], w6[3], offset);\n      c4[2] = hc_bytealign (w6[1], w6[2], offset);\n      c4[1] = hc_bytealign (w6[0], w6[1], offset);\n      c4[0] = hc_bytealign (w5[3], w6[0], offset);\n      c3[3] = hc_bytealign (w5[2], w5[3], offset);\n      c3[2] = hc_bytealign (w5[1], w5[2], offset);\n      c3[1] = hc_bytealign (w5[0], w5[1], offset);\n      c3[0] = hc_bytealign (w4[3], w5[0], offset);\n      c2[3] = hc_bytealign (w4[2], w4[3], offset);\n      c2[2] = hc_bytealign (w4[1], w4[2], offset);\n      c2[1] = hc_bytealign (w4[0], w4[1], offset);\n      c2[0] = hc_bytealign (w3[3], w4[0], offset);\n      c1[3] = hc_bytealign (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign (w1[3], w2[0], offset);\n      w7[3] = hc_bytealign (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_bytealign (w7[3],     0, offset);\n      c6[0] = hc_bytealign (w7[2], w7[3], offset);\n      c5[3] = hc_bytealign (w7[1], w7[2], offset);\n      c5[2] = hc_bytealign (w7[0], w7[1], offset);\n      c5[1] = hc_bytealign (w6[3], w7[0], offset);\n      c5[0] = hc_bytealign (w6[2], w6[3], offset);\n      c4[3] = hc_bytealign (w6[1], w6[2], offset);\n      c4[2] = hc_bytealign (w6[0], w6[1], offset);\n      c4[1] = hc_bytealign (w5[3], w6[0], offset);\n      c4[0] = hc_bytealign (w5[2], w5[3], offset);\n      c3[3] = hc_bytealign (w5[1], w5[2], offset);\n      c3[2] = hc_bytealign (w5[0], w5[1], offset);\n      c3[1] = hc_bytealign (w4[3], w5[0], offset);\n      c3[0] = hc_bytealign (w4[2], w4[3], offset);\n      c2[3] = hc_bytealign (w4[1], w4[2], offset);\n      c2[2] = hc_bytealign (w4[0], w4[1], offset);\n      c2[1] = hc_bytealign (w3[3], w4[0], offset);\n      c2[0] = hc_bytealign (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign (w1[2], w1[3], offset);\n      w7[3] = hc_bytealign (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_bytealign (w7[3],     0, offset);\n      c6[1] = hc_bytealign (w7[2], w7[3], offset);\n      c6[0] = hc_bytealign (w7[1], w7[2], offset);\n      c5[3] = hc_bytealign (w7[0], w7[1], offset);\n      c5[2] = hc_bytealign (w6[3], w7[0], offset);\n      c5[1] = hc_bytealign (w6[2], w6[3], offset);\n      c5[0] = hc_bytealign (w6[1], w6[2], offset);\n      c4[3] = hc_bytealign (w6[0], w6[1], offset);\n      c4[2] = hc_bytealign (w5[3], w6[0], offset);\n      c4[1] = hc_bytealign (w5[2], w5[3], offset);\n      c4[0] = hc_bytealign (w5[1], w5[2], offset);\n      c3[3] = hc_bytealign (w5[0], w5[1], offset);\n      c3[2] = hc_bytealign (w4[3], w5[0], offset);\n      c3[1] = hc_bytealign (w4[2], w4[3], offset);\n      c3[0] = hc_bytealign (w4[1], w4[2], offset);\n      c2[3] = hc_bytealign (w4[0], w4[1], offset);\n      c2[2] = hc_bytealign (w3[3], w4[0], offset);\n      c2[1] = hc_bytealign (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign (w1[1], w1[2], offset);\n      w7[3] = hc_bytealign (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_bytealign (w7[3],     0, offset);\n      c6[2] = hc_bytealign (w7[2], w7[3], offset);\n      c6[1] = hc_bytealign (w7[1], w7[2], offset);\n      c6[0] = hc_bytealign (w7[0], w7[1], offset);\n      c5[3] = hc_bytealign (w6[3], w7[0], offset);\n      c5[2] = hc_bytealign (w6[2], w6[3], offset);\n      c5[1] = hc_bytealign (w6[1], w6[2], offset);\n      c5[0] = hc_bytealign (w6[0], w6[1], offset);\n      c4[3] = hc_bytealign (w5[3], w6[0], offset);\n      c4[2] = hc_bytealign (w5[2], w5[3], offset);\n      c4[1] = hc_bytealign (w5[1], w5[2], offset);\n      c4[0] = hc_bytealign (w5[0], w5[1], offset);\n      c3[3] = hc_bytealign (w4[3], w5[0], offset);\n      c3[2] = hc_bytealign (w4[2], w4[3], offset);\n      c3[1] = hc_bytealign (w4[1], w4[2], offset);\n      c3[0] = hc_bytealign (w4[0], w4[1], offset);\n      c2[3] = hc_bytealign (w3[3], w4[0], offset);\n      c2[2] = hc_bytealign (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign (w1[0], w1[1], offset);\n      w7[3] = hc_bytealign (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_bytealign (w7[3],     0, offset);\n      c6[3] = hc_bytealign (w7[2], w7[3], offset);\n      c6[2] = hc_bytealign (w7[1], w7[2], offset);\n      c6[1] = hc_bytealign (w7[0], w7[1], offset);\n      c6[0] = hc_bytealign (w6[3], w7[0], offset);\n      c5[3] = hc_bytealign (w6[2], w6[3], offset);\n      c5[2] = hc_bytealign (w6[1], w6[2], offset);\n      c5[1] = hc_bytealign (w6[0], w6[1], offset);\n      c5[0] = hc_bytealign (w5[3], w6[0], offset);\n      c4[3] = hc_bytealign (w5[2], w5[3], offset);\n      c4[2] = hc_bytealign (w5[1], w5[2], offset);\n      c4[1] = hc_bytealign (w5[0], w5[1], offset);\n      c4[0] = hc_bytealign (w4[3], w5[0], offset);\n      c3[3] = hc_bytealign (w4[2], w4[3], offset);\n      c3[2] = hc_bytealign (w4[1], w4[2], offset);\n      c3[1] = hc_bytealign (w4[0], w4[1], offset);\n      c3[0] = hc_bytealign (w3[3], w4[0], offset);\n      c2[3] = hc_bytealign (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign (w0[3], w1[0], offset);\n      w7[3] = hc_bytealign (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_bytealign (w7[3],     0, offset);\n      c7[0] = hc_bytealign (w7[2], w7[3], offset);\n      c6[3] = hc_bytealign (w7[1], w7[2], offset);\n      c6[2] = hc_bytealign (w7[0], w7[1], offset);\n      c6[1] = hc_bytealign (w6[3], w7[0], offset);\n      c6[0] = hc_bytealign (w6[2], w6[3], offset);\n      c5[3] = hc_bytealign (w6[1], w6[2], offset);\n      c5[2] = hc_bytealign (w6[0], w6[1], offset);\n      c5[1] = hc_bytealign (w5[3], w6[0], offset);\n      c5[0] = hc_bytealign (w5[2], w5[3], offset);\n      c4[3] = hc_bytealign (w5[1], w5[2], offset);\n      c4[2] = hc_bytealign (w5[0], w5[1], offset);\n      c4[1] = hc_bytealign (w4[3], w5[0], offset);\n      c4[0] = hc_bytealign (w4[2], w4[3], offset);\n      c3[3] = hc_bytealign (w4[1], w4[2], offset);\n      c3[2] = hc_bytealign (w4[0], w4[1], offset);\n      c3[1] = hc_bytealign (w3[3], w4[0], offset);\n      c3[0] = hc_bytealign (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign (w0[2], w0[3], offset);\n      w7[3] = hc_bytealign (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_bytealign (w7[3],     0, offset);\n      c7[1] = hc_bytealign (w7[2], w7[3], offset);\n      c7[0] = hc_bytealign (w7[1], w7[2], offset);\n      c6[3] = hc_bytealign (w7[0], w7[1], offset);\n      c6[2] = hc_bytealign (w6[3], w7[0], offset);\n      c6[1] = hc_bytealign (w6[2], w6[3], offset);\n      c6[0] = hc_bytealign (w6[1], w6[2], offset);\n      c5[3] = hc_bytealign (w6[0], w6[1], offset);\n      c5[2] = hc_bytealign (w5[3], w6[0], offset);\n      c5[1] = hc_bytealign (w5[2], w5[3], offset);\n      c5[0] = hc_bytealign (w5[1], w5[2], offset);\n      c4[3] = hc_bytealign (w5[0], w5[1], offset);\n      c4[2] = hc_bytealign (w4[3], w5[0], offset);\n      c4[1] = hc_bytealign (w4[2], w4[3], offset);\n      c4[0] = hc_bytealign (w4[1], w4[2], offset);\n      c3[3] = hc_bytealign (w4[0], w4[1], offset);\n      c3[2] = hc_bytealign (w3[3], w4[0], offset);\n      c3[1] = hc_bytealign (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign (w0[1], w0[2], offset);\n      w7[3] = hc_bytealign (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_bytealign (w7[3],     0, offset);\n      c7[2] = hc_bytealign (w7[2], w7[3], offset);\n      c7[1] = hc_bytealign (w7[1], w7[2], offset);\n      c7[0] = hc_bytealign (w7[0], w7[1], offset);\n      c6[3] = hc_bytealign (w6[3], w7[0], offset);\n      c6[2] = hc_bytealign (w6[2], w6[3], offset);\n      c6[1] = hc_bytealign (w6[1], w6[2], offset);\n      c6[0] = hc_bytealign (w6[0], w6[1], offset);\n      c5[3] = hc_bytealign (w5[3], w6[0], offset);\n      c5[2] = hc_bytealign (w5[2], w5[3], offset);\n      c5[1] = hc_bytealign (w5[1], w5[2], offset);\n      c5[0] = hc_bytealign (w5[0], w5[1], offset);\n      c4[3] = hc_bytealign (w4[3], w5[0], offset);\n      c4[2] = hc_bytealign (w4[2], w4[3], offset);\n      c4[1] = hc_bytealign (w4[1], w4[2], offset);\n      c4[0] = hc_bytealign (w4[0], w4[1], offset);\n      c3[3] = hc_bytealign (w3[3], w4[0], offset);\n      c3[2] = hc_bytealign (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign (w0[0], w0[1], offset);\n      w7[3] = hc_bytealign (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_byte_perm (w7[3],     0, selector);\n      w7[3] = hc_byte_perm (w7[2], w7[3], selector);\n      w7[2] = hc_byte_perm (w7[1], w7[2], selector);\n      w7[1] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[0] = hc_byte_perm (w6[3], w7[0], selector);\n      w6[3] = hc_byte_perm (w6[2], w6[3], selector);\n      w6[2] = hc_byte_perm (w6[1], w6[2], selector);\n      w6[1] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[0] = hc_byte_perm (w5[3], w6[0], selector);\n      w5[3] = hc_byte_perm (w5[2], w5[3], selector);\n      w5[2] = hc_byte_perm (w5[1], w5[2], selector);\n      w5[1] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w4[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w4[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w4[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w3[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[0] = hc_byte_perm (    0, w0[0], selector);\n\n      break;\n\n    case  1:\n      c0[1] = hc_byte_perm (w7[3],     0, selector);\n      c0[0] = hc_byte_perm (w7[2], w7[3], selector);\n      w7[3] = hc_byte_perm (w7[1], w7[2], selector);\n      w7[2] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[1] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[0] = hc_byte_perm (w6[2], w6[3], selector);\n      w6[3] = hc_byte_perm (w6[1], w6[2], selector);\n      w6[2] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[1] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[0] = hc_byte_perm (w5[2], w5[3], selector);\n      w5[3] = hc_byte_perm (w5[1], w5[2], selector);\n      w5[2] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[1] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w4[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w4[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w3[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[1] = hc_byte_perm (    0, w0[0], selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_byte_perm (w7[3],     0, selector);\n      c0[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c0[0] = hc_byte_perm (w7[1], w7[2], selector);\n      w7[3] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[2] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[1] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[0] = hc_byte_perm (w6[1], w6[2], selector);\n      w6[3] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[2] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[1] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[0] = hc_byte_perm (w5[1], w5[2], selector);\n      w5[3] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[2] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[1] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w4[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w3[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[2] = hc_byte_perm (    0, w0[0], selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_byte_perm (w7[3],     0, selector);\n      c0[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c0[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c0[0] = hc_byte_perm (w7[0], w7[1], selector);\n      w7[3] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[2] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[1] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[0] = hc_byte_perm (w6[0], w6[1], selector);\n      w6[3] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[2] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[1] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[0] = hc_byte_perm (w5[0], w5[1], selector);\n      w5[3] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[2] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[1] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w4[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w3[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w2[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w1[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w0[3] = hc_byte_perm (    0, w0[0], selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_byte_perm (w7[3],     0, selector);\n      c0[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c0[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c0[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c0[0] = hc_byte_perm (w6[3], w7[0], selector);\n      w7[3] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[2] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[1] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[0] = hc_byte_perm (w5[3], w6[0], selector);\n      w6[3] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[2] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[1] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w5[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w4[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w3[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[0] = hc_byte_perm (    0, w0[0], selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_byte_perm (w7[3],     0, selector);\n      c1[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c0[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c0[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c0[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c0[0] = hc_byte_perm (w6[2], w6[3], selector);\n      w7[3] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[2] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[1] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[0] = hc_byte_perm (w5[2], w5[3], selector);\n      w6[3] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[2] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[1] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w5[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w4[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w3[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[1] = hc_byte_perm (    0, w0[0], selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_byte_perm (w7[3],     0, selector);\n      c1[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c1[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c0[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c0[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c0[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c0[0] = hc_byte_perm (w6[1], w6[2], selector);\n      w7[3] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[2] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[1] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[0] = hc_byte_perm (w5[1], w5[2], selector);\n      w6[3] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[2] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[1] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w5[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w4[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w3[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[2] = hc_byte_perm (    0, w0[0], selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_byte_perm (w7[3],     0, selector);\n      c1[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c1[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c1[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c0[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c0[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c0[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c0[0] = hc_byte_perm (w6[0], w6[1], selector);\n      w7[3] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[2] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[1] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[0] = hc_byte_perm (w5[0], w5[1], selector);\n      w6[3] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[2] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[1] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w5[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w4[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w3[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w2[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w1[3] = hc_byte_perm (    0, w0[0], selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_byte_perm (w7[3],     0, selector);\n      c1[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c1[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c1[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c1[0] = hc_byte_perm (w6[3], w7[0], selector);\n      c0[3] = hc_byte_perm (w6[2], w6[3], selector);\n      c0[2] = hc_byte_perm (w6[1], w6[2], selector);\n      c0[1] = hc_byte_perm (w6[0], w6[1], selector);\n      c0[0] = hc_byte_perm (w5[3], w6[0], selector);\n      w7[3] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[2] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[1] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w6[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w5[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w4[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w3[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[0] = hc_byte_perm (    0, w0[0], selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_byte_perm (w7[3],     0, selector);\n      c2[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c1[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c1[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c1[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c1[0] = hc_byte_perm (w6[2], w6[3], selector);\n      c0[3] = hc_byte_perm (w6[1], w6[2], selector);\n      c0[2] = hc_byte_perm (w6[0], w6[1], selector);\n      c0[1] = hc_byte_perm (w5[3], w6[0], selector);\n      c0[0] = hc_byte_perm (w5[2], w5[3], selector);\n      w7[3] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[2] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[1] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w6[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w5[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w4[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w3[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[1] = hc_byte_perm (    0, w0[0], selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_byte_perm (w7[3],     0, selector);\n      c2[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c2[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c1[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c1[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c1[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c1[0] = hc_byte_perm (w6[1], w6[2], selector);\n      c0[3] = hc_byte_perm (w6[0], w6[1], selector);\n      c0[2] = hc_byte_perm (w5[3], w6[0], selector);\n      c0[1] = hc_byte_perm (w5[2], w5[3], selector);\n      c0[0] = hc_byte_perm (w5[1], w5[2], selector);\n      w7[3] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[2] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[1] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w6[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w5[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w4[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w3[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[2] = hc_byte_perm (    0, w0[0], selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_byte_perm (w7[3],     0, selector);\n      c2[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c2[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c2[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c1[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c1[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c1[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c1[0] = hc_byte_perm (w6[0], w6[1], selector);\n      c0[3] = hc_byte_perm (w5[3], w6[0], selector);\n      c0[2] = hc_byte_perm (w5[2], w5[3], selector);\n      c0[1] = hc_byte_perm (w5[1], w5[2], selector);\n      c0[0] = hc_byte_perm (w5[0], w5[1], selector);\n      w7[3] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[2] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[1] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w6[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w5[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w4[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w3[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w2[3] = hc_byte_perm (    0, w0[0], selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_byte_perm (w7[3],     0, selector);\n      c2[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c2[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c2[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c2[0] = hc_byte_perm (w6[3], w7[0], selector);\n      c1[3] = hc_byte_perm (w6[2], w6[3], selector);\n      c1[2] = hc_byte_perm (w6[1], w6[2], selector);\n      c1[1] = hc_byte_perm (w6[0], w6[1], selector);\n      c1[0] = hc_byte_perm (w5[3], w6[0], selector);\n      c0[3] = hc_byte_perm (w5[2], w5[3], selector);\n      c0[2] = hc_byte_perm (w5[1], w5[2], selector);\n      c0[1] = hc_byte_perm (w5[0], w5[1], selector);\n      c0[0] = hc_byte_perm (w4[3], w5[0], selector);\n      w7[3] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[2] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[1] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w6[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w5[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w4[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w3[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[0] = hc_byte_perm (    0, w0[0], selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_byte_perm (w7[3],     0, selector);\n      c3[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c2[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c2[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c2[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c2[0] = hc_byte_perm (w6[2], w6[3], selector);\n      c1[3] = hc_byte_perm (w6[1], w6[2], selector);\n      c1[2] = hc_byte_perm (w6[0], w6[1], selector);\n      c1[1] = hc_byte_perm (w5[3], w6[0], selector);\n      c1[0] = hc_byte_perm (w5[2], w5[3], selector);\n      c0[3] = hc_byte_perm (w5[1], w5[2], selector);\n      c0[2] = hc_byte_perm (w5[0], w5[1], selector);\n      c0[1] = hc_byte_perm (w4[3], w5[0], selector);\n      c0[0] = hc_byte_perm (w4[2], w4[3], selector);\n      w7[3] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[2] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[1] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w6[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w5[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w4[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w3[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[1] = hc_byte_perm (    0, w0[0], selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_byte_perm (w7[3],     0, selector);\n      c3[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c3[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c2[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c2[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c2[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c2[0] = hc_byte_perm (w6[1], w6[2], selector);\n      c1[3] = hc_byte_perm (w6[0], w6[1], selector);\n      c1[2] = hc_byte_perm (w5[3], w6[0], selector);\n      c1[1] = hc_byte_perm (w5[2], w5[3], selector);\n      c1[0] = hc_byte_perm (w5[1], w5[2], selector);\n      c0[3] = hc_byte_perm (w5[0], w5[1], selector);\n      c0[2] = hc_byte_perm (w4[3], w5[0], selector);\n      c0[1] = hc_byte_perm (w4[2], w4[3], selector);\n      c0[0] = hc_byte_perm (w4[1], w4[2], selector);\n      w7[3] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[2] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[1] = hc_byte_perm (w3[2], w3[3], selector);\n      w7[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w6[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w6[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w5[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w5[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w4[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w4[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w3[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[2] = hc_byte_perm (    0, w0[0], selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_byte_perm (w7[3],     0, selector);\n      c3[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c3[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c3[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c2[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c2[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c2[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c2[0] = hc_byte_perm (w6[0], w6[1], selector);\n      c1[3] = hc_byte_perm (w5[3], w6[0], selector);\n      c1[2] = hc_byte_perm (w5[2], w5[3], selector);\n      c1[1] = hc_byte_perm (w5[1], w5[2], selector);\n      c1[0] = hc_byte_perm (w5[0], w5[1], selector);\n      c0[3] = hc_byte_perm (w4[3], w5[0], selector);\n      c0[2] = hc_byte_perm (w4[2], w4[3], selector);\n      c0[1] = hc_byte_perm (w4[1], w4[2], selector);\n      c0[0] = hc_byte_perm (w4[0], w4[1], selector);\n      w7[3] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[2] = hc_byte_perm (w3[2], w3[3], selector);\n      w7[1] = hc_byte_perm (w3[1], w3[2], selector);\n      w7[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w6[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w6[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w6[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w5[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w5[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w5[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w4[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w4[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w4[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w3[3] = hc_byte_perm (    0, w0[0], selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_byte_perm (w7[3],     0, selector);\n      c3[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c3[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c3[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c3[0] = hc_byte_perm (w6[3], w7[0], selector);\n      c2[3] = hc_byte_perm (w6[2], w6[3], selector);\n      c2[2] = hc_byte_perm (w6[1], w6[2], selector);\n      c2[1] = hc_byte_perm (w6[0], w6[1], selector);\n      c2[0] = hc_byte_perm (w5[3], w6[0], selector);\n      c1[3] = hc_byte_perm (w5[2], w5[3], selector);\n      c1[2] = hc_byte_perm (w5[1], w5[2], selector);\n      c1[1] = hc_byte_perm (w5[0], w5[1], selector);\n      c1[0] = hc_byte_perm (w4[3], w5[0], selector);\n      c0[3] = hc_byte_perm (w4[2], w4[3], selector);\n      c0[2] = hc_byte_perm (w4[1], w4[2], selector);\n      c0[1] = hc_byte_perm (w4[0], w4[1], selector);\n      c0[0] = hc_byte_perm (w3[3], w4[0], selector);\n      w7[3] = hc_byte_perm (w3[2], w3[3], selector);\n      w7[2] = hc_byte_perm (w3[1], w3[2], selector);\n      w7[1] = hc_byte_perm (w3[0], w3[1], selector);\n      w7[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w6[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w6[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w6[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w6[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w5[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w5[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w5[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w5[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w4[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w4[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w4[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w4[0] = hc_byte_perm (    0, w0[0], selector);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_byte_perm (w7[3],     0, selector);\n      c4[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c3[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c3[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c3[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c3[0] = hc_byte_perm (w6[2], w6[3], selector);\n      c2[3] = hc_byte_perm (w6[1], w6[2], selector);\n      c2[2] = hc_byte_perm (w6[0], w6[1], selector);\n      c2[1] = hc_byte_perm (w5[3], w6[0], selector);\n      c2[0] = hc_byte_perm (w5[2], w5[3], selector);\n      c1[3] = hc_byte_perm (w5[1], w5[2], selector);\n      c1[2] = hc_byte_perm (w5[0], w5[1], selector);\n      c1[1] = hc_byte_perm (w4[3], w5[0], selector);\n      c1[0] = hc_byte_perm (w4[2], w4[3], selector);\n      c0[3] = hc_byte_perm (w4[1], w4[2], selector);\n      c0[2] = hc_byte_perm (w4[0], w4[1], selector);\n      c0[1] = hc_byte_perm (w3[3], w4[0], selector);\n      c0[0] = hc_byte_perm (w3[2], w3[3], selector);\n      w7[3] = hc_byte_perm (w3[1], w3[2], selector);\n      w7[2] = hc_byte_perm (w3[0], w3[1], selector);\n      w7[1] = hc_byte_perm (w2[3], w3[0], selector);\n      w7[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w6[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w6[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w6[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w6[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w5[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w5[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w5[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w5[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w4[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w4[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w4[1] = hc_byte_perm (    0, w0[0], selector);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_byte_perm (w7[3],     0, selector);\n      c4[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c4[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c3[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c3[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c3[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c3[0] = hc_byte_perm (w6[1], w6[2], selector);\n      c2[3] = hc_byte_perm (w6[0], w6[1], selector);\n      c2[2] = hc_byte_perm (w5[3], w6[0], selector);\n      c2[1] = hc_byte_perm (w5[2], w5[3], selector);\n      c2[0] = hc_byte_perm (w5[1], w5[2], selector);\n      c1[3] = hc_byte_perm (w5[0], w5[1], selector);\n      c1[2] = hc_byte_perm (w4[3], w5[0], selector);\n      c1[1] = hc_byte_perm (w4[2], w4[3], selector);\n      c1[0] = hc_byte_perm (w4[1], w4[2], selector);\n      c0[3] = hc_byte_perm (w4[0], w4[1], selector);\n      c0[2] = hc_byte_perm (w3[3], w4[0], selector);\n      c0[1] = hc_byte_perm (w3[2], w3[3], selector);\n      c0[0] = hc_byte_perm (w3[1], w3[2], selector);\n      w7[3] = hc_byte_perm (w3[0], w3[1], selector);\n      w7[2] = hc_byte_perm (w2[3], w3[0], selector);\n      w7[1] = hc_byte_perm (w2[2], w2[3], selector);\n      w7[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w6[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w6[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w6[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w6[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w5[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w5[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w5[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w5[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w4[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w4[2] = hc_byte_perm (    0, w0[0], selector);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_byte_perm (w7[3],     0, selector);\n      c4[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c4[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c4[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c3[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c3[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c3[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c3[0] = hc_byte_perm (w6[0], w6[1], selector);\n      c2[3] = hc_byte_perm (w5[3], w6[0], selector);\n      c2[2] = hc_byte_perm (w5[2], w5[3], selector);\n      c2[1] = hc_byte_perm (w5[1], w5[2], selector);\n      c2[0] = hc_byte_perm (w5[0], w5[1], selector);\n      c1[3] = hc_byte_perm (w4[3], w5[0], selector);\n      c1[2] = hc_byte_perm (w4[2], w4[3], selector);\n      c1[1] = hc_byte_perm (w4[1], w4[2], selector);\n      c1[0] = hc_byte_perm (w4[0], w4[1], selector);\n      c0[3] = hc_byte_perm (w3[3], w4[0], selector);\n      c0[2] = hc_byte_perm (w3[2], w3[3], selector);\n      c0[1] = hc_byte_perm (w3[1], w3[2], selector);\n      c0[0] = hc_byte_perm (w3[0], w3[1], selector);\n      w7[3] = hc_byte_perm (w2[3], w3[0], selector);\n      w7[2] = hc_byte_perm (w2[2], w2[3], selector);\n      w7[1] = hc_byte_perm (w2[1], w2[2], selector);\n      w7[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w6[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w6[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w6[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w6[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w5[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w5[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w5[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w5[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w4[3] = hc_byte_perm (    0, w0[0], selector);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_byte_perm (w7[3],     0, selector);\n      c4[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c4[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c4[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c4[0] = hc_byte_perm (w6[3], w7[0], selector);\n      c3[3] = hc_byte_perm (w6[2], w6[3], selector);\n      c3[2] = hc_byte_perm (w6[1], w6[2], selector);\n      c3[1] = hc_byte_perm (w6[0], w6[1], selector);\n      c3[0] = hc_byte_perm (w5[3], w6[0], selector);\n      c2[3] = hc_byte_perm (w5[2], w5[3], selector);\n      c2[2] = hc_byte_perm (w5[1], w5[2], selector);\n      c2[1] = hc_byte_perm (w5[0], w5[1], selector);\n      c2[0] = hc_byte_perm (w4[3], w5[0], selector);\n      c1[3] = hc_byte_perm (w4[2], w4[3], selector);\n      c1[2] = hc_byte_perm (w4[1], w4[2], selector);\n      c1[1] = hc_byte_perm (w4[0], w4[1], selector);\n      c1[0] = hc_byte_perm (w3[3], w4[0], selector);\n      c0[3] = hc_byte_perm (w3[2], w3[3], selector);\n      c0[2] = hc_byte_perm (w3[1], w3[2], selector);\n      c0[1] = hc_byte_perm (w3[0], w3[1], selector);\n      c0[0] = hc_byte_perm (w2[3], w3[0], selector);\n      w7[3] = hc_byte_perm (w2[2], w2[3], selector);\n      w7[2] = hc_byte_perm (w2[1], w2[2], selector);\n      w7[1] = hc_byte_perm (w2[0], w2[1], selector);\n      w7[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w6[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w6[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w6[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w6[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w5[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w5[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w5[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w5[0] = hc_byte_perm (    0, w0[0], selector);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_byte_perm (w7[3],     0, selector);\n      c5[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c4[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c4[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c4[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c4[0] = hc_byte_perm (w6[2], w6[3], selector);\n      c3[3] = hc_byte_perm (w6[1], w6[2], selector);\n      c3[2] = hc_byte_perm (w6[0], w6[1], selector);\n      c3[1] = hc_byte_perm (w5[3], w6[0], selector);\n      c3[0] = hc_byte_perm (w5[2], w5[3], selector);\n      c2[3] = hc_byte_perm (w5[1], w5[2], selector);\n      c2[2] = hc_byte_perm (w5[0], w5[1], selector);\n      c2[1] = hc_byte_perm (w4[3], w5[0], selector);\n      c2[0] = hc_byte_perm (w4[2], w4[3], selector);\n      c1[3] = hc_byte_perm (w4[1], w4[2], selector);\n      c1[2] = hc_byte_perm (w4[0], w4[1], selector);\n      c1[1] = hc_byte_perm (w3[3], w4[0], selector);\n      c1[0] = hc_byte_perm (w3[2], w3[3], selector);\n      c0[3] = hc_byte_perm (w3[1], w3[2], selector);\n      c0[2] = hc_byte_perm (w3[0], w3[1], selector);\n      c0[1] = hc_byte_perm (w2[3], w3[0], selector);\n      c0[0] = hc_byte_perm (w2[2], w2[3], selector);\n      w7[3] = hc_byte_perm (w2[1], w2[2], selector);\n      w7[2] = hc_byte_perm (w2[0], w2[1], selector);\n      w7[1] = hc_byte_perm (w1[3], w2[0], selector);\n      w7[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w6[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w6[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w6[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w6[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w5[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w5[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w5[1] = hc_byte_perm (    0, w0[0], selector);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_byte_perm (w7[3],     0, selector);\n      c5[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c5[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c4[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c4[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c4[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c4[0] = hc_byte_perm (w6[1], w6[2], selector);\n      c3[3] = hc_byte_perm (w6[0], w6[1], selector);\n      c3[2] = hc_byte_perm (w5[3], w6[0], selector);\n      c3[1] = hc_byte_perm (w5[2], w5[3], selector);\n      c3[0] = hc_byte_perm (w5[1], w5[2], selector);\n      c2[3] = hc_byte_perm (w5[0], w5[1], selector);\n      c2[2] = hc_byte_perm (w4[3], w5[0], selector);\n      c2[1] = hc_byte_perm (w4[2], w4[3], selector);\n      c2[0] = hc_byte_perm (w4[1], w4[2], selector);\n      c1[3] = hc_byte_perm (w4[0], w4[1], selector);\n      c1[2] = hc_byte_perm (w3[3], w4[0], selector);\n      c1[1] = hc_byte_perm (w3[2], w3[3], selector);\n      c1[0] = hc_byte_perm (w3[1], w3[2], selector);\n      c0[3] = hc_byte_perm (w3[0], w3[1], selector);\n      c0[2] = hc_byte_perm (w2[3], w3[0], selector);\n      c0[1] = hc_byte_perm (w2[2], w2[3], selector);\n      c0[0] = hc_byte_perm (w2[1], w2[2], selector);\n      w7[3] = hc_byte_perm (w2[0], w2[1], selector);\n      w7[2] = hc_byte_perm (w1[3], w2[0], selector);\n      w7[1] = hc_byte_perm (w1[2], w1[3], selector);\n      w7[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w6[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w6[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w6[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w6[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w5[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w5[2] = hc_byte_perm (    0, w0[0], selector);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_byte_perm (w7[3],     0, selector);\n      c5[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c5[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c5[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c4[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c4[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c4[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c4[0] = hc_byte_perm (w6[0], w6[1], selector);\n      c3[3] = hc_byte_perm (w5[3], w6[0], selector);\n      c3[2] = hc_byte_perm (w5[2], w5[3], selector);\n      c3[1] = hc_byte_perm (w5[1], w5[2], selector);\n      c3[0] = hc_byte_perm (w5[0], w5[1], selector);\n      c2[3] = hc_byte_perm (w4[3], w5[0], selector);\n      c2[2] = hc_byte_perm (w4[2], w4[3], selector);\n      c2[1] = hc_byte_perm (w4[1], w4[2], selector);\n      c2[0] = hc_byte_perm (w4[0], w4[1], selector);\n      c1[3] = hc_byte_perm (w3[3], w4[0], selector);\n      c1[2] = hc_byte_perm (w3[2], w3[3], selector);\n      c1[1] = hc_byte_perm (w3[1], w3[2], selector);\n      c1[0] = hc_byte_perm (w3[0], w3[1], selector);\n      c0[3] = hc_byte_perm (w2[3], w3[0], selector);\n      c0[2] = hc_byte_perm (w2[2], w2[3], selector);\n      c0[1] = hc_byte_perm (w2[1], w2[2], selector);\n      c0[0] = hc_byte_perm (w2[0], w2[1], selector);\n      w7[3] = hc_byte_perm (w1[3], w2[0], selector);\n      w7[2] = hc_byte_perm (w1[2], w1[3], selector);\n      w7[1] = hc_byte_perm (w1[1], w1[2], selector);\n      w7[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w6[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w6[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w6[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w6[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w5[3] = hc_byte_perm (    0, w0[0], selector);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_byte_perm (w7[3],     0, selector);\n      c5[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c5[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c5[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c5[0] = hc_byte_perm (w6[3], w7[0], selector);\n      c4[3] = hc_byte_perm (w6[2], w6[3], selector);\n      c4[2] = hc_byte_perm (w6[1], w6[2], selector);\n      c4[1] = hc_byte_perm (w6[0], w6[1], selector);\n      c4[0] = hc_byte_perm (w5[3], w6[0], selector);\n      c3[3] = hc_byte_perm (w5[2], w5[3], selector);\n      c3[2] = hc_byte_perm (w5[1], w5[2], selector);\n      c3[1] = hc_byte_perm (w5[0], w5[1], selector);\n      c3[0] = hc_byte_perm (w4[3], w5[0], selector);\n      c2[3] = hc_byte_perm (w4[2], w4[3], selector);\n      c2[2] = hc_byte_perm (w4[1], w4[2], selector);\n      c2[1] = hc_byte_perm (w4[0], w4[1], selector);\n      c2[0] = hc_byte_perm (w3[3], w4[0], selector);\n      c1[3] = hc_byte_perm (w3[2], w3[3], selector);\n      c1[2] = hc_byte_perm (w3[1], w3[2], selector);\n      c1[1] = hc_byte_perm (w3[0], w3[1], selector);\n      c1[0] = hc_byte_perm (w2[3], w3[0], selector);\n      c0[3] = hc_byte_perm (w2[2], w2[3], selector);\n      c0[2] = hc_byte_perm (w2[1], w2[2], selector);\n      c0[1] = hc_byte_perm (w2[0], w2[1], selector);\n      c0[0] = hc_byte_perm (w1[3], w2[0], selector);\n      w7[3] = hc_byte_perm (w1[2], w1[3], selector);\n      w7[2] = hc_byte_perm (w1[1], w1[2], selector);\n      w7[1] = hc_byte_perm (w1[0], w1[1], selector);\n      w7[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w6[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w6[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w6[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w6[0] = hc_byte_perm (    0, w0[0], selector);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_byte_perm (w7[3],     0, selector);\n      c6[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c5[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c5[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c5[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c5[0] = hc_byte_perm (w6[2], w6[3], selector);\n      c4[3] = hc_byte_perm (w6[1], w6[2], selector);\n      c4[2] = hc_byte_perm (w6[0], w6[1], selector);\n      c4[1] = hc_byte_perm (w5[3], w6[0], selector);\n      c4[0] = hc_byte_perm (w5[2], w5[3], selector);\n      c3[3] = hc_byte_perm (w5[1], w5[2], selector);\n      c3[2] = hc_byte_perm (w5[0], w5[1], selector);\n      c3[1] = hc_byte_perm (w4[3], w5[0], selector);\n      c3[0] = hc_byte_perm (w4[2], w4[3], selector);\n      c2[3] = hc_byte_perm (w4[1], w4[2], selector);\n      c2[2] = hc_byte_perm (w4[0], w4[1], selector);\n      c2[1] = hc_byte_perm (w3[3], w4[0], selector);\n      c2[0] = hc_byte_perm (w3[2], w3[3], selector);\n      c1[3] = hc_byte_perm (w3[1], w3[2], selector);\n      c1[2] = hc_byte_perm (w3[0], w3[1], selector);\n      c1[1] = hc_byte_perm (w2[3], w3[0], selector);\n      c1[0] = hc_byte_perm (w2[2], w2[3], selector);\n      c0[3] = hc_byte_perm (w2[1], w2[2], selector);\n      c0[2] = hc_byte_perm (w2[0], w2[1], selector);\n      c0[1] = hc_byte_perm (w1[3], w2[0], selector);\n      c0[0] = hc_byte_perm (w1[2], w1[3], selector);\n      w7[3] = hc_byte_perm (w1[1], w1[2], selector);\n      w7[2] = hc_byte_perm (w1[0], w1[1], selector);\n      w7[1] = hc_byte_perm (w0[3], w1[0], selector);\n      w7[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w6[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w6[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w6[1] = hc_byte_perm (    0, w0[0], selector);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_byte_perm (w7[3],     0, selector);\n      c6[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c6[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c5[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c5[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c5[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c5[0] = hc_byte_perm (w6[1], w6[2], selector);\n      c4[3] = hc_byte_perm (w6[0], w6[1], selector);\n      c4[2] = hc_byte_perm (w5[3], w6[0], selector);\n      c4[1] = hc_byte_perm (w5[2], w5[3], selector);\n      c4[0] = hc_byte_perm (w5[1], w5[2], selector);\n      c3[3] = hc_byte_perm (w5[0], w5[1], selector);\n      c3[2] = hc_byte_perm (w4[3], w5[0], selector);\n      c3[1] = hc_byte_perm (w4[2], w4[3], selector);\n      c3[0] = hc_byte_perm (w4[1], w4[2], selector);\n      c2[3] = hc_byte_perm (w4[0], w4[1], selector);\n      c2[2] = hc_byte_perm (w3[3], w4[0], selector);\n      c2[1] = hc_byte_perm (w3[2], w3[3], selector);\n      c2[0] = hc_byte_perm (w3[1], w3[2], selector);\n      c1[3] = hc_byte_perm (w3[0], w3[1], selector);\n      c1[2] = hc_byte_perm (w2[3], w3[0], selector);\n      c1[1] = hc_byte_perm (w2[2], w2[3], selector);\n      c1[0] = hc_byte_perm (w2[1], w2[2], selector);\n      c0[3] = hc_byte_perm (w2[0], w2[1], selector);\n      c0[2] = hc_byte_perm (w1[3], w2[0], selector);\n      c0[1] = hc_byte_perm (w1[2], w1[3], selector);\n      c0[0] = hc_byte_perm (w1[1], w1[2], selector);\n      w7[3] = hc_byte_perm (w1[0], w1[1], selector);\n      w7[2] = hc_byte_perm (w0[3], w1[0], selector);\n      w7[1] = hc_byte_perm (w0[2], w0[3], selector);\n      w7[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w6[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w6[2] = hc_byte_perm (    0, w0[0], selector);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_byte_perm (w7[3],     0, selector);\n      c6[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c6[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c6[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c5[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c5[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c5[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c5[0] = hc_byte_perm (w6[0], w6[1], selector);\n      c4[3] = hc_byte_perm (w5[3], w6[0], selector);\n      c4[2] = hc_byte_perm (w5[2], w5[3], selector);\n      c4[1] = hc_byte_perm (w5[1], w5[2], selector);\n      c4[0] = hc_byte_perm (w5[0], w5[1], selector);\n      c3[3] = hc_byte_perm (w4[3], w5[0], selector);\n      c3[2] = hc_byte_perm (w4[2], w4[3], selector);\n      c3[1] = hc_byte_perm (w4[1], w4[2], selector);\n      c3[0] = hc_byte_perm (w4[0], w4[1], selector);\n      c2[3] = hc_byte_perm (w3[3], w4[0], selector);\n      c2[2] = hc_byte_perm (w3[2], w3[3], selector);\n      c2[1] = hc_byte_perm (w3[1], w3[2], selector);\n      c2[0] = hc_byte_perm (w3[0], w3[1], selector);\n      c1[3] = hc_byte_perm (w2[3], w3[0], selector);\n      c1[2] = hc_byte_perm (w2[2], w2[3], selector);\n      c1[1] = hc_byte_perm (w2[1], w2[2], selector);\n      c1[0] = hc_byte_perm (w2[0], w2[1], selector);\n      c0[3] = hc_byte_perm (w1[3], w2[0], selector);\n      c0[2] = hc_byte_perm (w1[2], w1[3], selector);\n      c0[1] = hc_byte_perm (w1[1], w1[2], selector);\n      c0[0] = hc_byte_perm (w1[0], w1[1], selector);\n      w7[3] = hc_byte_perm (w0[3], w1[0], selector);\n      w7[2] = hc_byte_perm (w0[2], w0[3], selector);\n      w7[1] = hc_byte_perm (w0[1], w0[2], selector);\n      w7[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w6[3] = hc_byte_perm (    0, w0[0], selector);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_byte_perm (w7[3],     0, selector);\n      c6[3] = hc_byte_perm (w7[2], w7[3], selector);\n      c6[2] = hc_byte_perm (w7[1], w7[2], selector);\n      c6[1] = hc_byte_perm (w7[0], w7[1], selector);\n      c6[0] = hc_byte_perm (w6[3], w7[0], selector);\n      c5[3] = hc_byte_perm (w6[2], w6[3], selector);\n      c5[2] = hc_byte_perm (w6[1], w6[2], selector);\n      c5[1] = hc_byte_perm (w6[0], w6[1], selector);\n      c5[0] = hc_byte_perm (w5[3], w6[0], selector);\n      c4[3] = hc_byte_perm (w5[2], w5[3], selector);\n      c4[2] = hc_byte_perm (w5[1], w5[2], selector);\n      c4[1] = hc_byte_perm (w5[0], w5[1], selector);\n      c4[0] = hc_byte_perm (w4[3], w5[0], selector);\n      c3[3] = hc_byte_perm (w4[2], w4[3], selector);\n      c3[2] = hc_byte_perm (w4[1], w4[2], selector);\n      c3[1] = hc_byte_perm (w4[0], w4[1], selector);\n      c3[0] = hc_byte_perm (w3[3], w4[0], selector);\n      c2[3] = hc_byte_perm (w3[2], w3[3], selector);\n      c2[2] = hc_byte_perm (w3[1], w3[2], selector);\n      c2[1] = hc_byte_perm (w3[0], w3[1], selector);\n      c2[0] = hc_byte_perm (w2[3], w3[0], selector);\n      c1[3] = hc_byte_perm (w2[2], w2[3], selector);\n      c1[2] = hc_byte_perm (w2[1], w2[2], selector);\n      c1[1] = hc_byte_perm (w2[0], w2[1], selector);\n      c1[0] = hc_byte_perm (w1[3], w2[0], selector);\n      c0[3] = hc_byte_perm (w1[2], w1[3], selector);\n      c0[2] = hc_byte_perm (w1[1], w1[2], selector);\n      c0[1] = hc_byte_perm (w1[0], w1[1], selector);\n      c0[0] = hc_byte_perm (w0[3], w1[0], selector);\n      w7[3] = hc_byte_perm (w0[2], w0[3], selector);\n      w7[2] = hc_byte_perm (w0[1], w0[2], selector);\n      w7[1] = hc_byte_perm (w0[0], w0[1], selector);\n      w7[0] = hc_byte_perm (    0, w0[0], selector);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_byte_perm (w7[3],     0, selector);\n      c7[0] = hc_byte_perm (w7[2], w7[3], selector);\n      c6[3] = hc_byte_perm (w7[1], w7[2], selector);\n      c6[2] = hc_byte_perm (w7[0], w7[1], selector);\n      c6[1] = hc_byte_perm (w6[3], w7[0], selector);\n      c6[0] = hc_byte_perm (w6[2], w6[3], selector);\n      c5[3] = hc_byte_perm (w6[1], w6[2], selector);\n      c5[2] = hc_byte_perm (w6[0], w6[1], selector);\n      c5[1] = hc_byte_perm (w5[3], w6[0], selector);\n      c5[0] = hc_byte_perm (w5[2], w5[3], selector);\n      c4[3] = hc_byte_perm (w5[1], w5[2], selector);\n      c4[2] = hc_byte_perm (w5[0], w5[1], selector);\n      c4[1] = hc_byte_perm (w4[3], w5[0], selector);\n      c4[0] = hc_byte_perm (w4[2], w4[3], selector);\n      c3[3] = hc_byte_perm (w4[1], w4[2], selector);\n      c3[2] = hc_byte_perm (w4[0], w4[1], selector);\n      c3[1] = hc_byte_perm (w3[3], w4[0], selector);\n      c3[0] = hc_byte_perm (w3[2], w3[3], selector);\n      c2[3] = hc_byte_perm (w3[1], w3[2], selector);\n      c2[2] = hc_byte_perm (w3[0], w3[1], selector);\n      c2[1] = hc_byte_perm (w2[3], w3[0], selector);\n      c2[0] = hc_byte_perm (w2[2], w2[3], selector);\n      c1[3] = hc_byte_perm (w2[1], w2[2], selector);\n      c1[2] = hc_byte_perm (w2[0], w2[1], selector);\n      c1[1] = hc_byte_perm (w1[3], w2[0], selector);\n      c1[0] = hc_byte_perm (w1[2], w1[3], selector);\n      c0[3] = hc_byte_perm (w1[1], w1[2], selector);\n      c0[2] = hc_byte_perm (w1[0], w1[1], selector);\n      c0[1] = hc_byte_perm (w0[3], w1[0], selector);\n      c0[0] = hc_byte_perm (w0[2], w0[3], selector);\n      w7[3] = hc_byte_perm (w0[1], w0[2], selector);\n      w7[2] = hc_byte_perm (w0[0], w0[1], selector);\n      w7[1] = hc_byte_perm (    0, w0[0], selector);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_byte_perm (w7[3],     0, selector);\n      c7[1] = hc_byte_perm (w7[2], w7[3], selector);\n      c7[0] = hc_byte_perm (w7[1], w7[2], selector);\n      c6[3] = hc_byte_perm (w7[0], w7[1], selector);\n      c6[2] = hc_byte_perm (w6[3], w7[0], selector);\n      c6[1] = hc_byte_perm (w6[2], w6[3], selector);\n      c6[0] = hc_byte_perm (w6[1], w6[2], selector);\n      c5[3] = hc_byte_perm (w6[0], w6[1], selector);\n      c5[2] = hc_byte_perm (w5[3], w6[0], selector);\n      c5[1] = hc_byte_perm (w5[2], w5[3], selector);\n      c5[0] = hc_byte_perm (w5[1], w5[2], selector);\n      c4[3] = hc_byte_perm (w5[0], w5[1], selector);\n      c4[2] = hc_byte_perm (w4[3], w5[0], selector);\n      c4[1] = hc_byte_perm (w4[2], w4[3], selector);\n      c4[0] = hc_byte_perm (w4[1], w4[2], selector);\n      c3[3] = hc_byte_perm (w4[0], w4[1], selector);\n      c3[2] = hc_byte_perm (w3[3], w4[0], selector);\n      c3[1] = hc_byte_perm (w3[2], w3[3], selector);\n      c3[0] = hc_byte_perm (w3[1], w3[2], selector);\n      c2[3] = hc_byte_perm (w3[0], w3[1], selector);\n      c2[2] = hc_byte_perm (w2[3], w3[0], selector);\n      c2[1] = hc_byte_perm (w2[2], w2[3], selector);\n      c2[0] = hc_byte_perm (w2[1], w2[2], selector);\n      c1[3] = hc_byte_perm (w2[0], w2[1], selector);\n      c1[2] = hc_byte_perm (w1[3], w2[0], selector);\n      c1[1] = hc_byte_perm (w1[2], w1[3], selector);\n      c1[0] = hc_byte_perm (w1[1], w1[2], selector);\n      c0[3] = hc_byte_perm (w1[0], w1[1], selector);\n      c0[2] = hc_byte_perm (w0[3], w1[0], selector);\n      c0[1] = hc_byte_perm (w0[2], w0[3], selector);\n      c0[0] = hc_byte_perm (w0[1], w0[2], selector);\n      w7[3] = hc_byte_perm (w0[0], w0[1], selector);\n      w7[2] = hc_byte_perm (    0, w0[0], selector);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_byte_perm (w7[3],     0, selector);\n      c7[2] = hc_byte_perm (w7[2], w7[3], selector);\n      c7[1] = hc_byte_perm (w7[1], w7[2], selector);\n      c7[0] = hc_byte_perm (w7[0], w7[1], selector);\n      c6[3] = hc_byte_perm (w6[3], w7[0], selector);\n      c6[2] = hc_byte_perm (w6[2], w6[3], selector);\n      c6[1] = hc_byte_perm (w6[1], w6[2], selector);\n      c6[0] = hc_byte_perm (w6[0], w6[1], selector);\n      c5[3] = hc_byte_perm (w5[3], w6[0], selector);\n      c5[2] = hc_byte_perm (w5[2], w5[3], selector);\n      c5[1] = hc_byte_perm (w5[1], w5[2], selector);\n      c5[0] = hc_byte_perm (w5[0], w5[1], selector);\n      c4[3] = hc_byte_perm (w4[3], w5[0], selector);\n      c4[2] = hc_byte_perm (w4[2], w4[3], selector);\n      c4[1] = hc_byte_perm (w4[1], w4[2], selector);\n      c4[0] = hc_byte_perm (w4[0], w4[1], selector);\n      c3[3] = hc_byte_perm (w3[3], w4[0], selector);\n      c3[2] = hc_byte_perm (w3[2], w3[3], selector);\n      c3[1] = hc_byte_perm (w3[1], w3[2], selector);\n      c3[0] = hc_byte_perm (w3[0], w3[1], selector);\n      c2[3] = hc_byte_perm (w2[3], w3[0], selector);\n      c2[2] = hc_byte_perm (w2[2], w2[3], selector);\n      c2[1] = hc_byte_perm (w2[1], w2[2], selector);\n      c2[0] = hc_byte_perm (w2[0], w2[1], selector);\n      c1[3] = hc_byte_perm (w1[3], w2[0], selector);\n      c1[2] = hc_byte_perm (w1[2], w1[3], selector);\n      c1[1] = hc_byte_perm (w1[1], w1[2], selector);\n      c1[0] = hc_byte_perm (w1[0], w1[1], selector);\n      c0[3] = hc_byte_perm (w0[3], w1[0], selector);\n      c0[2] = hc_byte_perm (w0[2], w0[3], selector);\n      c0[1] = hc_byte_perm (w0[1], w0[2], selector);\n      c0[0] = hc_byte_perm (w0[0], w0[1], selector);\n      w7[3] = hc_byte_perm (    0, w0[0], selector);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w7[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w7[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w7[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w7[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w7[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w7[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w7[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w7[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w7[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w7[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w7[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w7[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w7[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w7[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w7[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w7[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_be (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      w7[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign_be (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      w7[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign_be (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      w7[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign_be (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      w7[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign_be (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      w7[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign_be (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      w7[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign_be (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      w7[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign_be (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      w7[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign_be (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      w7[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign_be (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      w7[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign_be (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      w7[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign_be (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      w7[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign_be (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      w7[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign_be (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      w7[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign_be (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      w7[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign_be (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      w7[3] = hc_bytealign_be (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w7[3] = hc_byte_perm (w7[3], w7[2], selector);\n      w7[2] = hc_byte_perm (w7[2], w7[1], selector);\n      w7[1] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[0] = hc_byte_perm (w7[0], w6[3], selector);\n      w6[3] = hc_byte_perm (w6[3], w6[2], selector);\n      w6[2] = hc_byte_perm (w6[2], w6[1], selector);\n      w6[1] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[0] = hc_byte_perm (w6[0], w5[3], selector);\n      w5[3] = hc_byte_perm (w5[3], w5[2], selector);\n      w5[2] = hc_byte_perm (w5[2], w5[1], selector);\n      w5[1] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w4[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w4[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w4[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w3[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      w7[3] = hc_byte_perm (w7[2], w7[1], selector);\n      w7[2] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[1] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[0] = hc_byte_perm (w6[3], w6[2], selector);\n      w6[3] = hc_byte_perm (w6[2], w6[1], selector);\n      w6[2] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[1] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[0] = hc_byte_perm (w5[3], w5[2], selector);\n      w5[3] = hc_byte_perm (w5[2], w5[1], selector);\n      w5[2] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[1] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w4[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w4[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w7[3] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[2] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[1] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[0] = hc_byte_perm (w6[2], w6[1], selector);\n      w6[3] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[2] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[1] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[0] = hc_byte_perm (w5[2], w5[1], selector);\n      w5[3] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[2] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[1] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w4[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w7[3] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[2] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[1] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[0] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[3] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[2] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[1] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[0] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[3] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[2] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[1] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w7[3] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[2] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[1] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[0] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[3] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[2] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[1] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w7[3] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[2] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[1] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[0] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[3] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[2] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[1] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w7[3] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[2] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[1] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[0] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[3] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[2] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[1] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w7[3] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[2] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[1] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[0] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[3] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[2] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[1] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w7[3] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[2] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[1] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w7[3] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[2] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[1] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w7[3] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[2] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[1] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w7[3] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[2] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[1] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w7[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w7[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w7[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w7[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[3] = hc_byte_perm (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      w7[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[0] = hc_byte_perm (w0[0],     0, selector);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      w7[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[1] = hc_byte_perm (w0[0],     0, selector);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      w7[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[2] = hc_byte_perm (w0[0],     0, selector);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      w7[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[3] = hc_byte_perm (w0[0],     0, selector);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      w7[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[0] = hc_byte_perm (w0[0],     0, selector);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      w7[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[1] = hc_byte_perm (w0[0],     0, selector);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      w7[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[2] = hc_byte_perm (w0[0],     0, selector);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      w7[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[3] = hc_byte_perm (w0[0],     0, selector);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      w7[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[0] = hc_byte_perm (w0[0],     0, selector);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      w7[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[1] = hc_byte_perm (w0[0],     0, selector);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      w7[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[2] = hc_byte_perm (w0[0],     0, selector);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      w7[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[3] = hc_byte_perm (w0[0],     0, selector);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      w7[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[0] = hc_byte_perm (w0[0],     0, selector);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      w7[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[1] = hc_byte_perm (w0[0],     0, selector);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      w7[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[2] = hc_byte_perm (w0[0],     0, selector);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      w7[3] = hc_byte_perm (w0[0],     0, selector);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign_be (w7[3],     0, offset);\n      w7[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign_be (w7[3],     0, offset);\n      c0[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      w7[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign_be (w7[3],     0, offset);\n      c0[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c0[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      w7[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign_be (w7[3],     0, offset);\n      c0[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c0[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c0[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      w7[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign_be (w7[3],     0, offset);\n      c0[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c0[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c0[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c0[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      w7[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign_be (w7[3],     0, offset);\n      c1[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c0[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c0[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c0[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c0[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      w7[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign_be (w7[3],     0, offset);\n      c1[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c1[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c0[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c0[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c0[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c0[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      w7[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign_be (w7[3],     0, offset);\n      c1[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c1[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c1[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c0[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c0[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c0[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c0[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      w7[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign_be (w7[3],     0, offset);\n      c1[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c1[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c1[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c1[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      c0[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      c0[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      c0[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      c0[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      w7[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign_be (w7[3],     0, offset);\n      c2[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c1[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c1[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c1[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c1[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      c0[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      c0[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      c0[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      c0[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      w7[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_be (w7[3],     0, offset);\n      c2[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c2[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c1[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c1[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c1[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c1[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      c0[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      c0[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      c0[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      c0[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      w7[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_be (w7[3],     0, offset);\n      c2[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c2[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c2[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c1[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c1[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c1[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c1[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      c0[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      c0[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      c0[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      c0[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      w7[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_be (w7[3],     0, offset);\n      c2[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c2[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c2[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c2[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      c1[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      c1[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      c1[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      c1[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      c0[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      c0[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      c0[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      c0[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      w7[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_be (w7[3],     0, offset);\n      c3[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c2[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c2[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c2[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c2[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      c1[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      c1[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      c1[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      c1[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      c0[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      c0[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      c0[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      c0[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      w7[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_be (w7[3],     0, offset);\n      c3[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c3[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c2[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c2[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c2[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c2[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      c1[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      c1[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      c1[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      c1[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      c0[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      c0[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      c0[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      c0[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      w7[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_be (w7[3],     0, offset);\n      c3[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c3[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c3[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c2[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c2[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c2[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c2[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      c1[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      c1[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      c1[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      c1[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      c0[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      c0[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      c0[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      c0[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      w7[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_be (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_bytealign_be (w7[3],     0, offset);\n      c3[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c3[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c3[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c3[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      c2[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      c2[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      c2[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      c2[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      c1[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      c1[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      c1[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      c1[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      c0[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      c0[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      c0[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      c0[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      w7[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign_be (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_bytealign_be (w7[3],     0, offset);\n      c4[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c3[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c3[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c3[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c3[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      c2[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      c2[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      c2[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      c2[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      c1[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      c1[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      c1[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      c1[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      c0[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      c0[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      c0[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      c0[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      w7[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign_be (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_bytealign_be (w7[3],     0, offset);\n      c4[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c4[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c3[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c3[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c3[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c3[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      c2[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      c2[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      c2[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      c2[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      c1[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      c1[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      c1[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      c1[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      c0[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      c0[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      c0[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      w7[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign_be (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_bytealign_be (w7[3],     0, offset);\n      c4[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c4[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c4[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c3[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c3[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c3[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c3[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      c2[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      c2[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      c2[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      c2[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      c1[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      c1[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      c1[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      c1[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      c0[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      c0[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      w7[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign_be (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_bytealign_be (w7[3],     0, offset);\n      c4[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c4[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c4[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c4[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      c3[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      c3[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      c3[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      c3[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      c2[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      c2[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      c2[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      c2[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      c1[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      c1[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      c1[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      c1[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      c0[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      w7[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign_be (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_bytealign_be (w7[3],     0, offset);\n      c5[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c4[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c4[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c4[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c4[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      c3[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      c3[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      c3[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      c3[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      c2[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      c2[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      c2[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      c2[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      c1[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      c1[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      c1[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      c1[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      w7[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign_be (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_bytealign_be (w7[3],     0, offset);\n      c5[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c5[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c4[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c4[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c4[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c4[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      c3[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      c3[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      c3[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      c3[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      c2[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      c2[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      c2[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      c2[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      c1[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      c1[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      c1[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      w7[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign_be (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_bytealign_be (w7[3],     0, offset);\n      c5[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c5[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c5[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c4[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c4[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c4[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c4[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      c3[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      c3[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      c3[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      c3[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      c2[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      c2[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      c2[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      c2[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      c1[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      c1[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      w7[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign_be (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_bytealign_be (w7[3],     0, offset);\n      c5[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c5[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c5[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c5[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      c4[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      c4[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      c4[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      c4[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      c3[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      c3[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      c3[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      c3[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      c2[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      c2[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      c2[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      c2[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      c1[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      w7[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign_be (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_bytealign_be (w7[3],     0, offset);\n      c6[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c5[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c5[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c5[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c5[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      c4[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      c4[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      c4[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      c4[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      c3[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      c3[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      c3[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      c3[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      c2[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      c2[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      c2[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      c2[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      w7[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign_be (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_bytealign_be (w7[3],     0, offset);\n      c6[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c6[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c5[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c5[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c5[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c5[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      c4[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      c4[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      c4[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      c4[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      c3[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      c3[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      c3[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      c3[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      c2[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      c2[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      c2[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      w7[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign_be (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_bytealign_be (w7[3],     0, offset);\n      c6[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c6[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c6[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c5[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c5[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c5[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c5[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      c4[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      c4[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      c4[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      c4[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      c3[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      c3[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      c3[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      c3[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      c2[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      c2[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      w7[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign_be (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_bytealign_be (w7[3],     0, offset);\n      c6[3] = hc_bytealign_be (w7[2], w7[3], offset);\n      c6[2] = hc_bytealign_be (w7[1], w7[2], offset);\n      c6[1] = hc_bytealign_be (w7[0], w7[1], offset);\n      c6[0] = hc_bytealign_be (w6[3], w7[0], offset);\n      c5[3] = hc_bytealign_be (w6[2], w6[3], offset);\n      c5[2] = hc_bytealign_be (w6[1], w6[2], offset);\n      c5[1] = hc_bytealign_be (w6[0], w6[1], offset);\n      c5[0] = hc_bytealign_be (w5[3], w6[0], offset);\n      c4[3] = hc_bytealign_be (w5[2], w5[3], offset);\n      c4[2] = hc_bytealign_be (w5[1], w5[2], offset);\n      c4[1] = hc_bytealign_be (w5[0], w5[1], offset);\n      c4[0] = hc_bytealign_be (w4[3], w5[0], offset);\n      c3[3] = hc_bytealign_be (w4[2], w4[3], offset);\n      c3[2] = hc_bytealign_be (w4[1], w4[2], offset);\n      c3[1] = hc_bytealign_be (w4[0], w4[1], offset);\n      c3[0] = hc_bytealign_be (w3[3], w4[0], offset);\n      c2[3] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_be (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_be (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_be (w0[3], w1[0], offset);\n      w7[3] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign_be (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_bytealign_be (w7[3],     0, offset);\n      c7[0] = hc_bytealign_be (w7[2], w7[3], offset);\n      c6[3] = hc_bytealign_be (w7[1], w7[2], offset);\n      c6[2] = hc_bytealign_be (w7[0], w7[1], offset);\n      c6[1] = hc_bytealign_be (w6[3], w7[0], offset);\n      c6[0] = hc_bytealign_be (w6[2], w6[3], offset);\n      c5[3] = hc_bytealign_be (w6[1], w6[2], offset);\n      c5[2] = hc_bytealign_be (w6[0], w6[1], offset);\n      c5[1] = hc_bytealign_be (w5[3], w6[0], offset);\n      c5[0] = hc_bytealign_be (w5[2], w5[3], offset);\n      c4[3] = hc_bytealign_be (w5[1], w5[2], offset);\n      c4[2] = hc_bytealign_be (w5[0], w5[1], offset);\n      c4[1] = hc_bytealign_be (w4[3], w5[0], offset);\n      c4[0] = hc_bytealign_be (w4[2], w4[3], offset);\n      c3[3] = hc_bytealign_be (w4[1], w4[2], offset);\n      c3[2] = hc_bytealign_be (w4[0], w4[1], offset);\n      c3[1] = hc_bytealign_be (w3[3], w4[0], offset);\n      c3[0] = hc_bytealign_be (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_be (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_be (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_be (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_be (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_be (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_be (w0[2], w0[3], offset);\n      w7[3] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign_be (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_bytealign_be (w7[3],     0, offset);\n      c7[1] = hc_bytealign_be (w7[2], w7[3], offset);\n      c7[0] = hc_bytealign_be (w7[1], w7[2], offset);\n      c6[3] = hc_bytealign_be (w7[0], w7[1], offset);\n      c6[2] = hc_bytealign_be (w6[3], w7[0], offset);\n      c6[1] = hc_bytealign_be (w6[2], w6[3], offset);\n      c6[0] = hc_bytealign_be (w6[1], w6[2], offset);\n      c5[3] = hc_bytealign_be (w6[0], w6[1], offset);\n      c5[2] = hc_bytealign_be (w5[3], w6[0], offset);\n      c5[1] = hc_bytealign_be (w5[2], w5[3], offset);\n      c5[0] = hc_bytealign_be (w5[1], w5[2], offset);\n      c4[3] = hc_bytealign_be (w5[0], w5[1], offset);\n      c4[2] = hc_bytealign_be (w4[3], w5[0], offset);\n      c4[1] = hc_bytealign_be (w4[2], w4[3], offset);\n      c4[0] = hc_bytealign_be (w4[1], w4[2], offset);\n      c3[3] = hc_bytealign_be (w4[0], w4[1], offset);\n      c3[2] = hc_bytealign_be (w3[3], w4[0], offset);\n      c3[1] = hc_bytealign_be (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_be (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_be (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_be (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_be (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_be (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_be (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_be (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_be (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_be (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_be (w0[1], w0[2], offset);\n      w7[3] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign_be (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_bytealign_be (w7[3],     0, offset);\n      c7[2] = hc_bytealign_be (w7[2], w7[3], offset);\n      c7[1] = hc_bytealign_be (w7[1], w7[2], offset);\n      c7[0] = hc_bytealign_be (w7[0], w7[1], offset);\n      c6[3] = hc_bytealign_be (w6[3], w7[0], offset);\n      c6[2] = hc_bytealign_be (w6[2], w6[3], offset);\n      c6[1] = hc_bytealign_be (w6[1], w6[2], offset);\n      c6[0] = hc_bytealign_be (w6[0], w6[1], offset);\n      c5[3] = hc_bytealign_be (w5[3], w6[0], offset);\n      c5[2] = hc_bytealign_be (w5[2], w5[3], offset);\n      c5[1] = hc_bytealign_be (w5[1], w5[2], offset);\n      c5[0] = hc_bytealign_be (w5[0], w5[1], offset);\n      c4[3] = hc_bytealign_be (w4[3], w5[0], offset);\n      c4[2] = hc_bytealign_be (w4[2], w4[3], offset);\n      c4[1] = hc_bytealign_be (w4[1], w4[2], offset);\n      c4[0] = hc_bytealign_be (w4[0], w4[1], offset);\n      c3[3] = hc_bytealign_be (w3[3], w4[0], offset);\n      c3[2] = hc_bytealign_be (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_be (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_be (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_be (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_be (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_be (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_be (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_be (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_be (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_be (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_be (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_be (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_be (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_be (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_be (w0[0], w0[1], offset);\n      w7[3] = hc_bytealign_be (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_byte_perm (    0, w7[3], selector);\n      w7[3] = hc_byte_perm (w7[3], w7[2], selector);\n      w7[2] = hc_byte_perm (w7[2], w7[1], selector);\n      w7[1] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[0] = hc_byte_perm (w7[0], w6[3], selector);\n      w6[3] = hc_byte_perm (w6[3], w6[2], selector);\n      w6[2] = hc_byte_perm (w6[2], w6[1], selector);\n      w6[1] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[0] = hc_byte_perm (w6[0], w5[3], selector);\n      w5[3] = hc_byte_perm (w5[3], w5[2], selector);\n      w5[2] = hc_byte_perm (w5[2], w5[1], selector);\n      w5[1] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w4[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w4[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w4[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w3[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      c0[1] = hc_byte_perm (    0, w7[3], selector);\n      c0[0] = hc_byte_perm (w7[3], w7[2], selector);\n      w7[3] = hc_byte_perm (w7[2], w7[1], selector);\n      w7[2] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[1] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[0] = hc_byte_perm (w6[3], w6[2], selector);\n      w6[3] = hc_byte_perm (w6[2], w6[1], selector);\n      w6[2] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[1] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[0] = hc_byte_perm (w5[3], w5[2], selector);\n      w5[3] = hc_byte_perm (w5[2], w5[1], selector);\n      w5[2] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[1] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w4[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w4[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w3[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_byte_perm (    0, w7[3], selector);\n      c0[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c0[0] = hc_byte_perm (w7[2], w7[1], selector);\n      w7[3] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[2] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[1] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[0] = hc_byte_perm (w6[2], w6[1], selector);\n      w6[3] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[2] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[1] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[0] = hc_byte_perm (w5[2], w5[1], selector);\n      w5[3] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[2] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[1] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w4[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w3[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_byte_perm (    0, w7[3], selector);\n      c0[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c0[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c0[0] = hc_byte_perm (w7[1], w7[0], selector);\n      w7[3] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[2] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[1] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[0] = hc_byte_perm (w6[1], w6[0], selector);\n      w6[3] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[2] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[1] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[0] = hc_byte_perm (w5[1], w5[0], selector);\n      w5[3] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[2] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[1] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w4[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w3[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_byte_perm (    0, w7[3], selector);\n      c0[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c0[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c0[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c0[0] = hc_byte_perm (w7[0], w6[3], selector);\n      w7[3] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[2] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[1] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[0] = hc_byte_perm (w6[0], w5[3], selector);\n      w6[3] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[2] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[1] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w5[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w4[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w3[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_byte_perm (    0, w7[3], selector);\n      c1[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c0[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c0[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c0[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c0[0] = hc_byte_perm (w6[3], w6[2], selector);\n      w7[3] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[2] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[1] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[0] = hc_byte_perm (w5[3], w5[2], selector);\n      w6[3] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[2] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[1] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w5[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w4[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w3[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_byte_perm (    0, w7[3], selector);\n      c1[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c1[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c0[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c0[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c0[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c0[0] = hc_byte_perm (w6[2], w6[1], selector);\n      w7[3] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[2] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[1] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[0] = hc_byte_perm (w5[2], w5[1], selector);\n      w6[3] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[2] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[1] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w5[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w4[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w3[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_byte_perm (    0, w7[3], selector);\n      c1[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c1[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c1[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c0[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c0[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c0[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c0[0] = hc_byte_perm (w6[1], w6[0], selector);\n      w7[3] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[2] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[1] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[0] = hc_byte_perm (w5[1], w5[0], selector);\n      w6[3] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[2] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[1] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w5[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w4[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w3[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_byte_perm (    0, w7[3], selector);\n      c1[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c1[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c1[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c1[0] = hc_byte_perm (w7[0], w6[3], selector);\n      c0[3] = hc_byte_perm (w6[3], w6[2], selector);\n      c0[2] = hc_byte_perm (w6[2], w6[1], selector);\n      c0[1] = hc_byte_perm (w6[1], w6[0], selector);\n      c0[0] = hc_byte_perm (w6[0], w5[3], selector);\n      w7[3] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[2] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[1] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w6[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w5[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w4[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w3[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_byte_perm (    0, w7[3], selector);\n      c2[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c1[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c1[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c1[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c1[0] = hc_byte_perm (w6[3], w6[2], selector);\n      c0[3] = hc_byte_perm (w6[2], w6[1], selector);\n      c0[2] = hc_byte_perm (w6[1], w6[0], selector);\n      c0[1] = hc_byte_perm (w6[0], w5[3], selector);\n      c0[0] = hc_byte_perm (w5[3], w5[2], selector);\n      w7[3] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[2] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[1] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w6[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w5[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w4[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w3[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_byte_perm (    0, w7[3], selector);\n      c2[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c2[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c1[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c1[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c1[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c1[0] = hc_byte_perm (w6[2], w6[1], selector);\n      c0[3] = hc_byte_perm (w6[1], w6[0], selector);\n      c0[2] = hc_byte_perm (w6[0], w5[3], selector);\n      c0[1] = hc_byte_perm (w5[3], w5[2], selector);\n      c0[0] = hc_byte_perm (w5[2], w5[1], selector);\n      w7[3] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[2] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[1] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w6[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w5[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w4[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w3[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_byte_perm (    0, w7[3], selector);\n      c2[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c2[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c2[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c1[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c1[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c1[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c1[0] = hc_byte_perm (w6[1], w6[0], selector);\n      c0[3] = hc_byte_perm (w6[0], w5[3], selector);\n      c0[2] = hc_byte_perm (w5[3], w5[2], selector);\n      c0[1] = hc_byte_perm (w5[2], w5[1], selector);\n      c0[0] = hc_byte_perm (w5[1], w5[0], selector);\n      w7[3] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[2] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[1] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w6[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w5[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w4[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w3[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_byte_perm (    0, w7[3], selector);\n      c2[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c2[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c2[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c2[0] = hc_byte_perm (w7[0], w6[3], selector);\n      c1[3] = hc_byte_perm (w6[3], w6[2], selector);\n      c1[2] = hc_byte_perm (w6[2], w6[1], selector);\n      c1[1] = hc_byte_perm (w6[1], w6[0], selector);\n      c1[0] = hc_byte_perm (w6[0], w5[3], selector);\n      c0[3] = hc_byte_perm (w5[3], w5[2], selector);\n      c0[2] = hc_byte_perm (w5[2], w5[1], selector);\n      c0[1] = hc_byte_perm (w5[1], w5[0], selector);\n      c0[0] = hc_byte_perm (w5[0], w4[3], selector);\n      w7[3] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[2] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[1] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w6[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w5[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w4[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w3[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_byte_perm (    0, w7[3], selector);\n      c3[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c2[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c2[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c2[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c2[0] = hc_byte_perm (w6[3], w6[2], selector);\n      c1[3] = hc_byte_perm (w6[2], w6[1], selector);\n      c1[2] = hc_byte_perm (w6[1], w6[0], selector);\n      c1[1] = hc_byte_perm (w6[0], w5[3], selector);\n      c1[0] = hc_byte_perm (w5[3], w5[2], selector);\n      c0[3] = hc_byte_perm (w5[2], w5[1], selector);\n      c0[2] = hc_byte_perm (w5[1], w5[0], selector);\n      c0[1] = hc_byte_perm (w5[0], w4[3], selector);\n      c0[0] = hc_byte_perm (w4[3], w4[2], selector);\n      w7[3] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[2] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[1] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w6[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w5[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w4[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w3[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_byte_perm (    0, w7[3], selector);\n      c3[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c3[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c2[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c2[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c2[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c2[0] = hc_byte_perm (w6[2], w6[1], selector);\n      c1[3] = hc_byte_perm (w6[1], w6[0], selector);\n      c1[2] = hc_byte_perm (w6[0], w5[3], selector);\n      c1[1] = hc_byte_perm (w5[3], w5[2], selector);\n      c1[0] = hc_byte_perm (w5[2], w5[1], selector);\n      c0[3] = hc_byte_perm (w5[1], w5[0], selector);\n      c0[2] = hc_byte_perm (w5[0], w4[3], selector);\n      c0[1] = hc_byte_perm (w4[3], w4[2], selector);\n      c0[0] = hc_byte_perm (w4[2], w4[1], selector);\n      w7[3] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[2] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[1] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w6[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w5[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w4[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w3[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_byte_perm (    0, w7[3], selector);\n      c3[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c3[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c3[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c2[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c2[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c2[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c2[0] = hc_byte_perm (w6[1], w6[0], selector);\n      c1[3] = hc_byte_perm (w6[0], w5[3], selector);\n      c1[2] = hc_byte_perm (w5[3], w5[2], selector);\n      c1[1] = hc_byte_perm (w5[2], w5[1], selector);\n      c1[0] = hc_byte_perm (w5[1], w5[0], selector);\n      c0[3] = hc_byte_perm (w5[0], w4[3], selector);\n      c0[2] = hc_byte_perm (w4[3], w4[2], selector);\n      c0[1] = hc_byte_perm (w4[2], w4[1], selector);\n      c0[0] = hc_byte_perm (w4[1], w4[0], selector);\n      w7[3] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[2] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[1] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w6[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w5[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w4[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w3[3] = hc_byte_perm (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_byte_perm (    0, w7[3], selector);\n      c3[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c3[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c3[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c3[0] = hc_byte_perm (w7[0], w6[3], selector);\n      c2[3] = hc_byte_perm (w6[3], w6[2], selector);\n      c2[2] = hc_byte_perm (w6[2], w6[1], selector);\n      c2[1] = hc_byte_perm (w6[1], w6[0], selector);\n      c2[0] = hc_byte_perm (w6[0], w5[3], selector);\n      c1[3] = hc_byte_perm (w5[3], w5[2], selector);\n      c1[2] = hc_byte_perm (w5[2], w5[1], selector);\n      c1[1] = hc_byte_perm (w5[1], w5[0], selector);\n      c1[0] = hc_byte_perm (w5[0], w4[3], selector);\n      c0[3] = hc_byte_perm (w4[3], w4[2], selector);\n      c0[2] = hc_byte_perm (w4[2], w4[1], selector);\n      c0[1] = hc_byte_perm (w4[1], w4[0], selector);\n      c0[0] = hc_byte_perm (w4[0], w3[3], selector);\n      w7[3] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[2] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[1] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w6[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w5[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w4[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[0] = hc_byte_perm (w0[0],     0, selector);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_byte_perm (    0, w7[3], selector);\n      c4[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c3[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c3[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c3[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c3[0] = hc_byte_perm (w6[3], w6[2], selector);\n      c2[3] = hc_byte_perm (w6[2], w6[1], selector);\n      c2[2] = hc_byte_perm (w6[1], w6[0], selector);\n      c2[1] = hc_byte_perm (w6[0], w5[3], selector);\n      c2[0] = hc_byte_perm (w5[3], w5[2], selector);\n      c1[3] = hc_byte_perm (w5[2], w5[1], selector);\n      c1[2] = hc_byte_perm (w5[1], w5[0], selector);\n      c1[1] = hc_byte_perm (w5[0], w4[3], selector);\n      c1[0] = hc_byte_perm (w4[3], w4[2], selector);\n      c0[3] = hc_byte_perm (w4[2], w4[1], selector);\n      c0[2] = hc_byte_perm (w4[1], w4[0], selector);\n      c0[1] = hc_byte_perm (w4[0], w3[3], selector);\n      c0[0] = hc_byte_perm (w3[3], w3[2], selector);\n      w7[3] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[2] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[1] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w6[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w5[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w4[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[1] = hc_byte_perm (w0[0],     0, selector);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_byte_perm (    0, w7[3], selector);\n      c4[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c4[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c3[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c3[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c3[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c3[0] = hc_byte_perm (w6[2], w6[1], selector);\n      c2[3] = hc_byte_perm (w6[1], w6[0], selector);\n      c2[2] = hc_byte_perm (w6[0], w5[3], selector);\n      c2[1] = hc_byte_perm (w5[3], w5[2], selector);\n      c2[0] = hc_byte_perm (w5[2], w5[1], selector);\n      c1[3] = hc_byte_perm (w5[1], w5[0], selector);\n      c1[2] = hc_byte_perm (w5[0], w4[3], selector);\n      c1[1] = hc_byte_perm (w4[3], w4[2], selector);\n      c1[0] = hc_byte_perm (w4[2], w4[1], selector);\n      c0[3] = hc_byte_perm (w4[1], w4[0], selector);\n      c0[2] = hc_byte_perm (w4[0], w3[3], selector);\n      c0[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[0] = hc_byte_perm (w3[2], w3[1], selector);\n      w7[3] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[2] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[1] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w6[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w5[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w4[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[2] = hc_byte_perm (w0[0],     0, selector);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_byte_perm (    0, w7[3], selector);\n      c4[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c4[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c4[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c3[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c3[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c3[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c3[0] = hc_byte_perm (w6[1], w6[0], selector);\n      c2[3] = hc_byte_perm (w6[0], w5[3], selector);\n      c2[2] = hc_byte_perm (w5[3], w5[2], selector);\n      c2[1] = hc_byte_perm (w5[2], w5[1], selector);\n      c2[0] = hc_byte_perm (w5[1], w5[0], selector);\n      c1[3] = hc_byte_perm (w5[0], w4[3], selector);\n      c1[2] = hc_byte_perm (w4[3], w4[2], selector);\n      c1[1] = hc_byte_perm (w4[2], w4[1], selector);\n      c1[0] = hc_byte_perm (w4[1], w4[0], selector);\n      c0[3] = hc_byte_perm (w4[0], w3[3], selector);\n      c0[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[0] = hc_byte_perm (w3[1], w3[0], selector);\n      w7[3] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[2] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[1] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w6[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w5[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w4[3] = hc_byte_perm (w0[0],     0, selector);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_byte_perm (    0, w7[3], selector);\n      c4[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c4[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c4[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c4[0] = hc_byte_perm (w7[0], w6[3], selector);\n      c3[3] = hc_byte_perm (w6[3], w6[2], selector);\n      c3[2] = hc_byte_perm (w6[2], w6[1], selector);\n      c3[1] = hc_byte_perm (w6[1], w6[0], selector);\n      c3[0] = hc_byte_perm (w6[0], w5[3], selector);\n      c2[3] = hc_byte_perm (w5[3], w5[2], selector);\n      c2[2] = hc_byte_perm (w5[2], w5[1], selector);\n      c2[1] = hc_byte_perm (w5[1], w5[0], selector);\n      c2[0] = hc_byte_perm (w5[0], w4[3], selector);\n      c1[3] = hc_byte_perm (w4[3], w4[2], selector);\n      c1[2] = hc_byte_perm (w4[2], w4[1], selector);\n      c1[1] = hc_byte_perm (w4[1], w4[0], selector);\n      c1[0] = hc_byte_perm (w4[0], w3[3], selector);\n      c0[3] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[2] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[1] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[0] = hc_byte_perm (w3[0], w2[3], selector);\n      w7[3] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[2] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[1] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w6[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w5[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[0] = hc_byte_perm (w0[0],     0, selector);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_byte_perm (    0, w7[3], selector);\n      c5[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c4[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c4[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c4[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c4[0] = hc_byte_perm (w6[3], w6[2], selector);\n      c3[3] = hc_byte_perm (w6[2], w6[1], selector);\n      c3[2] = hc_byte_perm (w6[1], w6[0], selector);\n      c3[1] = hc_byte_perm (w6[0], w5[3], selector);\n      c3[0] = hc_byte_perm (w5[3], w5[2], selector);\n      c2[3] = hc_byte_perm (w5[2], w5[1], selector);\n      c2[2] = hc_byte_perm (w5[1], w5[0], selector);\n      c2[1] = hc_byte_perm (w5[0], w4[3], selector);\n      c2[0] = hc_byte_perm (w4[3], w4[2], selector);\n      c1[3] = hc_byte_perm (w4[2], w4[1], selector);\n      c1[2] = hc_byte_perm (w4[1], w4[0], selector);\n      c1[1] = hc_byte_perm (w4[0], w3[3], selector);\n      c1[0] = hc_byte_perm (w3[3], w3[2], selector);\n      c0[3] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[2] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[1] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[0] = hc_byte_perm (w2[3], w2[2], selector);\n      w7[3] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[2] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[1] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w6[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w5[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[1] = hc_byte_perm (w0[0],     0, selector);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_byte_perm (    0, w7[3], selector);\n      c5[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c5[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c4[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c4[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c4[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c4[0] = hc_byte_perm (w6[2], w6[1], selector);\n      c3[3] = hc_byte_perm (w6[1], w6[0], selector);\n      c3[2] = hc_byte_perm (w6[0], w5[3], selector);\n      c3[1] = hc_byte_perm (w5[3], w5[2], selector);\n      c3[0] = hc_byte_perm (w5[2], w5[1], selector);\n      c2[3] = hc_byte_perm (w5[1], w5[0], selector);\n      c2[2] = hc_byte_perm (w5[0], w4[3], selector);\n      c2[1] = hc_byte_perm (w4[3], w4[2], selector);\n      c2[0] = hc_byte_perm (w4[2], w4[1], selector);\n      c1[3] = hc_byte_perm (w4[1], w4[0], selector);\n      c1[2] = hc_byte_perm (w4[0], w3[3], selector);\n      c1[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[0] = hc_byte_perm (w3[2], w3[1], selector);\n      c0[3] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[2] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[1] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[0] = hc_byte_perm (w2[2], w2[1], selector);\n      w7[3] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[2] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[1] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w6[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w5[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[2] = hc_byte_perm (w0[0],     0, selector);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_byte_perm (    0, w7[3], selector);\n      c5[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c5[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c5[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c4[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c4[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c4[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c4[0] = hc_byte_perm (w6[1], w6[0], selector);\n      c3[3] = hc_byte_perm (w6[0], w5[3], selector);\n      c3[2] = hc_byte_perm (w5[3], w5[2], selector);\n      c3[1] = hc_byte_perm (w5[2], w5[1], selector);\n      c3[0] = hc_byte_perm (w5[1], w5[0], selector);\n      c2[3] = hc_byte_perm (w5[0], w4[3], selector);\n      c2[2] = hc_byte_perm (w4[3], w4[2], selector);\n      c2[1] = hc_byte_perm (w4[2], w4[1], selector);\n      c2[0] = hc_byte_perm (w4[1], w4[0], selector);\n      c1[3] = hc_byte_perm (w4[0], w3[3], selector);\n      c1[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[0] = hc_byte_perm (w3[1], w3[0], selector);\n      c0[3] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[2] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[1] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[0] = hc_byte_perm (w2[1], w2[0], selector);\n      w7[3] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[2] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[1] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w6[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w5[3] = hc_byte_perm (w0[0],     0, selector);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_byte_perm (    0, w7[3], selector);\n      c5[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c5[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c5[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c5[0] = hc_byte_perm (w7[0], w6[3], selector);\n      c4[3] = hc_byte_perm (w6[3], w6[2], selector);\n      c4[2] = hc_byte_perm (w6[2], w6[1], selector);\n      c4[1] = hc_byte_perm (w6[1], w6[0], selector);\n      c4[0] = hc_byte_perm (w6[0], w5[3], selector);\n      c3[3] = hc_byte_perm (w5[3], w5[2], selector);\n      c3[2] = hc_byte_perm (w5[2], w5[1], selector);\n      c3[1] = hc_byte_perm (w5[1], w5[0], selector);\n      c3[0] = hc_byte_perm (w5[0], w4[3], selector);\n      c2[3] = hc_byte_perm (w4[3], w4[2], selector);\n      c2[2] = hc_byte_perm (w4[2], w4[1], selector);\n      c2[1] = hc_byte_perm (w4[1], w4[0], selector);\n      c2[0] = hc_byte_perm (w4[0], w3[3], selector);\n      c1[3] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[2] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[1] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[0] = hc_byte_perm (w3[0], w2[3], selector);\n      c0[3] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[2] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[1] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[0] = hc_byte_perm (w2[0], w1[3], selector);\n      w7[3] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[2] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[1] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w6[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[0] = hc_byte_perm (w0[0],     0, selector);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_byte_perm (    0, w7[3], selector);\n      c6[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c5[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c5[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c5[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c5[0] = hc_byte_perm (w6[3], w6[2], selector);\n      c4[3] = hc_byte_perm (w6[2], w6[1], selector);\n      c4[2] = hc_byte_perm (w6[1], w6[0], selector);\n      c4[1] = hc_byte_perm (w6[0], w5[3], selector);\n      c4[0] = hc_byte_perm (w5[3], w5[2], selector);\n      c3[3] = hc_byte_perm (w5[2], w5[1], selector);\n      c3[2] = hc_byte_perm (w5[1], w5[0], selector);\n      c3[1] = hc_byte_perm (w5[0], w4[3], selector);\n      c3[0] = hc_byte_perm (w4[3], w4[2], selector);\n      c2[3] = hc_byte_perm (w4[2], w4[1], selector);\n      c2[2] = hc_byte_perm (w4[1], w4[0], selector);\n      c2[1] = hc_byte_perm (w4[0], w3[3], selector);\n      c2[0] = hc_byte_perm (w3[3], w3[2], selector);\n      c1[3] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[2] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[1] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[0] = hc_byte_perm (w2[3], w2[2], selector);\n      c0[3] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[2] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[1] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[0] = hc_byte_perm (w1[3], w1[2], selector);\n      w7[3] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[2] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[1] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w6[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[1] = hc_byte_perm (w0[0],     0, selector);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_byte_perm (    0, w7[3], selector);\n      c6[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c6[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c5[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c5[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c5[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c5[0] = hc_byte_perm (w6[2], w6[1], selector);\n      c4[3] = hc_byte_perm (w6[1], w6[0], selector);\n      c4[2] = hc_byte_perm (w6[0], w5[3], selector);\n      c4[1] = hc_byte_perm (w5[3], w5[2], selector);\n      c4[0] = hc_byte_perm (w5[2], w5[1], selector);\n      c3[3] = hc_byte_perm (w5[1], w5[0], selector);\n      c3[2] = hc_byte_perm (w5[0], w4[3], selector);\n      c3[1] = hc_byte_perm (w4[3], w4[2], selector);\n      c3[0] = hc_byte_perm (w4[2], w4[1], selector);\n      c2[3] = hc_byte_perm (w4[1], w4[0], selector);\n      c2[2] = hc_byte_perm (w4[0], w3[3], selector);\n      c2[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[0] = hc_byte_perm (w3[2], w3[1], selector);\n      c1[3] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[2] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[1] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[0] = hc_byte_perm (w2[2], w2[1], selector);\n      c0[3] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[2] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[1] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[0] = hc_byte_perm (w1[2], w1[1], selector);\n      w7[3] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[2] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[1] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w6[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[2] = hc_byte_perm (w0[0],     0, selector);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_byte_perm (    0, w7[3], selector);\n      c6[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c6[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c6[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c5[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c5[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c5[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c5[0] = hc_byte_perm (w6[1], w6[0], selector);\n      c4[3] = hc_byte_perm (w6[0], w5[3], selector);\n      c4[2] = hc_byte_perm (w5[3], w5[2], selector);\n      c4[1] = hc_byte_perm (w5[2], w5[1], selector);\n      c4[0] = hc_byte_perm (w5[1], w5[0], selector);\n      c3[3] = hc_byte_perm (w5[0], w4[3], selector);\n      c3[2] = hc_byte_perm (w4[3], w4[2], selector);\n      c3[1] = hc_byte_perm (w4[2], w4[1], selector);\n      c3[0] = hc_byte_perm (w4[1], w4[0], selector);\n      c2[3] = hc_byte_perm (w4[0], w3[3], selector);\n      c2[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[0] = hc_byte_perm (w3[1], w3[0], selector);\n      c1[3] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[2] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[1] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[0] = hc_byte_perm (w2[1], w2[0], selector);\n      c0[3] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[2] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[1] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[0] = hc_byte_perm (w1[1], w1[0], selector);\n      w7[3] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[2] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[1] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w6[3] = hc_byte_perm (w0[0],     0, selector);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_byte_perm (    0, w7[3], selector);\n      c6[3] = hc_byte_perm (w7[3], w7[2], selector);\n      c6[2] = hc_byte_perm (w7[2], w7[1], selector);\n      c6[1] = hc_byte_perm (w7[1], w7[0], selector);\n      c6[0] = hc_byte_perm (w7[0], w6[3], selector);\n      c5[3] = hc_byte_perm (w6[3], w6[2], selector);\n      c5[2] = hc_byte_perm (w6[2], w6[1], selector);\n      c5[1] = hc_byte_perm (w6[1], w6[0], selector);\n      c5[0] = hc_byte_perm (w6[0], w5[3], selector);\n      c4[3] = hc_byte_perm (w5[3], w5[2], selector);\n      c4[2] = hc_byte_perm (w5[2], w5[1], selector);\n      c4[1] = hc_byte_perm (w5[1], w5[0], selector);\n      c4[0] = hc_byte_perm (w5[0], w4[3], selector);\n      c3[3] = hc_byte_perm (w4[3], w4[2], selector);\n      c3[2] = hc_byte_perm (w4[2], w4[1], selector);\n      c3[1] = hc_byte_perm (w4[1], w4[0], selector);\n      c3[0] = hc_byte_perm (w4[0], w3[3], selector);\n      c2[3] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[2] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[1] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[0] = hc_byte_perm (w3[0], w2[3], selector);\n      c1[3] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[2] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[1] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[0] = hc_byte_perm (w2[0], w1[3], selector);\n      c0[3] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[2] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[1] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[0] = hc_byte_perm (w1[0], w0[3], selector);\n      w7[3] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[2] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[1] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[0] = hc_byte_perm (w0[0],     0, selector);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_byte_perm (    0, w7[3], selector);\n      c7[0] = hc_byte_perm (w7[3], w7[2], selector);\n      c6[3] = hc_byte_perm (w7[2], w7[1], selector);\n      c6[2] = hc_byte_perm (w7[1], w7[0], selector);\n      c6[1] = hc_byte_perm (w7[0], w6[3], selector);\n      c6[0] = hc_byte_perm (w6[3], w6[2], selector);\n      c5[3] = hc_byte_perm (w6[2], w6[1], selector);\n      c5[2] = hc_byte_perm (w6[1], w6[0], selector);\n      c5[1] = hc_byte_perm (w6[0], w5[3], selector);\n      c5[0] = hc_byte_perm (w5[3], w5[2], selector);\n      c4[3] = hc_byte_perm (w5[2], w5[1], selector);\n      c4[2] = hc_byte_perm (w5[1], w5[0], selector);\n      c4[1] = hc_byte_perm (w5[0], w4[3], selector);\n      c4[0] = hc_byte_perm (w4[3], w4[2], selector);\n      c3[3] = hc_byte_perm (w4[2], w4[1], selector);\n      c3[2] = hc_byte_perm (w4[1], w4[0], selector);\n      c3[1] = hc_byte_perm (w4[0], w3[3], selector);\n      c3[0] = hc_byte_perm (w3[3], w3[2], selector);\n      c2[3] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[2] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[1] = hc_byte_perm (w3[0], w2[3], selector);\n      c2[0] = hc_byte_perm (w2[3], w2[2], selector);\n      c1[3] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[2] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[1] = hc_byte_perm (w2[0], w1[3], selector);\n      c1[0] = hc_byte_perm (w1[3], w1[2], selector);\n      c0[3] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[2] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[1] = hc_byte_perm (w1[0], w0[3], selector);\n      c0[0] = hc_byte_perm (w0[3], w0[2], selector);\n      w7[3] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[2] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[1] = hc_byte_perm (w0[0],     0, selector);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_byte_perm (    0, w7[3], selector);\n      c7[1] = hc_byte_perm (w7[3], w7[2], selector);\n      c7[0] = hc_byte_perm (w7[2], w7[1], selector);\n      c6[3] = hc_byte_perm (w7[1], w7[0], selector);\n      c6[2] = hc_byte_perm (w7[0], w6[3], selector);\n      c6[1] = hc_byte_perm (w6[3], w6[2], selector);\n      c6[0] = hc_byte_perm (w6[2], w6[1], selector);\n      c5[3] = hc_byte_perm (w6[1], w6[0], selector);\n      c5[2] = hc_byte_perm (w6[0], w5[3], selector);\n      c5[1] = hc_byte_perm (w5[3], w5[2], selector);\n      c5[0] = hc_byte_perm (w5[2], w5[1], selector);\n      c4[3] = hc_byte_perm (w5[1], w5[0], selector);\n      c4[2] = hc_byte_perm (w5[0], w4[3], selector);\n      c4[1] = hc_byte_perm (w4[3], w4[2], selector);\n      c4[0] = hc_byte_perm (w4[2], w4[1], selector);\n      c3[3] = hc_byte_perm (w4[1], w4[0], selector);\n      c3[2] = hc_byte_perm (w4[0], w3[3], selector);\n      c3[1] = hc_byte_perm (w3[3], w3[2], selector);\n      c3[0] = hc_byte_perm (w3[2], w3[1], selector);\n      c2[3] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[2] = hc_byte_perm (w3[0], w2[3], selector);\n      c2[1] = hc_byte_perm (w2[3], w2[2], selector);\n      c2[0] = hc_byte_perm (w2[2], w2[1], selector);\n      c1[3] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[2] = hc_byte_perm (w2[0], w1[3], selector);\n      c1[1] = hc_byte_perm (w1[3], w1[2], selector);\n      c1[0] = hc_byte_perm (w1[2], w1[1], selector);\n      c0[3] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[2] = hc_byte_perm (w1[0], w0[3], selector);\n      c0[1] = hc_byte_perm (w0[3], w0[2], selector);\n      c0[0] = hc_byte_perm (w0[2], w0[1], selector);\n      w7[3] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[2] = hc_byte_perm (w0[0],     0, selector);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_byte_perm (    0, w7[3], selector);\n      c7[2] = hc_byte_perm (w7[3], w7[2], selector);\n      c7[1] = hc_byte_perm (w7[2], w7[1], selector);\n      c7[0] = hc_byte_perm (w7[1], w7[0], selector);\n      c6[3] = hc_byte_perm (w7[0], w6[3], selector);\n      c6[2] = hc_byte_perm (w6[3], w6[2], selector);\n      c6[1] = hc_byte_perm (w6[2], w6[1], selector);\n      c6[0] = hc_byte_perm (w6[1], w6[0], selector);\n      c5[3] = hc_byte_perm (w6[0], w5[3], selector);\n      c5[2] = hc_byte_perm (w5[3], w5[2], selector);\n      c5[1] = hc_byte_perm (w5[2], w5[1], selector);\n      c5[0] = hc_byte_perm (w5[1], w5[0], selector);\n      c4[3] = hc_byte_perm (w5[0], w4[3], selector);\n      c4[2] = hc_byte_perm (w4[3], w4[2], selector);\n      c4[1] = hc_byte_perm (w4[2], w4[1], selector);\n      c4[0] = hc_byte_perm (w4[1], w4[0], selector);\n      c3[3] = hc_byte_perm (w4[0], w3[3], selector);\n      c3[2] = hc_byte_perm (w3[3], w3[2], selector);\n      c3[1] = hc_byte_perm (w3[2], w3[1], selector);\n      c3[0] = hc_byte_perm (w3[1], w3[0], selector);\n      c2[3] = hc_byte_perm (w3[0], w2[3], selector);\n      c2[2] = hc_byte_perm (w2[3], w2[2], selector);\n      c2[1] = hc_byte_perm (w2[2], w2[1], selector);\n      c2[0] = hc_byte_perm (w2[1], w2[0], selector);\n      c1[3] = hc_byte_perm (w2[0], w1[3], selector);\n      c1[2] = hc_byte_perm (w1[3], w1[2], selector);\n      c1[1] = hc_byte_perm (w1[2], w1[1], selector);\n      c1[0] = hc_byte_perm (w1[1], w1[0], selector);\n      c0[3] = hc_byte_perm (w1[0], w0[3], selector);\n      c0[2] = hc_byte_perm (w0[3], w0[2], selector);\n      c0[1] = hc_byte_perm (w0[2], w0[1], selector);\n      c0[0] = hc_byte_perm (w0[1], w0[0], selector);\n      w7[3] = hc_byte_perm (w0[0],     0, selector);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_1x64_le (PRIVATE_AS u32x *w, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_bytealign (w[62], w[63], offset);\n      w[62] = hc_bytealign (w[61], w[62], offset);\n      w[61] = hc_bytealign (w[60], w[61], offset);\n      w[60] = hc_bytealign (w[59], w[60], offset);\n      w[59] = hc_bytealign (w[58], w[59], offset);\n      w[58] = hc_bytealign (w[57], w[58], offset);\n      w[57] = hc_bytealign (w[56], w[57], offset);\n      w[56] = hc_bytealign (w[55], w[56], offset);\n      w[55] = hc_bytealign (w[54], w[55], offset);\n      w[54] = hc_bytealign (w[53], w[54], offset);\n      w[53] = hc_bytealign (w[52], w[53], offset);\n      w[52] = hc_bytealign (w[51], w[52], offset);\n      w[51] = hc_bytealign (w[50], w[51], offset);\n      w[50] = hc_bytealign (w[49], w[50], offset);\n      w[49] = hc_bytealign (w[48], w[49], offset);\n      w[48] = hc_bytealign (w[47], w[48], offset);\n      w[47] = hc_bytealign (w[46], w[47], offset);\n      w[46] = hc_bytealign (w[45], w[46], offset);\n      w[45] = hc_bytealign (w[44], w[45], offset);\n      w[44] = hc_bytealign (w[43], w[44], offset);\n      w[43] = hc_bytealign (w[42], w[43], offset);\n      w[42] = hc_bytealign (w[41], w[42], offset);\n      w[41] = hc_bytealign (w[40], w[41], offset);\n      w[40] = hc_bytealign (w[39], w[40], offset);\n      w[39] = hc_bytealign (w[38], w[39], offset);\n      w[38] = hc_bytealign (w[37], w[38], offset);\n      w[37] = hc_bytealign (w[36], w[37], offset);\n      w[36] = hc_bytealign (w[35], w[36], offset);\n      w[35] = hc_bytealign (w[34], w[35], offset);\n      w[34] = hc_bytealign (w[33], w[34], offset);\n      w[33] = hc_bytealign (w[32], w[33], offset);\n      w[32] = hc_bytealign (w[31], w[32], offset);\n      w[31] = hc_bytealign (w[30], w[31], offset);\n      w[30] = hc_bytealign (w[29], w[30], offset);\n      w[29] = hc_bytealign (w[28], w[29], offset);\n      w[28] = hc_bytealign (w[27], w[28], offset);\n      w[27] = hc_bytealign (w[26], w[27], offset);\n      w[26] = hc_bytealign (w[25], w[26], offset);\n      w[25] = hc_bytealign (w[24], w[25], offset);\n      w[24] = hc_bytealign (w[23], w[24], offset);\n      w[23] = hc_bytealign (w[22], w[23], offset);\n      w[22] = hc_bytealign (w[21], w[22], offset);\n      w[21] = hc_bytealign (w[20], w[21], offset);\n      w[20] = hc_bytealign (w[19], w[20], offset);\n      w[19] = hc_bytealign (w[18], w[19], offset);\n      w[18] = hc_bytealign (w[17], w[18], offset);\n      w[17] = hc_bytealign (w[16], w[17], offset);\n      w[16] = hc_bytealign (w[15], w[16], offset);\n      w[15] = hc_bytealign (w[14], w[15], offset);\n      w[14] = hc_bytealign (w[13], w[14], offset);\n      w[13] = hc_bytealign (w[12], w[13], offset);\n      w[12] = hc_bytealign (w[11], w[12], offset);\n      w[11] = hc_bytealign (w[10], w[11], offset);\n      w[10] = hc_bytealign (w[ 9], w[10], offset);\n      w[ 9] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[ 8] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[ 7] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[ 6] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[ 5] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[ 4] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 3] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 2] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 1] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 0] = hc_bytealign (    0, w[ 0], offset);\n\n      break;\n\n    case  1:\n      w[63] = hc_bytealign (w[61], w[62], offset);\n      w[62] = hc_bytealign (w[60], w[61], offset);\n      w[61] = hc_bytealign (w[59], w[60], offset);\n      w[60] = hc_bytealign (w[58], w[59], offset);\n      w[59] = hc_bytealign (w[57], w[58], offset);\n      w[58] = hc_bytealign (w[56], w[57], offset);\n      w[57] = hc_bytealign (w[55], w[56], offset);\n      w[56] = hc_bytealign (w[54], w[55], offset);\n      w[55] = hc_bytealign (w[53], w[54], offset);\n      w[54] = hc_bytealign (w[52], w[53], offset);\n      w[53] = hc_bytealign (w[51], w[52], offset);\n      w[52] = hc_bytealign (w[50], w[51], offset);\n      w[51] = hc_bytealign (w[49], w[50], offset);\n      w[50] = hc_bytealign (w[48], w[49], offset);\n      w[49] = hc_bytealign (w[47], w[48], offset);\n      w[48] = hc_bytealign (w[46], w[47], offset);\n      w[47] = hc_bytealign (w[45], w[46], offset);\n      w[46] = hc_bytealign (w[44], w[45], offset);\n      w[45] = hc_bytealign (w[43], w[44], offset);\n      w[44] = hc_bytealign (w[42], w[43], offset);\n      w[43] = hc_bytealign (w[41], w[42], offset);\n      w[42] = hc_bytealign (w[40], w[41], offset);\n      w[41] = hc_bytealign (w[39], w[40], offset);\n      w[40] = hc_bytealign (w[38], w[39], offset);\n      w[39] = hc_bytealign (w[37], w[38], offset);\n      w[38] = hc_bytealign (w[36], w[37], offset);\n      w[37] = hc_bytealign (w[35], w[36], offset);\n      w[36] = hc_bytealign (w[34], w[35], offset);\n      w[35] = hc_bytealign (w[33], w[34], offset);\n      w[34] = hc_bytealign (w[32], w[33], offset);\n      w[33] = hc_bytealign (w[31], w[32], offset);\n      w[32] = hc_bytealign (w[30], w[31], offset);\n      w[31] = hc_bytealign (w[29], w[30], offset);\n      w[30] = hc_bytealign (w[28], w[29], offset);\n      w[29] = hc_bytealign (w[27], w[28], offset);\n      w[28] = hc_bytealign (w[26], w[27], offset);\n      w[27] = hc_bytealign (w[25], w[26], offset);\n      w[26] = hc_bytealign (w[24], w[25], offset);\n      w[25] = hc_bytealign (w[23], w[24], offset);\n      w[24] = hc_bytealign (w[22], w[23], offset);\n      w[23] = hc_bytealign (w[21], w[22], offset);\n      w[22] = hc_bytealign (w[20], w[21], offset);\n      w[21] = hc_bytealign (w[19], w[20], offset);\n      w[20] = hc_bytealign (w[18], w[19], offset);\n      w[19] = hc_bytealign (w[17], w[18], offset);\n      w[18] = hc_bytealign (w[16], w[17], offset);\n      w[17] = hc_bytealign (w[15], w[16], offset);\n      w[16] = hc_bytealign (w[14], w[15], offset);\n      w[15] = hc_bytealign (w[13], w[14], offset);\n      w[14] = hc_bytealign (w[12], w[13], offset);\n      w[13] = hc_bytealign (w[11], w[12], offset);\n      w[12] = hc_bytealign (w[10], w[11], offset);\n      w[11] = hc_bytealign (w[ 9], w[10], offset);\n      w[10] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[ 9] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[ 8] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[ 7] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[ 6] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[ 5] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 4] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 3] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 2] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 1] = hc_bytealign (    0, w[ 0], offset);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_bytealign (w[60], w[61], offset);\n      w[62] = hc_bytealign (w[59], w[60], offset);\n      w[61] = hc_bytealign (w[58], w[59], offset);\n      w[60] = hc_bytealign (w[57], w[58], offset);\n      w[59] = hc_bytealign (w[56], w[57], offset);\n      w[58] = hc_bytealign (w[55], w[56], offset);\n      w[57] = hc_bytealign (w[54], w[55], offset);\n      w[56] = hc_bytealign (w[53], w[54], offset);\n      w[55] = hc_bytealign (w[52], w[53], offset);\n      w[54] = hc_bytealign (w[51], w[52], offset);\n      w[53] = hc_bytealign (w[50], w[51], offset);\n      w[52] = hc_bytealign (w[49], w[50], offset);\n      w[51] = hc_bytealign (w[48], w[49], offset);\n      w[50] = hc_bytealign (w[47], w[48], offset);\n      w[49] = hc_bytealign (w[46], w[47], offset);\n      w[48] = hc_bytealign (w[45], w[46], offset);\n      w[47] = hc_bytealign (w[44], w[45], offset);\n      w[46] = hc_bytealign (w[43], w[44], offset);\n      w[45] = hc_bytealign (w[42], w[43], offset);\n      w[44] = hc_bytealign (w[41], w[42], offset);\n      w[43] = hc_bytealign (w[40], w[41], offset);\n      w[42] = hc_bytealign (w[39], w[40], offset);\n      w[41] = hc_bytealign (w[38], w[39], offset);\n      w[40] = hc_bytealign (w[37], w[38], offset);\n      w[39] = hc_bytealign (w[36], w[37], offset);\n      w[38] = hc_bytealign (w[35], w[36], offset);\n      w[37] = hc_bytealign (w[34], w[35], offset);\n      w[36] = hc_bytealign (w[33], w[34], offset);\n      w[35] = hc_bytealign (w[32], w[33], offset);\n      w[34] = hc_bytealign (w[31], w[32], offset);\n      w[33] = hc_bytealign (w[30], w[31], offset);\n      w[32] = hc_bytealign (w[29], w[30], offset);\n      w[31] = hc_bytealign (w[28], w[29], offset);\n      w[30] = hc_bytealign (w[27], w[28], offset);\n      w[29] = hc_bytealign (w[26], w[27], offset);\n      w[28] = hc_bytealign (w[25], w[26], offset);\n      w[27] = hc_bytealign (w[24], w[25], offset);\n      w[26] = hc_bytealign (w[23], w[24], offset);\n      w[25] = hc_bytealign (w[22], w[23], offset);\n      w[24] = hc_bytealign (w[21], w[22], offset);\n      w[23] = hc_bytealign (w[20], w[21], offset);\n      w[22] = hc_bytealign (w[19], w[20], offset);\n      w[21] = hc_bytealign (w[18], w[19], offset);\n      w[20] = hc_bytealign (w[17], w[18], offset);\n      w[19] = hc_bytealign (w[16], w[17], offset);\n      w[18] = hc_bytealign (w[15], w[16], offset);\n      w[17] = hc_bytealign (w[14], w[15], offset);\n      w[16] = hc_bytealign (w[13], w[14], offset);\n      w[15] = hc_bytealign (w[12], w[13], offset);\n      w[14] = hc_bytealign (w[11], w[12], offset);\n      w[13] = hc_bytealign (w[10], w[11], offset);\n      w[12] = hc_bytealign (w[ 9], w[10], offset);\n      w[11] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[10] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[ 9] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[ 8] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[ 7] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[ 6] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 5] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 4] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 3] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 2] = hc_bytealign (    0, w[ 0], offset);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_bytealign (w[59], w[60], offset);\n      w[62] = hc_bytealign (w[58], w[59], offset);\n      w[61] = hc_bytealign (w[57], w[58], offset);\n      w[60] = hc_bytealign (w[56], w[57], offset);\n      w[59] = hc_bytealign (w[55], w[56], offset);\n      w[58] = hc_bytealign (w[54], w[55], offset);\n      w[57] = hc_bytealign (w[53], w[54], offset);\n      w[56] = hc_bytealign (w[52], w[53], offset);\n      w[55] = hc_bytealign (w[51], w[52], offset);\n      w[54] = hc_bytealign (w[50], w[51], offset);\n      w[53] = hc_bytealign (w[49], w[50], offset);\n      w[52] = hc_bytealign (w[48], w[49], offset);\n      w[51] = hc_bytealign (w[47], w[48], offset);\n      w[50] = hc_bytealign (w[46], w[47], offset);\n      w[49] = hc_bytealign (w[45], w[46], offset);\n      w[48] = hc_bytealign (w[44], w[45], offset);\n      w[47] = hc_bytealign (w[43], w[44], offset);\n      w[46] = hc_bytealign (w[42], w[43], offset);\n      w[45] = hc_bytealign (w[41], w[42], offset);\n      w[44] = hc_bytealign (w[40], w[41], offset);\n      w[43] = hc_bytealign (w[39], w[40], offset);\n      w[42] = hc_bytealign (w[38], w[39], offset);\n      w[41] = hc_bytealign (w[37], w[38], offset);\n      w[40] = hc_bytealign (w[36], w[37], offset);\n      w[39] = hc_bytealign (w[35], w[36], offset);\n      w[38] = hc_bytealign (w[34], w[35], offset);\n      w[37] = hc_bytealign (w[33], w[34], offset);\n      w[36] = hc_bytealign (w[32], w[33], offset);\n      w[35] = hc_bytealign (w[31], w[32], offset);\n      w[34] = hc_bytealign (w[30], w[31], offset);\n      w[33] = hc_bytealign (w[29], w[30], offset);\n      w[32] = hc_bytealign (w[28], w[29], offset);\n      w[31] = hc_bytealign (w[27], w[28], offset);\n      w[30] = hc_bytealign (w[26], w[27], offset);\n      w[29] = hc_bytealign (w[25], w[26], offset);\n      w[28] = hc_bytealign (w[24], w[25], offset);\n      w[27] = hc_bytealign (w[23], w[24], offset);\n      w[26] = hc_bytealign (w[22], w[23], offset);\n      w[25] = hc_bytealign (w[21], w[22], offset);\n      w[24] = hc_bytealign (w[20], w[21], offset);\n      w[23] = hc_bytealign (w[19], w[20], offset);\n      w[22] = hc_bytealign (w[18], w[19], offset);\n      w[21] = hc_bytealign (w[17], w[18], offset);\n      w[20] = hc_bytealign (w[16], w[17], offset);\n      w[19] = hc_bytealign (w[15], w[16], offset);\n      w[18] = hc_bytealign (w[14], w[15], offset);\n      w[17] = hc_bytealign (w[13], w[14], offset);\n      w[16] = hc_bytealign (w[12], w[13], offset);\n      w[15] = hc_bytealign (w[11], w[12], offset);\n      w[14] = hc_bytealign (w[10], w[11], offset);\n      w[13] = hc_bytealign (w[ 9], w[10], offset);\n      w[12] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[11] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[10] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[ 9] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[ 8] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[ 7] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 6] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 5] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 4] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 3] = hc_bytealign (    0, w[ 0], offset);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_bytealign (w[58], w[59], offset);\n      w[62] = hc_bytealign (w[57], w[58], offset);\n      w[61] = hc_bytealign (w[56], w[57], offset);\n      w[60] = hc_bytealign (w[55], w[56], offset);\n      w[59] = hc_bytealign (w[54], w[55], offset);\n      w[58] = hc_bytealign (w[53], w[54], offset);\n      w[57] = hc_bytealign (w[52], w[53], offset);\n      w[56] = hc_bytealign (w[51], w[52], offset);\n      w[55] = hc_bytealign (w[50], w[51], offset);\n      w[54] = hc_bytealign (w[49], w[50], offset);\n      w[53] = hc_bytealign (w[48], w[49], offset);\n      w[52] = hc_bytealign (w[47], w[48], offset);\n      w[51] = hc_bytealign (w[46], w[47], offset);\n      w[50] = hc_bytealign (w[45], w[46], offset);\n      w[49] = hc_bytealign (w[44], w[45], offset);\n      w[48] = hc_bytealign (w[43], w[44], offset);\n      w[47] = hc_bytealign (w[42], w[43], offset);\n      w[46] = hc_bytealign (w[41], w[42], offset);\n      w[45] = hc_bytealign (w[40], w[41], offset);\n      w[44] = hc_bytealign (w[39], w[40], offset);\n      w[43] = hc_bytealign (w[38], w[39], offset);\n      w[42] = hc_bytealign (w[37], w[38], offset);\n      w[41] = hc_bytealign (w[36], w[37], offset);\n      w[40] = hc_bytealign (w[35], w[36], offset);\n      w[39] = hc_bytealign (w[34], w[35], offset);\n      w[38] = hc_bytealign (w[33], w[34], offset);\n      w[37] = hc_bytealign (w[32], w[33], offset);\n      w[36] = hc_bytealign (w[31], w[32], offset);\n      w[35] = hc_bytealign (w[30], w[31], offset);\n      w[34] = hc_bytealign (w[29], w[30], offset);\n      w[33] = hc_bytealign (w[28], w[29], offset);\n      w[32] = hc_bytealign (w[27], w[28], offset);\n      w[31] = hc_bytealign (w[26], w[27], offset);\n      w[30] = hc_bytealign (w[25], w[26], offset);\n      w[29] = hc_bytealign (w[24], w[25], offset);\n      w[28] = hc_bytealign (w[23], w[24], offset);\n      w[27] = hc_bytealign (w[22], w[23], offset);\n      w[26] = hc_bytealign (w[21], w[22], offset);\n      w[25] = hc_bytealign (w[20], w[21], offset);\n      w[24] = hc_bytealign (w[19], w[20], offset);\n      w[23] = hc_bytealign (w[18], w[19], offset);\n      w[22] = hc_bytealign (w[17], w[18], offset);\n      w[21] = hc_bytealign (w[16], w[17], offset);\n      w[20] = hc_bytealign (w[15], w[16], offset);\n      w[19] = hc_bytealign (w[14], w[15], offset);\n      w[18] = hc_bytealign (w[13], w[14], offset);\n      w[17] = hc_bytealign (w[12], w[13], offset);\n      w[16] = hc_bytealign (w[11], w[12], offset);\n      w[15] = hc_bytealign (w[10], w[11], offset);\n      w[14] = hc_bytealign (w[ 9], w[10], offset);\n      w[13] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[12] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[11] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[10] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[ 9] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[ 8] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 7] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 6] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 5] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 4] = hc_bytealign (    0, w[ 0], offset);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_bytealign (w[57], w[58], offset);\n      w[62] = hc_bytealign (w[56], w[57], offset);\n      w[61] = hc_bytealign (w[55], w[56], offset);\n      w[60] = hc_bytealign (w[54], w[55], offset);\n      w[59] = hc_bytealign (w[53], w[54], offset);\n      w[58] = hc_bytealign (w[52], w[53], offset);\n      w[57] = hc_bytealign (w[51], w[52], offset);\n      w[56] = hc_bytealign (w[50], w[51], offset);\n      w[55] = hc_bytealign (w[49], w[50], offset);\n      w[54] = hc_bytealign (w[48], w[49], offset);\n      w[53] = hc_bytealign (w[47], w[48], offset);\n      w[52] = hc_bytealign (w[46], w[47], offset);\n      w[51] = hc_bytealign (w[45], w[46], offset);\n      w[50] = hc_bytealign (w[44], w[45], offset);\n      w[49] = hc_bytealign (w[43], w[44], offset);\n      w[48] = hc_bytealign (w[42], w[43], offset);\n      w[47] = hc_bytealign (w[41], w[42], offset);\n      w[46] = hc_bytealign (w[40], w[41], offset);\n      w[45] = hc_bytealign (w[39], w[40], offset);\n      w[44] = hc_bytealign (w[38], w[39], offset);\n      w[43] = hc_bytealign (w[37], w[38], offset);\n      w[42] = hc_bytealign (w[36], w[37], offset);\n      w[41] = hc_bytealign (w[35], w[36], offset);\n      w[40] = hc_bytealign (w[34], w[35], offset);\n      w[39] = hc_bytealign (w[33], w[34], offset);\n      w[38] = hc_bytealign (w[32], w[33], offset);\n      w[37] = hc_bytealign (w[31], w[32], offset);\n      w[36] = hc_bytealign (w[30], w[31], offset);\n      w[35] = hc_bytealign (w[29], w[30], offset);\n      w[34] = hc_bytealign (w[28], w[29], offset);\n      w[33] = hc_bytealign (w[27], w[28], offset);\n      w[32] = hc_bytealign (w[26], w[27], offset);\n      w[31] = hc_bytealign (w[25], w[26], offset);\n      w[30] = hc_bytealign (w[24], w[25], offset);\n      w[29] = hc_bytealign (w[23], w[24], offset);\n      w[28] = hc_bytealign (w[22], w[23], offset);\n      w[27] = hc_bytealign (w[21], w[22], offset);\n      w[26] = hc_bytealign (w[20], w[21], offset);\n      w[25] = hc_bytealign (w[19], w[20], offset);\n      w[24] = hc_bytealign (w[18], w[19], offset);\n      w[23] = hc_bytealign (w[17], w[18], offset);\n      w[22] = hc_bytealign (w[16], w[17], offset);\n      w[21] = hc_bytealign (w[15], w[16], offset);\n      w[20] = hc_bytealign (w[14], w[15], offset);\n      w[19] = hc_bytealign (w[13], w[14], offset);\n      w[18] = hc_bytealign (w[12], w[13], offset);\n      w[17] = hc_bytealign (w[11], w[12], offset);\n      w[16] = hc_bytealign (w[10], w[11], offset);\n      w[15] = hc_bytealign (w[ 9], w[10], offset);\n      w[14] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[13] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[12] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[11] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[10] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[ 9] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 8] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 7] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 6] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 5] = hc_bytealign (    0, w[ 0], offset);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_bytealign (w[56], w[57], offset);\n      w[62] = hc_bytealign (w[55], w[56], offset);\n      w[61] = hc_bytealign (w[54], w[55], offset);\n      w[60] = hc_bytealign (w[53], w[54], offset);\n      w[59] = hc_bytealign (w[52], w[53], offset);\n      w[58] = hc_bytealign (w[51], w[52], offset);\n      w[57] = hc_bytealign (w[50], w[51], offset);\n      w[56] = hc_bytealign (w[49], w[50], offset);\n      w[55] = hc_bytealign (w[48], w[49], offset);\n      w[54] = hc_bytealign (w[47], w[48], offset);\n      w[53] = hc_bytealign (w[46], w[47], offset);\n      w[52] = hc_bytealign (w[45], w[46], offset);\n      w[51] = hc_bytealign (w[44], w[45], offset);\n      w[50] = hc_bytealign (w[43], w[44], offset);\n      w[49] = hc_bytealign (w[42], w[43], offset);\n      w[48] = hc_bytealign (w[41], w[42], offset);\n      w[47] = hc_bytealign (w[40], w[41], offset);\n      w[46] = hc_bytealign (w[39], w[40], offset);\n      w[45] = hc_bytealign (w[38], w[39], offset);\n      w[44] = hc_bytealign (w[37], w[38], offset);\n      w[43] = hc_bytealign (w[36], w[37], offset);\n      w[42] = hc_bytealign (w[35], w[36], offset);\n      w[41] = hc_bytealign (w[34], w[35], offset);\n      w[40] = hc_bytealign (w[33], w[34], offset);\n      w[39] = hc_bytealign (w[32], w[33], offset);\n      w[38] = hc_bytealign (w[31], w[32], offset);\n      w[37] = hc_bytealign (w[30], w[31], offset);\n      w[36] = hc_bytealign (w[29], w[30], offset);\n      w[35] = hc_bytealign (w[28], w[29], offset);\n      w[34] = hc_bytealign (w[27], w[28], offset);\n      w[33] = hc_bytealign (w[26], w[27], offset);\n      w[32] = hc_bytealign (w[25], w[26], offset);\n      w[31] = hc_bytealign (w[24], w[25], offset);\n      w[30] = hc_bytealign (w[23], w[24], offset);\n      w[29] = hc_bytealign (w[22], w[23], offset);\n      w[28] = hc_bytealign (w[21], w[22], offset);\n      w[27] = hc_bytealign (w[20], w[21], offset);\n      w[26] = hc_bytealign (w[19], w[20], offset);\n      w[25] = hc_bytealign (w[18], w[19], offset);\n      w[24] = hc_bytealign (w[17], w[18], offset);\n      w[23] = hc_bytealign (w[16], w[17], offset);\n      w[22] = hc_bytealign (w[15], w[16], offset);\n      w[21] = hc_bytealign (w[14], w[15], offset);\n      w[20] = hc_bytealign (w[13], w[14], offset);\n      w[19] = hc_bytealign (w[12], w[13], offset);\n      w[18] = hc_bytealign (w[11], w[12], offset);\n      w[17] = hc_bytealign (w[10], w[11], offset);\n      w[16] = hc_bytealign (w[ 9], w[10], offset);\n      w[15] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[14] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[13] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[12] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[11] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[10] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[ 9] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 8] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 7] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 6] = hc_bytealign (    0, w[ 0], offset);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_bytealign (w[55], w[56], offset);\n      w[62] = hc_bytealign (w[54], w[55], offset);\n      w[61] = hc_bytealign (w[53], w[54], offset);\n      w[60] = hc_bytealign (w[52], w[53], offset);\n      w[59] = hc_bytealign (w[51], w[52], offset);\n      w[58] = hc_bytealign (w[50], w[51], offset);\n      w[57] = hc_bytealign (w[49], w[50], offset);\n      w[56] = hc_bytealign (w[48], w[49], offset);\n      w[55] = hc_bytealign (w[47], w[48], offset);\n      w[54] = hc_bytealign (w[46], w[47], offset);\n      w[53] = hc_bytealign (w[45], w[46], offset);\n      w[52] = hc_bytealign (w[44], w[45], offset);\n      w[51] = hc_bytealign (w[43], w[44], offset);\n      w[50] = hc_bytealign (w[42], w[43], offset);\n      w[49] = hc_bytealign (w[41], w[42], offset);\n      w[48] = hc_bytealign (w[40], w[41], offset);\n      w[47] = hc_bytealign (w[39], w[40], offset);\n      w[46] = hc_bytealign (w[38], w[39], offset);\n      w[45] = hc_bytealign (w[37], w[38], offset);\n      w[44] = hc_bytealign (w[36], w[37], offset);\n      w[43] = hc_bytealign (w[35], w[36], offset);\n      w[42] = hc_bytealign (w[34], w[35], offset);\n      w[41] = hc_bytealign (w[33], w[34], offset);\n      w[40] = hc_bytealign (w[32], w[33], offset);\n      w[39] = hc_bytealign (w[31], w[32], offset);\n      w[38] = hc_bytealign (w[30], w[31], offset);\n      w[37] = hc_bytealign (w[29], w[30], offset);\n      w[36] = hc_bytealign (w[28], w[29], offset);\n      w[35] = hc_bytealign (w[27], w[28], offset);\n      w[34] = hc_bytealign (w[26], w[27], offset);\n      w[33] = hc_bytealign (w[25], w[26], offset);\n      w[32] = hc_bytealign (w[24], w[25], offset);\n      w[31] = hc_bytealign (w[23], w[24], offset);\n      w[30] = hc_bytealign (w[22], w[23], offset);\n      w[29] = hc_bytealign (w[21], w[22], offset);\n      w[28] = hc_bytealign (w[20], w[21], offset);\n      w[27] = hc_bytealign (w[19], w[20], offset);\n      w[26] = hc_bytealign (w[18], w[19], offset);\n      w[25] = hc_bytealign (w[17], w[18], offset);\n      w[24] = hc_bytealign (w[16], w[17], offset);\n      w[23] = hc_bytealign (w[15], w[16], offset);\n      w[22] = hc_bytealign (w[14], w[15], offset);\n      w[21] = hc_bytealign (w[13], w[14], offset);\n      w[20] = hc_bytealign (w[12], w[13], offset);\n      w[19] = hc_bytealign (w[11], w[12], offset);\n      w[18] = hc_bytealign (w[10], w[11], offset);\n      w[17] = hc_bytealign (w[ 9], w[10], offset);\n      w[16] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[15] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[14] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[13] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[12] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[11] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[10] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[ 9] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 8] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 7] = hc_bytealign (    0, w[ 0], offset);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_bytealign (w[54], w[55], offset);\n      w[62] = hc_bytealign (w[53], w[54], offset);\n      w[61] = hc_bytealign (w[52], w[53], offset);\n      w[60] = hc_bytealign (w[51], w[52], offset);\n      w[59] = hc_bytealign (w[50], w[51], offset);\n      w[58] = hc_bytealign (w[49], w[50], offset);\n      w[57] = hc_bytealign (w[48], w[49], offset);\n      w[56] = hc_bytealign (w[47], w[48], offset);\n      w[55] = hc_bytealign (w[46], w[47], offset);\n      w[54] = hc_bytealign (w[45], w[46], offset);\n      w[53] = hc_bytealign (w[44], w[45], offset);\n      w[52] = hc_bytealign (w[43], w[44], offset);\n      w[51] = hc_bytealign (w[42], w[43], offset);\n      w[50] = hc_bytealign (w[41], w[42], offset);\n      w[49] = hc_bytealign (w[40], w[41], offset);\n      w[48] = hc_bytealign (w[39], w[40], offset);\n      w[47] = hc_bytealign (w[38], w[39], offset);\n      w[46] = hc_bytealign (w[37], w[38], offset);\n      w[45] = hc_bytealign (w[36], w[37], offset);\n      w[44] = hc_bytealign (w[35], w[36], offset);\n      w[43] = hc_bytealign (w[34], w[35], offset);\n      w[42] = hc_bytealign (w[33], w[34], offset);\n      w[41] = hc_bytealign (w[32], w[33], offset);\n      w[40] = hc_bytealign (w[31], w[32], offset);\n      w[39] = hc_bytealign (w[30], w[31], offset);\n      w[38] = hc_bytealign (w[29], w[30], offset);\n      w[37] = hc_bytealign (w[28], w[29], offset);\n      w[36] = hc_bytealign (w[27], w[28], offset);\n      w[35] = hc_bytealign (w[26], w[27], offset);\n      w[34] = hc_bytealign (w[25], w[26], offset);\n      w[33] = hc_bytealign (w[24], w[25], offset);\n      w[32] = hc_bytealign (w[23], w[24], offset);\n      w[31] = hc_bytealign (w[22], w[23], offset);\n      w[30] = hc_bytealign (w[21], w[22], offset);\n      w[29] = hc_bytealign (w[20], w[21], offset);\n      w[28] = hc_bytealign (w[19], w[20], offset);\n      w[27] = hc_bytealign (w[18], w[19], offset);\n      w[26] = hc_bytealign (w[17], w[18], offset);\n      w[25] = hc_bytealign (w[16], w[17], offset);\n      w[24] = hc_bytealign (w[15], w[16], offset);\n      w[23] = hc_bytealign (w[14], w[15], offset);\n      w[22] = hc_bytealign (w[13], w[14], offset);\n      w[21] = hc_bytealign (w[12], w[13], offset);\n      w[20] = hc_bytealign (w[11], w[12], offset);\n      w[19] = hc_bytealign (w[10], w[11], offset);\n      w[18] = hc_bytealign (w[ 9], w[10], offset);\n      w[17] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[16] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[15] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[14] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[13] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[12] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[11] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[10] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[ 9] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 8] = hc_bytealign (    0, w[ 0], offset);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_bytealign (w[53], w[54], offset);\n      w[62] = hc_bytealign (w[52], w[53], offset);\n      w[61] = hc_bytealign (w[51], w[52], offset);\n      w[60] = hc_bytealign (w[50], w[51], offset);\n      w[59] = hc_bytealign (w[49], w[50], offset);\n      w[58] = hc_bytealign (w[48], w[49], offset);\n      w[57] = hc_bytealign (w[47], w[48], offset);\n      w[56] = hc_bytealign (w[46], w[47], offset);\n      w[55] = hc_bytealign (w[45], w[46], offset);\n      w[54] = hc_bytealign (w[44], w[45], offset);\n      w[53] = hc_bytealign (w[43], w[44], offset);\n      w[52] = hc_bytealign (w[42], w[43], offset);\n      w[51] = hc_bytealign (w[41], w[42], offset);\n      w[50] = hc_bytealign (w[40], w[41], offset);\n      w[49] = hc_bytealign (w[39], w[40], offset);\n      w[48] = hc_bytealign (w[38], w[39], offset);\n      w[47] = hc_bytealign (w[37], w[38], offset);\n      w[46] = hc_bytealign (w[36], w[37], offset);\n      w[45] = hc_bytealign (w[35], w[36], offset);\n      w[44] = hc_bytealign (w[34], w[35], offset);\n      w[43] = hc_bytealign (w[33], w[34], offset);\n      w[42] = hc_bytealign (w[32], w[33], offset);\n      w[41] = hc_bytealign (w[31], w[32], offset);\n      w[40] = hc_bytealign (w[30], w[31], offset);\n      w[39] = hc_bytealign (w[29], w[30], offset);\n      w[38] = hc_bytealign (w[28], w[29], offset);\n      w[37] = hc_bytealign (w[27], w[28], offset);\n      w[36] = hc_bytealign (w[26], w[27], offset);\n      w[35] = hc_bytealign (w[25], w[26], offset);\n      w[34] = hc_bytealign (w[24], w[25], offset);\n      w[33] = hc_bytealign (w[23], w[24], offset);\n      w[32] = hc_bytealign (w[22], w[23], offset);\n      w[31] = hc_bytealign (w[21], w[22], offset);\n      w[30] = hc_bytealign (w[20], w[21], offset);\n      w[29] = hc_bytealign (w[19], w[20], offset);\n      w[28] = hc_bytealign (w[18], w[19], offset);\n      w[27] = hc_bytealign (w[17], w[18], offset);\n      w[26] = hc_bytealign (w[16], w[17], offset);\n      w[25] = hc_bytealign (w[15], w[16], offset);\n      w[24] = hc_bytealign (w[14], w[15], offset);\n      w[23] = hc_bytealign (w[13], w[14], offset);\n      w[22] = hc_bytealign (w[12], w[13], offset);\n      w[21] = hc_bytealign (w[11], w[12], offset);\n      w[20] = hc_bytealign (w[10], w[11], offset);\n      w[19] = hc_bytealign (w[ 9], w[10], offset);\n      w[18] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[17] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[16] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[15] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[14] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[13] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[12] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[11] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[10] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[ 9] = hc_bytealign (    0, w[ 0], offset);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_bytealign (w[52], w[53], offset);\n      w[62] = hc_bytealign (w[51], w[52], offset);\n      w[61] = hc_bytealign (w[50], w[51], offset);\n      w[60] = hc_bytealign (w[49], w[50], offset);\n      w[59] = hc_bytealign (w[48], w[49], offset);\n      w[58] = hc_bytealign (w[47], w[48], offset);\n      w[57] = hc_bytealign (w[46], w[47], offset);\n      w[56] = hc_bytealign (w[45], w[46], offset);\n      w[55] = hc_bytealign (w[44], w[45], offset);\n      w[54] = hc_bytealign (w[43], w[44], offset);\n      w[53] = hc_bytealign (w[42], w[43], offset);\n      w[52] = hc_bytealign (w[41], w[42], offset);\n      w[51] = hc_bytealign (w[40], w[41], offset);\n      w[50] = hc_bytealign (w[39], w[40], offset);\n      w[49] = hc_bytealign (w[38], w[39], offset);\n      w[48] = hc_bytealign (w[37], w[38], offset);\n      w[47] = hc_bytealign (w[36], w[37], offset);\n      w[46] = hc_bytealign (w[35], w[36], offset);\n      w[45] = hc_bytealign (w[34], w[35], offset);\n      w[44] = hc_bytealign (w[33], w[34], offset);\n      w[43] = hc_bytealign (w[32], w[33], offset);\n      w[42] = hc_bytealign (w[31], w[32], offset);\n      w[41] = hc_bytealign (w[30], w[31], offset);\n      w[40] = hc_bytealign (w[29], w[30], offset);\n      w[39] = hc_bytealign (w[28], w[29], offset);\n      w[38] = hc_bytealign (w[27], w[28], offset);\n      w[37] = hc_bytealign (w[26], w[27], offset);\n      w[36] = hc_bytealign (w[25], w[26], offset);\n      w[35] = hc_bytealign (w[24], w[25], offset);\n      w[34] = hc_bytealign (w[23], w[24], offset);\n      w[33] = hc_bytealign (w[22], w[23], offset);\n      w[32] = hc_bytealign (w[21], w[22], offset);\n      w[31] = hc_bytealign (w[20], w[21], offset);\n      w[30] = hc_bytealign (w[19], w[20], offset);\n      w[29] = hc_bytealign (w[18], w[19], offset);\n      w[28] = hc_bytealign (w[17], w[18], offset);\n      w[27] = hc_bytealign (w[16], w[17], offset);\n      w[26] = hc_bytealign (w[15], w[16], offset);\n      w[25] = hc_bytealign (w[14], w[15], offset);\n      w[24] = hc_bytealign (w[13], w[14], offset);\n      w[23] = hc_bytealign (w[12], w[13], offset);\n      w[22] = hc_bytealign (w[11], w[12], offset);\n      w[21] = hc_bytealign (w[10], w[11], offset);\n      w[20] = hc_bytealign (w[ 9], w[10], offset);\n      w[19] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[18] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[17] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[16] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[15] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[14] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[13] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[12] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[11] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[10] = hc_bytealign (    0, w[ 0], offset);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_bytealign (w[51], w[52], offset);\n      w[62] = hc_bytealign (w[50], w[51], offset);\n      w[61] = hc_bytealign (w[49], w[50], offset);\n      w[60] = hc_bytealign (w[48], w[49], offset);\n      w[59] = hc_bytealign (w[47], w[48], offset);\n      w[58] = hc_bytealign (w[46], w[47], offset);\n      w[57] = hc_bytealign (w[45], w[46], offset);\n      w[56] = hc_bytealign (w[44], w[45], offset);\n      w[55] = hc_bytealign (w[43], w[44], offset);\n      w[54] = hc_bytealign (w[42], w[43], offset);\n      w[53] = hc_bytealign (w[41], w[42], offset);\n      w[52] = hc_bytealign (w[40], w[41], offset);\n      w[51] = hc_bytealign (w[39], w[40], offset);\n      w[50] = hc_bytealign (w[38], w[39], offset);\n      w[49] = hc_bytealign (w[37], w[38], offset);\n      w[48] = hc_bytealign (w[36], w[37], offset);\n      w[47] = hc_bytealign (w[35], w[36], offset);\n      w[46] = hc_bytealign (w[34], w[35], offset);\n      w[45] = hc_bytealign (w[33], w[34], offset);\n      w[44] = hc_bytealign (w[32], w[33], offset);\n      w[43] = hc_bytealign (w[31], w[32], offset);\n      w[42] = hc_bytealign (w[30], w[31], offset);\n      w[41] = hc_bytealign (w[29], w[30], offset);\n      w[40] = hc_bytealign (w[28], w[29], offset);\n      w[39] = hc_bytealign (w[27], w[28], offset);\n      w[38] = hc_bytealign (w[26], w[27], offset);\n      w[37] = hc_bytealign (w[25], w[26], offset);\n      w[36] = hc_bytealign (w[24], w[25], offset);\n      w[35] = hc_bytealign (w[23], w[24], offset);\n      w[34] = hc_bytealign (w[22], w[23], offset);\n      w[33] = hc_bytealign (w[21], w[22], offset);\n      w[32] = hc_bytealign (w[20], w[21], offset);\n      w[31] = hc_bytealign (w[19], w[20], offset);\n      w[30] = hc_bytealign (w[18], w[19], offset);\n      w[29] = hc_bytealign (w[17], w[18], offset);\n      w[28] = hc_bytealign (w[16], w[17], offset);\n      w[27] = hc_bytealign (w[15], w[16], offset);\n      w[26] = hc_bytealign (w[14], w[15], offset);\n      w[25] = hc_bytealign (w[13], w[14], offset);\n      w[24] = hc_bytealign (w[12], w[13], offset);\n      w[23] = hc_bytealign (w[11], w[12], offset);\n      w[22] = hc_bytealign (w[10], w[11], offset);\n      w[21] = hc_bytealign (w[ 9], w[10], offset);\n      w[20] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[19] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[18] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[17] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[16] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[15] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[14] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[13] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[12] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[11] = hc_bytealign (    0, w[ 0], offset);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_bytealign (w[50], w[51], offset);\n      w[62] = hc_bytealign (w[49], w[50], offset);\n      w[61] = hc_bytealign (w[48], w[49], offset);\n      w[60] = hc_bytealign (w[47], w[48], offset);\n      w[59] = hc_bytealign (w[46], w[47], offset);\n      w[58] = hc_bytealign (w[45], w[46], offset);\n      w[57] = hc_bytealign (w[44], w[45], offset);\n      w[56] = hc_bytealign (w[43], w[44], offset);\n      w[55] = hc_bytealign (w[42], w[43], offset);\n      w[54] = hc_bytealign (w[41], w[42], offset);\n      w[53] = hc_bytealign (w[40], w[41], offset);\n      w[52] = hc_bytealign (w[39], w[40], offset);\n      w[51] = hc_bytealign (w[38], w[39], offset);\n      w[50] = hc_bytealign (w[37], w[38], offset);\n      w[49] = hc_bytealign (w[36], w[37], offset);\n      w[48] = hc_bytealign (w[35], w[36], offset);\n      w[47] = hc_bytealign (w[34], w[35], offset);\n      w[46] = hc_bytealign (w[33], w[34], offset);\n      w[45] = hc_bytealign (w[32], w[33], offset);\n      w[44] = hc_bytealign (w[31], w[32], offset);\n      w[43] = hc_bytealign (w[30], w[31], offset);\n      w[42] = hc_bytealign (w[29], w[30], offset);\n      w[41] = hc_bytealign (w[28], w[29], offset);\n      w[40] = hc_bytealign (w[27], w[28], offset);\n      w[39] = hc_bytealign (w[26], w[27], offset);\n      w[38] = hc_bytealign (w[25], w[26], offset);\n      w[37] = hc_bytealign (w[24], w[25], offset);\n      w[36] = hc_bytealign (w[23], w[24], offset);\n      w[35] = hc_bytealign (w[22], w[23], offset);\n      w[34] = hc_bytealign (w[21], w[22], offset);\n      w[33] = hc_bytealign (w[20], w[21], offset);\n      w[32] = hc_bytealign (w[19], w[20], offset);\n      w[31] = hc_bytealign (w[18], w[19], offset);\n      w[30] = hc_bytealign (w[17], w[18], offset);\n      w[29] = hc_bytealign (w[16], w[17], offset);\n      w[28] = hc_bytealign (w[15], w[16], offset);\n      w[27] = hc_bytealign (w[14], w[15], offset);\n      w[26] = hc_bytealign (w[13], w[14], offset);\n      w[25] = hc_bytealign (w[12], w[13], offset);\n      w[24] = hc_bytealign (w[11], w[12], offset);\n      w[23] = hc_bytealign (w[10], w[11], offset);\n      w[22] = hc_bytealign (w[ 9], w[10], offset);\n      w[21] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[20] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[19] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[18] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[17] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[16] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[15] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[14] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[13] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[12] = hc_bytealign (    0, w[ 0], offset);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_bytealign (w[49], w[50], offset);\n      w[62] = hc_bytealign (w[48], w[49], offset);\n      w[61] = hc_bytealign (w[47], w[48], offset);\n      w[60] = hc_bytealign (w[46], w[47], offset);\n      w[59] = hc_bytealign (w[45], w[46], offset);\n      w[58] = hc_bytealign (w[44], w[45], offset);\n      w[57] = hc_bytealign (w[43], w[44], offset);\n      w[56] = hc_bytealign (w[42], w[43], offset);\n      w[55] = hc_bytealign (w[41], w[42], offset);\n      w[54] = hc_bytealign (w[40], w[41], offset);\n      w[53] = hc_bytealign (w[39], w[40], offset);\n      w[52] = hc_bytealign (w[38], w[39], offset);\n      w[51] = hc_bytealign (w[37], w[38], offset);\n      w[50] = hc_bytealign (w[36], w[37], offset);\n      w[49] = hc_bytealign (w[35], w[36], offset);\n      w[48] = hc_bytealign (w[34], w[35], offset);\n      w[47] = hc_bytealign (w[33], w[34], offset);\n      w[46] = hc_bytealign (w[32], w[33], offset);\n      w[45] = hc_bytealign (w[31], w[32], offset);\n      w[44] = hc_bytealign (w[30], w[31], offset);\n      w[43] = hc_bytealign (w[29], w[30], offset);\n      w[42] = hc_bytealign (w[28], w[29], offset);\n      w[41] = hc_bytealign (w[27], w[28], offset);\n      w[40] = hc_bytealign (w[26], w[27], offset);\n      w[39] = hc_bytealign (w[25], w[26], offset);\n      w[38] = hc_bytealign (w[24], w[25], offset);\n      w[37] = hc_bytealign (w[23], w[24], offset);\n      w[36] = hc_bytealign (w[22], w[23], offset);\n      w[35] = hc_bytealign (w[21], w[22], offset);\n      w[34] = hc_bytealign (w[20], w[21], offset);\n      w[33] = hc_bytealign (w[19], w[20], offset);\n      w[32] = hc_bytealign (w[18], w[19], offset);\n      w[31] = hc_bytealign (w[17], w[18], offset);\n      w[30] = hc_bytealign (w[16], w[17], offset);\n      w[29] = hc_bytealign (w[15], w[16], offset);\n      w[28] = hc_bytealign (w[14], w[15], offset);\n      w[27] = hc_bytealign (w[13], w[14], offset);\n      w[26] = hc_bytealign (w[12], w[13], offset);\n      w[25] = hc_bytealign (w[11], w[12], offset);\n      w[24] = hc_bytealign (w[10], w[11], offset);\n      w[23] = hc_bytealign (w[ 9], w[10], offset);\n      w[22] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[21] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[20] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[19] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[18] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[17] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[16] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[15] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[14] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[13] = hc_bytealign (    0, w[ 0], offset);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_bytealign (w[48], w[49], offset);\n      w[62] = hc_bytealign (w[47], w[48], offset);\n      w[61] = hc_bytealign (w[46], w[47], offset);\n      w[60] = hc_bytealign (w[45], w[46], offset);\n      w[59] = hc_bytealign (w[44], w[45], offset);\n      w[58] = hc_bytealign (w[43], w[44], offset);\n      w[57] = hc_bytealign (w[42], w[43], offset);\n      w[56] = hc_bytealign (w[41], w[42], offset);\n      w[55] = hc_bytealign (w[40], w[41], offset);\n      w[54] = hc_bytealign (w[39], w[40], offset);\n      w[53] = hc_bytealign (w[38], w[39], offset);\n      w[52] = hc_bytealign (w[37], w[38], offset);\n      w[51] = hc_bytealign (w[36], w[37], offset);\n      w[50] = hc_bytealign (w[35], w[36], offset);\n      w[49] = hc_bytealign (w[34], w[35], offset);\n      w[48] = hc_bytealign (w[33], w[34], offset);\n      w[47] = hc_bytealign (w[32], w[33], offset);\n      w[46] = hc_bytealign (w[31], w[32], offset);\n      w[45] = hc_bytealign (w[30], w[31], offset);\n      w[44] = hc_bytealign (w[29], w[30], offset);\n      w[43] = hc_bytealign (w[28], w[29], offset);\n      w[42] = hc_bytealign (w[27], w[28], offset);\n      w[41] = hc_bytealign (w[26], w[27], offset);\n      w[40] = hc_bytealign (w[25], w[26], offset);\n      w[39] = hc_bytealign (w[24], w[25], offset);\n      w[38] = hc_bytealign (w[23], w[24], offset);\n      w[37] = hc_bytealign (w[22], w[23], offset);\n      w[36] = hc_bytealign (w[21], w[22], offset);\n      w[35] = hc_bytealign (w[20], w[21], offset);\n      w[34] = hc_bytealign (w[19], w[20], offset);\n      w[33] = hc_bytealign (w[18], w[19], offset);\n      w[32] = hc_bytealign (w[17], w[18], offset);\n      w[31] = hc_bytealign (w[16], w[17], offset);\n      w[30] = hc_bytealign (w[15], w[16], offset);\n      w[29] = hc_bytealign (w[14], w[15], offset);\n      w[28] = hc_bytealign (w[13], w[14], offset);\n      w[27] = hc_bytealign (w[12], w[13], offset);\n      w[26] = hc_bytealign (w[11], w[12], offset);\n      w[25] = hc_bytealign (w[10], w[11], offset);\n      w[24] = hc_bytealign (w[ 9], w[10], offset);\n      w[23] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[22] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[21] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[20] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[19] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[18] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[17] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[16] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[15] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[14] = hc_bytealign (    0, w[ 0], offset);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_bytealign (w[47], w[48], offset);\n      w[62] = hc_bytealign (w[46], w[47], offset);\n      w[61] = hc_bytealign (w[45], w[46], offset);\n      w[60] = hc_bytealign (w[44], w[45], offset);\n      w[59] = hc_bytealign (w[43], w[44], offset);\n      w[58] = hc_bytealign (w[42], w[43], offset);\n      w[57] = hc_bytealign (w[41], w[42], offset);\n      w[56] = hc_bytealign (w[40], w[41], offset);\n      w[55] = hc_bytealign (w[39], w[40], offset);\n      w[54] = hc_bytealign (w[38], w[39], offset);\n      w[53] = hc_bytealign (w[37], w[38], offset);\n      w[52] = hc_bytealign (w[36], w[37], offset);\n      w[51] = hc_bytealign (w[35], w[36], offset);\n      w[50] = hc_bytealign (w[34], w[35], offset);\n      w[49] = hc_bytealign (w[33], w[34], offset);\n      w[48] = hc_bytealign (w[32], w[33], offset);\n      w[47] = hc_bytealign (w[31], w[32], offset);\n      w[46] = hc_bytealign (w[30], w[31], offset);\n      w[45] = hc_bytealign (w[29], w[30], offset);\n      w[44] = hc_bytealign (w[28], w[29], offset);\n      w[43] = hc_bytealign (w[27], w[28], offset);\n      w[42] = hc_bytealign (w[26], w[27], offset);\n      w[41] = hc_bytealign (w[25], w[26], offset);\n      w[40] = hc_bytealign (w[24], w[25], offset);\n      w[39] = hc_bytealign (w[23], w[24], offset);\n      w[38] = hc_bytealign (w[22], w[23], offset);\n      w[37] = hc_bytealign (w[21], w[22], offset);\n      w[36] = hc_bytealign (w[20], w[21], offset);\n      w[35] = hc_bytealign (w[19], w[20], offset);\n      w[34] = hc_bytealign (w[18], w[19], offset);\n      w[33] = hc_bytealign (w[17], w[18], offset);\n      w[32] = hc_bytealign (w[16], w[17], offset);\n      w[31] = hc_bytealign (w[15], w[16], offset);\n      w[30] = hc_bytealign (w[14], w[15], offset);\n      w[29] = hc_bytealign (w[13], w[14], offset);\n      w[28] = hc_bytealign (w[12], w[13], offset);\n      w[27] = hc_bytealign (w[11], w[12], offset);\n      w[26] = hc_bytealign (w[10], w[11], offset);\n      w[25] = hc_bytealign (w[ 9], w[10], offset);\n      w[24] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[23] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[22] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[21] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[20] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[19] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[18] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[17] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[16] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[15] = hc_bytealign (    0, w[ 0], offset);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_bytealign (w[46], w[47], offset);\n      w[62] = hc_bytealign (w[45], w[46], offset);\n      w[61] = hc_bytealign (w[44], w[45], offset);\n      w[60] = hc_bytealign (w[43], w[44], offset);\n      w[59] = hc_bytealign (w[42], w[43], offset);\n      w[58] = hc_bytealign (w[41], w[42], offset);\n      w[57] = hc_bytealign (w[40], w[41], offset);\n      w[56] = hc_bytealign (w[39], w[40], offset);\n      w[55] = hc_bytealign (w[38], w[39], offset);\n      w[54] = hc_bytealign (w[37], w[38], offset);\n      w[53] = hc_bytealign (w[36], w[37], offset);\n      w[52] = hc_bytealign (w[35], w[36], offset);\n      w[51] = hc_bytealign (w[34], w[35], offset);\n      w[50] = hc_bytealign (w[33], w[34], offset);\n      w[49] = hc_bytealign (w[32], w[33], offset);\n      w[48] = hc_bytealign (w[31], w[32], offset);\n      w[47] = hc_bytealign (w[30], w[31], offset);\n      w[46] = hc_bytealign (w[29], w[30], offset);\n      w[45] = hc_bytealign (w[28], w[29], offset);\n      w[44] = hc_bytealign (w[27], w[28], offset);\n      w[43] = hc_bytealign (w[26], w[27], offset);\n      w[42] = hc_bytealign (w[25], w[26], offset);\n      w[41] = hc_bytealign (w[24], w[25], offset);\n      w[40] = hc_bytealign (w[23], w[24], offset);\n      w[39] = hc_bytealign (w[22], w[23], offset);\n      w[38] = hc_bytealign (w[21], w[22], offset);\n      w[37] = hc_bytealign (w[20], w[21], offset);\n      w[36] = hc_bytealign (w[19], w[20], offset);\n      w[35] = hc_bytealign (w[18], w[19], offset);\n      w[34] = hc_bytealign (w[17], w[18], offset);\n      w[33] = hc_bytealign (w[16], w[17], offset);\n      w[32] = hc_bytealign (w[15], w[16], offset);\n      w[31] = hc_bytealign (w[14], w[15], offset);\n      w[30] = hc_bytealign (w[13], w[14], offset);\n      w[29] = hc_bytealign (w[12], w[13], offset);\n      w[28] = hc_bytealign (w[11], w[12], offset);\n      w[27] = hc_bytealign (w[10], w[11], offset);\n      w[26] = hc_bytealign (w[ 9], w[10], offset);\n      w[25] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[24] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[23] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[22] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[21] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[20] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[19] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[18] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[17] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[16] = hc_bytealign (    0, w[ 0], offset);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_bytealign (w[45], w[46], offset);\n      w[62] = hc_bytealign (w[44], w[45], offset);\n      w[61] = hc_bytealign (w[43], w[44], offset);\n      w[60] = hc_bytealign (w[42], w[43], offset);\n      w[59] = hc_bytealign (w[41], w[42], offset);\n      w[58] = hc_bytealign (w[40], w[41], offset);\n      w[57] = hc_bytealign (w[39], w[40], offset);\n      w[56] = hc_bytealign (w[38], w[39], offset);\n      w[55] = hc_bytealign (w[37], w[38], offset);\n      w[54] = hc_bytealign (w[36], w[37], offset);\n      w[53] = hc_bytealign (w[35], w[36], offset);\n      w[52] = hc_bytealign (w[34], w[35], offset);\n      w[51] = hc_bytealign (w[33], w[34], offset);\n      w[50] = hc_bytealign (w[32], w[33], offset);\n      w[49] = hc_bytealign (w[31], w[32], offset);\n      w[48] = hc_bytealign (w[30], w[31], offset);\n      w[47] = hc_bytealign (w[29], w[30], offset);\n      w[46] = hc_bytealign (w[28], w[29], offset);\n      w[45] = hc_bytealign (w[27], w[28], offset);\n      w[44] = hc_bytealign (w[26], w[27], offset);\n      w[43] = hc_bytealign (w[25], w[26], offset);\n      w[42] = hc_bytealign (w[24], w[25], offset);\n      w[41] = hc_bytealign (w[23], w[24], offset);\n      w[40] = hc_bytealign (w[22], w[23], offset);\n      w[39] = hc_bytealign (w[21], w[22], offset);\n      w[38] = hc_bytealign (w[20], w[21], offset);\n      w[37] = hc_bytealign (w[19], w[20], offset);\n      w[36] = hc_bytealign (w[18], w[19], offset);\n      w[35] = hc_bytealign (w[17], w[18], offset);\n      w[34] = hc_bytealign (w[16], w[17], offset);\n      w[33] = hc_bytealign (w[15], w[16], offset);\n      w[32] = hc_bytealign (w[14], w[15], offset);\n      w[31] = hc_bytealign (w[13], w[14], offset);\n      w[30] = hc_bytealign (w[12], w[13], offset);\n      w[29] = hc_bytealign (w[11], w[12], offset);\n      w[28] = hc_bytealign (w[10], w[11], offset);\n      w[27] = hc_bytealign (w[ 9], w[10], offset);\n      w[26] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[25] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[24] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[23] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[22] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[21] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[20] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[19] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[18] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[17] = hc_bytealign (    0, w[ 0], offset);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_bytealign (w[44], w[45], offset);\n      w[62] = hc_bytealign (w[43], w[44], offset);\n      w[61] = hc_bytealign (w[42], w[43], offset);\n      w[60] = hc_bytealign (w[41], w[42], offset);\n      w[59] = hc_bytealign (w[40], w[41], offset);\n      w[58] = hc_bytealign (w[39], w[40], offset);\n      w[57] = hc_bytealign (w[38], w[39], offset);\n      w[56] = hc_bytealign (w[37], w[38], offset);\n      w[55] = hc_bytealign (w[36], w[37], offset);\n      w[54] = hc_bytealign (w[35], w[36], offset);\n      w[53] = hc_bytealign (w[34], w[35], offset);\n      w[52] = hc_bytealign (w[33], w[34], offset);\n      w[51] = hc_bytealign (w[32], w[33], offset);\n      w[50] = hc_bytealign (w[31], w[32], offset);\n      w[49] = hc_bytealign (w[30], w[31], offset);\n      w[48] = hc_bytealign (w[29], w[30], offset);\n      w[47] = hc_bytealign (w[28], w[29], offset);\n      w[46] = hc_bytealign (w[27], w[28], offset);\n      w[45] = hc_bytealign (w[26], w[27], offset);\n      w[44] = hc_bytealign (w[25], w[26], offset);\n      w[43] = hc_bytealign (w[24], w[25], offset);\n      w[42] = hc_bytealign (w[23], w[24], offset);\n      w[41] = hc_bytealign (w[22], w[23], offset);\n      w[40] = hc_bytealign (w[21], w[22], offset);\n      w[39] = hc_bytealign (w[20], w[21], offset);\n      w[38] = hc_bytealign (w[19], w[20], offset);\n      w[37] = hc_bytealign (w[18], w[19], offset);\n      w[36] = hc_bytealign (w[17], w[18], offset);\n      w[35] = hc_bytealign (w[16], w[17], offset);\n      w[34] = hc_bytealign (w[15], w[16], offset);\n      w[33] = hc_bytealign (w[14], w[15], offset);\n      w[32] = hc_bytealign (w[13], w[14], offset);\n      w[31] = hc_bytealign (w[12], w[13], offset);\n      w[30] = hc_bytealign (w[11], w[12], offset);\n      w[29] = hc_bytealign (w[10], w[11], offset);\n      w[28] = hc_bytealign (w[ 9], w[10], offset);\n      w[27] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[26] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[25] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[24] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[23] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[22] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[21] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[20] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[19] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[18] = hc_bytealign (    0, w[ 0], offset);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_bytealign (w[43], w[44], offset);\n      w[62] = hc_bytealign (w[42], w[43], offset);\n      w[61] = hc_bytealign (w[41], w[42], offset);\n      w[60] = hc_bytealign (w[40], w[41], offset);\n      w[59] = hc_bytealign (w[39], w[40], offset);\n      w[58] = hc_bytealign (w[38], w[39], offset);\n      w[57] = hc_bytealign (w[37], w[38], offset);\n      w[56] = hc_bytealign (w[36], w[37], offset);\n      w[55] = hc_bytealign (w[35], w[36], offset);\n      w[54] = hc_bytealign (w[34], w[35], offset);\n      w[53] = hc_bytealign (w[33], w[34], offset);\n      w[52] = hc_bytealign (w[32], w[33], offset);\n      w[51] = hc_bytealign (w[31], w[32], offset);\n      w[50] = hc_bytealign (w[30], w[31], offset);\n      w[49] = hc_bytealign (w[29], w[30], offset);\n      w[48] = hc_bytealign (w[28], w[29], offset);\n      w[47] = hc_bytealign (w[27], w[28], offset);\n      w[46] = hc_bytealign (w[26], w[27], offset);\n      w[45] = hc_bytealign (w[25], w[26], offset);\n      w[44] = hc_bytealign (w[24], w[25], offset);\n      w[43] = hc_bytealign (w[23], w[24], offset);\n      w[42] = hc_bytealign (w[22], w[23], offset);\n      w[41] = hc_bytealign (w[21], w[22], offset);\n      w[40] = hc_bytealign (w[20], w[21], offset);\n      w[39] = hc_bytealign (w[19], w[20], offset);\n      w[38] = hc_bytealign (w[18], w[19], offset);\n      w[37] = hc_bytealign (w[17], w[18], offset);\n      w[36] = hc_bytealign (w[16], w[17], offset);\n      w[35] = hc_bytealign (w[15], w[16], offset);\n      w[34] = hc_bytealign (w[14], w[15], offset);\n      w[33] = hc_bytealign (w[13], w[14], offset);\n      w[32] = hc_bytealign (w[12], w[13], offset);\n      w[31] = hc_bytealign (w[11], w[12], offset);\n      w[30] = hc_bytealign (w[10], w[11], offset);\n      w[29] = hc_bytealign (w[ 9], w[10], offset);\n      w[28] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[27] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[26] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[25] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[24] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[23] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[22] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[21] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[20] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[19] = hc_bytealign (    0, w[ 0], offset);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_bytealign (w[42], w[43], offset);\n      w[62] = hc_bytealign (w[41], w[42], offset);\n      w[61] = hc_bytealign (w[40], w[41], offset);\n      w[60] = hc_bytealign (w[39], w[40], offset);\n      w[59] = hc_bytealign (w[38], w[39], offset);\n      w[58] = hc_bytealign (w[37], w[38], offset);\n      w[57] = hc_bytealign (w[36], w[37], offset);\n      w[56] = hc_bytealign (w[35], w[36], offset);\n      w[55] = hc_bytealign (w[34], w[35], offset);\n      w[54] = hc_bytealign (w[33], w[34], offset);\n      w[53] = hc_bytealign (w[32], w[33], offset);\n      w[52] = hc_bytealign (w[31], w[32], offset);\n      w[51] = hc_bytealign (w[30], w[31], offset);\n      w[50] = hc_bytealign (w[29], w[30], offset);\n      w[49] = hc_bytealign (w[28], w[29], offset);\n      w[48] = hc_bytealign (w[27], w[28], offset);\n      w[47] = hc_bytealign (w[26], w[27], offset);\n      w[46] = hc_bytealign (w[25], w[26], offset);\n      w[45] = hc_bytealign (w[24], w[25], offset);\n      w[44] = hc_bytealign (w[23], w[24], offset);\n      w[43] = hc_bytealign (w[22], w[23], offset);\n      w[42] = hc_bytealign (w[21], w[22], offset);\n      w[41] = hc_bytealign (w[20], w[21], offset);\n      w[40] = hc_bytealign (w[19], w[20], offset);\n      w[39] = hc_bytealign (w[18], w[19], offset);\n      w[38] = hc_bytealign (w[17], w[18], offset);\n      w[37] = hc_bytealign (w[16], w[17], offset);\n      w[36] = hc_bytealign (w[15], w[16], offset);\n      w[35] = hc_bytealign (w[14], w[15], offset);\n      w[34] = hc_bytealign (w[13], w[14], offset);\n      w[33] = hc_bytealign (w[12], w[13], offset);\n      w[32] = hc_bytealign (w[11], w[12], offset);\n      w[31] = hc_bytealign (w[10], w[11], offset);\n      w[30] = hc_bytealign (w[ 9], w[10], offset);\n      w[29] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[28] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[27] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[26] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[25] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[24] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[23] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[22] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[21] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[20] = hc_bytealign (    0, w[ 0], offset);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_bytealign (w[41], w[42], offset);\n      w[62] = hc_bytealign (w[40], w[41], offset);\n      w[61] = hc_bytealign (w[39], w[40], offset);\n      w[60] = hc_bytealign (w[38], w[39], offset);\n      w[59] = hc_bytealign (w[37], w[38], offset);\n      w[58] = hc_bytealign (w[36], w[37], offset);\n      w[57] = hc_bytealign (w[35], w[36], offset);\n      w[56] = hc_bytealign (w[34], w[35], offset);\n      w[55] = hc_bytealign (w[33], w[34], offset);\n      w[54] = hc_bytealign (w[32], w[33], offset);\n      w[53] = hc_bytealign (w[31], w[32], offset);\n      w[52] = hc_bytealign (w[30], w[31], offset);\n      w[51] = hc_bytealign (w[29], w[30], offset);\n      w[50] = hc_bytealign (w[28], w[29], offset);\n      w[49] = hc_bytealign (w[27], w[28], offset);\n      w[48] = hc_bytealign (w[26], w[27], offset);\n      w[47] = hc_bytealign (w[25], w[26], offset);\n      w[46] = hc_bytealign (w[24], w[25], offset);\n      w[45] = hc_bytealign (w[23], w[24], offset);\n      w[44] = hc_bytealign (w[22], w[23], offset);\n      w[43] = hc_bytealign (w[21], w[22], offset);\n      w[42] = hc_bytealign (w[20], w[21], offset);\n      w[41] = hc_bytealign (w[19], w[20], offset);\n      w[40] = hc_bytealign (w[18], w[19], offset);\n      w[39] = hc_bytealign (w[17], w[18], offset);\n      w[38] = hc_bytealign (w[16], w[17], offset);\n      w[37] = hc_bytealign (w[15], w[16], offset);\n      w[36] = hc_bytealign (w[14], w[15], offset);\n      w[35] = hc_bytealign (w[13], w[14], offset);\n      w[34] = hc_bytealign (w[12], w[13], offset);\n      w[33] = hc_bytealign (w[11], w[12], offset);\n      w[32] = hc_bytealign (w[10], w[11], offset);\n      w[31] = hc_bytealign (w[ 9], w[10], offset);\n      w[30] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[29] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[28] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[27] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[26] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[25] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[24] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[23] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[22] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[21] = hc_bytealign (    0, w[ 0], offset);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_bytealign (w[40], w[41], offset);\n      w[62] = hc_bytealign (w[39], w[40], offset);\n      w[61] = hc_bytealign (w[38], w[39], offset);\n      w[60] = hc_bytealign (w[37], w[38], offset);\n      w[59] = hc_bytealign (w[36], w[37], offset);\n      w[58] = hc_bytealign (w[35], w[36], offset);\n      w[57] = hc_bytealign (w[34], w[35], offset);\n      w[56] = hc_bytealign (w[33], w[34], offset);\n      w[55] = hc_bytealign (w[32], w[33], offset);\n      w[54] = hc_bytealign (w[31], w[32], offset);\n      w[53] = hc_bytealign (w[30], w[31], offset);\n      w[52] = hc_bytealign (w[29], w[30], offset);\n      w[51] = hc_bytealign (w[28], w[29], offset);\n      w[50] = hc_bytealign (w[27], w[28], offset);\n      w[49] = hc_bytealign (w[26], w[27], offset);\n      w[48] = hc_bytealign (w[25], w[26], offset);\n      w[47] = hc_bytealign (w[24], w[25], offset);\n      w[46] = hc_bytealign (w[23], w[24], offset);\n      w[45] = hc_bytealign (w[22], w[23], offset);\n      w[44] = hc_bytealign (w[21], w[22], offset);\n      w[43] = hc_bytealign (w[20], w[21], offset);\n      w[42] = hc_bytealign (w[19], w[20], offset);\n      w[41] = hc_bytealign (w[18], w[19], offset);\n      w[40] = hc_bytealign (w[17], w[18], offset);\n      w[39] = hc_bytealign (w[16], w[17], offset);\n      w[38] = hc_bytealign (w[15], w[16], offset);\n      w[37] = hc_bytealign (w[14], w[15], offset);\n      w[36] = hc_bytealign (w[13], w[14], offset);\n      w[35] = hc_bytealign (w[12], w[13], offset);\n      w[34] = hc_bytealign (w[11], w[12], offset);\n      w[33] = hc_bytealign (w[10], w[11], offset);\n      w[32] = hc_bytealign (w[ 9], w[10], offset);\n      w[31] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[30] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[29] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[28] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[27] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[26] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[25] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[24] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[23] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[22] = hc_bytealign (    0, w[ 0], offset);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_bytealign (w[39], w[40], offset);\n      w[62] = hc_bytealign (w[38], w[39], offset);\n      w[61] = hc_bytealign (w[37], w[38], offset);\n      w[60] = hc_bytealign (w[36], w[37], offset);\n      w[59] = hc_bytealign (w[35], w[36], offset);\n      w[58] = hc_bytealign (w[34], w[35], offset);\n      w[57] = hc_bytealign (w[33], w[34], offset);\n      w[56] = hc_bytealign (w[32], w[33], offset);\n      w[55] = hc_bytealign (w[31], w[32], offset);\n      w[54] = hc_bytealign (w[30], w[31], offset);\n      w[53] = hc_bytealign (w[29], w[30], offset);\n      w[52] = hc_bytealign (w[28], w[29], offset);\n      w[51] = hc_bytealign (w[27], w[28], offset);\n      w[50] = hc_bytealign (w[26], w[27], offset);\n      w[49] = hc_bytealign (w[25], w[26], offset);\n      w[48] = hc_bytealign (w[24], w[25], offset);\n      w[47] = hc_bytealign (w[23], w[24], offset);\n      w[46] = hc_bytealign (w[22], w[23], offset);\n      w[45] = hc_bytealign (w[21], w[22], offset);\n      w[44] = hc_bytealign (w[20], w[21], offset);\n      w[43] = hc_bytealign (w[19], w[20], offset);\n      w[42] = hc_bytealign (w[18], w[19], offset);\n      w[41] = hc_bytealign (w[17], w[18], offset);\n      w[40] = hc_bytealign (w[16], w[17], offset);\n      w[39] = hc_bytealign (w[15], w[16], offset);\n      w[38] = hc_bytealign (w[14], w[15], offset);\n      w[37] = hc_bytealign (w[13], w[14], offset);\n      w[36] = hc_bytealign (w[12], w[13], offset);\n      w[35] = hc_bytealign (w[11], w[12], offset);\n      w[34] = hc_bytealign (w[10], w[11], offset);\n      w[33] = hc_bytealign (w[ 9], w[10], offset);\n      w[32] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[31] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[30] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[29] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[28] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[27] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[26] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[25] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[24] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[23] = hc_bytealign (    0, w[ 0], offset);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_bytealign (w[38], w[39], offset);\n      w[62] = hc_bytealign (w[37], w[38], offset);\n      w[61] = hc_bytealign (w[36], w[37], offset);\n      w[60] = hc_bytealign (w[35], w[36], offset);\n      w[59] = hc_bytealign (w[34], w[35], offset);\n      w[58] = hc_bytealign (w[33], w[34], offset);\n      w[57] = hc_bytealign (w[32], w[33], offset);\n      w[56] = hc_bytealign (w[31], w[32], offset);\n      w[55] = hc_bytealign (w[30], w[31], offset);\n      w[54] = hc_bytealign (w[29], w[30], offset);\n      w[53] = hc_bytealign (w[28], w[29], offset);\n      w[52] = hc_bytealign (w[27], w[28], offset);\n      w[51] = hc_bytealign (w[26], w[27], offset);\n      w[50] = hc_bytealign (w[25], w[26], offset);\n      w[49] = hc_bytealign (w[24], w[25], offset);\n      w[48] = hc_bytealign (w[23], w[24], offset);\n      w[47] = hc_bytealign (w[22], w[23], offset);\n      w[46] = hc_bytealign (w[21], w[22], offset);\n      w[45] = hc_bytealign (w[20], w[21], offset);\n      w[44] = hc_bytealign (w[19], w[20], offset);\n      w[43] = hc_bytealign (w[18], w[19], offset);\n      w[42] = hc_bytealign (w[17], w[18], offset);\n      w[41] = hc_bytealign (w[16], w[17], offset);\n      w[40] = hc_bytealign (w[15], w[16], offset);\n      w[39] = hc_bytealign (w[14], w[15], offset);\n      w[38] = hc_bytealign (w[13], w[14], offset);\n      w[37] = hc_bytealign (w[12], w[13], offset);\n      w[36] = hc_bytealign (w[11], w[12], offset);\n      w[35] = hc_bytealign (w[10], w[11], offset);\n      w[34] = hc_bytealign (w[ 9], w[10], offset);\n      w[33] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[32] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[31] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[30] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[29] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[28] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[27] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[26] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[25] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[24] = hc_bytealign (    0, w[ 0], offset);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_bytealign (w[37], w[38], offset);\n      w[62] = hc_bytealign (w[36], w[37], offset);\n      w[61] = hc_bytealign (w[35], w[36], offset);\n      w[60] = hc_bytealign (w[34], w[35], offset);\n      w[59] = hc_bytealign (w[33], w[34], offset);\n      w[58] = hc_bytealign (w[32], w[33], offset);\n      w[57] = hc_bytealign (w[31], w[32], offset);\n      w[56] = hc_bytealign (w[30], w[31], offset);\n      w[55] = hc_bytealign (w[29], w[30], offset);\n      w[54] = hc_bytealign (w[28], w[29], offset);\n      w[53] = hc_bytealign (w[27], w[28], offset);\n      w[52] = hc_bytealign (w[26], w[27], offset);\n      w[51] = hc_bytealign (w[25], w[26], offset);\n      w[50] = hc_bytealign (w[24], w[25], offset);\n      w[49] = hc_bytealign (w[23], w[24], offset);\n      w[48] = hc_bytealign (w[22], w[23], offset);\n      w[47] = hc_bytealign (w[21], w[22], offset);\n      w[46] = hc_bytealign (w[20], w[21], offset);\n      w[45] = hc_bytealign (w[19], w[20], offset);\n      w[44] = hc_bytealign (w[18], w[19], offset);\n      w[43] = hc_bytealign (w[17], w[18], offset);\n      w[42] = hc_bytealign (w[16], w[17], offset);\n      w[41] = hc_bytealign (w[15], w[16], offset);\n      w[40] = hc_bytealign (w[14], w[15], offset);\n      w[39] = hc_bytealign (w[13], w[14], offset);\n      w[38] = hc_bytealign (w[12], w[13], offset);\n      w[37] = hc_bytealign (w[11], w[12], offset);\n      w[36] = hc_bytealign (w[10], w[11], offset);\n      w[35] = hc_bytealign (w[ 9], w[10], offset);\n      w[34] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[33] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[32] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[31] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[30] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[29] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[28] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[27] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[26] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[25] = hc_bytealign (    0, w[ 0], offset);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_bytealign (w[36], w[37], offset);\n      w[62] = hc_bytealign (w[35], w[36], offset);\n      w[61] = hc_bytealign (w[34], w[35], offset);\n      w[60] = hc_bytealign (w[33], w[34], offset);\n      w[59] = hc_bytealign (w[32], w[33], offset);\n      w[58] = hc_bytealign (w[31], w[32], offset);\n      w[57] = hc_bytealign (w[30], w[31], offset);\n      w[56] = hc_bytealign (w[29], w[30], offset);\n      w[55] = hc_bytealign (w[28], w[29], offset);\n      w[54] = hc_bytealign (w[27], w[28], offset);\n      w[53] = hc_bytealign (w[26], w[27], offset);\n      w[52] = hc_bytealign (w[25], w[26], offset);\n      w[51] = hc_bytealign (w[24], w[25], offset);\n      w[50] = hc_bytealign (w[23], w[24], offset);\n      w[49] = hc_bytealign (w[22], w[23], offset);\n      w[48] = hc_bytealign (w[21], w[22], offset);\n      w[47] = hc_bytealign (w[20], w[21], offset);\n      w[46] = hc_bytealign (w[19], w[20], offset);\n      w[45] = hc_bytealign (w[18], w[19], offset);\n      w[44] = hc_bytealign (w[17], w[18], offset);\n      w[43] = hc_bytealign (w[16], w[17], offset);\n      w[42] = hc_bytealign (w[15], w[16], offset);\n      w[41] = hc_bytealign (w[14], w[15], offset);\n      w[40] = hc_bytealign (w[13], w[14], offset);\n      w[39] = hc_bytealign (w[12], w[13], offset);\n      w[38] = hc_bytealign (w[11], w[12], offset);\n      w[37] = hc_bytealign (w[10], w[11], offset);\n      w[36] = hc_bytealign (w[ 9], w[10], offset);\n      w[35] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[34] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[33] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[32] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[31] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[30] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[29] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[28] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[27] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[26] = hc_bytealign (    0, w[ 0], offset);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_bytealign (w[35], w[36], offset);\n      w[62] = hc_bytealign (w[34], w[35], offset);\n      w[61] = hc_bytealign (w[33], w[34], offset);\n      w[60] = hc_bytealign (w[32], w[33], offset);\n      w[59] = hc_bytealign (w[31], w[32], offset);\n      w[58] = hc_bytealign (w[30], w[31], offset);\n      w[57] = hc_bytealign (w[29], w[30], offset);\n      w[56] = hc_bytealign (w[28], w[29], offset);\n      w[55] = hc_bytealign (w[27], w[28], offset);\n      w[54] = hc_bytealign (w[26], w[27], offset);\n      w[53] = hc_bytealign (w[25], w[26], offset);\n      w[52] = hc_bytealign (w[24], w[25], offset);\n      w[51] = hc_bytealign (w[23], w[24], offset);\n      w[50] = hc_bytealign (w[22], w[23], offset);\n      w[49] = hc_bytealign (w[21], w[22], offset);\n      w[48] = hc_bytealign (w[20], w[21], offset);\n      w[47] = hc_bytealign (w[19], w[20], offset);\n      w[46] = hc_bytealign (w[18], w[19], offset);\n      w[45] = hc_bytealign (w[17], w[18], offset);\n      w[44] = hc_bytealign (w[16], w[17], offset);\n      w[43] = hc_bytealign (w[15], w[16], offset);\n      w[42] = hc_bytealign (w[14], w[15], offset);\n      w[41] = hc_bytealign (w[13], w[14], offset);\n      w[40] = hc_bytealign (w[12], w[13], offset);\n      w[39] = hc_bytealign (w[11], w[12], offset);\n      w[38] = hc_bytealign (w[10], w[11], offset);\n      w[37] = hc_bytealign (w[ 9], w[10], offset);\n      w[36] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[35] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[34] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[33] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[32] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[31] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[30] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[29] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[28] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[27] = hc_bytealign (    0, w[ 0], offset);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_bytealign (w[34], w[35], offset);\n      w[62] = hc_bytealign (w[33], w[34], offset);\n      w[61] = hc_bytealign (w[32], w[33], offset);\n      w[60] = hc_bytealign (w[31], w[32], offset);\n      w[59] = hc_bytealign (w[30], w[31], offset);\n      w[58] = hc_bytealign (w[29], w[30], offset);\n      w[57] = hc_bytealign (w[28], w[29], offset);\n      w[56] = hc_bytealign (w[27], w[28], offset);\n      w[55] = hc_bytealign (w[26], w[27], offset);\n      w[54] = hc_bytealign (w[25], w[26], offset);\n      w[53] = hc_bytealign (w[24], w[25], offset);\n      w[52] = hc_bytealign (w[23], w[24], offset);\n      w[51] = hc_bytealign (w[22], w[23], offset);\n      w[50] = hc_bytealign (w[21], w[22], offset);\n      w[49] = hc_bytealign (w[20], w[21], offset);\n      w[48] = hc_bytealign (w[19], w[20], offset);\n      w[47] = hc_bytealign (w[18], w[19], offset);\n      w[46] = hc_bytealign (w[17], w[18], offset);\n      w[45] = hc_bytealign (w[16], w[17], offset);\n      w[44] = hc_bytealign (w[15], w[16], offset);\n      w[43] = hc_bytealign (w[14], w[15], offset);\n      w[42] = hc_bytealign (w[13], w[14], offset);\n      w[41] = hc_bytealign (w[12], w[13], offset);\n      w[40] = hc_bytealign (w[11], w[12], offset);\n      w[39] = hc_bytealign (w[10], w[11], offset);\n      w[38] = hc_bytealign (w[ 9], w[10], offset);\n      w[37] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[36] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[35] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[34] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[33] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[32] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[31] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[30] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[29] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[28] = hc_bytealign (    0, w[ 0], offset);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_bytealign (w[33], w[34], offset);\n      w[62] = hc_bytealign (w[32], w[33], offset);\n      w[61] = hc_bytealign (w[31], w[32], offset);\n      w[60] = hc_bytealign (w[30], w[31], offset);\n      w[59] = hc_bytealign (w[29], w[30], offset);\n      w[58] = hc_bytealign (w[28], w[29], offset);\n      w[57] = hc_bytealign (w[27], w[28], offset);\n      w[56] = hc_bytealign (w[26], w[27], offset);\n      w[55] = hc_bytealign (w[25], w[26], offset);\n      w[54] = hc_bytealign (w[24], w[25], offset);\n      w[53] = hc_bytealign (w[23], w[24], offset);\n      w[52] = hc_bytealign (w[22], w[23], offset);\n      w[51] = hc_bytealign (w[21], w[22], offset);\n      w[50] = hc_bytealign (w[20], w[21], offset);\n      w[49] = hc_bytealign (w[19], w[20], offset);\n      w[48] = hc_bytealign (w[18], w[19], offset);\n      w[47] = hc_bytealign (w[17], w[18], offset);\n      w[46] = hc_bytealign (w[16], w[17], offset);\n      w[45] = hc_bytealign (w[15], w[16], offset);\n      w[44] = hc_bytealign (w[14], w[15], offset);\n      w[43] = hc_bytealign (w[13], w[14], offset);\n      w[42] = hc_bytealign (w[12], w[13], offset);\n      w[41] = hc_bytealign (w[11], w[12], offset);\n      w[40] = hc_bytealign (w[10], w[11], offset);\n      w[39] = hc_bytealign (w[ 9], w[10], offset);\n      w[38] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[37] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[36] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[35] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[34] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[33] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[32] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[31] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[30] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[29] = hc_bytealign (    0, w[ 0], offset);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_bytealign (w[32], w[33], offset);\n      w[62] = hc_bytealign (w[31], w[32], offset);\n      w[61] = hc_bytealign (w[30], w[31], offset);\n      w[60] = hc_bytealign (w[29], w[30], offset);\n      w[59] = hc_bytealign (w[28], w[29], offset);\n      w[58] = hc_bytealign (w[27], w[28], offset);\n      w[57] = hc_bytealign (w[26], w[27], offset);\n      w[56] = hc_bytealign (w[25], w[26], offset);\n      w[55] = hc_bytealign (w[24], w[25], offset);\n      w[54] = hc_bytealign (w[23], w[24], offset);\n      w[53] = hc_bytealign (w[22], w[23], offset);\n      w[52] = hc_bytealign (w[21], w[22], offset);\n      w[51] = hc_bytealign (w[20], w[21], offset);\n      w[50] = hc_bytealign (w[19], w[20], offset);\n      w[49] = hc_bytealign (w[18], w[19], offset);\n      w[48] = hc_bytealign (w[17], w[18], offset);\n      w[47] = hc_bytealign (w[16], w[17], offset);\n      w[46] = hc_bytealign (w[15], w[16], offset);\n      w[45] = hc_bytealign (w[14], w[15], offset);\n      w[44] = hc_bytealign (w[13], w[14], offset);\n      w[43] = hc_bytealign (w[12], w[13], offset);\n      w[42] = hc_bytealign (w[11], w[12], offset);\n      w[41] = hc_bytealign (w[10], w[11], offset);\n      w[40] = hc_bytealign (w[ 9], w[10], offset);\n      w[39] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[38] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[37] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[36] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[35] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[34] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[33] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[32] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[31] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[30] = hc_bytealign (    0, w[ 0], offset);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_bytealign (w[31], w[32], offset);\n      w[62] = hc_bytealign (w[30], w[31], offset);\n      w[61] = hc_bytealign (w[29], w[30], offset);\n      w[60] = hc_bytealign (w[28], w[29], offset);\n      w[59] = hc_bytealign (w[27], w[28], offset);\n      w[58] = hc_bytealign (w[26], w[27], offset);\n      w[57] = hc_bytealign (w[25], w[26], offset);\n      w[56] = hc_bytealign (w[24], w[25], offset);\n      w[55] = hc_bytealign (w[23], w[24], offset);\n      w[54] = hc_bytealign (w[22], w[23], offset);\n      w[53] = hc_bytealign (w[21], w[22], offset);\n      w[52] = hc_bytealign (w[20], w[21], offset);\n      w[51] = hc_bytealign (w[19], w[20], offset);\n      w[50] = hc_bytealign (w[18], w[19], offset);\n      w[49] = hc_bytealign (w[17], w[18], offset);\n      w[48] = hc_bytealign (w[16], w[17], offset);\n      w[47] = hc_bytealign (w[15], w[16], offset);\n      w[46] = hc_bytealign (w[14], w[15], offset);\n      w[45] = hc_bytealign (w[13], w[14], offset);\n      w[44] = hc_bytealign (w[12], w[13], offset);\n      w[43] = hc_bytealign (w[11], w[12], offset);\n      w[42] = hc_bytealign (w[10], w[11], offset);\n      w[41] = hc_bytealign (w[ 9], w[10], offset);\n      w[40] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[39] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[38] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[37] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[36] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[35] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[34] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[33] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[32] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[31] = hc_bytealign (    0, w[ 0], offset);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_bytealign (w[30], w[31], offset);\n      w[62] = hc_bytealign (w[29], w[30], offset);\n      w[61] = hc_bytealign (w[28], w[29], offset);\n      w[60] = hc_bytealign (w[27], w[28], offset);\n      w[59] = hc_bytealign (w[26], w[27], offset);\n      w[58] = hc_bytealign (w[25], w[26], offset);\n      w[57] = hc_bytealign (w[24], w[25], offset);\n      w[56] = hc_bytealign (w[23], w[24], offset);\n      w[55] = hc_bytealign (w[22], w[23], offset);\n      w[54] = hc_bytealign (w[21], w[22], offset);\n      w[53] = hc_bytealign (w[20], w[21], offset);\n      w[52] = hc_bytealign (w[19], w[20], offset);\n      w[51] = hc_bytealign (w[18], w[19], offset);\n      w[50] = hc_bytealign (w[17], w[18], offset);\n      w[49] = hc_bytealign (w[16], w[17], offset);\n      w[48] = hc_bytealign (w[15], w[16], offset);\n      w[47] = hc_bytealign (w[14], w[15], offset);\n      w[46] = hc_bytealign (w[13], w[14], offset);\n      w[45] = hc_bytealign (w[12], w[13], offset);\n      w[44] = hc_bytealign (w[11], w[12], offset);\n      w[43] = hc_bytealign (w[10], w[11], offset);\n      w[42] = hc_bytealign (w[ 9], w[10], offset);\n      w[41] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[40] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[39] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[38] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[37] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[36] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[35] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[34] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[33] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[32] = hc_bytealign (    0, w[ 0], offset);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_bytealign (w[29], w[30], offset);\n      w[62] = hc_bytealign (w[28], w[29], offset);\n      w[61] = hc_bytealign (w[27], w[28], offset);\n      w[60] = hc_bytealign (w[26], w[27], offset);\n      w[59] = hc_bytealign (w[25], w[26], offset);\n      w[58] = hc_bytealign (w[24], w[25], offset);\n      w[57] = hc_bytealign (w[23], w[24], offset);\n      w[56] = hc_bytealign (w[22], w[23], offset);\n      w[55] = hc_bytealign (w[21], w[22], offset);\n      w[54] = hc_bytealign (w[20], w[21], offset);\n      w[53] = hc_bytealign (w[19], w[20], offset);\n      w[52] = hc_bytealign (w[18], w[19], offset);\n      w[51] = hc_bytealign (w[17], w[18], offset);\n      w[50] = hc_bytealign (w[16], w[17], offset);\n      w[49] = hc_bytealign (w[15], w[16], offset);\n      w[48] = hc_bytealign (w[14], w[15], offset);\n      w[47] = hc_bytealign (w[13], w[14], offset);\n      w[46] = hc_bytealign (w[12], w[13], offset);\n      w[45] = hc_bytealign (w[11], w[12], offset);\n      w[44] = hc_bytealign (w[10], w[11], offset);\n      w[43] = hc_bytealign (w[ 9], w[10], offset);\n      w[42] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[41] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[40] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[39] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[38] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[37] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[36] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[35] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[34] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[33] = hc_bytealign (    0, w[ 0], offset);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_bytealign (w[28], w[29], offset);\n      w[62] = hc_bytealign (w[27], w[28], offset);\n      w[61] = hc_bytealign (w[26], w[27], offset);\n      w[60] = hc_bytealign (w[25], w[26], offset);\n      w[59] = hc_bytealign (w[24], w[25], offset);\n      w[58] = hc_bytealign (w[23], w[24], offset);\n      w[57] = hc_bytealign (w[22], w[23], offset);\n      w[56] = hc_bytealign (w[21], w[22], offset);\n      w[55] = hc_bytealign (w[20], w[21], offset);\n      w[54] = hc_bytealign (w[19], w[20], offset);\n      w[53] = hc_bytealign (w[18], w[19], offset);\n      w[52] = hc_bytealign (w[17], w[18], offset);\n      w[51] = hc_bytealign (w[16], w[17], offset);\n      w[50] = hc_bytealign (w[15], w[16], offset);\n      w[49] = hc_bytealign (w[14], w[15], offset);\n      w[48] = hc_bytealign (w[13], w[14], offset);\n      w[47] = hc_bytealign (w[12], w[13], offset);\n      w[46] = hc_bytealign (w[11], w[12], offset);\n      w[45] = hc_bytealign (w[10], w[11], offset);\n      w[44] = hc_bytealign (w[ 9], w[10], offset);\n      w[43] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[42] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[41] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[40] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[39] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[38] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[37] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[36] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[35] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[34] = hc_bytealign (    0, w[ 0], offset);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_bytealign (w[27], w[28], offset);\n      w[62] = hc_bytealign (w[26], w[27], offset);\n      w[61] = hc_bytealign (w[25], w[26], offset);\n      w[60] = hc_bytealign (w[24], w[25], offset);\n      w[59] = hc_bytealign (w[23], w[24], offset);\n      w[58] = hc_bytealign (w[22], w[23], offset);\n      w[57] = hc_bytealign (w[21], w[22], offset);\n      w[56] = hc_bytealign (w[20], w[21], offset);\n      w[55] = hc_bytealign (w[19], w[20], offset);\n      w[54] = hc_bytealign (w[18], w[19], offset);\n      w[53] = hc_bytealign (w[17], w[18], offset);\n      w[52] = hc_bytealign (w[16], w[17], offset);\n      w[51] = hc_bytealign (w[15], w[16], offset);\n      w[50] = hc_bytealign (w[14], w[15], offset);\n      w[49] = hc_bytealign (w[13], w[14], offset);\n      w[48] = hc_bytealign (w[12], w[13], offset);\n      w[47] = hc_bytealign (w[11], w[12], offset);\n      w[46] = hc_bytealign (w[10], w[11], offset);\n      w[45] = hc_bytealign (w[ 9], w[10], offset);\n      w[44] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[43] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[42] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[41] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[40] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[39] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[38] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[37] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[36] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[35] = hc_bytealign (    0, w[ 0], offset);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_bytealign (w[26], w[27], offset);\n      w[62] = hc_bytealign (w[25], w[26], offset);\n      w[61] = hc_bytealign (w[24], w[25], offset);\n      w[60] = hc_bytealign (w[23], w[24], offset);\n      w[59] = hc_bytealign (w[22], w[23], offset);\n      w[58] = hc_bytealign (w[21], w[22], offset);\n      w[57] = hc_bytealign (w[20], w[21], offset);\n      w[56] = hc_bytealign (w[19], w[20], offset);\n      w[55] = hc_bytealign (w[18], w[19], offset);\n      w[54] = hc_bytealign (w[17], w[18], offset);\n      w[53] = hc_bytealign (w[16], w[17], offset);\n      w[52] = hc_bytealign (w[15], w[16], offset);\n      w[51] = hc_bytealign (w[14], w[15], offset);\n      w[50] = hc_bytealign (w[13], w[14], offset);\n      w[49] = hc_bytealign (w[12], w[13], offset);\n      w[48] = hc_bytealign (w[11], w[12], offset);\n      w[47] = hc_bytealign (w[10], w[11], offset);\n      w[46] = hc_bytealign (w[ 9], w[10], offset);\n      w[45] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[44] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[43] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[42] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[41] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[40] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[39] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[38] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[37] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[36] = hc_bytealign (    0, w[ 0], offset);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_bytealign (w[25], w[26], offset);\n      w[62] = hc_bytealign (w[24], w[25], offset);\n      w[61] = hc_bytealign (w[23], w[24], offset);\n      w[60] = hc_bytealign (w[22], w[23], offset);\n      w[59] = hc_bytealign (w[21], w[22], offset);\n      w[58] = hc_bytealign (w[20], w[21], offset);\n      w[57] = hc_bytealign (w[19], w[20], offset);\n      w[56] = hc_bytealign (w[18], w[19], offset);\n      w[55] = hc_bytealign (w[17], w[18], offset);\n      w[54] = hc_bytealign (w[16], w[17], offset);\n      w[53] = hc_bytealign (w[15], w[16], offset);\n      w[52] = hc_bytealign (w[14], w[15], offset);\n      w[51] = hc_bytealign (w[13], w[14], offset);\n      w[50] = hc_bytealign (w[12], w[13], offset);\n      w[49] = hc_bytealign (w[11], w[12], offset);\n      w[48] = hc_bytealign (w[10], w[11], offset);\n      w[47] = hc_bytealign (w[ 9], w[10], offset);\n      w[46] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[45] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[44] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[43] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[42] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[41] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[40] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[39] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[38] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[37] = hc_bytealign (    0, w[ 0], offset);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_bytealign (w[24], w[25], offset);\n      w[62] = hc_bytealign (w[23], w[24], offset);\n      w[61] = hc_bytealign (w[22], w[23], offset);\n      w[60] = hc_bytealign (w[21], w[22], offset);\n      w[59] = hc_bytealign (w[20], w[21], offset);\n      w[58] = hc_bytealign (w[19], w[20], offset);\n      w[57] = hc_bytealign (w[18], w[19], offset);\n      w[56] = hc_bytealign (w[17], w[18], offset);\n      w[55] = hc_bytealign (w[16], w[17], offset);\n      w[54] = hc_bytealign (w[15], w[16], offset);\n      w[53] = hc_bytealign (w[14], w[15], offset);\n      w[52] = hc_bytealign (w[13], w[14], offset);\n      w[51] = hc_bytealign (w[12], w[13], offset);\n      w[50] = hc_bytealign (w[11], w[12], offset);\n      w[49] = hc_bytealign (w[10], w[11], offset);\n      w[48] = hc_bytealign (w[ 9], w[10], offset);\n      w[47] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[46] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[45] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[44] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[43] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[42] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[41] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[40] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[39] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[38] = hc_bytealign (    0, w[ 0], offset);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_bytealign (w[23], w[24], offset);\n      w[62] = hc_bytealign (w[22], w[23], offset);\n      w[61] = hc_bytealign (w[21], w[22], offset);\n      w[60] = hc_bytealign (w[20], w[21], offset);\n      w[59] = hc_bytealign (w[19], w[20], offset);\n      w[58] = hc_bytealign (w[18], w[19], offset);\n      w[57] = hc_bytealign (w[17], w[18], offset);\n      w[56] = hc_bytealign (w[16], w[17], offset);\n      w[55] = hc_bytealign (w[15], w[16], offset);\n      w[54] = hc_bytealign (w[14], w[15], offset);\n      w[53] = hc_bytealign (w[13], w[14], offset);\n      w[52] = hc_bytealign (w[12], w[13], offset);\n      w[51] = hc_bytealign (w[11], w[12], offset);\n      w[50] = hc_bytealign (w[10], w[11], offset);\n      w[49] = hc_bytealign (w[ 9], w[10], offset);\n      w[48] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[47] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[46] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[45] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[44] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[43] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[42] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[41] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[40] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[39] = hc_bytealign (    0, w[ 0], offset);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_bytealign (w[22], w[23], offset);\n      w[62] = hc_bytealign (w[21], w[22], offset);\n      w[61] = hc_bytealign (w[20], w[21], offset);\n      w[60] = hc_bytealign (w[19], w[20], offset);\n      w[59] = hc_bytealign (w[18], w[19], offset);\n      w[58] = hc_bytealign (w[17], w[18], offset);\n      w[57] = hc_bytealign (w[16], w[17], offset);\n      w[56] = hc_bytealign (w[15], w[16], offset);\n      w[55] = hc_bytealign (w[14], w[15], offset);\n      w[54] = hc_bytealign (w[13], w[14], offset);\n      w[53] = hc_bytealign (w[12], w[13], offset);\n      w[52] = hc_bytealign (w[11], w[12], offset);\n      w[51] = hc_bytealign (w[10], w[11], offset);\n      w[50] = hc_bytealign (w[ 9], w[10], offset);\n      w[49] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[48] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[47] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[46] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[45] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[44] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[43] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[42] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[41] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[40] = hc_bytealign (    0, w[ 0], offset);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_bytealign (w[21], w[22], offset);\n      w[62] = hc_bytealign (w[20], w[21], offset);\n      w[61] = hc_bytealign (w[19], w[20], offset);\n      w[60] = hc_bytealign (w[18], w[19], offset);\n      w[59] = hc_bytealign (w[17], w[18], offset);\n      w[58] = hc_bytealign (w[16], w[17], offset);\n      w[57] = hc_bytealign (w[15], w[16], offset);\n      w[56] = hc_bytealign (w[14], w[15], offset);\n      w[55] = hc_bytealign (w[13], w[14], offset);\n      w[54] = hc_bytealign (w[12], w[13], offset);\n      w[53] = hc_bytealign (w[11], w[12], offset);\n      w[52] = hc_bytealign (w[10], w[11], offset);\n      w[51] = hc_bytealign (w[ 9], w[10], offset);\n      w[50] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[49] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[48] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[47] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[46] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[45] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[44] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[43] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[42] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[41] = hc_bytealign (    0, w[ 0], offset);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_bytealign (w[20], w[21], offset);\n      w[62] = hc_bytealign (w[19], w[20], offset);\n      w[61] = hc_bytealign (w[18], w[19], offset);\n      w[60] = hc_bytealign (w[17], w[18], offset);\n      w[59] = hc_bytealign (w[16], w[17], offset);\n      w[58] = hc_bytealign (w[15], w[16], offset);\n      w[57] = hc_bytealign (w[14], w[15], offset);\n      w[56] = hc_bytealign (w[13], w[14], offset);\n      w[55] = hc_bytealign (w[12], w[13], offset);\n      w[54] = hc_bytealign (w[11], w[12], offset);\n      w[53] = hc_bytealign (w[10], w[11], offset);\n      w[52] = hc_bytealign (w[ 9], w[10], offset);\n      w[51] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[50] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[49] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[48] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[47] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[46] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[45] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[44] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[43] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[42] = hc_bytealign (    0, w[ 0], offset);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_bytealign (w[19], w[20], offset);\n      w[62] = hc_bytealign (w[18], w[19], offset);\n      w[61] = hc_bytealign (w[17], w[18], offset);\n      w[60] = hc_bytealign (w[16], w[17], offset);\n      w[59] = hc_bytealign (w[15], w[16], offset);\n      w[58] = hc_bytealign (w[14], w[15], offset);\n      w[57] = hc_bytealign (w[13], w[14], offset);\n      w[56] = hc_bytealign (w[12], w[13], offset);\n      w[55] = hc_bytealign (w[11], w[12], offset);\n      w[54] = hc_bytealign (w[10], w[11], offset);\n      w[53] = hc_bytealign (w[ 9], w[10], offset);\n      w[52] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[51] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[50] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[49] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[48] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[47] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[46] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[45] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[44] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[43] = hc_bytealign (    0, w[ 0], offset);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_bytealign (w[18], w[19], offset);\n      w[62] = hc_bytealign (w[17], w[18], offset);\n      w[61] = hc_bytealign (w[16], w[17], offset);\n      w[60] = hc_bytealign (w[15], w[16], offset);\n      w[59] = hc_bytealign (w[14], w[15], offset);\n      w[58] = hc_bytealign (w[13], w[14], offset);\n      w[57] = hc_bytealign (w[12], w[13], offset);\n      w[56] = hc_bytealign (w[11], w[12], offset);\n      w[55] = hc_bytealign (w[10], w[11], offset);\n      w[54] = hc_bytealign (w[ 9], w[10], offset);\n      w[53] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[52] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[51] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[50] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[49] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[48] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[47] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[46] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[45] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[44] = hc_bytealign (    0, w[ 0], offset);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_bytealign (w[17], w[18], offset);\n      w[62] = hc_bytealign (w[16], w[17], offset);\n      w[61] = hc_bytealign (w[15], w[16], offset);\n      w[60] = hc_bytealign (w[14], w[15], offset);\n      w[59] = hc_bytealign (w[13], w[14], offset);\n      w[58] = hc_bytealign (w[12], w[13], offset);\n      w[57] = hc_bytealign (w[11], w[12], offset);\n      w[56] = hc_bytealign (w[10], w[11], offset);\n      w[55] = hc_bytealign (w[ 9], w[10], offset);\n      w[54] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[53] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[52] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[51] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[50] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[49] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[48] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[47] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[46] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[45] = hc_bytealign (    0, w[ 0], offset);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_bytealign (w[16], w[17], offset);\n      w[62] = hc_bytealign (w[15], w[16], offset);\n      w[61] = hc_bytealign (w[14], w[15], offset);\n      w[60] = hc_bytealign (w[13], w[14], offset);\n      w[59] = hc_bytealign (w[12], w[13], offset);\n      w[58] = hc_bytealign (w[11], w[12], offset);\n      w[57] = hc_bytealign (w[10], w[11], offset);\n      w[56] = hc_bytealign (w[ 9], w[10], offset);\n      w[55] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[54] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[53] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[52] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[51] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[50] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[49] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[48] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[47] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[46] = hc_bytealign (    0, w[ 0], offset);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_bytealign (w[15], w[16], offset);\n      w[62] = hc_bytealign (w[14], w[15], offset);\n      w[61] = hc_bytealign (w[13], w[14], offset);\n      w[60] = hc_bytealign (w[12], w[13], offset);\n      w[59] = hc_bytealign (w[11], w[12], offset);\n      w[58] = hc_bytealign (w[10], w[11], offset);\n      w[57] = hc_bytealign (w[ 9], w[10], offset);\n      w[56] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[55] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[54] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[53] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[52] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[51] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[50] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[49] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[48] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[47] = hc_bytealign (    0, w[ 0], offset);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_bytealign (w[14], w[15], offset);\n      w[62] = hc_bytealign (w[13], w[14], offset);\n      w[61] = hc_bytealign (w[12], w[13], offset);\n      w[60] = hc_bytealign (w[11], w[12], offset);\n      w[59] = hc_bytealign (w[10], w[11], offset);\n      w[58] = hc_bytealign (w[ 9], w[10], offset);\n      w[57] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[56] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[55] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[54] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[53] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[52] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[51] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[50] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[49] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[48] = hc_bytealign (    0, w[ 0], offset);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_bytealign (w[13], w[14], offset);\n      w[62] = hc_bytealign (w[12], w[13], offset);\n      w[61] = hc_bytealign (w[11], w[12], offset);\n      w[60] = hc_bytealign (w[10], w[11], offset);\n      w[59] = hc_bytealign (w[ 9], w[10], offset);\n      w[58] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[57] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[56] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[55] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[54] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[53] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[52] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[51] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[50] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[49] = hc_bytealign (    0, w[ 0], offset);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_bytealign (w[12], w[13], offset);\n      w[62] = hc_bytealign (w[11], w[12], offset);\n      w[61] = hc_bytealign (w[10], w[11], offset);\n      w[60] = hc_bytealign (w[ 9], w[10], offset);\n      w[59] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[58] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[57] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[56] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[55] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[54] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[53] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[52] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[51] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[50] = hc_bytealign (    0, w[ 0], offset);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_bytealign (w[11], w[12], offset);\n      w[62] = hc_bytealign (w[10], w[11], offset);\n      w[61] = hc_bytealign (w[ 9], w[10], offset);\n      w[60] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[59] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[58] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[57] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[56] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[55] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[54] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[53] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[52] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[51] = hc_bytealign (    0, w[ 0], offset);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_bytealign (w[10], w[11], offset);\n      w[62] = hc_bytealign (w[ 9], w[10], offset);\n      w[61] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[60] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[59] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[58] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[57] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[56] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[55] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[54] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[53] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[52] = hc_bytealign (    0, w[ 0], offset);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_bytealign (w[ 9], w[10], offset);\n      w[62] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[61] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[60] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[59] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[58] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[57] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[56] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[55] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[54] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[53] = hc_bytealign (    0, w[ 0], offset);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_bytealign (w[ 8], w[ 9], offset);\n      w[62] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[61] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[60] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[59] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[58] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[57] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[56] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[55] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[54] = hc_bytealign (    0, w[ 0], offset);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_bytealign (w[ 7], w[ 8], offset);\n      w[62] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[61] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[60] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[59] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[58] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[57] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[56] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[55] = hc_bytealign (    0, w[ 0], offset);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_bytealign (w[ 6], w[ 7], offset);\n      w[62] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[61] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[60] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[59] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[58] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[57] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[56] = hc_bytealign (    0, w[ 0], offset);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_bytealign (w[ 5], w[ 6], offset);\n      w[62] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[61] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[60] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[59] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[58] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[57] = hc_bytealign (    0, w[ 0], offset);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_bytealign (w[ 4], w[ 5], offset);\n      w[62] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[61] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[60] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[59] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[58] = hc_bytealign (    0, w[ 0], offset);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_bytealign (w[ 3], w[ 4], offset);\n      w[62] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[61] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[60] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[59] = hc_bytealign (    0, w[ 0], offset);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_bytealign (w[ 2], w[ 3], offset);\n      w[62] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[61] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[60] = hc_bytealign (    0, w[ 0], offset);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_bytealign (w[ 1], w[ 2], offset);\n      w[62] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[61] = hc_bytealign (    0, w[ 0], offset);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_bytealign (w[ 0], w[ 1], offset);\n      w[62] = hc_bytealign (    0, w[ 0], offset);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_bytealign (    0, w[ 0], offset);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_byte_perm (w[62], w[63], selector);\n      w[62] = hc_byte_perm (w[61], w[62], selector);\n      w[61] = hc_byte_perm (w[60], w[61], selector);\n      w[60] = hc_byte_perm (w[59], w[60], selector);\n      w[59] = hc_byte_perm (w[58], w[59], selector);\n      w[58] = hc_byte_perm (w[57], w[58], selector);\n      w[57] = hc_byte_perm (w[56], w[57], selector);\n      w[56] = hc_byte_perm (w[55], w[56], selector);\n      w[55] = hc_byte_perm (w[54], w[55], selector);\n      w[54] = hc_byte_perm (w[53], w[54], selector);\n      w[53] = hc_byte_perm (w[52], w[53], selector);\n      w[52] = hc_byte_perm (w[51], w[52], selector);\n      w[51] = hc_byte_perm (w[50], w[51], selector);\n      w[50] = hc_byte_perm (w[49], w[50], selector);\n      w[49] = hc_byte_perm (w[48], w[49], selector);\n      w[48] = hc_byte_perm (w[47], w[48], selector);\n      w[47] = hc_byte_perm (w[46], w[47], selector);\n      w[46] = hc_byte_perm (w[45], w[46], selector);\n      w[45] = hc_byte_perm (w[44], w[45], selector);\n      w[44] = hc_byte_perm (w[43], w[44], selector);\n      w[43] = hc_byte_perm (w[42], w[43], selector);\n      w[42] = hc_byte_perm (w[41], w[42], selector);\n      w[41] = hc_byte_perm (w[40], w[41], selector);\n      w[40] = hc_byte_perm (w[39], w[40], selector);\n      w[39] = hc_byte_perm (w[38], w[39], selector);\n      w[38] = hc_byte_perm (w[37], w[38], selector);\n      w[37] = hc_byte_perm (w[36], w[37], selector);\n      w[36] = hc_byte_perm (w[35], w[36], selector);\n      w[35] = hc_byte_perm (w[34], w[35], selector);\n      w[34] = hc_byte_perm (w[33], w[34], selector);\n      w[33] = hc_byte_perm (w[32], w[33], selector);\n      w[32] = hc_byte_perm (w[31], w[32], selector);\n      w[31] = hc_byte_perm (w[30], w[31], selector);\n      w[30] = hc_byte_perm (w[29], w[30], selector);\n      w[29] = hc_byte_perm (w[28], w[29], selector);\n      w[28] = hc_byte_perm (w[27], w[28], selector);\n      w[27] = hc_byte_perm (w[26], w[27], selector);\n      w[26] = hc_byte_perm (w[25], w[26], selector);\n      w[25] = hc_byte_perm (w[24], w[25], selector);\n      w[24] = hc_byte_perm (w[23], w[24], selector);\n      w[23] = hc_byte_perm (w[22], w[23], selector);\n      w[22] = hc_byte_perm (w[21], w[22], selector);\n      w[21] = hc_byte_perm (w[20], w[21], selector);\n      w[20] = hc_byte_perm (w[19], w[20], selector);\n      w[19] = hc_byte_perm (w[18], w[19], selector);\n      w[18] = hc_byte_perm (w[17], w[18], selector);\n      w[17] = hc_byte_perm (w[16], w[17], selector);\n      w[16] = hc_byte_perm (w[15], w[16], selector);\n      w[15] = hc_byte_perm (w[14], w[15], selector);\n      w[14] = hc_byte_perm (w[13], w[14], selector);\n      w[13] = hc_byte_perm (w[12], w[13], selector);\n      w[12] = hc_byte_perm (w[11], w[12], selector);\n      w[11] = hc_byte_perm (w[10], w[11], selector);\n      w[10] = hc_byte_perm (w[ 9], w[10], selector);\n      w[ 9] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[ 8] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[ 7] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[ 6] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[ 5] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[ 4] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 3] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 2] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 1] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 0] = hc_byte_perm (    0, w[ 0], selector);\n\n      break;\n\n    case  1:\n      w[63] = hc_byte_perm (w[61], w[62], selector);\n      w[62] = hc_byte_perm (w[60], w[61], selector);\n      w[61] = hc_byte_perm (w[59], w[60], selector);\n      w[60] = hc_byte_perm (w[58], w[59], selector);\n      w[59] = hc_byte_perm (w[57], w[58], selector);\n      w[58] = hc_byte_perm (w[56], w[57], selector);\n      w[57] = hc_byte_perm (w[55], w[56], selector);\n      w[56] = hc_byte_perm (w[54], w[55], selector);\n      w[55] = hc_byte_perm (w[53], w[54], selector);\n      w[54] = hc_byte_perm (w[52], w[53], selector);\n      w[53] = hc_byte_perm (w[51], w[52], selector);\n      w[52] = hc_byte_perm (w[50], w[51], selector);\n      w[51] = hc_byte_perm (w[49], w[50], selector);\n      w[50] = hc_byte_perm (w[48], w[49], selector);\n      w[49] = hc_byte_perm (w[47], w[48], selector);\n      w[48] = hc_byte_perm (w[46], w[47], selector);\n      w[47] = hc_byte_perm (w[45], w[46], selector);\n      w[46] = hc_byte_perm (w[44], w[45], selector);\n      w[45] = hc_byte_perm (w[43], w[44], selector);\n      w[44] = hc_byte_perm (w[42], w[43], selector);\n      w[43] = hc_byte_perm (w[41], w[42], selector);\n      w[42] = hc_byte_perm (w[40], w[41], selector);\n      w[41] = hc_byte_perm (w[39], w[40], selector);\n      w[40] = hc_byte_perm (w[38], w[39], selector);\n      w[39] = hc_byte_perm (w[37], w[38], selector);\n      w[38] = hc_byte_perm (w[36], w[37], selector);\n      w[37] = hc_byte_perm (w[35], w[36], selector);\n      w[36] = hc_byte_perm (w[34], w[35], selector);\n      w[35] = hc_byte_perm (w[33], w[34], selector);\n      w[34] = hc_byte_perm (w[32], w[33], selector);\n      w[33] = hc_byte_perm (w[31], w[32], selector);\n      w[32] = hc_byte_perm (w[30], w[31], selector);\n      w[31] = hc_byte_perm (w[29], w[30], selector);\n      w[30] = hc_byte_perm (w[28], w[29], selector);\n      w[29] = hc_byte_perm (w[27], w[28], selector);\n      w[28] = hc_byte_perm (w[26], w[27], selector);\n      w[27] = hc_byte_perm (w[25], w[26], selector);\n      w[26] = hc_byte_perm (w[24], w[25], selector);\n      w[25] = hc_byte_perm (w[23], w[24], selector);\n      w[24] = hc_byte_perm (w[22], w[23], selector);\n      w[23] = hc_byte_perm (w[21], w[22], selector);\n      w[22] = hc_byte_perm (w[20], w[21], selector);\n      w[21] = hc_byte_perm (w[19], w[20], selector);\n      w[20] = hc_byte_perm (w[18], w[19], selector);\n      w[19] = hc_byte_perm (w[17], w[18], selector);\n      w[18] = hc_byte_perm (w[16], w[17], selector);\n      w[17] = hc_byte_perm (w[15], w[16], selector);\n      w[16] = hc_byte_perm (w[14], w[15], selector);\n      w[15] = hc_byte_perm (w[13], w[14], selector);\n      w[14] = hc_byte_perm (w[12], w[13], selector);\n      w[13] = hc_byte_perm (w[11], w[12], selector);\n      w[12] = hc_byte_perm (w[10], w[11], selector);\n      w[11] = hc_byte_perm (w[ 9], w[10], selector);\n      w[10] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[ 9] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[ 8] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[ 7] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[ 6] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[ 5] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 4] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 3] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 2] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 1] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_byte_perm (w[60], w[61], selector);\n      w[62] = hc_byte_perm (w[59], w[60], selector);\n      w[61] = hc_byte_perm (w[58], w[59], selector);\n      w[60] = hc_byte_perm (w[57], w[58], selector);\n      w[59] = hc_byte_perm (w[56], w[57], selector);\n      w[58] = hc_byte_perm (w[55], w[56], selector);\n      w[57] = hc_byte_perm (w[54], w[55], selector);\n      w[56] = hc_byte_perm (w[53], w[54], selector);\n      w[55] = hc_byte_perm (w[52], w[53], selector);\n      w[54] = hc_byte_perm (w[51], w[52], selector);\n      w[53] = hc_byte_perm (w[50], w[51], selector);\n      w[52] = hc_byte_perm (w[49], w[50], selector);\n      w[51] = hc_byte_perm (w[48], w[49], selector);\n      w[50] = hc_byte_perm (w[47], w[48], selector);\n      w[49] = hc_byte_perm (w[46], w[47], selector);\n      w[48] = hc_byte_perm (w[45], w[46], selector);\n      w[47] = hc_byte_perm (w[44], w[45], selector);\n      w[46] = hc_byte_perm (w[43], w[44], selector);\n      w[45] = hc_byte_perm (w[42], w[43], selector);\n      w[44] = hc_byte_perm (w[41], w[42], selector);\n      w[43] = hc_byte_perm (w[40], w[41], selector);\n      w[42] = hc_byte_perm (w[39], w[40], selector);\n      w[41] = hc_byte_perm (w[38], w[39], selector);\n      w[40] = hc_byte_perm (w[37], w[38], selector);\n      w[39] = hc_byte_perm (w[36], w[37], selector);\n      w[38] = hc_byte_perm (w[35], w[36], selector);\n      w[37] = hc_byte_perm (w[34], w[35], selector);\n      w[36] = hc_byte_perm (w[33], w[34], selector);\n      w[35] = hc_byte_perm (w[32], w[33], selector);\n      w[34] = hc_byte_perm (w[31], w[32], selector);\n      w[33] = hc_byte_perm (w[30], w[31], selector);\n      w[32] = hc_byte_perm (w[29], w[30], selector);\n      w[31] = hc_byte_perm (w[28], w[29], selector);\n      w[30] = hc_byte_perm (w[27], w[28], selector);\n      w[29] = hc_byte_perm (w[26], w[27], selector);\n      w[28] = hc_byte_perm (w[25], w[26], selector);\n      w[27] = hc_byte_perm (w[24], w[25], selector);\n      w[26] = hc_byte_perm (w[23], w[24], selector);\n      w[25] = hc_byte_perm (w[22], w[23], selector);\n      w[24] = hc_byte_perm (w[21], w[22], selector);\n      w[23] = hc_byte_perm (w[20], w[21], selector);\n      w[22] = hc_byte_perm (w[19], w[20], selector);\n      w[21] = hc_byte_perm (w[18], w[19], selector);\n      w[20] = hc_byte_perm (w[17], w[18], selector);\n      w[19] = hc_byte_perm (w[16], w[17], selector);\n      w[18] = hc_byte_perm (w[15], w[16], selector);\n      w[17] = hc_byte_perm (w[14], w[15], selector);\n      w[16] = hc_byte_perm (w[13], w[14], selector);\n      w[15] = hc_byte_perm (w[12], w[13], selector);\n      w[14] = hc_byte_perm (w[11], w[12], selector);\n      w[13] = hc_byte_perm (w[10], w[11], selector);\n      w[12] = hc_byte_perm (w[ 9], w[10], selector);\n      w[11] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[10] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[ 9] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[ 8] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[ 7] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[ 6] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 5] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 4] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 3] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 2] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_byte_perm (w[59], w[60], selector);\n      w[62] = hc_byte_perm (w[58], w[59], selector);\n      w[61] = hc_byte_perm (w[57], w[58], selector);\n      w[60] = hc_byte_perm (w[56], w[57], selector);\n      w[59] = hc_byte_perm (w[55], w[56], selector);\n      w[58] = hc_byte_perm (w[54], w[55], selector);\n      w[57] = hc_byte_perm (w[53], w[54], selector);\n      w[56] = hc_byte_perm (w[52], w[53], selector);\n      w[55] = hc_byte_perm (w[51], w[52], selector);\n      w[54] = hc_byte_perm (w[50], w[51], selector);\n      w[53] = hc_byte_perm (w[49], w[50], selector);\n      w[52] = hc_byte_perm (w[48], w[49], selector);\n      w[51] = hc_byte_perm (w[47], w[48], selector);\n      w[50] = hc_byte_perm (w[46], w[47], selector);\n      w[49] = hc_byte_perm (w[45], w[46], selector);\n      w[48] = hc_byte_perm (w[44], w[45], selector);\n      w[47] = hc_byte_perm (w[43], w[44], selector);\n      w[46] = hc_byte_perm (w[42], w[43], selector);\n      w[45] = hc_byte_perm (w[41], w[42], selector);\n      w[44] = hc_byte_perm (w[40], w[41], selector);\n      w[43] = hc_byte_perm (w[39], w[40], selector);\n      w[42] = hc_byte_perm (w[38], w[39], selector);\n      w[41] = hc_byte_perm (w[37], w[38], selector);\n      w[40] = hc_byte_perm (w[36], w[37], selector);\n      w[39] = hc_byte_perm (w[35], w[36], selector);\n      w[38] = hc_byte_perm (w[34], w[35], selector);\n      w[37] = hc_byte_perm (w[33], w[34], selector);\n      w[36] = hc_byte_perm (w[32], w[33], selector);\n      w[35] = hc_byte_perm (w[31], w[32], selector);\n      w[34] = hc_byte_perm (w[30], w[31], selector);\n      w[33] = hc_byte_perm (w[29], w[30], selector);\n      w[32] = hc_byte_perm (w[28], w[29], selector);\n      w[31] = hc_byte_perm (w[27], w[28], selector);\n      w[30] = hc_byte_perm (w[26], w[27], selector);\n      w[29] = hc_byte_perm (w[25], w[26], selector);\n      w[28] = hc_byte_perm (w[24], w[25], selector);\n      w[27] = hc_byte_perm (w[23], w[24], selector);\n      w[26] = hc_byte_perm (w[22], w[23], selector);\n      w[25] = hc_byte_perm (w[21], w[22], selector);\n      w[24] = hc_byte_perm (w[20], w[21], selector);\n      w[23] = hc_byte_perm (w[19], w[20], selector);\n      w[22] = hc_byte_perm (w[18], w[19], selector);\n      w[21] = hc_byte_perm (w[17], w[18], selector);\n      w[20] = hc_byte_perm (w[16], w[17], selector);\n      w[19] = hc_byte_perm (w[15], w[16], selector);\n      w[18] = hc_byte_perm (w[14], w[15], selector);\n      w[17] = hc_byte_perm (w[13], w[14], selector);\n      w[16] = hc_byte_perm (w[12], w[13], selector);\n      w[15] = hc_byte_perm (w[11], w[12], selector);\n      w[14] = hc_byte_perm (w[10], w[11], selector);\n      w[13] = hc_byte_perm (w[ 9], w[10], selector);\n      w[12] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[11] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[10] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[ 9] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[ 8] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[ 7] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 6] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 5] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 4] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 3] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_byte_perm (w[58], w[59], selector);\n      w[62] = hc_byte_perm (w[57], w[58], selector);\n      w[61] = hc_byte_perm (w[56], w[57], selector);\n      w[60] = hc_byte_perm (w[55], w[56], selector);\n      w[59] = hc_byte_perm (w[54], w[55], selector);\n      w[58] = hc_byte_perm (w[53], w[54], selector);\n      w[57] = hc_byte_perm (w[52], w[53], selector);\n      w[56] = hc_byte_perm (w[51], w[52], selector);\n      w[55] = hc_byte_perm (w[50], w[51], selector);\n      w[54] = hc_byte_perm (w[49], w[50], selector);\n      w[53] = hc_byte_perm (w[48], w[49], selector);\n      w[52] = hc_byte_perm (w[47], w[48], selector);\n      w[51] = hc_byte_perm (w[46], w[47], selector);\n      w[50] = hc_byte_perm (w[45], w[46], selector);\n      w[49] = hc_byte_perm (w[44], w[45], selector);\n      w[48] = hc_byte_perm (w[43], w[44], selector);\n      w[47] = hc_byte_perm (w[42], w[43], selector);\n      w[46] = hc_byte_perm (w[41], w[42], selector);\n      w[45] = hc_byte_perm (w[40], w[41], selector);\n      w[44] = hc_byte_perm (w[39], w[40], selector);\n      w[43] = hc_byte_perm (w[38], w[39], selector);\n      w[42] = hc_byte_perm (w[37], w[38], selector);\n      w[41] = hc_byte_perm (w[36], w[37], selector);\n      w[40] = hc_byte_perm (w[35], w[36], selector);\n      w[39] = hc_byte_perm (w[34], w[35], selector);\n      w[38] = hc_byte_perm (w[33], w[34], selector);\n      w[37] = hc_byte_perm (w[32], w[33], selector);\n      w[36] = hc_byte_perm (w[31], w[32], selector);\n      w[35] = hc_byte_perm (w[30], w[31], selector);\n      w[34] = hc_byte_perm (w[29], w[30], selector);\n      w[33] = hc_byte_perm (w[28], w[29], selector);\n      w[32] = hc_byte_perm (w[27], w[28], selector);\n      w[31] = hc_byte_perm (w[26], w[27], selector);\n      w[30] = hc_byte_perm (w[25], w[26], selector);\n      w[29] = hc_byte_perm (w[24], w[25], selector);\n      w[28] = hc_byte_perm (w[23], w[24], selector);\n      w[27] = hc_byte_perm (w[22], w[23], selector);\n      w[26] = hc_byte_perm (w[21], w[22], selector);\n      w[25] = hc_byte_perm (w[20], w[21], selector);\n      w[24] = hc_byte_perm (w[19], w[20], selector);\n      w[23] = hc_byte_perm (w[18], w[19], selector);\n      w[22] = hc_byte_perm (w[17], w[18], selector);\n      w[21] = hc_byte_perm (w[16], w[17], selector);\n      w[20] = hc_byte_perm (w[15], w[16], selector);\n      w[19] = hc_byte_perm (w[14], w[15], selector);\n      w[18] = hc_byte_perm (w[13], w[14], selector);\n      w[17] = hc_byte_perm (w[12], w[13], selector);\n      w[16] = hc_byte_perm (w[11], w[12], selector);\n      w[15] = hc_byte_perm (w[10], w[11], selector);\n      w[14] = hc_byte_perm (w[ 9], w[10], selector);\n      w[13] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[12] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[11] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[10] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[ 9] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[ 8] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 7] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 6] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 5] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 4] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_byte_perm (w[57], w[58], selector);\n      w[62] = hc_byte_perm (w[56], w[57], selector);\n      w[61] = hc_byte_perm (w[55], w[56], selector);\n      w[60] = hc_byte_perm (w[54], w[55], selector);\n      w[59] = hc_byte_perm (w[53], w[54], selector);\n      w[58] = hc_byte_perm (w[52], w[53], selector);\n      w[57] = hc_byte_perm (w[51], w[52], selector);\n      w[56] = hc_byte_perm (w[50], w[51], selector);\n      w[55] = hc_byte_perm (w[49], w[50], selector);\n      w[54] = hc_byte_perm (w[48], w[49], selector);\n      w[53] = hc_byte_perm (w[47], w[48], selector);\n      w[52] = hc_byte_perm (w[46], w[47], selector);\n      w[51] = hc_byte_perm (w[45], w[46], selector);\n      w[50] = hc_byte_perm (w[44], w[45], selector);\n      w[49] = hc_byte_perm (w[43], w[44], selector);\n      w[48] = hc_byte_perm (w[42], w[43], selector);\n      w[47] = hc_byte_perm (w[41], w[42], selector);\n      w[46] = hc_byte_perm (w[40], w[41], selector);\n      w[45] = hc_byte_perm (w[39], w[40], selector);\n      w[44] = hc_byte_perm (w[38], w[39], selector);\n      w[43] = hc_byte_perm (w[37], w[38], selector);\n      w[42] = hc_byte_perm (w[36], w[37], selector);\n      w[41] = hc_byte_perm (w[35], w[36], selector);\n      w[40] = hc_byte_perm (w[34], w[35], selector);\n      w[39] = hc_byte_perm (w[33], w[34], selector);\n      w[38] = hc_byte_perm (w[32], w[33], selector);\n      w[37] = hc_byte_perm (w[31], w[32], selector);\n      w[36] = hc_byte_perm (w[30], w[31], selector);\n      w[35] = hc_byte_perm (w[29], w[30], selector);\n      w[34] = hc_byte_perm (w[28], w[29], selector);\n      w[33] = hc_byte_perm (w[27], w[28], selector);\n      w[32] = hc_byte_perm (w[26], w[27], selector);\n      w[31] = hc_byte_perm (w[25], w[26], selector);\n      w[30] = hc_byte_perm (w[24], w[25], selector);\n      w[29] = hc_byte_perm (w[23], w[24], selector);\n      w[28] = hc_byte_perm (w[22], w[23], selector);\n      w[27] = hc_byte_perm (w[21], w[22], selector);\n      w[26] = hc_byte_perm (w[20], w[21], selector);\n      w[25] = hc_byte_perm (w[19], w[20], selector);\n      w[24] = hc_byte_perm (w[18], w[19], selector);\n      w[23] = hc_byte_perm (w[17], w[18], selector);\n      w[22] = hc_byte_perm (w[16], w[17], selector);\n      w[21] = hc_byte_perm (w[15], w[16], selector);\n      w[20] = hc_byte_perm (w[14], w[15], selector);\n      w[19] = hc_byte_perm (w[13], w[14], selector);\n      w[18] = hc_byte_perm (w[12], w[13], selector);\n      w[17] = hc_byte_perm (w[11], w[12], selector);\n      w[16] = hc_byte_perm (w[10], w[11], selector);\n      w[15] = hc_byte_perm (w[ 9], w[10], selector);\n      w[14] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[13] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[12] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[11] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[10] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[ 9] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 8] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 7] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 6] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 5] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_byte_perm (w[56], w[57], selector);\n      w[62] = hc_byte_perm (w[55], w[56], selector);\n      w[61] = hc_byte_perm (w[54], w[55], selector);\n      w[60] = hc_byte_perm (w[53], w[54], selector);\n      w[59] = hc_byte_perm (w[52], w[53], selector);\n      w[58] = hc_byte_perm (w[51], w[52], selector);\n      w[57] = hc_byte_perm (w[50], w[51], selector);\n      w[56] = hc_byte_perm (w[49], w[50], selector);\n      w[55] = hc_byte_perm (w[48], w[49], selector);\n      w[54] = hc_byte_perm (w[47], w[48], selector);\n      w[53] = hc_byte_perm (w[46], w[47], selector);\n      w[52] = hc_byte_perm (w[45], w[46], selector);\n      w[51] = hc_byte_perm (w[44], w[45], selector);\n      w[50] = hc_byte_perm (w[43], w[44], selector);\n      w[49] = hc_byte_perm (w[42], w[43], selector);\n      w[48] = hc_byte_perm (w[41], w[42], selector);\n      w[47] = hc_byte_perm (w[40], w[41], selector);\n      w[46] = hc_byte_perm (w[39], w[40], selector);\n      w[45] = hc_byte_perm (w[38], w[39], selector);\n      w[44] = hc_byte_perm (w[37], w[38], selector);\n      w[43] = hc_byte_perm (w[36], w[37], selector);\n      w[42] = hc_byte_perm (w[35], w[36], selector);\n      w[41] = hc_byte_perm (w[34], w[35], selector);\n      w[40] = hc_byte_perm (w[33], w[34], selector);\n      w[39] = hc_byte_perm (w[32], w[33], selector);\n      w[38] = hc_byte_perm (w[31], w[32], selector);\n      w[37] = hc_byte_perm (w[30], w[31], selector);\n      w[36] = hc_byte_perm (w[29], w[30], selector);\n      w[35] = hc_byte_perm (w[28], w[29], selector);\n      w[34] = hc_byte_perm (w[27], w[28], selector);\n      w[33] = hc_byte_perm (w[26], w[27], selector);\n      w[32] = hc_byte_perm (w[25], w[26], selector);\n      w[31] = hc_byte_perm (w[24], w[25], selector);\n      w[30] = hc_byte_perm (w[23], w[24], selector);\n      w[29] = hc_byte_perm (w[22], w[23], selector);\n      w[28] = hc_byte_perm (w[21], w[22], selector);\n      w[27] = hc_byte_perm (w[20], w[21], selector);\n      w[26] = hc_byte_perm (w[19], w[20], selector);\n      w[25] = hc_byte_perm (w[18], w[19], selector);\n      w[24] = hc_byte_perm (w[17], w[18], selector);\n      w[23] = hc_byte_perm (w[16], w[17], selector);\n      w[22] = hc_byte_perm (w[15], w[16], selector);\n      w[21] = hc_byte_perm (w[14], w[15], selector);\n      w[20] = hc_byte_perm (w[13], w[14], selector);\n      w[19] = hc_byte_perm (w[12], w[13], selector);\n      w[18] = hc_byte_perm (w[11], w[12], selector);\n      w[17] = hc_byte_perm (w[10], w[11], selector);\n      w[16] = hc_byte_perm (w[ 9], w[10], selector);\n      w[15] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[14] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[13] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[12] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[11] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[10] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[ 9] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 8] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 7] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 6] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_byte_perm (w[55], w[56], selector);\n      w[62] = hc_byte_perm (w[54], w[55], selector);\n      w[61] = hc_byte_perm (w[53], w[54], selector);\n      w[60] = hc_byte_perm (w[52], w[53], selector);\n      w[59] = hc_byte_perm (w[51], w[52], selector);\n      w[58] = hc_byte_perm (w[50], w[51], selector);\n      w[57] = hc_byte_perm (w[49], w[50], selector);\n      w[56] = hc_byte_perm (w[48], w[49], selector);\n      w[55] = hc_byte_perm (w[47], w[48], selector);\n      w[54] = hc_byte_perm (w[46], w[47], selector);\n      w[53] = hc_byte_perm (w[45], w[46], selector);\n      w[52] = hc_byte_perm (w[44], w[45], selector);\n      w[51] = hc_byte_perm (w[43], w[44], selector);\n      w[50] = hc_byte_perm (w[42], w[43], selector);\n      w[49] = hc_byte_perm (w[41], w[42], selector);\n      w[48] = hc_byte_perm (w[40], w[41], selector);\n      w[47] = hc_byte_perm (w[39], w[40], selector);\n      w[46] = hc_byte_perm (w[38], w[39], selector);\n      w[45] = hc_byte_perm (w[37], w[38], selector);\n      w[44] = hc_byte_perm (w[36], w[37], selector);\n      w[43] = hc_byte_perm (w[35], w[36], selector);\n      w[42] = hc_byte_perm (w[34], w[35], selector);\n      w[41] = hc_byte_perm (w[33], w[34], selector);\n      w[40] = hc_byte_perm (w[32], w[33], selector);\n      w[39] = hc_byte_perm (w[31], w[32], selector);\n      w[38] = hc_byte_perm (w[30], w[31], selector);\n      w[37] = hc_byte_perm (w[29], w[30], selector);\n      w[36] = hc_byte_perm (w[28], w[29], selector);\n      w[35] = hc_byte_perm (w[27], w[28], selector);\n      w[34] = hc_byte_perm (w[26], w[27], selector);\n      w[33] = hc_byte_perm (w[25], w[26], selector);\n      w[32] = hc_byte_perm (w[24], w[25], selector);\n      w[31] = hc_byte_perm (w[23], w[24], selector);\n      w[30] = hc_byte_perm (w[22], w[23], selector);\n      w[29] = hc_byte_perm (w[21], w[22], selector);\n      w[28] = hc_byte_perm (w[20], w[21], selector);\n      w[27] = hc_byte_perm (w[19], w[20], selector);\n      w[26] = hc_byte_perm (w[18], w[19], selector);\n      w[25] = hc_byte_perm (w[17], w[18], selector);\n      w[24] = hc_byte_perm (w[16], w[17], selector);\n      w[23] = hc_byte_perm (w[15], w[16], selector);\n      w[22] = hc_byte_perm (w[14], w[15], selector);\n      w[21] = hc_byte_perm (w[13], w[14], selector);\n      w[20] = hc_byte_perm (w[12], w[13], selector);\n      w[19] = hc_byte_perm (w[11], w[12], selector);\n      w[18] = hc_byte_perm (w[10], w[11], selector);\n      w[17] = hc_byte_perm (w[ 9], w[10], selector);\n      w[16] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[15] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[14] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[13] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[12] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[11] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[10] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[ 9] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 8] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 7] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_byte_perm (w[54], w[55], selector);\n      w[62] = hc_byte_perm (w[53], w[54], selector);\n      w[61] = hc_byte_perm (w[52], w[53], selector);\n      w[60] = hc_byte_perm (w[51], w[52], selector);\n      w[59] = hc_byte_perm (w[50], w[51], selector);\n      w[58] = hc_byte_perm (w[49], w[50], selector);\n      w[57] = hc_byte_perm (w[48], w[49], selector);\n      w[56] = hc_byte_perm (w[47], w[48], selector);\n      w[55] = hc_byte_perm (w[46], w[47], selector);\n      w[54] = hc_byte_perm (w[45], w[46], selector);\n      w[53] = hc_byte_perm (w[44], w[45], selector);\n      w[52] = hc_byte_perm (w[43], w[44], selector);\n      w[51] = hc_byte_perm (w[42], w[43], selector);\n      w[50] = hc_byte_perm (w[41], w[42], selector);\n      w[49] = hc_byte_perm (w[40], w[41], selector);\n      w[48] = hc_byte_perm (w[39], w[40], selector);\n      w[47] = hc_byte_perm (w[38], w[39], selector);\n      w[46] = hc_byte_perm (w[37], w[38], selector);\n      w[45] = hc_byte_perm (w[36], w[37], selector);\n      w[44] = hc_byte_perm (w[35], w[36], selector);\n      w[43] = hc_byte_perm (w[34], w[35], selector);\n      w[42] = hc_byte_perm (w[33], w[34], selector);\n      w[41] = hc_byte_perm (w[32], w[33], selector);\n      w[40] = hc_byte_perm (w[31], w[32], selector);\n      w[39] = hc_byte_perm (w[30], w[31], selector);\n      w[38] = hc_byte_perm (w[29], w[30], selector);\n      w[37] = hc_byte_perm (w[28], w[29], selector);\n      w[36] = hc_byte_perm (w[27], w[28], selector);\n      w[35] = hc_byte_perm (w[26], w[27], selector);\n      w[34] = hc_byte_perm (w[25], w[26], selector);\n      w[33] = hc_byte_perm (w[24], w[25], selector);\n      w[32] = hc_byte_perm (w[23], w[24], selector);\n      w[31] = hc_byte_perm (w[22], w[23], selector);\n      w[30] = hc_byte_perm (w[21], w[22], selector);\n      w[29] = hc_byte_perm (w[20], w[21], selector);\n      w[28] = hc_byte_perm (w[19], w[20], selector);\n      w[27] = hc_byte_perm (w[18], w[19], selector);\n      w[26] = hc_byte_perm (w[17], w[18], selector);\n      w[25] = hc_byte_perm (w[16], w[17], selector);\n      w[24] = hc_byte_perm (w[15], w[16], selector);\n      w[23] = hc_byte_perm (w[14], w[15], selector);\n      w[22] = hc_byte_perm (w[13], w[14], selector);\n      w[21] = hc_byte_perm (w[12], w[13], selector);\n      w[20] = hc_byte_perm (w[11], w[12], selector);\n      w[19] = hc_byte_perm (w[10], w[11], selector);\n      w[18] = hc_byte_perm (w[ 9], w[10], selector);\n      w[17] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[16] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[15] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[14] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[13] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[12] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[11] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[10] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[ 9] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 8] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_byte_perm (w[53], w[54], selector);\n      w[62] = hc_byte_perm (w[52], w[53], selector);\n      w[61] = hc_byte_perm (w[51], w[52], selector);\n      w[60] = hc_byte_perm (w[50], w[51], selector);\n      w[59] = hc_byte_perm (w[49], w[50], selector);\n      w[58] = hc_byte_perm (w[48], w[49], selector);\n      w[57] = hc_byte_perm (w[47], w[48], selector);\n      w[56] = hc_byte_perm (w[46], w[47], selector);\n      w[55] = hc_byte_perm (w[45], w[46], selector);\n      w[54] = hc_byte_perm (w[44], w[45], selector);\n      w[53] = hc_byte_perm (w[43], w[44], selector);\n      w[52] = hc_byte_perm (w[42], w[43], selector);\n      w[51] = hc_byte_perm (w[41], w[42], selector);\n      w[50] = hc_byte_perm (w[40], w[41], selector);\n      w[49] = hc_byte_perm (w[39], w[40], selector);\n      w[48] = hc_byte_perm (w[38], w[39], selector);\n      w[47] = hc_byte_perm (w[37], w[38], selector);\n      w[46] = hc_byte_perm (w[36], w[37], selector);\n      w[45] = hc_byte_perm (w[35], w[36], selector);\n      w[44] = hc_byte_perm (w[34], w[35], selector);\n      w[43] = hc_byte_perm (w[33], w[34], selector);\n      w[42] = hc_byte_perm (w[32], w[33], selector);\n      w[41] = hc_byte_perm (w[31], w[32], selector);\n      w[40] = hc_byte_perm (w[30], w[31], selector);\n      w[39] = hc_byte_perm (w[29], w[30], selector);\n      w[38] = hc_byte_perm (w[28], w[29], selector);\n      w[37] = hc_byte_perm (w[27], w[28], selector);\n      w[36] = hc_byte_perm (w[26], w[27], selector);\n      w[35] = hc_byte_perm (w[25], w[26], selector);\n      w[34] = hc_byte_perm (w[24], w[25], selector);\n      w[33] = hc_byte_perm (w[23], w[24], selector);\n      w[32] = hc_byte_perm (w[22], w[23], selector);\n      w[31] = hc_byte_perm (w[21], w[22], selector);\n      w[30] = hc_byte_perm (w[20], w[21], selector);\n      w[29] = hc_byte_perm (w[19], w[20], selector);\n      w[28] = hc_byte_perm (w[18], w[19], selector);\n      w[27] = hc_byte_perm (w[17], w[18], selector);\n      w[26] = hc_byte_perm (w[16], w[17], selector);\n      w[25] = hc_byte_perm (w[15], w[16], selector);\n      w[24] = hc_byte_perm (w[14], w[15], selector);\n      w[23] = hc_byte_perm (w[13], w[14], selector);\n      w[22] = hc_byte_perm (w[12], w[13], selector);\n      w[21] = hc_byte_perm (w[11], w[12], selector);\n      w[20] = hc_byte_perm (w[10], w[11], selector);\n      w[19] = hc_byte_perm (w[ 9], w[10], selector);\n      w[18] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[17] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[16] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[15] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[14] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[13] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[12] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[11] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[10] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[ 9] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_byte_perm (w[52], w[53], selector);\n      w[62] = hc_byte_perm (w[51], w[52], selector);\n      w[61] = hc_byte_perm (w[50], w[51], selector);\n      w[60] = hc_byte_perm (w[49], w[50], selector);\n      w[59] = hc_byte_perm (w[48], w[49], selector);\n      w[58] = hc_byte_perm (w[47], w[48], selector);\n      w[57] = hc_byte_perm (w[46], w[47], selector);\n      w[56] = hc_byte_perm (w[45], w[46], selector);\n      w[55] = hc_byte_perm (w[44], w[45], selector);\n      w[54] = hc_byte_perm (w[43], w[44], selector);\n      w[53] = hc_byte_perm (w[42], w[43], selector);\n      w[52] = hc_byte_perm (w[41], w[42], selector);\n      w[51] = hc_byte_perm (w[40], w[41], selector);\n      w[50] = hc_byte_perm (w[39], w[40], selector);\n      w[49] = hc_byte_perm (w[38], w[39], selector);\n      w[48] = hc_byte_perm (w[37], w[38], selector);\n      w[47] = hc_byte_perm (w[36], w[37], selector);\n      w[46] = hc_byte_perm (w[35], w[36], selector);\n      w[45] = hc_byte_perm (w[34], w[35], selector);\n      w[44] = hc_byte_perm (w[33], w[34], selector);\n      w[43] = hc_byte_perm (w[32], w[33], selector);\n      w[42] = hc_byte_perm (w[31], w[32], selector);\n      w[41] = hc_byte_perm (w[30], w[31], selector);\n      w[40] = hc_byte_perm (w[29], w[30], selector);\n      w[39] = hc_byte_perm (w[28], w[29], selector);\n      w[38] = hc_byte_perm (w[27], w[28], selector);\n      w[37] = hc_byte_perm (w[26], w[27], selector);\n      w[36] = hc_byte_perm (w[25], w[26], selector);\n      w[35] = hc_byte_perm (w[24], w[25], selector);\n      w[34] = hc_byte_perm (w[23], w[24], selector);\n      w[33] = hc_byte_perm (w[22], w[23], selector);\n      w[32] = hc_byte_perm (w[21], w[22], selector);\n      w[31] = hc_byte_perm (w[20], w[21], selector);\n      w[30] = hc_byte_perm (w[19], w[20], selector);\n      w[29] = hc_byte_perm (w[18], w[19], selector);\n      w[28] = hc_byte_perm (w[17], w[18], selector);\n      w[27] = hc_byte_perm (w[16], w[17], selector);\n      w[26] = hc_byte_perm (w[15], w[16], selector);\n      w[25] = hc_byte_perm (w[14], w[15], selector);\n      w[24] = hc_byte_perm (w[13], w[14], selector);\n      w[23] = hc_byte_perm (w[12], w[13], selector);\n      w[22] = hc_byte_perm (w[11], w[12], selector);\n      w[21] = hc_byte_perm (w[10], w[11], selector);\n      w[20] = hc_byte_perm (w[ 9], w[10], selector);\n      w[19] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[18] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[17] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[16] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[15] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[14] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[13] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[12] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[11] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[10] = hc_byte_perm (    0, w[ 0], selector);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_byte_perm (w[51], w[52], selector);\n      w[62] = hc_byte_perm (w[50], w[51], selector);\n      w[61] = hc_byte_perm (w[49], w[50], selector);\n      w[60] = hc_byte_perm (w[48], w[49], selector);\n      w[59] = hc_byte_perm (w[47], w[48], selector);\n      w[58] = hc_byte_perm (w[46], w[47], selector);\n      w[57] = hc_byte_perm (w[45], w[46], selector);\n      w[56] = hc_byte_perm (w[44], w[45], selector);\n      w[55] = hc_byte_perm (w[43], w[44], selector);\n      w[54] = hc_byte_perm (w[42], w[43], selector);\n      w[53] = hc_byte_perm (w[41], w[42], selector);\n      w[52] = hc_byte_perm (w[40], w[41], selector);\n      w[51] = hc_byte_perm (w[39], w[40], selector);\n      w[50] = hc_byte_perm (w[38], w[39], selector);\n      w[49] = hc_byte_perm (w[37], w[38], selector);\n      w[48] = hc_byte_perm (w[36], w[37], selector);\n      w[47] = hc_byte_perm (w[35], w[36], selector);\n      w[46] = hc_byte_perm (w[34], w[35], selector);\n      w[45] = hc_byte_perm (w[33], w[34], selector);\n      w[44] = hc_byte_perm (w[32], w[33], selector);\n      w[43] = hc_byte_perm (w[31], w[32], selector);\n      w[42] = hc_byte_perm (w[30], w[31], selector);\n      w[41] = hc_byte_perm (w[29], w[30], selector);\n      w[40] = hc_byte_perm (w[28], w[29], selector);\n      w[39] = hc_byte_perm (w[27], w[28], selector);\n      w[38] = hc_byte_perm (w[26], w[27], selector);\n      w[37] = hc_byte_perm (w[25], w[26], selector);\n      w[36] = hc_byte_perm (w[24], w[25], selector);\n      w[35] = hc_byte_perm (w[23], w[24], selector);\n      w[34] = hc_byte_perm (w[22], w[23], selector);\n      w[33] = hc_byte_perm (w[21], w[22], selector);\n      w[32] = hc_byte_perm (w[20], w[21], selector);\n      w[31] = hc_byte_perm (w[19], w[20], selector);\n      w[30] = hc_byte_perm (w[18], w[19], selector);\n      w[29] = hc_byte_perm (w[17], w[18], selector);\n      w[28] = hc_byte_perm (w[16], w[17], selector);\n      w[27] = hc_byte_perm (w[15], w[16], selector);\n      w[26] = hc_byte_perm (w[14], w[15], selector);\n      w[25] = hc_byte_perm (w[13], w[14], selector);\n      w[24] = hc_byte_perm (w[12], w[13], selector);\n      w[23] = hc_byte_perm (w[11], w[12], selector);\n      w[22] = hc_byte_perm (w[10], w[11], selector);\n      w[21] = hc_byte_perm (w[ 9], w[10], selector);\n      w[20] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[19] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[18] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[17] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[16] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[15] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[14] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[13] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[12] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[11] = hc_byte_perm (    0, w[ 0], selector);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_byte_perm (w[50], w[51], selector);\n      w[62] = hc_byte_perm (w[49], w[50], selector);\n      w[61] = hc_byte_perm (w[48], w[49], selector);\n      w[60] = hc_byte_perm (w[47], w[48], selector);\n      w[59] = hc_byte_perm (w[46], w[47], selector);\n      w[58] = hc_byte_perm (w[45], w[46], selector);\n      w[57] = hc_byte_perm (w[44], w[45], selector);\n      w[56] = hc_byte_perm (w[43], w[44], selector);\n      w[55] = hc_byte_perm (w[42], w[43], selector);\n      w[54] = hc_byte_perm (w[41], w[42], selector);\n      w[53] = hc_byte_perm (w[40], w[41], selector);\n      w[52] = hc_byte_perm (w[39], w[40], selector);\n      w[51] = hc_byte_perm (w[38], w[39], selector);\n      w[50] = hc_byte_perm (w[37], w[38], selector);\n      w[49] = hc_byte_perm (w[36], w[37], selector);\n      w[48] = hc_byte_perm (w[35], w[36], selector);\n      w[47] = hc_byte_perm (w[34], w[35], selector);\n      w[46] = hc_byte_perm (w[33], w[34], selector);\n      w[45] = hc_byte_perm (w[32], w[33], selector);\n      w[44] = hc_byte_perm (w[31], w[32], selector);\n      w[43] = hc_byte_perm (w[30], w[31], selector);\n      w[42] = hc_byte_perm (w[29], w[30], selector);\n      w[41] = hc_byte_perm (w[28], w[29], selector);\n      w[40] = hc_byte_perm (w[27], w[28], selector);\n      w[39] = hc_byte_perm (w[26], w[27], selector);\n      w[38] = hc_byte_perm (w[25], w[26], selector);\n      w[37] = hc_byte_perm (w[24], w[25], selector);\n      w[36] = hc_byte_perm (w[23], w[24], selector);\n      w[35] = hc_byte_perm (w[22], w[23], selector);\n      w[34] = hc_byte_perm (w[21], w[22], selector);\n      w[33] = hc_byte_perm (w[20], w[21], selector);\n      w[32] = hc_byte_perm (w[19], w[20], selector);\n      w[31] = hc_byte_perm (w[18], w[19], selector);\n      w[30] = hc_byte_perm (w[17], w[18], selector);\n      w[29] = hc_byte_perm (w[16], w[17], selector);\n      w[28] = hc_byte_perm (w[15], w[16], selector);\n      w[27] = hc_byte_perm (w[14], w[15], selector);\n      w[26] = hc_byte_perm (w[13], w[14], selector);\n      w[25] = hc_byte_perm (w[12], w[13], selector);\n      w[24] = hc_byte_perm (w[11], w[12], selector);\n      w[23] = hc_byte_perm (w[10], w[11], selector);\n      w[22] = hc_byte_perm (w[ 9], w[10], selector);\n      w[21] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[20] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[19] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[18] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[17] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[16] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[15] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[14] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[13] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[12] = hc_byte_perm (    0, w[ 0], selector);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_byte_perm (w[49], w[50], selector);\n      w[62] = hc_byte_perm (w[48], w[49], selector);\n      w[61] = hc_byte_perm (w[47], w[48], selector);\n      w[60] = hc_byte_perm (w[46], w[47], selector);\n      w[59] = hc_byte_perm (w[45], w[46], selector);\n      w[58] = hc_byte_perm (w[44], w[45], selector);\n      w[57] = hc_byte_perm (w[43], w[44], selector);\n      w[56] = hc_byte_perm (w[42], w[43], selector);\n      w[55] = hc_byte_perm (w[41], w[42], selector);\n      w[54] = hc_byte_perm (w[40], w[41], selector);\n      w[53] = hc_byte_perm (w[39], w[40], selector);\n      w[52] = hc_byte_perm (w[38], w[39], selector);\n      w[51] = hc_byte_perm (w[37], w[38], selector);\n      w[50] = hc_byte_perm (w[36], w[37], selector);\n      w[49] = hc_byte_perm (w[35], w[36], selector);\n      w[48] = hc_byte_perm (w[34], w[35], selector);\n      w[47] = hc_byte_perm (w[33], w[34], selector);\n      w[46] = hc_byte_perm (w[32], w[33], selector);\n      w[45] = hc_byte_perm (w[31], w[32], selector);\n      w[44] = hc_byte_perm (w[30], w[31], selector);\n      w[43] = hc_byte_perm (w[29], w[30], selector);\n      w[42] = hc_byte_perm (w[28], w[29], selector);\n      w[41] = hc_byte_perm (w[27], w[28], selector);\n      w[40] = hc_byte_perm (w[26], w[27], selector);\n      w[39] = hc_byte_perm (w[25], w[26], selector);\n      w[38] = hc_byte_perm (w[24], w[25], selector);\n      w[37] = hc_byte_perm (w[23], w[24], selector);\n      w[36] = hc_byte_perm (w[22], w[23], selector);\n      w[35] = hc_byte_perm (w[21], w[22], selector);\n      w[34] = hc_byte_perm (w[20], w[21], selector);\n      w[33] = hc_byte_perm (w[19], w[20], selector);\n      w[32] = hc_byte_perm (w[18], w[19], selector);\n      w[31] = hc_byte_perm (w[17], w[18], selector);\n      w[30] = hc_byte_perm (w[16], w[17], selector);\n      w[29] = hc_byte_perm (w[15], w[16], selector);\n      w[28] = hc_byte_perm (w[14], w[15], selector);\n      w[27] = hc_byte_perm (w[13], w[14], selector);\n      w[26] = hc_byte_perm (w[12], w[13], selector);\n      w[25] = hc_byte_perm (w[11], w[12], selector);\n      w[24] = hc_byte_perm (w[10], w[11], selector);\n      w[23] = hc_byte_perm (w[ 9], w[10], selector);\n      w[22] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[21] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[20] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[19] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[18] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[17] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[16] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[15] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[14] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[13] = hc_byte_perm (    0, w[ 0], selector);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_byte_perm (w[48], w[49], selector);\n      w[62] = hc_byte_perm (w[47], w[48], selector);\n      w[61] = hc_byte_perm (w[46], w[47], selector);\n      w[60] = hc_byte_perm (w[45], w[46], selector);\n      w[59] = hc_byte_perm (w[44], w[45], selector);\n      w[58] = hc_byte_perm (w[43], w[44], selector);\n      w[57] = hc_byte_perm (w[42], w[43], selector);\n      w[56] = hc_byte_perm (w[41], w[42], selector);\n      w[55] = hc_byte_perm (w[40], w[41], selector);\n      w[54] = hc_byte_perm (w[39], w[40], selector);\n      w[53] = hc_byte_perm (w[38], w[39], selector);\n      w[52] = hc_byte_perm (w[37], w[38], selector);\n      w[51] = hc_byte_perm (w[36], w[37], selector);\n      w[50] = hc_byte_perm (w[35], w[36], selector);\n      w[49] = hc_byte_perm (w[34], w[35], selector);\n      w[48] = hc_byte_perm (w[33], w[34], selector);\n      w[47] = hc_byte_perm (w[32], w[33], selector);\n      w[46] = hc_byte_perm (w[31], w[32], selector);\n      w[45] = hc_byte_perm (w[30], w[31], selector);\n      w[44] = hc_byte_perm (w[29], w[30], selector);\n      w[43] = hc_byte_perm (w[28], w[29], selector);\n      w[42] = hc_byte_perm (w[27], w[28], selector);\n      w[41] = hc_byte_perm (w[26], w[27], selector);\n      w[40] = hc_byte_perm (w[25], w[26], selector);\n      w[39] = hc_byte_perm (w[24], w[25], selector);\n      w[38] = hc_byte_perm (w[23], w[24], selector);\n      w[37] = hc_byte_perm (w[22], w[23], selector);\n      w[36] = hc_byte_perm (w[21], w[22], selector);\n      w[35] = hc_byte_perm (w[20], w[21], selector);\n      w[34] = hc_byte_perm (w[19], w[20], selector);\n      w[33] = hc_byte_perm (w[18], w[19], selector);\n      w[32] = hc_byte_perm (w[17], w[18], selector);\n      w[31] = hc_byte_perm (w[16], w[17], selector);\n      w[30] = hc_byte_perm (w[15], w[16], selector);\n      w[29] = hc_byte_perm (w[14], w[15], selector);\n      w[28] = hc_byte_perm (w[13], w[14], selector);\n      w[27] = hc_byte_perm (w[12], w[13], selector);\n      w[26] = hc_byte_perm (w[11], w[12], selector);\n      w[25] = hc_byte_perm (w[10], w[11], selector);\n      w[24] = hc_byte_perm (w[ 9], w[10], selector);\n      w[23] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[22] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[21] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[20] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[19] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[18] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[17] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[16] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[15] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[14] = hc_byte_perm (    0, w[ 0], selector);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_byte_perm (w[47], w[48], selector);\n      w[62] = hc_byte_perm (w[46], w[47], selector);\n      w[61] = hc_byte_perm (w[45], w[46], selector);\n      w[60] = hc_byte_perm (w[44], w[45], selector);\n      w[59] = hc_byte_perm (w[43], w[44], selector);\n      w[58] = hc_byte_perm (w[42], w[43], selector);\n      w[57] = hc_byte_perm (w[41], w[42], selector);\n      w[56] = hc_byte_perm (w[40], w[41], selector);\n      w[55] = hc_byte_perm (w[39], w[40], selector);\n      w[54] = hc_byte_perm (w[38], w[39], selector);\n      w[53] = hc_byte_perm (w[37], w[38], selector);\n      w[52] = hc_byte_perm (w[36], w[37], selector);\n      w[51] = hc_byte_perm (w[35], w[36], selector);\n      w[50] = hc_byte_perm (w[34], w[35], selector);\n      w[49] = hc_byte_perm (w[33], w[34], selector);\n      w[48] = hc_byte_perm (w[32], w[33], selector);\n      w[47] = hc_byte_perm (w[31], w[32], selector);\n      w[46] = hc_byte_perm (w[30], w[31], selector);\n      w[45] = hc_byte_perm (w[29], w[30], selector);\n      w[44] = hc_byte_perm (w[28], w[29], selector);\n      w[43] = hc_byte_perm (w[27], w[28], selector);\n      w[42] = hc_byte_perm (w[26], w[27], selector);\n      w[41] = hc_byte_perm (w[25], w[26], selector);\n      w[40] = hc_byte_perm (w[24], w[25], selector);\n      w[39] = hc_byte_perm (w[23], w[24], selector);\n      w[38] = hc_byte_perm (w[22], w[23], selector);\n      w[37] = hc_byte_perm (w[21], w[22], selector);\n      w[36] = hc_byte_perm (w[20], w[21], selector);\n      w[35] = hc_byte_perm (w[19], w[20], selector);\n      w[34] = hc_byte_perm (w[18], w[19], selector);\n      w[33] = hc_byte_perm (w[17], w[18], selector);\n      w[32] = hc_byte_perm (w[16], w[17], selector);\n      w[31] = hc_byte_perm (w[15], w[16], selector);\n      w[30] = hc_byte_perm (w[14], w[15], selector);\n      w[29] = hc_byte_perm (w[13], w[14], selector);\n      w[28] = hc_byte_perm (w[12], w[13], selector);\n      w[27] = hc_byte_perm (w[11], w[12], selector);\n      w[26] = hc_byte_perm (w[10], w[11], selector);\n      w[25] = hc_byte_perm (w[ 9], w[10], selector);\n      w[24] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[23] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[22] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[21] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[20] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[19] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[18] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[17] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[16] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[15] = hc_byte_perm (    0, w[ 0], selector);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_byte_perm (w[46], w[47], selector);\n      w[62] = hc_byte_perm (w[45], w[46], selector);\n      w[61] = hc_byte_perm (w[44], w[45], selector);\n      w[60] = hc_byte_perm (w[43], w[44], selector);\n      w[59] = hc_byte_perm (w[42], w[43], selector);\n      w[58] = hc_byte_perm (w[41], w[42], selector);\n      w[57] = hc_byte_perm (w[40], w[41], selector);\n      w[56] = hc_byte_perm (w[39], w[40], selector);\n      w[55] = hc_byte_perm (w[38], w[39], selector);\n      w[54] = hc_byte_perm (w[37], w[38], selector);\n      w[53] = hc_byte_perm (w[36], w[37], selector);\n      w[52] = hc_byte_perm (w[35], w[36], selector);\n      w[51] = hc_byte_perm (w[34], w[35], selector);\n      w[50] = hc_byte_perm (w[33], w[34], selector);\n      w[49] = hc_byte_perm (w[32], w[33], selector);\n      w[48] = hc_byte_perm (w[31], w[32], selector);\n      w[47] = hc_byte_perm (w[30], w[31], selector);\n      w[46] = hc_byte_perm (w[29], w[30], selector);\n      w[45] = hc_byte_perm (w[28], w[29], selector);\n      w[44] = hc_byte_perm (w[27], w[28], selector);\n      w[43] = hc_byte_perm (w[26], w[27], selector);\n      w[42] = hc_byte_perm (w[25], w[26], selector);\n      w[41] = hc_byte_perm (w[24], w[25], selector);\n      w[40] = hc_byte_perm (w[23], w[24], selector);\n      w[39] = hc_byte_perm (w[22], w[23], selector);\n      w[38] = hc_byte_perm (w[21], w[22], selector);\n      w[37] = hc_byte_perm (w[20], w[21], selector);\n      w[36] = hc_byte_perm (w[19], w[20], selector);\n      w[35] = hc_byte_perm (w[18], w[19], selector);\n      w[34] = hc_byte_perm (w[17], w[18], selector);\n      w[33] = hc_byte_perm (w[16], w[17], selector);\n      w[32] = hc_byte_perm (w[15], w[16], selector);\n      w[31] = hc_byte_perm (w[14], w[15], selector);\n      w[30] = hc_byte_perm (w[13], w[14], selector);\n      w[29] = hc_byte_perm (w[12], w[13], selector);\n      w[28] = hc_byte_perm (w[11], w[12], selector);\n      w[27] = hc_byte_perm (w[10], w[11], selector);\n      w[26] = hc_byte_perm (w[ 9], w[10], selector);\n      w[25] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[24] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[23] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[22] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[21] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[20] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[19] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[18] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[17] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[16] = hc_byte_perm (    0, w[ 0], selector);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_byte_perm (w[45], w[46], selector);\n      w[62] = hc_byte_perm (w[44], w[45], selector);\n      w[61] = hc_byte_perm (w[43], w[44], selector);\n      w[60] = hc_byte_perm (w[42], w[43], selector);\n      w[59] = hc_byte_perm (w[41], w[42], selector);\n      w[58] = hc_byte_perm (w[40], w[41], selector);\n      w[57] = hc_byte_perm (w[39], w[40], selector);\n      w[56] = hc_byte_perm (w[38], w[39], selector);\n      w[55] = hc_byte_perm (w[37], w[38], selector);\n      w[54] = hc_byte_perm (w[36], w[37], selector);\n      w[53] = hc_byte_perm (w[35], w[36], selector);\n      w[52] = hc_byte_perm (w[34], w[35], selector);\n      w[51] = hc_byte_perm (w[33], w[34], selector);\n      w[50] = hc_byte_perm (w[32], w[33], selector);\n      w[49] = hc_byte_perm (w[31], w[32], selector);\n      w[48] = hc_byte_perm (w[30], w[31], selector);\n      w[47] = hc_byte_perm (w[29], w[30], selector);\n      w[46] = hc_byte_perm (w[28], w[29], selector);\n      w[45] = hc_byte_perm (w[27], w[28], selector);\n      w[44] = hc_byte_perm (w[26], w[27], selector);\n      w[43] = hc_byte_perm (w[25], w[26], selector);\n      w[42] = hc_byte_perm (w[24], w[25], selector);\n      w[41] = hc_byte_perm (w[23], w[24], selector);\n      w[40] = hc_byte_perm (w[22], w[23], selector);\n      w[39] = hc_byte_perm (w[21], w[22], selector);\n      w[38] = hc_byte_perm (w[20], w[21], selector);\n      w[37] = hc_byte_perm (w[19], w[20], selector);\n      w[36] = hc_byte_perm (w[18], w[19], selector);\n      w[35] = hc_byte_perm (w[17], w[18], selector);\n      w[34] = hc_byte_perm (w[16], w[17], selector);\n      w[33] = hc_byte_perm (w[15], w[16], selector);\n      w[32] = hc_byte_perm (w[14], w[15], selector);\n      w[31] = hc_byte_perm (w[13], w[14], selector);\n      w[30] = hc_byte_perm (w[12], w[13], selector);\n      w[29] = hc_byte_perm (w[11], w[12], selector);\n      w[28] = hc_byte_perm (w[10], w[11], selector);\n      w[27] = hc_byte_perm (w[ 9], w[10], selector);\n      w[26] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[25] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[24] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[23] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[22] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[21] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[20] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[19] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[18] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[17] = hc_byte_perm (    0, w[ 0], selector);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_byte_perm (w[44], w[45], selector);\n      w[62] = hc_byte_perm (w[43], w[44], selector);\n      w[61] = hc_byte_perm (w[42], w[43], selector);\n      w[60] = hc_byte_perm (w[41], w[42], selector);\n      w[59] = hc_byte_perm (w[40], w[41], selector);\n      w[58] = hc_byte_perm (w[39], w[40], selector);\n      w[57] = hc_byte_perm (w[38], w[39], selector);\n      w[56] = hc_byte_perm (w[37], w[38], selector);\n      w[55] = hc_byte_perm (w[36], w[37], selector);\n      w[54] = hc_byte_perm (w[35], w[36], selector);\n      w[53] = hc_byte_perm (w[34], w[35], selector);\n      w[52] = hc_byte_perm (w[33], w[34], selector);\n      w[51] = hc_byte_perm (w[32], w[33], selector);\n      w[50] = hc_byte_perm (w[31], w[32], selector);\n      w[49] = hc_byte_perm (w[30], w[31], selector);\n      w[48] = hc_byte_perm (w[29], w[30], selector);\n      w[47] = hc_byte_perm (w[28], w[29], selector);\n      w[46] = hc_byte_perm (w[27], w[28], selector);\n      w[45] = hc_byte_perm (w[26], w[27], selector);\n      w[44] = hc_byte_perm (w[25], w[26], selector);\n      w[43] = hc_byte_perm (w[24], w[25], selector);\n      w[42] = hc_byte_perm (w[23], w[24], selector);\n      w[41] = hc_byte_perm (w[22], w[23], selector);\n      w[40] = hc_byte_perm (w[21], w[22], selector);\n      w[39] = hc_byte_perm (w[20], w[21], selector);\n      w[38] = hc_byte_perm (w[19], w[20], selector);\n      w[37] = hc_byte_perm (w[18], w[19], selector);\n      w[36] = hc_byte_perm (w[17], w[18], selector);\n      w[35] = hc_byte_perm (w[16], w[17], selector);\n      w[34] = hc_byte_perm (w[15], w[16], selector);\n      w[33] = hc_byte_perm (w[14], w[15], selector);\n      w[32] = hc_byte_perm (w[13], w[14], selector);\n      w[31] = hc_byte_perm (w[12], w[13], selector);\n      w[30] = hc_byte_perm (w[11], w[12], selector);\n      w[29] = hc_byte_perm (w[10], w[11], selector);\n      w[28] = hc_byte_perm (w[ 9], w[10], selector);\n      w[27] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[26] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[25] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[24] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[23] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[22] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[21] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[20] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[19] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[18] = hc_byte_perm (    0, w[ 0], selector);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_byte_perm (w[43], w[44], selector);\n      w[62] = hc_byte_perm (w[42], w[43], selector);\n      w[61] = hc_byte_perm (w[41], w[42], selector);\n      w[60] = hc_byte_perm (w[40], w[41], selector);\n      w[59] = hc_byte_perm (w[39], w[40], selector);\n      w[58] = hc_byte_perm (w[38], w[39], selector);\n      w[57] = hc_byte_perm (w[37], w[38], selector);\n      w[56] = hc_byte_perm (w[36], w[37], selector);\n      w[55] = hc_byte_perm (w[35], w[36], selector);\n      w[54] = hc_byte_perm (w[34], w[35], selector);\n      w[53] = hc_byte_perm (w[33], w[34], selector);\n      w[52] = hc_byte_perm (w[32], w[33], selector);\n      w[51] = hc_byte_perm (w[31], w[32], selector);\n      w[50] = hc_byte_perm (w[30], w[31], selector);\n      w[49] = hc_byte_perm (w[29], w[30], selector);\n      w[48] = hc_byte_perm (w[28], w[29], selector);\n      w[47] = hc_byte_perm (w[27], w[28], selector);\n      w[46] = hc_byte_perm (w[26], w[27], selector);\n      w[45] = hc_byte_perm (w[25], w[26], selector);\n      w[44] = hc_byte_perm (w[24], w[25], selector);\n      w[43] = hc_byte_perm (w[23], w[24], selector);\n      w[42] = hc_byte_perm (w[22], w[23], selector);\n      w[41] = hc_byte_perm (w[21], w[22], selector);\n      w[40] = hc_byte_perm (w[20], w[21], selector);\n      w[39] = hc_byte_perm (w[19], w[20], selector);\n      w[38] = hc_byte_perm (w[18], w[19], selector);\n      w[37] = hc_byte_perm (w[17], w[18], selector);\n      w[36] = hc_byte_perm (w[16], w[17], selector);\n      w[35] = hc_byte_perm (w[15], w[16], selector);\n      w[34] = hc_byte_perm (w[14], w[15], selector);\n      w[33] = hc_byte_perm (w[13], w[14], selector);\n      w[32] = hc_byte_perm (w[12], w[13], selector);\n      w[31] = hc_byte_perm (w[11], w[12], selector);\n      w[30] = hc_byte_perm (w[10], w[11], selector);\n      w[29] = hc_byte_perm (w[ 9], w[10], selector);\n      w[28] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[27] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[26] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[25] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[24] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[23] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[22] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[21] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[20] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[19] = hc_byte_perm (    0, w[ 0], selector);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_byte_perm (w[42], w[43], selector);\n      w[62] = hc_byte_perm (w[41], w[42], selector);\n      w[61] = hc_byte_perm (w[40], w[41], selector);\n      w[60] = hc_byte_perm (w[39], w[40], selector);\n      w[59] = hc_byte_perm (w[38], w[39], selector);\n      w[58] = hc_byte_perm (w[37], w[38], selector);\n      w[57] = hc_byte_perm (w[36], w[37], selector);\n      w[56] = hc_byte_perm (w[35], w[36], selector);\n      w[55] = hc_byte_perm (w[34], w[35], selector);\n      w[54] = hc_byte_perm (w[33], w[34], selector);\n      w[53] = hc_byte_perm (w[32], w[33], selector);\n      w[52] = hc_byte_perm (w[31], w[32], selector);\n      w[51] = hc_byte_perm (w[30], w[31], selector);\n      w[50] = hc_byte_perm (w[29], w[30], selector);\n      w[49] = hc_byte_perm (w[28], w[29], selector);\n      w[48] = hc_byte_perm (w[27], w[28], selector);\n      w[47] = hc_byte_perm (w[26], w[27], selector);\n      w[46] = hc_byte_perm (w[25], w[26], selector);\n      w[45] = hc_byte_perm (w[24], w[25], selector);\n      w[44] = hc_byte_perm (w[23], w[24], selector);\n      w[43] = hc_byte_perm (w[22], w[23], selector);\n      w[42] = hc_byte_perm (w[21], w[22], selector);\n      w[41] = hc_byte_perm (w[20], w[21], selector);\n      w[40] = hc_byte_perm (w[19], w[20], selector);\n      w[39] = hc_byte_perm (w[18], w[19], selector);\n      w[38] = hc_byte_perm (w[17], w[18], selector);\n      w[37] = hc_byte_perm (w[16], w[17], selector);\n      w[36] = hc_byte_perm (w[15], w[16], selector);\n      w[35] = hc_byte_perm (w[14], w[15], selector);\n      w[34] = hc_byte_perm (w[13], w[14], selector);\n      w[33] = hc_byte_perm (w[12], w[13], selector);\n      w[32] = hc_byte_perm (w[11], w[12], selector);\n      w[31] = hc_byte_perm (w[10], w[11], selector);\n      w[30] = hc_byte_perm (w[ 9], w[10], selector);\n      w[29] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[28] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[27] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[26] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[25] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[24] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[23] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[22] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[21] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[20] = hc_byte_perm (    0, w[ 0], selector);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_byte_perm (w[41], w[42], selector);\n      w[62] = hc_byte_perm (w[40], w[41], selector);\n      w[61] = hc_byte_perm (w[39], w[40], selector);\n      w[60] = hc_byte_perm (w[38], w[39], selector);\n      w[59] = hc_byte_perm (w[37], w[38], selector);\n      w[58] = hc_byte_perm (w[36], w[37], selector);\n      w[57] = hc_byte_perm (w[35], w[36], selector);\n      w[56] = hc_byte_perm (w[34], w[35], selector);\n      w[55] = hc_byte_perm (w[33], w[34], selector);\n      w[54] = hc_byte_perm (w[32], w[33], selector);\n      w[53] = hc_byte_perm (w[31], w[32], selector);\n      w[52] = hc_byte_perm (w[30], w[31], selector);\n      w[51] = hc_byte_perm (w[29], w[30], selector);\n      w[50] = hc_byte_perm (w[28], w[29], selector);\n      w[49] = hc_byte_perm (w[27], w[28], selector);\n      w[48] = hc_byte_perm (w[26], w[27], selector);\n      w[47] = hc_byte_perm (w[25], w[26], selector);\n      w[46] = hc_byte_perm (w[24], w[25], selector);\n      w[45] = hc_byte_perm (w[23], w[24], selector);\n      w[44] = hc_byte_perm (w[22], w[23], selector);\n      w[43] = hc_byte_perm (w[21], w[22], selector);\n      w[42] = hc_byte_perm (w[20], w[21], selector);\n      w[41] = hc_byte_perm (w[19], w[20], selector);\n      w[40] = hc_byte_perm (w[18], w[19], selector);\n      w[39] = hc_byte_perm (w[17], w[18], selector);\n      w[38] = hc_byte_perm (w[16], w[17], selector);\n      w[37] = hc_byte_perm (w[15], w[16], selector);\n      w[36] = hc_byte_perm (w[14], w[15], selector);\n      w[35] = hc_byte_perm (w[13], w[14], selector);\n      w[34] = hc_byte_perm (w[12], w[13], selector);\n      w[33] = hc_byte_perm (w[11], w[12], selector);\n      w[32] = hc_byte_perm (w[10], w[11], selector);\n      w[31] = hc_byte_perm (w[ 9], w[10], selector);\n      w[30] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[29] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[28] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[27] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[26] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[25] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[24] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[23] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[22] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[21] = hc_byte_perm (    0, w[ 0], selector);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_byte_perm (w[40], w[41], selector);\n      w[62] = hc_byte_perm (w[39], w[40], selector);\n      w[61] = hc_byte_perm (w[38], w[39], selector);\n      w[60] = hc_byte_perm (w[37], w[38], selector);\n      w[59] = hc_byte_perm (w[36], w[37], selector);\n      w[58] = hc_byte_perm (w[35], w[36], selector);\n      w[57] = hc_byte_perm (w[34], w[35], selector);\n      w[56] = hc_byte_perm (w[33], w[34], selector);\n      w[55] = hc_byte_perm (w[32], w[33], selector);\n      w[54] = hc_byte_perm (w[31], w[32], selector);\n      w[53] = hc_byte_perm (w[30], w[31], selector);\n      w[52] = hc_byte_perm (w[29], w[30], selector);\n      w[51] = hc_byte_perm (w[28], w[29], selector);\n      w[50] = hc_byte_perm (w[27], w[28], selector);\n      w[49] = hc_byte_perm (w[26], w[27], selector);\n      w[48] = hc_byte_perm (w[25], w[26], selector);\n      w[47] = hc_byte_perm (w[24], w[25], selector);\n      w[46] = hc_byte_perm (w[23], w[24], selector);\n      w[45] = hc_byte_perm (w[22], w[23], selector);\n      w[44] = hc_byte_perm (w[21], w[22], selector);\n      w[43] = hc_byte_perm (w[20], w[21], selector);\n      w[42] = hc_byte_perm (w[19], w[20], selector);\n      w[41] = hc_byte_perm (w[18], w[19], selector);\n      w[40] = hc_byte_perm (w[17], w[18], selector);\n      w[39] = hc_byte_perm (w[16], w[17], selector);\n      w[38] = hc_byte_perm (w[15], w[16], selector);\n      w[37] = hc_byte_perm (w[14], w[15], selector);\n      w[36] = hc_byte_perm (w[13], w[14], selector);\n      w[35] = hc_byte_perm (w[12], w[13], selector);\n      w[34] = hc_byte_perm (w[11], w[12], selector);\n      w[33] = hc_byte_perm (w[10], w[11], selector);\n      w[32] = hc_byte_perm (w[ 9], w[10], selector);\n      w[31] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[30] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[29] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[28] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[27] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[26] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[25] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[24] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[23] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[22] = hc_byte_perm (    0, w[ 0], selector);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_byte_perm (w[39], w[40], selector);\n      w[62] = hc_byte_perm (w[38], w[39], selector);\n      w[61] = hc_byte_perm (w[37], w[38], selector);\n      w[60] = hc_byte_perm (w[36], w[37], selector);\n      w[59] = hc_byte_perm (w[35], w[36], selector);\n      w[58] = hc_byte_perm (w[34], w[35], selector);\n      w[57] = hc_byte_perm (w[33], w[34], selector);\n      w[56] = hc_byte_perm (w[32], w[33], selector);\n      w[55] = hc_byte_perm (w[31], w[32], selector);\n      w[54] = hc_byte_perm (w[30], w[31], selector);\n      w[53] = hc_byte_perm (w[29], w[30], selector);\n      w[52] = hc_byte_perm (w[28], w[29], selector);\n      w[51] = hc_byte_perm (w[27], w[28], selector);\n      w[50] = hc_byte_perm (w[26], w[27], selector);\n      w[49] = hc_byte_perm (w[25], w[26], selector);\n      w[48] = hc_byte_perm (w[24], w[25], selector);\n      w[47] = hc_byte_perm (w[23], w[24], selector);\n      w[46] = hc_byte_perm (w[22], w[23], selector);\n      w[45] = hc_byte_perm (w[21], w[22], selector);\n      w[44] = hc_byte_perm (w[20], w[21], selector);\n      w[43] = hc_byte_perm (w[19], w[20], selector);\n      w[42] = hc_byte_perm (w[18], w[19], selector);\n      w[41] = hc_byte_perm (w[17], w[18], selector);\n      w[40] = hc_byte_perm (w[16], w[17], selector);\n      w[39] = hc_byte_perm (w[15], w[16], selector);\n      w[38] = hc_byte_perm (w[14], w[15], selector);\n      w[37] = hc_byte_perm (w[13], w[14], selector);\n      w[36] = hc_byte_perm (w[12], w[13], selector);\n      w[35] = hc_byte_perm (w[11], w[12], selector);\n      w[34] = hc_byte_perm (w[10], w[11], selector);\n      w[33] = hc_byte_perm (w[ 9], w[10], selector);\n      w[32] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[31] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[30] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[29] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[28] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[27] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[26] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[25] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[24] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[23] = hc_byte_perm (    0, w[ 0], selector);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_byte_perm (w[38], w[39], selector);\n      w[62] = hc_byte_perm (w[37], w[38], selector);\n      w[61] = hc_byte_perm (w[36], w[37], selector);\n      w[60] = hc_byte_perm (w[35], w[36], selector);\n      w[59] = hc_byte_perm (w[34], w[35], selector);\n      w[58] = hc_byte_perm (w[33], w[34], selector);\n      w[57] = hc_byte_perm (w[32], w[33], selector);\n      w[56] = hc_byte_perm (w[31], w[32], selector);\n      w[55] = hc_byte_perm (w[30], w[31], selector);\n      w[54] = hc_byte_perm (w[29], w[30], selector);\n      w[53] = hc_byte_perm (w[28], w[29], selector);\n      w[52] = hc_byte_perm (w[27], w[28], selector);\n      w[51] = hc_byte_perm (w[26], w[27], selector);\n      w[50] = hc_byte_perm (w[25], w[26], selector);\n      w[49] = hc_byte_perm (w[24], w[25], selector);\n      w[48] = hc_byte_perm (w[23], w[24], selector);\n      w[47] = hc_byte_perm (w[22], w[23], selector);\n      w[46] = hc_byte_perm (w[21], w[22], selector);\n      w[45] = hc_byte_perm (w[20], w[21], selector);\n      w[44] = hc_byte_perm (w[19], w[20], selector);\n      w[43] = hc_byte_perm (w[18], w[19], selector);\n      w[42] = hc_byte_perm (w[17], w[18], selector);\n      w[41] = hc_byte_perm (w[16], w[17], selector);\n      w[40] = hc_byte_perm (w[15], w[16], selector);\n      w[39] = hc_byte_perm (w[14], w[15], selector);\n      w[38] = hc_byte_perm (w[13], w[14], selector);\n      w[37] = hc_byte_perm (w[12], w[13], selector);\n      w[36] = hc_byte_perm (w[11], w[12], selector);\n      w[35] = hc_byte_perm (w[10], w[11], selector);\n      w[34] = hc_byte_perm (w[ 9], w[10], selector);\n      w[33] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[32] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[31] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[30] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[29] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[28] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[27] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[26] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[25] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[24] = hc_byte_perm (    0, w[ 0], selector);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_byte_perm (w[37], w[38], selector);\n      w[62] = hc_byte_perm (w[36], w[37], selector);\n      w[61] = hc_byte_perm (w[35], w[36], selector);\n      w[60] = hc_byte_perm (w[34], w[35], selector);\n      w[59] = hc_byte_perm (w[33], w[34], selector);\n      w[58] = hc_byte_perm (w[32], w[33], selector);\n      w[57] = hc_byte_perm (w[31], w[32], selector);\n      w[56] = hc_byte_perm (w[30], w[31], selector);\n      w[55] = hc_byte_perm (w[29], w[30], selector);\n      w[54] = hc_byte_perm (w[28], w[29], selector);\n      w[53] = hc_byte_perm (w[27], w[28], selector);\n      w[52] = hc_byte_perm (w[26], w[27], selector);\n      w[51] = hc_byte_perm (w[25], w[26], selector);\n      w[50] = hc_byte_perm (w[24], w[25], selector);\n      w[49] = hc_byte_perm (w[23], w[24], selector);\n      w[48] = hc_byte_perm (w[22], w[23], selector);\n      w[47] = hc_byte_perm (w[21], w[22], selector);\n      w[46] = hc_byte_perm (w[20], w[21], selector);\n      w[45] = hc_byte_perm (w[19], w[20], selector);\n      w[44] = hc_byte_perm (w[18], w[19], selector);\n      w[43] = hc_byte_perm (w[17], w[18], selector);\n      w[42] = hc_byte_perm (w[16], w[17], selector);\n      w[41] = hc_byte_perm (w[15], w[16], selector);\n      w[40] = hc_byte_perm (w[14], w[15], selector);\n      w[39] = hc_byte_perm (w[13], w[14], selector);\n      w[38] = hc_byte_perm (w[12], w[13], selector);\n      w[37] = hc_byte_perm (w[11], w[12], selector);\n      w[36] = hc_byte_perm (w[10], w[11], selector);\n      w[35] = hc_byte_perm (w[ 9], w[10], selector);\n      w[34] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[33] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[32] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[31] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[30] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[29] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[28] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[27] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[26] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[25] = hc_byte_perm (    0, w[ 0], selector);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_byte_perm (w[36], w[37], selector);\n      w[62] = hc_byte_perm (w[35], w[36], selector);\n      w[61] = hc_byte_perm (w[34], w[35], selector);\n      w[60] = hc_byte_perm (w[33], w[34], selector);\n      w[59] = hc_byte_perm (w[32], w[33], selector);\n      w[58] = hc_byte_perm (w[31], w[32], selector);\n      w[57] = hc_byte_perm (w[30], w[31], selector);\n      w[56] = hc_byte_perm (w[29], w[30], selector);\n      w[55] = hc_byte_perm (w[28], w[29], selector);\n      w[54] = hc_byte_perm (w[27], w[28], selector);\n      w[53] = hc_byte_perm (w[26], w[27], selector);\n      w[52] = hc_byte_perm (w[25], w[26], selector);\n      w[51] = hc_byte_perm (w[24], w[25], selector);\n      w[50] = hc_byte_perm (w[23], w[24], selector);\n      w[49] = hc_byte_perm (w[22], w[23], selector);\n      w[48] = hc_byte_perm (w[21], w[22], selector);\n      w[47] = hc_byte_perm (w[20], w[21], selector);\n      w[46] = hc_byte_perm (w[19], w[20], selector);\n      w[45] = hc_byte_perm (w[18], w[19], selector);\n      w[44] = hc_byte_perm (w[17], w[18], selector);\n      w[43] = hc_byte_perm (w[16], w[17], selector);\n      w[42] = hc_byte_perm (w[15], w[16], selector);\n      w[41] = hc_byte_perm (w[14], w[15], selector);\n      w[40] = hc_byte_perm (w[13], w[14], selector);\n      w[39] = hc_byte_perm (w[12], w[13], selector);\n      w[38] = hc_byte_perm (w[11], w[12], selector);\n      w[37] = hc_byte_perm (w[10], w[11], selector);\n      w[36] = hc_byte_perm (w[ 9], w[10], selector);\n      w[35] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[34] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[33] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[32] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[31] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[30] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[29] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[28] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[27] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[26] = hc_byte_perm (    0, w[ 0], selector);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_byte_perm (w[35], w[36], selector);\n      w[62] = hc_byte_perm (w[34], w[35], selector);\n      w[61] = hc_byte_perm (w[33], w[34], selector);\n      w[60] = hc_byte_perm (w[32], w[33], selector);\n      w[59] = hc_byte_perm (w[31], w[32], selector);\n      w[58] = hc_byte_perm (w[30], w[31], selector);\n      w[57] = hc_byte_perm (w[29], w[30], selector);\n      w[56] = hc_byte_perm (w[28], w[29], selector);\n      w[55] = hc_byte_perm (w[27], w[28], selector);\n      w[54] = hc_byte_perm (w[26], w[27], selector);\n      w[53] = hc_byte_perm (w[25], w[26], selector);\n      w[52] = hc_byte_perm (w[24], w[25], selector);\n      w[51] = hc_byte_perm (w[23], w[24], selector);\n      w[50] = hc_byte_perm (w[22], w[23], selector);\n      w[49] = hc_byte_perm (w[21], w[22], selector);\n      w[48] = hc_byte_perm (w[20], w[21], selector);\n      w[47] = hc_byte_perm (w[19], w[20], selector);\n      w[46] = hc_byte_perm (w[18], w[19], selector);\n      w[45] = hc_byte_perm (w[17], w[18], selector);\n      w[44] = hc_byte_perm (w[16], w[17], selector);\n      w[43] = hc_byte_perm (w[15], w[16], selector);\n      w[42] = hc_byte_perm (w[14], w[15], selector);\n      w[41] = hc_byte_perm (w[13], w[14], selector);\n      w[40] = hc_byte_perm (w[12], w[13], selector);\n      w[39] = hc_byte_perm (w[11], w[12], selector);\n      w[38] = hc_byte_perm (w[10], w[11], selector);\n      w[37] = hc_byte_perm (w[ 9], w[10], selector);\n      w[36] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[35] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[34] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[33] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[32] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[31] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[30] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[29] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[28] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[27] = hc_byte_perm (    0, w[ 0], selector);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_byte_perm (w[34], w[35], selector);\n      w[62] = hc_byte_perm (w[33], w[34], selector);\n      w[61] = hc_byte_perm (w[32], w[33], selector);\n      w[60] = hc_byte_perm (w[31], w[32], selector);\n      w[59] = hc_byte_perm (w[30], w[31], selector);\n      w[58] = hc_byte_perm (w[29], w[30], selector);\n      w[57] = hc_byte_perm (w[28], w[29], selector);\n      w[56] = hc_byte_perm (w[27], w[28], selector);\n      w[55] = hc_byte_perm (w[26], w[27], selector);\n      w[54] = hc_byte_perm (w[25], w[26], selector);\n      w[53] = hc_byte_perm (w[24], w[25], selector);\n      w[52] = hc_byte_perm (w[23], w[24], selector);\n      w[51] = hc_byte_perm (w[22], w[23], selector);\n      w[50] = hc_byte_perm (w[21], w[22], selector);\n      w[49] = hc_byte_perm (w[20], w[21], selector);\n      w[48] = hc_byte_perm (w[19], w[20], selector);\n      w[47] = hc_byte_perm (w[18], w[19], selector);\n      w[46] = hc_byte_perm (w[17], w[18], selector);\n      w[45] = hc_byte_perm (w[16], w[17], selector);\n      w[44] = hc_byte_perm (w[15], w[16], selector);\n      w[43] = hc_byte_perm (w[14], w[15], selector);\n      w[42] = hc_byte_perm (w[13], w[14], selector);\n      w[41] = hc_byte_perm (w[12], w[13], selector);\n      w[40] = hc_byte_perm (w[11], w[12], selector);\n      w[39] = hc_byte_perm (w[10], w[11], selector);\n      w[38] = hc_byte_perm (w[ 9], w[10], selector);\n      w[37] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[36] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[35] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[34] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[33] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[32] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[31] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[30] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[29] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[28] = hc_byte_perm (    0, w[ 0], selector);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_byte_perm (w[33], w[34], selector);\n      w[62] = hc_byte_perm (w[32], w[33], selector);\n      w[61] = hc_byte_perm (w[31], w[32], selector);\n      w[60] = hc_byte_perm (w[30], w[31], selector);\n      w[59] = hc_byte_perm (w[29], w[30], selector);\n      w[58] = hc_byte_perm (w[28], w[29], selector);\n      w[57] = hc_byte_perm (w[27], w[28], selector);\n      w[56] = hc_byte_perm (w[26], w[27], selector);\n      w[55] = hc_byte_perm (w[25], w[26], selector);\n      w[54] = hc_byte_perm (w[24], w[25], selector);\n      w[53] = hc_byte_perm (w[23], w[24], selector);\n      w[52] = hc_byte_perm (w[22], w[23], selector);\n      w[51] = hc_byte_perm (w[21], w[22], selector);\n      w[50] = hc_byte_perm (w[20], w[21], selector);\n      w[49] = hc_byte_perm (w[19], w[20], selector);\n      w[48] = hc_byte_perm (w[18], w[19], selector);\n      w[47] = hc_byte_perm (w[17], w[18], selector);\n      w[46] = hc_byte_perm (w[16], w[17], selector);\n      w[45] = hc_byte_perm (w[15], w[16], selector);\n      w[44] = hc_byte_perm (w[14], w[15], selector);\n      w[43] = hc_byte_perm (w[13], w[14], selector);\n      w[42] = hc_byte_perm (w[12], w[13], selector);\n      w[41] = hc_byte_perm (w[11], w[12], selector);\n      w[40] = hc_byte_perm (w[10], w[11], selector);\n      w[39] = hc_byte_perm (w[ 9], w[10], selector);\n      w[38] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[37] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[36] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[35] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[34] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[33] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[32] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[31] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[30] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[29] = hc_byte_perm (    0, w[ 0], selector);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_byte_perm (w[32], w[33], selector);\n      w[62] = hc_byte_perm (w[31], w[32], selector);\n      w[61] = hc_byte_perm (w[30], w[31], selector);\n      w[60] = hc_byte_perm (w[29], w[30], selector);\n      w[59] = hc_byte_perm (w[28], w[29], selector);\n      w[58] = hc_byte_perm (w[27], w[28], selector);\n      w[57] = hc_byte_perm (w[26], w[27], selector);\n      w[56] = hc_byte_perm (w[25], w[26], selector);\n      w[55] = hc_byte_perm (w[24], w[25], selector);\n      w[54] = hc_byte_perm (w[23], w[24], selector);\n      w[53] = hc_byte_perm (w[22], w[23], selector);\n      w[52] = hc_byte_perm (w[21], w[22], selector);\n      w[51] = hc_byte_perm (w[20], w[21], selector);\n      w[50] = hc_byte_perm (w[19], w[20], selector);\n      w[49] = hc_byte_perm (w[18], w[19], selector);\n      w[48] = hc_byte_perm (w[17], w[18], selector);\n      w[47] = hc_byte_perm (w[16], w[17], selector);\n      w[46] = hc_byte_perm (w[15], w[16], selector);\n      w[45] = hc_byte_perm (w[14], w[15], selector);\n      w[44] = hc_byte_perm (w[13], w[14], selector);\n      w[43] = hc_byte_perm (w[12], w[13], selector);\n      w[42] = hc_byte_perm (w[11], w[12], selector);\n      w[41] = hc_byte_perm (w[10], w[11], selector);\n      w[40] = hc_byte_perm (w[ 9], w[10], selector);\n      w[39] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[38] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[37] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[36] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[35] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[34] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[33] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[32] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[31] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[30] = hc_byte_perm (    0, w[ 0], selector);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_byte_perm (w[31], w[32], selector);\n      w[62] = hc_byte_perm (w[30], w[31], selector);\n      w[61] = hc_byte_perm (w[29], w[30], selector);\n      w[60] = hc_byte_perm (w[28], w[29], selector);\n      w[59] = hc_byte_perm (w[27], w[28], selector);\n      w[58] = hc_byte_perm (w[26], w[27], selector);\n      w[57] = hc_byte_perm (w[25], w[26], selector);\n      w[56] = hc_byte_perm (w[24], w[25], selector);\n      w[55] = hc_byte_perm (w[23], w[24], selector);\n      w[54] = hc_byte_perm (w[22], w[23], selector);\n      w[53] = hc_byte_perm (w[21], w[22], selector);\n      w[52] = hc_byte_perm (w[20], w[21], selector);\n      w[51] = hc_byte_perm (w[19], w[20], selector);\n      w[50] = hc_byte_perm (w[18], w[19], selector);\n      w[49] = hc_byte_perm (w[17], w[18], selector);\n      w[48] = hc_byte_perm (w[16], w[17], selector);\n      w[47] = hc_byte_perm (w[15], w[16], selector);\n      w[46] = hc_byte_perm (w[14], w[15], selector);\n      w[45] = hc_byte_perm (w[13], w[14], selector);\n      w[44] = hc_byte_perm (w[12], w[13], selector);\n      w[43] = hc_byte_perm (w[11], w[12], selector);\n      w[42] = hc_byte_perm (w[10], w[11], selector);\n      w[41] = hc_byte_perm (w[ 9], w[10], selector);\n      w[40] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[39] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[38] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[37] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[36] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[35] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[34] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[33] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[32] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[31] = hc_byte_perm (    0, w[ 0], selector);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_byte_perm (w[30], w[31], selector);\n      w[62] = hc_byte_perm (w[29], w[30], selector);\n      w[61] = hc_byte_perm (w[28], w[29], selector);\n      w[60] = hc_byte_perm (w[27], w[28], selector);\n      w[59] = hc_byte_perm (w[26], w[27], selector);\n      w[58] = hc_byte_perm (w[25], w[26], selector);\n      w[57] = hc_byte_perm (w[24], w[25], selector);\n      w[56] = hc_byte_perm (w[23], w[24], selector);\n      w[55] = hc_byte_perm (w[22], w[23], selector);\n      w[54] = hc_byte_perm (w[21], w[22], selector);\n      w[53] = hc_byte_perm (w[20], w[21], selector);\n      w[52] = hc_byte_perm (w[19], w[20], selector);\n      w[51] = hc_byte_perm (w[18], w[19], selector);\n      w[50] = hc_byte_perm (w[17], w[18], selector);\n      w[49] = hc_byte_perm (w[16], w[17], selector);\n      w[48] = hc_byte_perm (w[15], w[16], selector);\n      w[47] = hc_byte_perm (w[14], w[15], selector);\n      w[46] = hc_byte_perm (w[13], w[14], selector);\n      w[45] = hc_byte_perm (w[12], w[13], selector);\n      w[44] = hc_byte_perm (w[11], w[12], selector);\n      w[43] = hc_byte_perm (w[10], w[11], selector);\n      w[42] = hc_byte_perm (w[ 9], w[10], selector);\n      w[41] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[40] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[39] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[38] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[37] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[36] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[35] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[34] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[33] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[32] = hc_byte_perm (    0, w[ 0], selector);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_byte_perm (w[29], w[30], selector);\n      w[62] = hc_byte_perm (w[28], w[29], selector);\n      w[61] = hc_byte_perm (w[27], w[28], selector);\n      w[60] = hc_byte_perm (w[26], w[27], selector);\n      w[59] = hc_byte_perm (w[25], w[26], selector);\n      w[58] = hc_byte_perm (w[24], w[25], selector);\n      w[57] = hc_byte_perm (w[23], w[24], selector);\n      w[56] = hc_byte_perm (w[22], w[23], selector);\n      w[55] = hc_byte_perm (w[21], w[22], selector);\n      w[54] = hc_byte_perm (w[20], w[21], selector);\n      w[53] = hc_byte_perm (w[19], w[20], selector);\n      w[52] = hc_byte_perm (w[18], w[19], selector);\n      w[51] = hc_byte_perm (w[17], w[18], selector);\n      w[50] = hc_byte_perm (w[16], w[17], selector);\n      w[49] = hc_byte_perm (w[15], w[16], selector);\n      w[48] = hc_byte_perm (w[14], w[15], selector);\n      w[47] = hc_byte_perm (w[13], w[14], selector);\n      w[46] = hc_byte_perm (w[12], w[13], selector);\n      w[45] = hc_byte_perm (w[11], w[12], selector);\n      w[44] = hc_byte_perm (w[10], w[11], selector);\n      w[43] = hc_byte_perm (w[ 9], w[10], selector);\n      w[42] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[41] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[40] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[39] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[38] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[37] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[36] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[35] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[34] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[33] = hc_byte_perm (    0, w[ 0], selector);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_byte_perm (w[28], w[29], selector);\n      w[62] = hc_byte_perm (w[27], w[28], selector);\n      w[61] = hc_byte_perm (w[26], w[27], selector);\n      w[60] = hc_byte_perm (w[25], w[26], selector);\n      w[59] = hc_byte_perm (w[24], w[25], selector);\n      w[58] = hc_byte_perm (w[23], w[24], selector);\n      w[57] = hc_byte_perm (w[22], w[23], selector);\n      w[56] = hc_byte_perm (w[21], w[22], selector);\n      w[55] = hc_byte_perm (w[20], w[21], selector);\n      w[54] = hc_byte_perm (w[19], w[20], selector);\n      w[53] = hc_byte_perm (w[18], w[19], selector);\n      w[52] = hc_byte_perm (w[17], w[18], selector);\n      w[51] = hc_byte_perm (w[16], w[17], selector);\n      w[50] = hc_byte_perm (w[15], w[16], selector);\n      w[49] = hc_byte_perm (w[14], w[15], selector);\n      w[48] = hc_byte_perm (w[13], w[14], selector);\n      w[47] = hc_byte_perm (w[12], w[13], selector);\n      w[46] = hc_byte_perm (w[11], w[12], selector);\n      w[45] = hc_byte_perm (w[10], w[11], selector);\n      w[44] = hc_byte_perm (w[ 9], w[10], selector);\n      w[43] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[42] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[41] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[40] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[39] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[38] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[37] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[36] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[35] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[34] = hc_byte_perm (    0, w[ 0], selector);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_byte_perm (w[27], w[28], selector);\n      w[62] = hc_byte_perm (w[26], w[27], selector);\n      w[61] = hc_byte_perm (w[25], w[26], selector);\n      w[60] = hc_byte_perm (w[24], w[25], selector);\n      w[59] = hc_byte_perm (w[23], w[24], selector);\n      w[58] = hc_byte_perm (w[22], w[23], selector);\n      w[57] = hc_byte_perm (w[21], w[22], selector);\n      w[56] = hc_byte_perm (w[20], w[21], selector);\n      w[55] = hc_byte_perm (w[19], w[20], selector);\n      w[54] = hc_byte_perm (w[18], w[19], selector);\n      w[53] = hc_byte_perm (w[17], w[18], selector);\n      w[52] = hc_byte_perm (w[16], w[17], selector);\n      w[51] = hc_byte_perm (w[15], w[16], selector);\n      w[50] = hc_byte_perm (w[14], w[15], selector);\n      w[49] = hc_byte_perm (w[13], w[14], selector);\n      w[48] = hc_byte_perm (w[12], w[13], selector);\n      w[47] = hc_byte_perm (w[11], w[12], selector);\n      w[46] = hc_byte_perm (w[10], w[11], selector);\n      w[45] = hc_byte_perm (w[ 9], w[10], selector);\n      w[44] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[43] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[42] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[41] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[40] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[39] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[38] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[37] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[36] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[35] = hc_byte_perm (    0, w[ 0], selector);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_byte_perm (w[26], w[27], selector);\n      w[62] = hc_byte_perm (w[25], w[26], selector);\n      w[61] = hc_byte_perm (w[24], w[25], selector);\n      w[60] = hc_byte_perm (w[23], w[24], selector);\n      w[59] = hc_byte_perm (w[22], w[23], selector);\n      w[58] = hc_byte_perm (w[21], w[22], selector);\n      w[57] = hc_byte_perm (w[20], w[21], selector);\n      w[56] = hc_byte_perm (w[19], w[20], selector);\n      w[55] = hc_byte_perm (w[18], w[19], selector);\n      w[54] = hc_byte_perm (w[17], w[18], selector);\n      w[53] = hc_byte_perm (w[16], w[17], selector);\n      w[52] = hc_byte_perm (w[15], w[16], selector);\n      w[51] = hc_byte_perm (w[14], w[15], selector);\n      w[50] = hc_byte_perm (w[13], w[14], selector);\n      w[49] = hc_byte_perm (w[12], w[13], selector);\n      w[48] = hc_byte_perm (w[11], w[12], selector);\n      w[47] = hc_byte_perm (w[10], w[11], selector);\n      w[46] = hc_byte_perm (w[ 9], w[10], selector);\n      w[45] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[44] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[43] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[42] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[41] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[40] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[39] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[38] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[37] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[36] = hc_byte_perm (    0, w[ 0], selector);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_byte_perm (w[25], w[26], selector);\n      w[62] = hc_byte_perm (w[24], w[25], selector);\n      w[61] = hc_byte_perm (w[23], w[24], selector);\n      w[60] = hc_byte_perm (w[22], w[23], selector);\n      w[59] = hc_byte_perm (w[21], w[22], selector);\n      w[58] = hc_byte_perm (w[20], w[21], selector);\n      w[57] = hc_byte_perm (w[19], w[20], selector);\n      w[56] = hc_byte_perm (w[18], w[19], selector);\n      w[55] = hc_byte_perm (w[17], w[18], selector);\n      w[54] = hc_byte_perm (w[16], w[17], selector);\n      w[53] = hc_byte_perm (w[15], w[16], selector);\n      w[52] = hc_byte_perm (w[14], w[15], selector);\n      w[51] = hc_byte_perm (w[13], w[14], selector);\n      w[50] = hc_byte_perm (w[12], w[13], selector);\n      w[49] = hc_byte_perm (w[11], w[12], selector);\n      w[48] = hc_byte_perm (w[10], w[11], selector);\n      w[47] = hc_byte_perm (w[ 9], w[10], selector);\n      w[46] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[45] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[44] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[43] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[42] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[41] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[40] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[39] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[38] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[37] = hc_byte_perm (    0, w[ 0], selector);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_byte_perm (w[24], w[25], selector);\n      w[62] = hc_byte_perm (w[23], w[24], selector);\n      w[61] = hc_byte_perm (w[22], w[23], selector);\n      w[60] = hc_byte_perm (w[21], w[22], selector);\n      w[59] = hc_byte_perm (w[20], w[21], selector);\n      w[58] = hc_byte_perm (w[19], w[20], selector);\n      w[57] = hc_byte_perm (w[18], w[19], selector);\n      w[56] = hc_byte_perm (w[17], w[18], selector);\n      w[55] = hc_byte_perm (w[16], w[17], selector);\n      w[54] = hc_byte_perm (w[15], w[16], selector);\n      w[53] = hc_byte_perm (w[14], w[15], selector);\n      w[52] = hc_byte_perm (w[13], w[14], selector);\n      w[51] = hc_byte_perm (w[12], w[13], selector);\n      w[50] = hc_byte_perm (w[11], w[12], selector);\n      w[49] = hc_byte_perm (w[10], w[11], selector);\n      w[48] = hc_byte_perm (w[ 9], w[10], selector);\n      w[47] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[46] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[45] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[44] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[43] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[42] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[41] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[40] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[39] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[38] = hc_byte_perm (    0, w[ 0], selector);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_byte_perm (w[23], w[24], selector);\n      w[62] = hc_byte_perm (w[22], w[23], selector);\n      w[61] = hc_byte_perm (w[21], w[22], selector);\n      w[60] = hc_byte_perm (w[20], w[21], selector);\n      w[59] = hc_byte_perm (w[19], w[20], selector);\n      w[58] = hc_byte_perm (w[18], w[19], selector);\n      w[57] = hc_byte_perm (w[17], w[18], selector);\n      w[56] = hc_byte_perm (w[16], w[17], selector);\n      w[55] = hc_byte_perm (w[15], w[16], selector);\n      w[54] = hc_byte_perm (w[14], w[15], selector);\n      w[53] = hc_byte_perm (w[13], w[14], selector);\n      w[52] = hc_byte_perm (w[12], w[13], selector);\n      w[51] = hc_byte_perm (w[11], w[12], selector);\n      w[50] = hc_byte_perm (w[10], w[11], selector);\n      w[49] = hc_byte_perm (w[ 9], w[10], selector);\n      w[48] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[47] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[46] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[45] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[44] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[43] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[42] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[41] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[40] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[39] = hc_byte_perm (    0, w[ 0], selector);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_byte_perm (w[22], w[23], selector);\n      w[62] = hc_byte_perm (w[21], w[22], selector);\n      w[61] = hc_byte_perm (w[20], w[21], selector);\n      w[60] = hc_byte_perm (w[19], w[20], selector);\n      w[59] = hc_byte_perm (w[18], w[19], selector);\n      w[58] = hc_byte_perm (w[17], w[18], selector);\n      w[57] = hc_byte_perm (w[16], w[17], selector);\n      w[56] = hc_byte_perm (w[15], w[16], selector);\n      w[55] = hc_byte_perm (w[14], w[15], selector);\n      w[54] = hc_byte_perm (w[13], w[14], selector);\n      w[53] = hc_byte_perm (w[12], w[13], selector);\n      w[52] = hc_byte_perm (w[11], w[12], selector);\n      w[51] = hc_byte_perm (w[10], w[11], selector);\n      w[50] = hc_byte_perm (w[ 9], w[10], selector);\n      w[49] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[48] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[47] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[46] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[45] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[44] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[43] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[42] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[41] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[40] = hc_byte_perm (    0, w[ 0], selector);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_byte_perm (w[21], w[22], selector);\n      w[62] = hc_byte_perm (w[20], w[21], selector);\n      w[61] = hc_byte_perm (w[19], w[20], selector);\n      w[60] = hc_byte_perm (w[18], w[19], selector);\n      w[59] = hc_byte_perm (w[17], w[18], selector);\n      w[58] = hc_byte_perm (w[16], w[17], selector);\n      w[57] = hc_byte_perm (w[15], w[16], selector);\n      w[56] = hc_byte_perm (w[14], w[15], selector);\n      w[55] = hc_byte_perm (w[13], w[14], selector);\n      w[54] = hc_byte_perm (w[12], w[13], selector);\n      w[53] = hc_byte_perm (w[11], w[12], selector);\n      w[52] = hc_byte_perm (w[10], w[11], selector);\n      w[51] = hc_byte_perm (w[ 9], w[10], selector);\n      w[50] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[49] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[48] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[47] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[46] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[45] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[44] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[43] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[42] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[41] = hc_byte_perm (    0, w[ 0], selector);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_byte_perm (w[20], w[21], selector);\n      w[62] = hc_byte_perm (w[19], w[20], selector);\n      w[61] = hc_byte_perm (w[18], w[19], selector);\n      w[60] = hc_byte_perm (w[17], w[18], selector);\n      w[59] = hc_byte_perm (w[16], w[17], selector);\n      w[58] = hc_byte_perm (w[15], w[16], selector);\n      w[57] = hc_byte_perm (w[14], w[15], selector);\n      w[56] = hc_byte_perm (w[13], w[14], selector);\n      w[55] = hc_byte_perm (w[12], w[13], selector);\n      w[54] = hc_byte_perm (w[11], w[12], selector);\n      w[53] = hc_byte_perm (w[10], w[11], selector);\n      w[52] = hc_byte_perm (w[ 9], w[10], selector);\n      w[51] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[50] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[49] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[48] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[47] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[46] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[45] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[44] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[43] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[42] = hc_byte_perm (    0, w[ 0], selector);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_byte_perm (w[19], w[20], selector);\n      w[62] = hc_byte_perm (w[18], w[19], selector);\n      w[61] = hc_byte_perm (w[17], w[18], selector);\n      w[60] = hc_byte_perm (w[16], w[17], selector);\n      w[59] = hc_byte_perm (w[15], w[16], selector);\n      w[58] = hc_byte_perm (w[14], w[15], selector);\n      w[57] = hc_byte_perm (w[13], w[14], selector);\n      w[56] = hc_byte_perm (w[12], w[13], selector);\n      w[55] = hc_byte_perm (w[11], w[12], selector);\n      w[54] = hc_byte_perm (w[10], w[11], selector);\n      w[53] = hc_byte_perm (w[ 9], w[10], selector);\n      w[52] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[51] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[50] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[49] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[48] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[47] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[46] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[45] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[44] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[43] = hc_byte_perm (    0, w[ 0], selector);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_byte_perm (w[18], w[19], selector);\n      w[62] = hc_byte_perm (w[17], w[18], selector);\n      w[61] = hc_byte_perm (w[16], w[17], selector);\n      w[60] = hc_byte_perm (w[15], w[16], selector);\n      w[59] = hc_byte_perm (w[14], w[15], selector);\n      w[58] = hc_byte_perm (w[13], w[14], selector);\n      w[57] = hc_byte_perm (w[12], w[13], selector);\n      w[56] = hc_byte_perm (w[11], w[12], selector);\n      w[55] = hc_byte_perm (w[10], w[11], selector);\n      w[54] = hc_byte_perm (w[ 9], w[10], selector);\n      w[53] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[52] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[51] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[50] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[49] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[48] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[47] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[46] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[45] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[44] = hc_byte_perm (    0, w[ 0], selector);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_byte_perm (w[17], w[18], selector);\n      w[62] = hc_byte_perm (w[16], w[17], selector);\n      w[61] = hc_byte_perm (w[15], w[16], selector);\n      w[60] = hc_byte_perm (w[14], w[15], selector);\n      w[59] = hc_byte_perm (w[13], w[14], selector);\n      w[58] = hc_byte_perm (w[12], w[13], selector);\n      w[57] = hc_byte_perm (w[11], w[12], selector);\n      w[56] = hc_byte_perm (w[10], w[11], selector);\n      w[55] = hc_byte_perm (w[ 9], w[10], selector);\n      w[54] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[53] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[52] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[51] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[50] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[49] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[48] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[47] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[46] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[45] = hc_byte_perm (    0, w[ 0], selector);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_byte_perm (w[16], w[17], selector);\n      w[62] = hc_byte_perm (w[15], w[16], selector);\n      w[61] = hc_byte_perm (w[14], w[15], selector);\n      w[60] = hc_byte_perm (w[13], w[14], selector);\n      w[59] = hc_byte_perm (w[12], w[13], selector);\n      w[58] = hc_byte_perm (w[11], w[12], selector);\n      w[57] = hc_byte_perm (w[10], w[11], selector);\n      w[56] = hc_byte_perm (w[ 9], w[10], selector);\n      w[55] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[54] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[53] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[52] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[51] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[50] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[49] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[48] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[47] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[46] = hc_byte_perm (    0, w[ 0], selector);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_byte_perm (w[15], w[16], selector);\n      w[62] = hc_byte_perm (w[14], w[15], selector);\n      w[61] = hc_byte_perm (w[13], w[14], selector);\n      w[60] = hc_byte_perm (w[12], w[13], selector);\n      w[59] = hc_byte_perm (w[11], w[12], selector);\n      w[58] = hc_byte_perm (w[10], w[11], selector);\n      w[57] = hc_byte_perm (w[ 9], w[10], selector);\n      w[56] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[55] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[54] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[53] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[52] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[51] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[50] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[49] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[48] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[47] = hc_byte_perm (    0, w[ 0], selector);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_byte_perm (w[14], w[15], selector);\n      w[62] = hc_byte_perm (w[13], w[14], selector);\n      w[61] = hc_byte_perm (w[12], w[13], selector);\n      w[60] = hc_byte_perm (w[11], w[12], selector);\n      w[59] = hc_byte_perm (w[10], w[11], selector);\n      w[58] = hc_byte_perm (w[ 9], w[10], selector);\n      w[57] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[56] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[55] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[54] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[53] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[52] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[51] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[50] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[49] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[48] = hc_byte_perm (    0, w[ 0], selector);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_byte_perm (w[13], w[14], selector);\n      w[62] = hc_byte_perm (w[12], w[13], selector);\n      w[61] = hc_byte_perm (w[11], w[12], selector);\n      w[60] = hc_byte_perm (w[10], w[11], selector);\n      w[59] = hc_byte_perm (w[ 9], w[10], selector);\n      w[58] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[57] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[56] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[55] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[54] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[53] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[52] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[51] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[50] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[49] = hc_byte_perm (    0, w[ 0], selector);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_byte_perm (w[12], w[13], selector);\n      w[62] = hc_byte_perm (w[11], w[12], selector);\n      w[61] = hc_byte_perm (w[10], w[11], selector);\n      w[60] = hc_byte_perm (w[ 9], w[10], selector);\n      w[59] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[58] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[57] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[56] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[55] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[54] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[53] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[52] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[51] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[50] = hc_byte_perm (    0, w[ 0], selector);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_byte_perm (w[11], w[12], selector);\n      w[62] = hc_byte_perm (w[10], w[11], selector);\n      w[61] = hc_byte_perm (w[ 9], w[10], selector);\n      w[60] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[59] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[58] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[57] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[56] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[55] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[54] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[53] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[52] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[51] = hc_byte_perm (    0, w[ 0], selector);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_byte_perm (w[10], w[11], selector);\n      w[62] = hc_byte_perm (w[ 9], w[10], selector);\n      w[61] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[60] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[59] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[58] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[57] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[56] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[55] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[54] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[53] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[52] = hc_byte_perm (    0, w[ 0], selector);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_byte_perm (w[ 9], w[10], selector);\n      w[62] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[61] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[60] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[59] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[58] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[57] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[56] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[55] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[54] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[53] = hc_byte_perm (    0, w[ 0], selector);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_byte_perm (w[ 8], w[ 9], selector);\n      w[62] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[61] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[60] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[59] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[58] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[57] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[56] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[55] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[54] = hc_byte_perm (    0, w[ 0], selector);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_byte_perm (w[ 7], w[ 8], selector);\n      w[62] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[61] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[60] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[59] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[58] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[57] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[56] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[55] = hc_byte_perm (    0, w[ 0], selector);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_byte_perm (w[ 6], w[ 7], selector);\n      w[62] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[61] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[60] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[59] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[58] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[57] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[56] = hc_byte_perm (    0, w[ 0], selector);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_byte_perm (w[ 5], w[ 6], selector);\n      w[62] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[61] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[60] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[59] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[58] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[57] = hc_byte_perm (    0, w[ 0], selector);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_byte_perm (w[ 4], w[ 5], selector);\n      w[62] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[61] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[60] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[59] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[58] = hc_byte_perm (    0, w[ 0], selector);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_byte_perm (w[ 3], w[ 4], selector);\n      w[62] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[61] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[60] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[59] = hc_byte_perm (    0, w[ 0], selector);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_byte_perm (w[ 2], w[ 3], selector);\n      w[62] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[61] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[60] = hc_byte_perm (    0, w[ 0], selector);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_byte_perm (w[ 1], w[ 2], selector);\n      w[62] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[61] = hc_byte_perm (    0, w[ 0], selector);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_byte_perm (w[ 0], w[ 1], selector);\n      w[62] = hc_byte_perm (    0, w[ 0], selector);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_byte_perm (    0, w[ 0], selector);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_1x64_be (PRIVATE_AS u32x *w, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_bytealign_be (w[62], w[63], offset);\n      w[62] = hc_bytealign_be (w[61], w[62], offset);\n      w[61] = hc_bytealign_be (w[60], w[61], offset);\n      w[60] = hc_bytealign_be (w[59], w[60], offset);\n      w[59] = hc_bytealign_be (w[58], w[59], offset);\n      w[58] = hc_bytealign_be (w[57], w[58], offset);\n      w[57] = hc_bytealign_be (w[56], w[57], offset);\n      w[56] = hc_bytealign_be (w[55], w[56], offset);\n      w[55] = hc_bytealign_be (w[54], w[55], offset);\n      w[54] = hc_bytealign_be (w[53], w[54], offset);\n      w[53] = hc_bytealign_be (w[52], w[53], offset);\n      w[52] = hc_bytealign_be (w[51], w[52], offset);\n      w[51] = hc_bytealign_be (w[50], w[51], offset);\n      w[50] = hc_bytealign_be (w[49], w[50], offset);\n      w[49] = hc_bytealign_be (w[48], w[49], offset);\n      w[48] = hc_bytealign_be (w[47], w[48], offset);\n      w[47] = hc_bytealign_be (w[46], w[47], offset);\n      w[46] = hc_bytealign_be (w[45], w[46], offset);\n      w[45] = hc_bytealign_be (w[44], w[45], offset);\n      w[44] = hc_bytealign_be (w[43], w[44], offset);\n      w[43] = hc_bytealign_be (w[42], w[43], offset);\n      w[42] = hc_bytealign_be (w[41], w[42], offset);\n      w[41] = hc_bytealign_be (w[40], w[41], offset);\n      w[40] = hc_bytealign_be (w[39], w[40], offset);\n      w[39] = hc_bytealign_be (w[38], w[39], offset);\n      w[38] = hc_bytealign_be (w[37], w[38], offset);\n      w[37] = hc_bytealign_be (w[36], w[37], offset);\n      w[36] = hc_bytealign_be (w[35], w[36], offset);\n      w[35] = hc_bytealign_be (w[34], w[35], offset);\n      w[34] = hc_bytealign_be (w[33], w[34], offset);\n      w[33] = hc_bytealign_be (w[32], w[33], offset);\n      w[32] = hc_bytealign_be (w[31], w[32], offset);\n      w[31] = hc_bytealign_be (w[30], w[31], offset);\n      w[30] = hc_bytealign_be (w[29], w[30], offset);\n      w[29] = hc_bytealign_be (w[28], w[29], offset);\n      w[28] = hc_bytealign_be (w[27], w[28], offset);\n      w[27] = hc_bytealign_be (w[26], w[27], offset);\n      w[26] = hc_bytealign_be (w[25], w[26], offset);\n      w[25] = hc_bytealign_be (w[24], w[25], offset);\n      w[24] = hc_bytealign_be (w[23], w[24], offset);\n      w[23] = hc_bytealign_be (w[22], w[23], offset);\n      w[22] = hc_bytealign_be (w[21], w[22], offset);\n      w[21] = hc_bytealign_be (w[20], w[21], offset);\n      w[20] = hc_bytealign_be (w[19], w[20], offset);\n      w[19] = hc_bytealign_be (w[18], w[19], offset);\n      w[18] = hc_bytealign_be (w[17], w[18], offset);\n      w[17] = hc_bytealign_be (w[16], w[17], offset);\n      w[16] = hc_bytealign_be (w[15], w[16], offset);\n      w[15] = hc_bytealign_be (w[14], w[15], offset);\n      w[14] = hc_bytealign_be (w[13], w[14], offset);\n      w[13] = hc_bytealign_be (w[12], w[13], offset);\n      w[12] = hc_bytealign_be (w[11], w[12], offset);\n      w[11] = hc_bytealign_be (w[10], w[11], offset);\n      w[10] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[ 9] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[ 8] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[ 7] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[ 6] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[ 5] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[ 4] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 3] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 2] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 1] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 0] = hc_bytealign_be (    0, w[ 0], offset);\n\n      break;\n\n    case  1:\n      w[63] = hc_bytealign_be (w[61], w[62], offset);\n      w[62] = hc_bytealign_be (w[60], w[61], offset);\n      w[61] = hc_bytealign_be (w[59], w[60], offset);\n      w[60] = hc_bytealign_be (w[58], w[59], offset);\n      w[59] = hc_bytealign_be (w[57], w[58], offset);\n      w[58] = hc_bytealign_be (w[56], w[57], offset);\n      w[57] = hc_bytealign_be (w[55], w[56], offset);\n      w[56] = hc_bytealign_be (w[54], w[55], offset);\n      w[55] = hc_bytealign_be (w[53], w[54], offset);\n      w[54] = hc_bytealign_be (w[52], w[53], offset);\n      w[53] = hc_bytealign_be (w[51], w[52], offset);\n      w[52] = hc_bytealign_be (w[50], w[51], offset);\n      w[51] = hc_bytealign_be (w[49], w[50], offset);\n      w[50] = hc_bytealign_be (w[48], w[49], offset);\n      w[49] = hc_bytealign_be (w[47], w[48], offset);\n      w[48] = hc_bytealign_be (w[46], w[47], offset);\n      w[47] = hc_bytealign_be (w[45], w[46], offset);\n      w[46] = hc_bytealign_be (w[44], w[45], offset);\n      w[45] = hc_bytealign_be (w[43], w[44], offset);\n      w[44] = hc_bytealign_be (w[42], w[43], offset);\n      w[43] = hc_bytealign_be (w[41], w[42], offset);\n      w[42] = hc_bytealign_be (w[40], w[41], offset);\n      w[41] = hc_bytealign_be (w[39], w[40], offset);\n      w[40] = hc_bytealign_be (w[38], w[39], offset);\n      w[39] = hc_bytealign_be (w[37], w[38], offset);\n      w[38] = hc_bytealign_be (w[36], w[37], offset);\n      w[37] = hc_bytealign_be (w[35], w[36], offset);\n      w[36] = hc_bytealign_be (w[34], w[35], offset);\n      w[35] = hc_bytealign_be (w[33], w[34], offset);\n      w[34] = hc_bytealign_be (w[32], w[33], offset);\n      w[33] = hc_bytealign_be (w[31], w[32], offset);\n      w[32] = hc_bytealign_be (w[30], w[31], offset);\n      w[31] = hc_bytealign_be (w[29], w[30], offset);\n      w[30] = hc_bytealign_be (w[28], w[29], offset);\n      w[29] = hc_bytealign_be (w[27], w[28], offset);\n      w[28] = hc_bytealign_be (w[26], w[27], offset);\n      w[27] = hc_bytealign_be (w[25], w[26], offset);\n      w[26] = hc_bytealign_be (w[24], w[25], offset);\n      w[25] = hc_bytealign_be (w[23], w[24], offset);\n      w[24] = hc_bytealign_be (w[22], w[23], offset);\n      w[23] = hc_bytealign_be (w[21], w[22], offset);\n      w[22] = hc_bytealign_be (w[20], w[21], offset);\n      w[21] = hc_bytealign_be (w[19], w[20], offset);\n      w[20] = hc_bytealign_be (w[18], w[19], offset);\n      w[19] = hc_bytealign_be (w[17], w[18], offset);\n      w[18] = hc_bytealign_be (w[16], w[17], offset);\n      w[17] = hc_bytealign_be (w[15], w[16], offset);\n      w[16] = hc_bytealign_be (w[14], w[15], offset);\n      w[15] = hc_bytealign_be (w[13], w[14], offset);\n      w[14] = hc_bytealign_be (w[12], w[13], offset);\n      w[13] = hc_bytealign_be (w[11], w[12], offset);\n      w[12] = hc_bytealign_be (w[10], w[11], offset);\n      w[11] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[10] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[ 9] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[ 8] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[ 7] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[ 6] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[ 5] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 4] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 3] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 2] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 1] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_bytealign_be (w[60], w[61], offset);\n      w[62] = hc_bytealign_be (w[59], w[60], offset);\n      w[61] = hc_bytealign_be (w[58], w[59], offset);\n      w[60] = hc_bytealign_be (w[57], w[58], offset);\n      w[59] = hc_bytealign_be (w[56], w[57], offset);\n      w[58] = hc_bytealign_be (w[55], w[56], offset);\n      w[57] = hc_bytealign_be (w[54], w[55], offset);\n      w[56] = hc_bytealign_be (w[53], w[54], offset);\n      w[55] = hc_bytealign_be (w[52], w[53], offset);\n      w[54] = hc_bytealign_be (w[51], w[52], offset);\n      w[53] = hc_bytealign_be (w[50], w[51], offset);\n      w[52] = hc_bytealign_be (w[49], w[50], offset);\n      w[51] = hc_bytealign_be (w[48], w[49], offset);\n      w[50] = hc_bytealign_be (w[47], w[48], offset);\n      w[49] = hc_bytealign_be (w[46], w[47], offset);\n      w[48] = hc_bytealign_be (w[45], w[46], offset);\n      w[47] = hc_bytealign_be (w[44], w[45], offset);\n      w[46] = hc_bytealign_be (w[43], w[44], offset);\n      w[45] = hc_bytealign_be (w[42], w[43], offset);\n      w[44] = hc_bytealign_be (w[41], w[42], offset);\n      w[43] = hc_bytealign_be (w[40], w[41], offset);\n      w[42] = hc_bytealign_be (w[39], w[40], offset);\n      w[41] = hc_bytealign_be (w[38], w[39], offset);\n      w[40] = hc_bytealign_be (w[37], w[38], offset);\n      w[39] = hc_bytealign_be (w[36], w[37], offset);\n      w[38] = hc_bytealign_be (w[35], w[36], offset);\n      w[37] = hc_bytealign_be (w[34], w[35], offset);\n      w[36] = hc_bytealign_be (w[33], w[34], offset);\n      w[35] = hc_bytealign_be (w[32], w[33], offset);\n      w[34] = hc_bytealign_be (w[31], w[32], offset);\n      w[33] = hc_bytealign_be (w[30], w[31], offset);\n      w[32] = hc_bytealign_be (w[29], w[30], offset);\n      w[31] = hc_bytealign_be (w[28], w[29], offset);\n      w[30] = hc_bytealign_be (w[27], w[28], offset);\n      w[29] = hc_bytealign_be (w[26], w[27], offset);\n      w[28] = hc_bytealign_be (w[25], w[26], offset);\n      w[27] = hc_bytealign_be (w[24], w[25], offset);\n      w[26] = hc_bytealign_be (w[23], w[24], offset);\n      w[25] = hc_bytealign_be (w[22], w[23], offset);\n      w[24] = hc_bytealign_be (w[21], w[22], offset);\n      w[23] = hc_bytealign_be (w[20], w[21], offset);\n      w[22] = hc_bytealign_be (w[19], w[20], offset);\n      w[21] = hc_bytealign_be (w[18], w[19], offset);\n      w[20] = hc_bytealign_be (w[17], w[18], offset);\n      w[19] = hc_bytealign_be (w[16], w[17], offset);\n      w[18] = hc_bytealign_be (w[15], w[16], offset);\n      w[17] = hc_bytealign_be (w[14], w[15], offset);\n      w[16] = hc_bytealign_be (w[13], w[14], offset);\n      w[15] = hc_bytealign_be (w[12], w[13], offset);\n      w[14] = hc_bytealign_be (w[11], w[12], offset);\n      w[13] = hc_bytealign_be (w[10], w[11], offset);\n      w[12] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[11] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[10] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[ 9] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[ 8] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[ 7] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[ 6] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 5] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 4] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 3] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 2] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_bytealign_be (w[59], w[60], offset);\n      w[62] = hc_bytealign_be (w[58], w[59], offset);\n      w[61] = hc_bytealign_be (w[57], w[58], offset);\n      w[60] = hc_bytealign_be (w[56], w[57], offset);\n      w[59] = hc_bytealign_be (w[55], w[56], offset);\n      w[58] = hc_bytealign_be (w[54], w[55], offset);\n      w[57] = hc_bytealign_be (w[53], w[54], offset);\n      w[56] = hc_bytealign_be (w[52], w[53], offset);\n      w[55] = hc_bytealign_be (w[51], w[52], offset);\n      w[54] = hc_bytealign_be (w[50], w[51], offset);\n      w[53] = hc_bytealign_be (w[49], w[50], offset);\n      w[52] = hc_bytealign_be (w[48], w[49], offset);\n      w[51] = hc_bytealign_be (w[47], w[48], offset);\n      w[50] = hc_bytealign_be (w[46], w[47], offset);\n      w[49] = hc_bytealign_be (w[45], w[46], offset);\n      w[48] = hc_bytealign_be (w[44], w[45], offset);\n      w[47] = hc_bytealign_be (w[43], w[44], offset);\n      w[46] = hc_bytealign_be (w[42], w[43], offset);\n      w[45] = hc_bytealign_be (w[41], w[42], offset);\n      w[44] = hc_bytealign_be (w[40], w[41], offset);\n      w[43] = hc_bytealign_be (w[39], w[40], offset);\n      w[42] = hc_bytealign_be (w[38], w[39], offset);\n      w[41] = hc_bytealign_be (w[37], w[38], offset);\n      w[40] = hc_bytealign_be (w[36], w[37], offset);\n      w[39] = hc_bytealign_be (w[35], w[36], offset);\n      w[38] = hc_bytealign_be (w[34], w[35], offset);\n      w[37] = hc_bytealign_be (w[33], w[34], offset);\n      w[36] = hc_bytealign_be (w[32], w[33], offset);\n      w[35] = hc_bytealign_be (w[31], w[32], offset);\n      w[34] = hc_bytealign_be (w[30], w[31], offset);\n      w[33] = hc_bytealign_be (w[29], w[30], offset);\n      w[32] = hc_bytealign_be (w[28], w[29], offset);\n      w[31] = hc_bytealign_be (w[27], w[28], offset);\n      w[30] = hc_bytealign_be (w[26], w[27], offset);\n      w[29] = hc_bytealign_be (w[25], w[26], offset);\n      w[28] = hc_bytealign_be (w[24], w[25], offset);\n      w[27] = hc_bytealign_be (w[23], w[24], offset);\n      w[26] = hc_bytealign_be (w[22], w[23], offset);\n      w[25] = hc_bytealign_be (w[21], w[22], offset);\n      w[24] = hc_bytealign_be (w[20], w[21], offset);\n      w[23] = hc_bytealign_be (w[19], w[20], offset);\n      w[22] = hc_bytealign_be (w[18], w[19], offset);\n      w[21] = hc_bytealign_be (w[17], w[18], offset);\n      w[20] = hc_bytealign_be (w[16], w[17], offset);\n      w[19] = hc_bytealign_be (w[15], w[16], offset);\n      w[18] = hc_bytealign_be (w[14], w[15], offset);\n      w[17] = hc_bytealign_be (w[13], w[14], offset);\n      w[16] = hc_bytealign_be (w[12], w[13], offset);\n      w[15] = hc_bytealign_be (w[11], w[12], offset);\n      w[14] = hc_bytealign_be (w[10], w[11], offset);\n      w[13] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[12] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[11] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[10] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[ 9] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[ 8] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[ 7] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 6] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 5] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 4] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 3] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_bytealign_be (w[58], w[59], offset);\n      w[62] = hc_bytealign_be (w[57], w[58], offset);\n      w[61] = hc_bytealign_be (w[56], w[57], offset);\n      w[60] = hc_bytealign_be (w[55], w[56], offset);\n      w[59] = hc_bytealign_be (w[54], w[55], offset);\n      w[58] = hc_bytealign_be (w[53], w[54], offset);\n      w[57] = hc_bytealign_be (w[52], w[53], offset);\n      w[56] = hc_bytealign_be (w[51], w[52], offset);\n      w[55] = hc_bytealign_be (w[50], w[51], offset);\n      w[54] = hc_bytealign_be (w[49], w[50], offset);\n      w[53] = hc_bytealign_be (w[48], w[49], offset);\n      w[52] = hc_bytealign_be (w[47], w[48], offset);\n      w[51] = hc_bytealign_be (w[46], w[47], offset);\n      w[50] = hc_bytealign_be (w[45], w[46], offset);\n      w[49] = hc_bytealign_be (w[44], w[45], offset);\n      w[48] = hc_bytealign_be (w[43], w[44], offset);\n      w[47] = hc_bytealign_be (w[42], w[43], offset);\n      w[46] = hc_bytealign_be (w[41], w[42], offset);\n      w[45] = hc_bytealign_be (w[40], w[41], offset);\n      w[44] = hc_bytealign_be (w[39], w[40], offset);\n      w[43] = hc_bytealign_be (w[38], w[39], offset);\n      w[42] = hc_bytealign_be (w[37], w[38], offset);\n      w[41] = hc_bytealign_be (w[36], w[37], offset);\n      w[40] = hc_bytealign_be (w[35], w[36], offset);\n      w[39] = hc_bytealign_be (w[34], w[35], offset);\n      w[38] = hc_bytealign_be (w[33], w[34], offset);\n      w[37] = hc_bytealign_be (w[32], w[33], offset);\n      w[36] = hc_bytealign_be (w[31], w[32], offset);\n      w[35] = hc_bytealign_be (w[30], w[31], offset);\n      w[34] = hc_bytealign_be (w[29], w[30], offset);\n      w[33] = hc_bytealign_be (w[28], w[29], offset);\n      w[32] = hc_bytealign_be (w[27], w[28], offset);\n      w[31] = hc_bytealign_be (w[26], w[27], offset);\n      w[30] = hc_bytealign_be (w[25], w[26], offset);\n      w[29] = hc_bytealign_be (w[24], w[25], offset);\n      w[28] = hc_bytealign_be (w[23], w[24], offset);\n      w[27] = hc_bytealign_be (w[22], w[23], offset);\n      w[26] = hc_bytealign_be (w[21], w[22], offset);\n      w[25] = hc_bytealign_be (w[20], w[21], offset);\n      w[24] = hc_bytealign_be (w[19], w[20], offset);\n      w[23] = hc_bytealign_be (w[18], w[19], offset);\n      w[22] = hc_bytealign_be (w[17], w[18], offset);\n      w[21] = hc_bytealign_be (w[16], w[17], offset);\n      w[20] = hc_bytealign_be (w[15], w[16], offset);\n      w[19] = hc_bytealign_be (w[14], w[15], offset);\n      w[18] = hc_bytealign_be (w[13], w[14], offset);\n      w[17] = hc_bytealign_be (w[12], w[13], offset);\n      w[16] = hc_bytealign_be (w[11], w[12], offset);\n      w[15] = hc_bytealign_be (w[10], w[11], offset);\n      w[14] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[13] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[12] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[11] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[10] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[ 9] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[ 8] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 7] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 6] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 5] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 4] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_bytealign_be (w[57], w[58], offset);\n      w[62] = hc_bytealign_be (w[56], w[57], offset);\n      w[61] = hc_bytealign_be (w[55], w[56], offset);\n      w[60] = hc_bytealign_be (w[54], w[55], offset);\n      w[59] = hc_bytealign_be (w[53], w[54], offset);\n      w[58] = hc_bytealign_be (w[52], w[53], offset);\n      w[57] = hc_bytealign_be (w[51], w[52], offset);\n      w[56] = hc_bytealign_be (w[50], w[51], offset);\n      w[55] = hc_bytealign_be (w[49], w[50], offset);\n      w[54] = hc_bytealign_be (w[48], w[49], offset);\n      w[53] = hc_bytealign_be (w[47], w[48], offset);\n      w[52] = hc_bytealign_be (w[46], w[47], offset);\n      w[51] = hc_bytealign_be (w[45], w[46], offset);\n      w[50] = hc_bytealign_be (w[44], w[45], offset);\n      w[49] = hc_bytealign_be (w[43], w[44], offset);\n      w[48] = hc_bytealign_be (w[42], w[43], offset);\n      w[47] = hc_bytealign_be (w[41], w[42], offset);\n      w[46] = hc_bytealign_be (w[40], w[41], offset);\n      w[45] = hc_bytealign_be (w[39], w[40], offset);\n      w[44] = hc_bytealign_be (w[38], w[39], offset);\n      w[43] = hc_bytealign_be (w[37], w[38], offset);\n      w[42] = hc_bytealign_be (w[36], w[37], offset);\n      w[41] = hc_bytealign_be (w[35], w[36], offset);\n      w[40] = hc_bytealign_be (w[34], w[35], offset);\n      w[39] = hc_bytealign_be (w[33], w[34], offset);\n      w[38] = hc_bytealign_be (w[32], w[33], offset);\n      w[37] = hc_bytealign_be (w[31], w[32], offset);\n      w[36] = hc_bytealign_be (w[30], w[31], offset);\n      w[35] = hc_bytealign_be (w[29], w[30], offset);\n      w[34] = hc_bytealign_be (w[28], w[29], offset);\n      w[33] = hc_bytealign_be (w[27], w[28], offset);\n      w[32] = hc_bytealign_be (w[26], w[27], offset);\n      w[31] = hc_bytealign_be (w[25], w[26], offset);\n      w[30] = hc_bytealign_be (w[24], w[25], offset);\n      w[29] = hc_bytealign_be (w[23], w[24], offset);\n      w[28] = hc_bytealign_be (w[22], w[23], offset);\n      w[27] = hc_bytealign_be (w[21], w[22], offset);\n      w[26] = hc_bytealign_be (w[20], w[21], offset);\n      w[25] = hc_bytealign_be (w[19], w[20], offset);\n      w[24] = hc_bytealign_be (w[18], w[19], offset);\n      w[23] = hc_bytealign_be (w[17], w[18], offset);\n      w[22] = hc_bytealign_be (w[16], w[17], offset);\n      w[21] = hc_bytealign_be (w[15], w[16], offset);\n      w[20] = hc_bytealign_be (w[14], w[15], offset);\n      w[19] = hc_bytealign_be (w[13], w[14], offset);\n      w[18] = hc_bytealign_be (w[12], w[13], offset);\n      w[17] = hc_bytealign_be (w[11], w[12], offset);\n      w[16] = hc_bytealign_be (w[10], w[11], offset);\n      w[15] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[14] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[13] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[12] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[11] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[10] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[ 9] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 8] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 7] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 6] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 5] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_bytealign_be (w[56], w[57], offset);\n      w[62] = hc_bytealign_be (w[55], w[56], offset);\n      w[61] = hc_bytealign_be (w[54], w[55], offset);\n      w[60] = hc_bytealign_be (w[53], w[54], offset);\n      w[59] = hc_bytealign_be (w[52], w[53], offset);\n      w[58] = hc_bytealign_be (w[51], w[52], offset);\n      w[57] = hc_bytealign_be (w[50], w[51], offset);\n      w[56] = hc_bytealign_be (w[49], w[50], offset);\n      w[55] = hc_bytealign_be (w[48], w[49], offset);\n      w[54] = hc_bytealign_be (w[47], w[48], offset);\n      w[53] = hc_bytealign_be (w[46], w[47], offset);\n      w[52] = hc_bytealign_be (w[45], w[46], offset);\n      w[51] = hc_bytealign_be (w[44], w[45], offset);\n      w[50] = hc_bytealign_be (w[43], w[44], offset);\n      w[49] = hc_bytealign_be (w[42], w[43], offset);\n      w[48] = hc_bytealign_be (w[41], w[42], offset);\n      w[47] = hc_bytealign_be (w[40], w[41], offset);\n      w[46] = hc_bytealign_be (w[39], w[40], offset);\n      w[45] = hc_bytealign_be (w[38], w[39], offset);\n      w[44] = hc_bytealign_be (w[37], w[38], offset);\n      w[43] = hc_bytealign_be (w[36], w[37], offset);\n      w[42] = hc_bytealign_be (w[35], w[36], offset);\n      w[41] = hc_bytealign_be (w[34], w[35], offset);\n      w[40] = hc_bytealign_be (w[33], w[34], offset);\n      w[39] = hc_bytealign_be (w[32], w[33], offset);\n      w[38] = hc_bytealign_be (w[31], w[32], offset);\n      w[37] = hc_bytealign_be (w[30], w[31], offset);\n      w[36] = hc_bytealign_be (w[29], w[30], offset);\n      w[35] = hc_bytealign_be (w[28], w[29], offset);\n      w[34] = hc_bytealign_be (w[27], w[28], offset);\n      w[33] = hc_bytealign_be (w[26], w[27], offset);\n      w[32] = hc_bytealign_be (w[25], w[26], offset);\n      w[31] = hc_bytealign_be (w[24], w[25], offset);\n      w[30] = hc_bytealign_be (w[23], w[24], offset);\n      w[29] = hc_bytealign_be (w[22], w[23], offset);\n      w[28] = hc_bytealign_be (w[21], w[22], offset);\n      w[27] = hc_bytealign_be (w[20], w[21], offset);\n      w[26] = hc_bytealign_be (w[19], w[20], offset);\n      w[25] = hc_bytealign_be (w[18], w[19], offset);\n      w[24] = hc_bytealign_be (w[17], w[18], offset);\n      w[23] = hc_bytealign_be (w[16], w[17], offset);\n      w[22] = hc_bytealign_be (w[15], w[16], offset);\n      w[21] = hc_bytealign_be (w[14], w[15], offset);\n      w[20] = hc_bytealign_be (w[13], w[14], offset);\n      w[19] = hc_bytealign_be (w[12], w[13], offset);\n      w[18] = hc_bytealign_be (w[11], w[12], offset);\n      w[17] = hc_bytealign_be (w[10], w[11], offset);\n      w[16] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[15] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[14] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[13] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[12] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[11] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[10] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[ 9] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 8] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 7] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 6] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_bytealign_be (w[55], w[56], offset);\n      w[62] = hc_bytealign_be (w[54], w[55], offset);\n      w[61] = hc_bytealign_be (w[53], w[54], offset);\n      w[60] = hc_bytealign_be (w[52], w[53], offset);\n      w[59] = hc_bytealign_be (w[51], w[52], offset);\n      w[58] = hc_bytealign_be (w[50], w[51], offset);\n      w[57] = hc_bytealign_be (w[49], w[50], offset);\n      w[56] = hc_bytealign_be (w[48], w[49], offset);\n      w[55] = hc_bytealign_be (w[47], w[48], offset);\n      w[54] = hc_bytealign_be (w[46], w[47], offset);\n      w[53] = hc_bytealign_be (w[45], w[46], offset);\n      w[52] = hc_bytealign_be (w[44], w[45], offset);\n      w[51] = hc_bytealign_be (w[43], w[44], offset);\n      w[50] = hc_bytealign_be (w[42], w[43], offset);\n      w[49] = hc_bytealign_be (w[41], w[42], offset);\n      w[48] = hc_bytealign_be (w[40], w[41], offset);\n      w[47] = hc_bytealign_be (w[39], w[40], offset);\n      w[46] = hc_bytealign_be (w[38], w[39], offset);\n      w[45] = hc_bytealign_be (w[37], w[38], offset);\n      w[44] = hc_bytealign_be (w[36], w[37], offset);\n      w[43] = hc_bytealign_be (w[35], w[36], offset);\n      w[42] = hc_bytealign_be (w[34], w[35], offset);\n      w[41] = hc_bytealign_be (w[33], w[34], offset);\n      w[40] = hc_bytealign_be (w[32], w[33], offset);\n      w[39] = hc_bytealign_be (w[31], w[32], offset);\n      w[38] = hc_bytealign_be (w[30], w[31], offset);\n      w[37] = hc_bytealign_be (w[29], w[30], offset);\n      w[36] = hc_bytealign_be (w[28], w[29], offset);\n      w[35] = hc_bytealign_be (w[27], w[28], offset);\n      w[34] = hc_bytealign_be (w[26], w[27], offset);\n      w[33] = hc_bytealign_be (w[25], w[26], offset);\n      w[32] = hc_bytealign_be (w[24], w[25], offset);\n      w[31] = hc_bytealign_be (w[23], w[24], offset);\n      w[30] = hc_bytealign_be (w[22], w[23], offset);\n      w[29] = hc_bytealign_be (w[21], w[22], offset);\n      w[28] = hc_bytealign_be (w[20], w[21], offset);\n      w[27] = hc_bytealign_be (w[19], w[20], offset);\n      w[26] = hc_bytealign_be (w[18], w[19], offset);\n      w[25] = hc_bytealign_be (w[17], w[18], offset);\n      w[24] = hc_bytealign_be (w[16], w[17], offset);\n      w[23] = hc_bytealign_be (w[15], w[16], offset);\n      w[22] = hc_bytealign_be (w[14], w[15], offset);\n      w[21] = hc_bytealign_be (w[13], w[14], offset);\n      w[20] = hc_bytealign_be (w[12], w[13], offset);\n      w[19] = hc_bytealign_be (w[11], w[12], offset);\n      w[18] = hc_bytealign_be (w[10], w[11], offset);\n      w[17] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[16] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[15] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[14] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[13] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[12] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[11] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[10] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[ 9] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 8] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 7] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_bytealign_be (w[54], w[55], offset);\n      w[62] = hc_bytealign_be (w[53], w[54], offset);\n      w[61] = hc_bytealign_be (w[52], w[53], offset);\n      w[60] = hc_bytealign_be (w[51], w[52], offset);\n      w[59] = hc_bytealign_be (w[50], w[51], offset);\n      w[58] = hc_bytealign_be (w[49], w[50], offset);\n      w[57] = hc_bytealign_be (w[48], w[49], offset);\n      w[56] = hc_bytealign_be (w[47], w[48], offset);\n      w[55] = hc_bytealign_be (w[46], w[47], offset);\n      w[54] = hc_bytealign_be (w[45], w[46], offset);\n      w[53] = hc_bytealign_be (w[44], w[45], offset);\n      w[52] = hc_bytealign_be (w[43], w[44], offset);\n      w[51] = hc_bytealign_be (w[42], w[43], offset);\n      w[50] = hc_bytealign_be (w[41], w[42], offset);\n      w[49] = hc_bytealign_be (w[40], w[41], offset);\n      w[48] = hc_bytealign_be (w[39], w[40], offset);\n      w[47] = hc_bytealign_be (w[38], w[39], offset);\n      w[46] = hc_bytealign_be (w[37], w[38], offset);\n      w[45] = hc_bytealign_be (w[36], w[37], offset);\n      w[44] = hc_bytealign_be (w[35], w[36], offset);\n      w[43] = hc_bytealign_be (w[34], w[35], offset);\n      w[42] = hc_bytealign_be (w[33], w[34], offset);\n      w[41] = hc_bytealign_be (w[32], w[33], offset);\n      w[40] = hc_bytealign_be (w[31], w[32], offset);\n      w[39] = hc_bytealign_be (w[30], w[31], offset);\n      w[38] = hc_bytealign_be (w[29], w[30], offset);\n      w[37] = hc_bytealign_be (w[28], w[29], offset);\n      w[36] = hc_bytealign_be (w[27], w[28], offset);\n      w[35] = hc_bytealign_be (w[26], w[27], offset);\n      w[34] = hc_bytealign_be (w[25], w[26], offset);\n      w[33] = hc_bytealign_be (w[24], w[25], offset);\n      w[32] = hc_bytealign_be (w[23], w[24], offset);\n      w[31] = hc_bytealign_be (w[22], w[23], offset);\n      w[30] = hc_bytealign_be (w[21], w[22], offset);\n      w[29] = hc_bytealign_be (w[20], w[21], offset);\n      w[28] = hc_bytealign_be (w[19], w[20], offset);\n      w[27] = hc_bytealign_be (w[18], w[19], offset);\n      w[26] = hc_bytealign_be (w[17], w[18], offset);\n      w[25] = hc_bytealign_be (w[16], w[17], offset);\n      w[24] = hc_bytealign_be (w[15], w[16], offset);\n      w[23] = hc_bytealign_be (w[14], w[15], offset);\n      w[22] = hc_bytealign_be (w[13], w[14], offset);\n      w[21] = hc_bytealign_be (w[12], w[13], offset);\n      w[20] = hc_bytealign_be (w[11], w[12], offset);\n      w[19] = hc_bytealign_be (w[10], w[11], offset);\n      w[18] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[17] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[16] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[15] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[14] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[13] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[12] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[11] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[10] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[ 9] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 8] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_bytealign_be (w[53], w[54], offset);\n      w[62] = hc_bytealign_be (w[52], w[53], offset);\n      w[61] = hc_bytealign_be (w[51], w[52], offset);\n      w[60] = hc_bytealign_be (w[50], w[51], offset);\n      w[59] = hc_bytealign_be (w[49], w[50], offset);\n      w[58] = hc_bytealign_be (w[48], w[49], offset);\n      w[57] = hc_bytealign_be (w[47], w[48], offset);\n      w[56] = hc_bytealign_be (w[46], w[47], offset);\n      w[55] = hc_bytealign_be (w[45], w[46], offset);\n      w[54] = hc_bytealign_be (w[44], w[45], offset);\n      w[53] = hc_bytealign_be (w[43], w[44], offset);\n      w[52] = hc_bytealign_be (w[42], w[43], offset);\n      w[51] = hc_bytealign_be (w[41], w[42], offset);\n      w[50] = hc_bytealign_be (w[40], w[41], offset);\n      w[49] = hc_bytealign_be (w[39], w[40], offset);\n      w[48] = hc_bytealign_be (w[38], w[39], offset);\n      w[47] = hc_bytealign_be (w[37], w[38], offset);\n      w[46] = hc_bytealign_be (w[36], w[37], offset);\n      w[45] = hc_bytealign_be (w[35], w[36], offset);\n      w[44] = hc_bytealign_be (w[34], w[35], offset);\n      w[43] = hc_bytealign_be (w[33], w[34], offset);\n      w[42] = hc_bytealign_be (w[32], w[33], offset);\n      w[41] = hc_bytealign_be (w[31], w[32], offset);\n      w[40] = hc_bytealign_be (w[30], w[31], offset);\n      w[39] = hc_bytealign_be (w[29], w[30], offset);\n      w[38] = hc_bytealign_be (w[28], w[29], offset);\n      w[37] = hc_bytealign_be (w[27], w[28], offset);\n      w[36] = hc_bytealign_be (w[26], w[27], offset);\n      w[35] = hc_bytealign_be (w[25], w[26], offset);\n      w[34] = hc_bytealign_be (w[24], w[25], offset);\n      w[33] = hc_bytealign_be (w[23], w[24], offset);\n      w[32] = hc_bytealign_be (w[22], w[23], offset);\n      w[31] = hc_bytealign_be (w[21], w[22], offset);\n      w[30] = hc_bytealign_be (w[20], w[21], offset);\n      w[29] = hc_bytealign_be (w[19], w[20], offset);\n      w[28] = hc_bytealign_be (w[18], w[19], offset);\n      w[27] = hc_bytealign_be (w[17], w[18], offset);\n      w[26] = hc_bytealign_be (w[16], w[17], offset);\n      w[25] = hc_bytealign_be (w[15], w[16], offset);\n      w[24] = hc_bytealign_be (w[14], w[15], offset);\n      w[23] = hc_bytealign_be (w[13], w[14], offset);\n      w[22] = hc_bytealign_be (w[12], w[13], offset);\n      w[21] = hc_bytealign_be (w[11], w[12], offset);\n      w[20] = hc_bytealign_be (w[10], w[11], offset);\n      w[19] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[18] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[17] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[16] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[15] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[14] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[13] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[12] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[11] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[10] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[ 9] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_bytealign_be (w[52], w[53], offset);\n      w[62] = hc_bytealign_be (w[51], w[52], offset);\n      w[61] = hc_bytealign_be (w[50], w[51], offset);\n      w[60] = hc_bytealign_be (w[49], w[50], offset);\n      w[59] = hc_bytealign_be (w[48], w[49], offset);\n      w[58] = hc_bytealign_be (w[47], w[48], offset);\n      w[57] = hc_bytealign_be (w[46], w[47], offset);\n      w[56] = hc_bytealign_be (w[45], w[46], offset);\n      w[55] = hc_bytealign_be (w[44], w[45], offset);\n      w[54] = hc_bytealign_be (w[43], w[44], offset);\n      w[53] = hc_bytealign_be (w[42], w[43], offset);\n      w[52] = hc_bytealign_be (w[41], w[42], offset);\n      w[51] = hc_bytealign_be (w[40], w[41], offset);\n      w[50] = hc_bytealign_be (w[39], w[40], offset);\n      w[49] = hc_bytealign_be (w[38], w[39], offset);\n      w[48] = hc_bytealign_be (w[37], w[38], offset);\n      w[47] = hc_bytealign_be (w[36], w[37], offset);\n      w[46] = hc_bytealign_be (w[35], w[36], offset);\n      w[45] = hc_bytealign_be (w[34], w[35], offset);\n      w[44] = hc_bytealign_be (w[33], w[34], offset);\n      w[43] = hc_bytealign_be (w[32], w[33], offset);\n      w[42] = hc_bytealign_be (w[31], w[32], offset);\n      w[41] = hc_bytealign_be (w[30], w[31], offset);\n      w[40] = hc_bytealign_be (w[29], w[30], offset);\n      w[39] = hc_bytealign_be (w[28], w[29], offset);\n      w[38] = hc_bytealign_be (w[27], w[28], offset);\n      w[37] = hc_bytealign_be (w[26], w[27], offset);\n      w[36] = hc_bytealign_be (w[25], w[26], offset);\n      w[35] = hc_bytealign_be (w[24], w[25], offset);\n      w[34] = hc_bytealign_be (w[23], w[24], offset);\n      w[33] = hc_bytealign_be (w[22], w[23], offset);\n      w[32] = hc_bytealign_be (w[21], w[22], offset);\n      w[31] = hc_bytealign_be (w[20], w[21], offset);\n      w[30] = hc_bytealign_be (w[19], w[20], offset);\n      w[29] = hc_bytealign_be (w[18], w[19], offset);\n      w[28] = hc_bytealign_be (w[17], w[18], offset);\n      w[27] = hc_bytealign_be (w[16], w[17], offset);\n      w[26] = hc_bytealign_be (w[15], w[16], offset);\n      w[25] = hc_bytealign_be (w[14], w[15], offset);\n      w[24] = hc_bytealign_be (w[13], w[14], offset);\n      w[23] = hc_bytealign_be (w[12], w[13], offset);\n      w[22] = hc_bytealign_be (w[11], w[12], offset);\n      w[21] = hc_bytealign_be (w[10], w[11], offset);\n      w[20] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[19] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[18] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[17] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[16] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[15] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[14] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[13] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[12] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[11] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[10] = hc_bytealign_be (    0, w[ 0], offset);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_bytealign_be (w[51], w[52], offset);\n      w[62] = hc_bytealign_be (w[50], w[51], offset);\n      w[61] = hc_bytealign_be (w[49], w[50], offset);\n      w[60] = hc_bytealign_be (w[48], w[49], offset);\n      w[59] = hc_bytealign_be (w[47], w[48], offset);\n      w[58] = hc_bytealign_be (w[46], w[47], offset);\n      w[57] = hc_bytealign_be (w[45], w[46], offset);\n      w[56] = hc_bytealign_be (w[44], w[45], offset);\n      w[55] = hc_bytealign_be (w[43], w[44], offset);\n      w[54] = hc_bytealign_be (w[42], w[43], offset);\n      w[53] = hc_bytealign_be (w[41], w[42], offset);\n      w[52] = hc_bytealign_be (w[40], w[41], offset);\n      w[51] = hc_bytealign_be (w[39], w[40], offset);\n      w[50] = hc_bytealign_be (w[38], w[39], offset);\n      w[49] = hc_bytealign_be (w[37], w[38], offset);\n      w[48] = hc_bytealign_be (w[36], w[37], offset);\n      w[47] = hc_bytealign_be (w[35], w[36], offset);\n      w[46] = hc_bytealign_be (w[34], w[35], offset);\n      w[45] = hc_bytealign_be (w[33], w[34], offset);\n      w[44] = hc_bytealign_be (w[32], w[33], offset);\n      w[43] = hc_bytealign_be (w[31], w[32], offset);\n      w[42] = hc_bytealign_be (w[30], w[31], offset);\n      w[41] = hc_bytealign_be (w[29], w[30], offset);\n      w[40] = hc_bytealign_be (w[28], w[29], offset);\n      w[39] = hc_bytealign_be (w[27], w[28], offset);\n      w[38] = hc_bytealign_be (w[26], w[27], offset);\n      w[37] = hc_bytealign_be (w[25], w[26], offset);\n      w[36] = hc_bytealign_be (w[24], w[25], offset);\n      w[35] = hc_bytealign_be (w[23], w[24], offset);\n      w[34] = hc_bytealign_be (w[22], w[23], offset);\n      w[33] = hc_bytealign_be (w[21], w[22], offset);\n      w[32] = hc_bytealign_be (w[20], w[21], offset);\n      w[31] = hc_bytealign_be (w[19], w[20], offset);\n      w[30] = hc_bytealign_be (w[18], w[19], offset);\n      w[29] = hc_bytealign_be (w[17], w[18], offset);\n      w[28] = hc_bytealign_be (w[16], w[17], offset);\n      w[27] = hc_bytealign_be (w[15], w[16], offset);\n      w[26] = hc_bytealign_be (w[14], w[15], offset);\n      w[25] = hc_bytealign_be (w[13], w[14], offset);\n      w[24] = hc_bytealign_be (w[12], w[13], offset);\n      w[23] = hc_bytealign_be (w[11], w[12], offset);\n      w[22] = hc_bytealign_be (w[10], w[11], offset);\n      w[21] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[20] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[19] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[18] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[17] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[16] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[15] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[14] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[13] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[12] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[11] = hc_bytealign_be (    0, w[ 0], offset);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_bytealign_be (w[50], w[51], offset);\n      w[62] = hc_bytealign_be (w[49], w[50], offset);\n      w[61] = hc_bytealign_be (w[48], w[49], offset);\n      w[60] = hc_bytealign_be (w[47], w[48], offset);\n      w[59] = hc_bytealign_be (w[46], w[47], offset);\n      w[58] = hc_bytealign_be (w[45], w[46], offset);\n      w[57] = hc_bytealign_be (w[44], w[45], offset);\n      w[56] = hc_bytealign_be (w[43], w[44], offset);\n      w[55] = hc_bytealign_be (w[42], w[43], offset);\n      w[54] = hc_bytealign_be (w[41], w[42], offset);\n      w[53] = hc_bytealign_be (w[40], w[41], offset);\n      w[52] = hc_bytealign_be (w[39], w[40], offset);\n      w[51] = hc_bytealign_be (w[38], w[39], offset);\n      w[50] = hc_bytealign_be (w[37], w[38], offset);\n      w[49] = hc_bytealign_be (w[36], w[37], offset);\n      w[48] = hc_bytealign_be (w[35], w[36], offset);\n      w[47] = hc_bytealign_be (w[34], w[35], offset);\n      w[46] = hc_bytealign_be (w[33], w[34], offset);\n      w[45] = hc_bytealign_be (w[32], w[33], offset);\n      w[44] = hc_bytealign_be (w[31], w[32], offset);\n      w[43] = hc_bytealign_be (w[30], w[31], offset);\n      w[42] = hc_bytealign_be (w[29], w[30], offset);\n      w[41] = hc_bytealign_be (w[28], w[29], offset);\n      w[40] = hc_bytealign_be (w[27], w[28], offset);\n      w[39] = hc_bytealign_be (w[26], w[27], offset);\n      w[38] = hc_bytealign_be (w[25], w[26], offset);\n      w[37] = hc_bytealign_be (w[24], w[25], offset);\n      w[36] = hc_bytealign_be (w[23], w[24], offset);\n      w[35] = hc_bytealign_be (w[22], w[23], offset);\n      w[34] = hc_bytealign_be (w[21], w[22], offset);\n      w[33] = hc_bytealign_be (w[20], w[21], offset);\n      w[32] = hc_bytealign_be (w[19], w[20], offset);\n      w[31] = hc_bytealign_be (w[18], w[19], offset);\n      w[30] = hc_bytealign_be (w[17], w[18], offset);\n      w[29] = hc_bytealign_be (w[16], w[17], offset);\n      w[28] = hc_bytealign_be (w[15], w[16], offset);\n      w[27] = hc_bytealign_be (w[14], w[15], offset);\n      w[26] = hc_bytealign_be (w[13], w[14], offset);\n      w[25] = hc_bytealign_be (w[12], w[13], offset);\n      w[24] = hc_bytealign_be (w[11], w[12], offset);\n      w[23] = hc_bytealign_be (w[10], w[11], offset);\n      w[22] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[21] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[20] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[19] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[18] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[17] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[16] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[15] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[14] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[13] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[12] = hc_bytealign_be (    0, w[ 0], offset);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_bytealign_be (w[49], w[50], offset);\n      w[62] = hc_bytealign_be (w[48], w[49], offset);\n      w[61] = hc_bytealign_be (w[47], w[48], offset);\n      w[60] = hc_bytealign_be (w[46], w[47], offset);\n      w[59] = hc_bytealign_be (w[45], w[46], offset);\n      w[58] = hc_bytealign_be (w[44], w[45], offset);\n      w[57] = hc_bytealign_be (w[43], w[44], offset);\n      w[56] = hc_bytealign_be (w[42], w[43], offset);\n      w[55] = hc_bytealign_be (w[41], w[42], offset);\n      w[54] = hc_bytealign_be (w[40], w[41], offset);\n      w[53] = hc_bytealign_be (w[39], w[40], offset);\n      w[52] = hc_bytealign_be (w[38], w[39], offset);\n      w[51] = hc_bytealign_be (w[37], w[38], offset);\n      w[50] = hc_bytealign_be (w[36], w[37], offset);\n      w[49] = hc_bytealign_be (w[35], w[36], offset);\n      w[48] = hc_bytealign_be (w[34], w[35], offset);\n      w[47] = hc_bytealign_be (w[33], w[34], offset);\n      w[46] = hc_bytealign_be (w[32], w[33], offset);\n      w[45] = hc_bytealign_be (w[31], w[32], offset);\n      w[44] = hc_bytealign_be (w[30], w[31], offset);\n      w[43] = hc_bytealign_be (w[29], w[30], offset);\n      w[42] = hc_bytealign_be (w[28], w[29], offset);\n      w[41] = hc_bytealign_be (w[27], w[28], offset);\n      w[40] = hc_bytealign_be (w[26], w[27], offset);\n      w[39] = hc_bytealign_be (w[25], w[26], offset);\n      w[38] = hc_bytealign_be (w[24], w[25], offset);\n      w[37] = hc_bytealign_be (w[23], w[24], offset);\n      w[36] = hc_bytealign_be (w[22], w[23], offset);\n      w[35] = hc_bytealign_be (w[21], w[22], offset);\n      w[34] = hc_bytealign_be (w[20], w[21], offset);\n      w[33] = hc_bytealign_be (w[19], w[20], offset);\n      w[32] = hc_bytealign_be (w[18], w[19], offset);\n      w[31] = hc_bytealign_be (w[17], w[18], offset);\n      w[30] = hc_bytealign_be (w[16], w[17], offset);\n      w[29] = hc_bytealign_be (w[15], w[16], offset);\n      w[28] = hc_bytealign_be (w[14], w[15], offset);\n      w[27] = hc_bytealign_be (w[13], w[14], offset);\n      w[26] = hc_bytealign_be (w[12], w[13], offset);\n      w[25] = hc_bytealign_be (w[11], w[12], offset);\n      w[24] = hc_bytealign_be (w[10], w[11], offset);\n      w[23] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[22] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[21] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[20] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[19] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[18] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[17] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[16] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[15] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[14] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[13] = hc_bytealign_be (    0, w[ 0], offset);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_bytealign_be (w[48], w[49], offset);\n      w[62] = hc_bytealign_be (w[47], w[48], offset);\n      w[61] = hc_bytealign_be (w[46], w[47], offset);\n      w[60] = hc_bytealign_be (w[45], w[46], offset);\n      w[59] = hc_bytealign_be (w[44], w[45], offset);\n      w[58] = hc_bytealign_be (w[43], w[44], offset);\n      w[57] = hc_bytealign_be (w[42], w[43], offset);\n      w[56] = hc_bytealign_be (w[41], w[42], offset);\n      w[55] = hc_bytealign_be (w[40], w[41], offset);\n      w[54] = hc_bytealign_be (w[39], w[40], offset);\n      w[53] = hc_bytealign_be (w[38], w[39], offset);\n      w[52] = hc_bytealign_be (w[37], w[38], offset);\n      w[51] = hc_bytealign_be (w[36], w[37], offset);\n      w[50] = hc_bytealign_be (w[35], w[36], offset);\n      w[49] = hc_bytealign_be (w[34], w[35], offset);\n      w[48] = hc_bytealign_be (w[33], w[34], offset);\n      w[47] = hc_bytealign_be (w[32], w[33], offset);\n      w[46] = hc_bytealign_be (w[31], w[32], offset);\n      w[45] = hc_bytealign_be (w[30], w[31], offset);\n      w[44] = hc_bytealign_be (w[29], w[30], offset);\n      w[43] = hc_bytealign_be (w[28], w[29], offset);\n      w[42] = hc_bytealign_be (w[27], w[28], offset);\n      w[41] = hc_bytealign_be (w[26], w[27], offset);\n      w[40] = hc_bytealign_be (w[25], w[26], offset);\n      w[39] = hc_bytealign_be (w[24], w[25], offset);\n      w[38] = hc_bytealign_be (w[23], w[24], offset);\n      w[37] = hc_bytealign_be (w[22], w[23], offset);\n      w[36] = hc_bytealign_be (w[21], w[22], offset);\n      w[35] = hc_bytealign_be (w[20], w[21], offset);\n      w[34] = hc_bytealign_be (w[19], w[20], offset);\n      w[33] = hc_bytealign_be (w[18], w[19], offset);\n      w[32] = hc_bytealign_be (w[17], w[18], offset);\n      w[31] = hc_bytealign_be (w[16], w[17], offset);\n      w[30] = hc_bytealign_be (w[15], w[16], offset);\n      w[29] = hc_bytealign_be (w[14], w[15], offset);\n      w[28] = hc_bytealign_be (w[13], w[14], offset);\n      w[27] = hc_bytealign_be (w[12], w[13], offset);\n      w[26] = hc_bytealign_be (w[11], w[12], offset);\n      w[25] = hc_bytealign_be (w[10], w[11], offset);\n      w[24] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[23] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[22] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[21] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[20] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[19] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[18] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[17] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[16] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[15] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[14] = hc_bytealign_be (    0, w[ 0], offset);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_bytealign_be (w[47], w[48], offset);\n      w[62] = hc_bytealign_be (w[46], w[47], offset);\n      w[61] = hc_bytealign_be (w[45], w[46], offset);\n      w[60] = hc_bytealign_be (w[44], w[45], offset);\n      w[59] = hc_bytealign_be (w[43], w[44], offset);\n      w[58] = hc_bytealign_be (w[42], w[43], offset);\n      w[57] = hc_bytealign_be (w[41], w[42], offset);\n      w[56] = hc_bytealign_be (w[40], w[41], offset);\n      w[55] = hc_bytealign_be (w[39], w[40], offset);\n      w[54] = hc_bytealign_be (w[38], w[39], offset);\n      w[53] = hc_bytealign_be (w[37], w[38], offset);\n      w[52] = hc_bytealign_be (w[36], w[37], offset);\n      w[51] = hc_bytealign_be (w[35], w[36], offset);\n      w[50] = hc_bytealign_be (w[34], w[35], offset);\n      w[49] = hc_bytealign_be (w[33], w[34], offset);\n      w[48] = hc_bytealign_be (w[32], w[33], offset);\n      w[47] = hc_bytealign_be (w[31], w[32], offset);\n      w[46] = hc_bytealign_be (w[30], w[31], offset);\n      w[45] = hc_bytealign_be (w[29], w[30], offset);\n      w[44] = hc_bytealign_be (w[28], w[29], offset);\n      w[43] = hc_bytealign_be (w[27], w[28], offset);\n      w[42] = hc_bytealign_be (w[26], w[27], offset);\n      w[41] = hc_bytealign_be (w[25], w[26], offset);\n      w[40] = hc_bytealign_be (w[24], w[25], offset);\n      w[39] = hc_bytealign_be (w[23], w[24], offset);\n      w[38] = hc_bytealign_be (w[22], w[23], offset);\n      w[37] = hc_bytealign_be (w[21], w[22], offset);\n      w[36] = hc_bytealign_be (w[20], w[21], offset);\n      w[35] = hc_bytealign_be (w[19], w[20], offset);\n      w[34] = hc_bytealign_be (w[18], w[19], offset);\n      w[33] = hc_bytealign_be (w[17], w[18], offset);\n      w[32] = hc_bytealign_be (w[16], w[17], offset);\n      w[31] = hc_bytealign_be (w[15], w[16], offset);\n      w[30] = hc_bytealign_be (w[14], w[15], offset);\n      w[29] = hc_bytealign_be (w[13], w[14], offset);\n      w[28] = hc_bytealign_be (w[12], w[13], offset);\n      w[27] = hc_bytealign_be (w[11], w[12], offset);\n      w[26] = hc_bytealign_be (w[10], w[11], offset);\n      w[25] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[24] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[23] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[22] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[21] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[20] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[19] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[18] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[17] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[16] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[15] = hc_bytealign_be (    0, w[ 0], offset);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_bytealign_be (w[46], w[47], offset);\n      w[62] = hc_bytealign_be (w[45], w[46], offset);\n      w[61] = hc_bytealign_be (w[44], w[45], offset);\n      w[60] = hc_bytealign_be (w[43], w[44], offset);\n      w[59] = hc_bytealign_be (w[42], w[43], offset);\n      w[58] = hc_bytealign_be (w[41], w[42], offset);\n      w[57] = hc_bytealign_be (w[40], w[41], offset);\n      w[56] = hc_bytealign_be (w[39], w[40], offset);\n      w[55] = hc_bytealign_be (w[38], w[39], offset);\n      w[54] = hc_bytealign_be (w[37], w[38], offset);\n      w[53] = hc_bytealign_be (w[36], w[37], offset);\n      w[52] = hc_bytealign_be (w[35], w[36], offset);\n      w[51] = hc_bytealign_be (w[34], w[35], offset);\n      w[50] = hc_bytealign_be (w[33], w[34], offset);\n      w[49] = hc_bytealign_be (w[32], w[33], offset);\n      w[48] = hc_bytealign_be (w[31], w[32], offset);\n      w[47] = hc_bytealign_be (w[30], w[31], offset);\n      w[46] = hc_bytealign_be (w[29], w[30], offset);\n      w[45] = hc_bytealign_be (w[28], w[29], offset);\n      w[44] = hc_bytealign_be (w[27], w[28], offset);\n      w[43] = hc_bytealign_be (w[26], w[27], offset);\n      w[42] = hc_bytealign_be (w[25], w[26], offset);\n      w[41] = hc_bytealign_be (w[24], w[25], offset);\n      w[40] = hc_bytealign_be (w[23], w[24], offset);\n      w[39] = hc_bytealign_be (w[22], w[23], offset);\n      w[38] = hc_bytealign_be (w[21], w[22], offset);\n      w[37] = hc_bytealign_be (w[20], w[21], offset);\n      w[36] = hc_bytealign_be (w[19], w[20], offset);\n      w[35] = hc_bytealign_be (w[18], w[19], offset);\n      w[34] = hc_bytealign_be (w[17], w[18], offset);\n      w[33] = hc_bytealign_be (w[16], w[17], offset);\n      w[32] = hc_bytealign_be (w[15], w[16], offset);\n      w[31] = hc_bytealign_be (w[14], w[15], offset);\n      w[30] = hc_bytealign_be (w[13], w[14], offset);\n      w[29] = hc_bytealign_be (w[12], w[13], offset);\n      w[28] = hc_bytealign_be (w[11], w[12], offset);\n      w[27] = hc_bytealign_be (w[10], w[11], offset);\n      w[26] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[25] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[24] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[23] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[22] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[21] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[20] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[19] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[18] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[17] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[16] = hc_bytealign_be (    0, w[ 0], offset);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_bytealign_be (w[45], w[46], offset);\n      w[62] = hc_bytealign_be (w[44], w[45], offset);\n      w[61] = hc_bytealign_be (w[43], w[44], offset);\n      w[60] = hc_bytealign_be (w[42], w[43], offset);\n      w[59] = hc_bytealign_be (w[41], w[42], offset);\n      w[58] = hc_bytealign_be (w[40], w[41], offset);\n      w[57] = hc_bytealign_be (w[39], w[40], offset);\n      w[56] = hc_bytealign_be (w[38], w[39], offset);\n      w[55] = hc_bytealign_be (w[37], w[38], offset);\n      w[54] = hc_bytealign_be (w[36], w[37], offset);\n      w[53] = hc_bytealign_be (w[35], w[36], offset);\n      w[52] = hc_bytealign_be (w[34], w[35], offset);\n      w[51] = hc_bytealign_be (w[33], w[34], offset);\n      w[50] = hc_bytealign_be (w[32], w[33], offset);\n      w[49] = hc_bytealign_be (w[31], w[32], offset);\n      w[48] = hc_bytealign_be (w[30], w[31], offset);\n      w[47] = hc_bytealign_be (w[29], w[30], offset);\n      w[46] = hc_bytealign_be (w[28], w[29], offset);\n      w[45] = hc_bytealign_be (w[27], w[28], offset);\n      w[44] = hc_bytealign_be (w[26], w[27], offset);\n      w[43] = hc_bytealign_be (w[25], w[26], offset);\n      w[42] = hc_bytealign_be (w[24], w[25], offset);\n      w[41] = hc_bytealign_be (w[23], w[24], offset);\n      w[40] = hc_bytealign_be (w[22], w[23], offset);\n      w[39] = hc_bytealign_be (w[21], w[22], offset);\n      w[38] = hc_bytealign_be (w[20], w[21], offset);\n      w[37] = hc_bytealign_be (w[19], w[20], offset);\n      w[36] = hc_bytealign_be (w[18], w[19], offset);\n      w[35] = hc_bytealign_be (w[17], w[18], offset);\n      w[34] = hc_bytealign_be (w[16], w[17], offset);\n      w[33] = hc_bytealign_be (w[15], w[16], offset);\n      w[32] = hc_bytealign_be (w[14], w[15], offset);\n      w[31] = hc_bytealign_be (w[13], w[14], offset);\n      w[30] = hc_bytealign_be (w[12], w[13], offset);\n      w[29] = hc_bytealign_be (w[11], w[12], offset);\n      w[28] = hc_bytealign_be (w[10], w[11], offset);\n      w[27] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[26] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[25] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[24] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[23] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[22] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[21] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[20] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[19] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[18] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[17] = hc_bytealign_be (    0, w[ 0], offset);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_bytealign_be (w[44], w[45], offset);\n      w[62] = hc_bytealign_be (w[43], w[44], offset);\n      w[61] = hc_bytealign_be (w[42], w[43], offset);\n      w[60] = hc_bytealign_be (w[41], w[42], offset);\n      w[59] = hc_bytealign_be (w[40], w[41], offset);\n      w[58] = hc_bytealign_be (w[39], w[40], offset);\n      w[57] = hc_bytealign_be (w[38], w[39], offset);\n      w[56] = hc_bytealign_be (w[37], w[38], offset);\n      w[55] = hc_bytealign_be (w[36], w[37], offset);\n      w[54] = hc_bytealign_be (w[35], w[36], offset);\n      w[53] = hc_bytealign_be (w[34], w[35], offset);\n      w[52] = hc_bytealign_be (w[33], w[34], offset);\n      w[51] = hc_bytealign_be (w[32], w[33], offset);\n      w[50] = hc_bytealign_be (w[31], w[32], offset);\n      w[49] = hc_bytealign_be (w[30], w[31], offset);\n      w[48] = hc_bytealign_be (w[29], w[30], offset);\n      w[47] = hc_bytealign_be (w[28], w[29], offset);\n      w[46] = hc_bytealign_be (w[27], w[28], offset);\n      w[45] = hc_bytealign_be (w[26], w[27], offset);\n      w[44] = hc_bytealign_be (w[25], w[26], offset);\n      w[43] = hc_bytealign_be (w[24], w[25], offset);\n      w[42] = hc_bytealign_be (w[23], w[24], offset);\n      w[41] = hc_bytealign_be (w[22], w[23], offset);\n      w[40] = hc_bytealign_be (w[21], w[22], offset);\n      w[39] = hc_bytealign_be (w[20], w[21], offset);\n      w[38] = hc_bytealign_be (w[19], w[20], offset);\n      w[37] = hc_bytealign_be (w[18], w[19], offset);\n      w[36] = hc_bytealign_be (w[17], w[18], offset);\n      w[35] = hc_bytealign_be (w[16], w[17], offset);\n      w[34] = hc_bytealign_be (w[15], w[16], offset);\n      w[33] = hc_bytealign_be (w[14], w[15], offset);\n      w[32] = hc_bytealign_be (w[13], w[14], offset);\n      w[31] = hc_bytealign_be (w[12], w[13], offset);\n      w[30] = hc_bytealign_be (w[11], w[12], offset);\n      w[29] = hc_bytealign_be (w[10], w[11], offset);\n      w[28] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[27] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[26] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[25] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[24] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[23] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[22] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[21] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[20] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[19] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[18] = hc_bytealign_be (    0, w[ 0], offset);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_bytealign_be (w[43], w[44], offset);\n      w[62] = hc_bytealign_be (w[42], w[43], offset);\n      w[61] = hc_bytealign_be (w[41], w[42], offset);\n      w[60] = hc_bytealign_be (w[40], w[41], offset);\n      w[59] = hc_bytealign_be (w[39], w[40], offset);\n      w[58] = hc_bytealign_be (w[38], w[39], offset);\n      w[57] = hc_bytealign_be (w[37], w[38], offset);\n      w[56] = hc_bytealign_be (w[36], w[37], offset);\n      w[55] = hc_bytealign_be (w[35], w[36], offset);\n      w[54] = hc_bytealign_be (w[34], w[35], offset);\n      w[53] = hc_bytealign_be (w[33], w[34], offset);\n      w[52] = hc_bytealign_be (w[32], w[33], offset);\n      w[51] = hc_bytealign_be (w[31], w[32], offset);\n      w[50] = hc_bytealign_be (w[30], w[31], offset);\n      w[49] = hc_bytealign_be (w[29], w[30], offset);\n      w[48] = hc_bytealign_be (w[28], w[29], offset);\n      w[47] = hc_bytealign_be (w[27], w[28], offset);\n      w[46] = hc_bytealign_be (w[26], w[27], offset);\n      w[45] = hc_bytealign_be (w[25], w[26], offset);\n      w[44] = hc_bytealign_be (w[24], w[25], offset);\n      w[43] = hc_bytealign_be (w[23], w[24], offset);\n      w[42] = hc_bytealign_be (w[22], w[23], offset);\n      w[41] = hc_bytealign_be (w[21], w[22], offset);\n      w[40] = hc_bytealign_be (w[20], w[21], offset);\n      w[39] = hc_bytealign_be (w[19], w[20], offset);\n      w[38] = hc_bytealign_be (w[18], w[19], offset);\n      w[37] = hc_bytealign_be (w[17], w[18], offset);\n      w[36] = hc_bytealign_be (w[16], w[17], offset);\n      w[35] = hc_bytealign_be (w[15], w[16], offset);\n      w[34] = hc_bytealign_be (w[14], w[15], offset);\n      w[33] = hc_bytealign_be (w[13], w[14], offset);\n      w[32] = hc_bytealign_be (w[12], w[13], offset);\n      w[31] = hc_bytealign_be (w[11], w[12], offset);\n      w[30] = hc_bytealign_be (w[10], w[11], offset);\n      w[29] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[28] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[27] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[26] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[25] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[24] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[23] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[22] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[21] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[20] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[19] = hc_bytealign_be (    0, w[ 0], offset);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_bytealign_be (w[42], w[43], offset);\n      w[62] = hc_bytealign_be (w[41], w[42], offset);\n      w[61] = hc_bytealign_be (w[40], w[41], offset);\n      w[60] = hc_bytealign_be (w[39], w[40], offset);\n      w[59] = hc_bytealign_be (w[38], w[39], offset);\n      w[58] = hc_bytealign_be (w[37], w[38], offset);\n      w[57] = hc_bytealign_be (w[36], w[37], offset);\n      w[56] = hc_bytealign_be (w[35], w[36], offset);\n      w[55] = hc_bytealign_be (w[34], w[35], offset);\n      w[54] = hc_bytealign_be (w[33], w[34], offset);\n      w[53] = hc_bytealign_be (w[32], w[33], offset);\n      w[52] = hc_bytealign_be (w[31], w[32], offset);\n      w[51] = hc_bytealign_be (w[30], w[31], offset);\n      w[50] = hc_bytealign_be (w[29], w[30], offset);\n      w[49] = hc_bytealign_be (w[28], w[29], offset);\n      w[48] = hc_bytealign_be (w[27], w[28], offset);\n      w[47] = hc_bytealign_be (w[26], w[27], offset);\n      w[46] = hc_bytealign_be (w[25], w[26], offset);\n      w[45] = hc_bytealign_be (w[24], w[25], offset);\n      w[44] = hc_bytealign_be (w[23], w[24], offset);\n      w[43] = hc_bytealign_be (w[22], w[23], offset);\n      w[42] = hc_bytealign_be (w[21], w[22], offset);\n      w[41] = hc_bytealign_be (w[20], w[21], offset);\n      w[40] = hc_bytealign_be (w[19], w[20], offset);\n      w[39] = hc_bytealign_be (w[18], w[19], offset);\n      w[38] = hc_bytealign_be (w[17], w[18], offset);\n      w[37] = hc_bytealign_be (w[16], w[17], offset);\n      w[36] = hc_bytealign_be (w[15], w[16], offset);\n      w[35] = hc_bytealign_be (w[14], w[15], offset);\n      w[34] = hc_bytealign_be (w[13], w[14], offset);\n      w[33] = hc_bytealign_be (w[12], w[13], offset);\n      w[32] = hc_bytealign_be (w[11], w[12], offset);\n      w[31] = hc_bytealign_be (w[10], w[11], offset);\n      w[30] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[29] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[28] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[27] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[26] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[25] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[24] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[23] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[22] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[21] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[20] = hc_bytealign_be (    0, w[ 0], offset);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_bytealign_be (w[41], w[42], offset);\n      w[62] = hc_bytealign_be (w[40], w[41], offset);\n      w[61] = hc_bytealign_be (w[39], w[40], offset);\n      w[60] = hc_bytealign_be (w[38], w[39], offset);\n      w[59] = hc_bytealign_be (w[37], w[38], offset);\n      w[58] = hc_bytealign_be (w[36], w[37], offset);\n      w[57] = hc_bytealign_be (w[35], w[36], offset);\n      w[56] = hc_bytealign_be (w[34], w[35], offset);\n      w[55] = hc_bytealign_be (w[33], w[34], offset);\n      w[54] = hc_bytealign_be (w[32], w[33], offset);\n      w[53] = hc_bytealign_be (w[31], w[32], offset);\n      w[52] = hc_bytealign_be (w[30], w[31], offset);\n      w[51] = hc_bytealign_be (w[29], w[30], offset);\n      w[50] = hc_bytealign_be (w[28], w[29], offset);\n      w[49] = hc_bytealign_be (w[27], w[28], offset);\n      w[48] = hc_bytealign_be (w[26], w[27], offset);\n      w[47] = hc_bytealign_be (w[25], w[26], offset);\n      w[46] = hc_bytealign_be (w[24], w[25], offset);\n      w[45] = hc_bytealign_be (w[23], w[24], offset);\n      w[44] = hc_bytealign_be (w[22], w[23], offset);\n      w[43] = hc_bytealign_be (w[21], w[22], offset);\n      w[42] = hc_bytealign_be (w[20], w[21], offset);\n      w[41] = hc_bytealign_be (w[19], w[20], offset);\n      w[40] = hc_bytealign_be (w[18], w[19], offset);\n      w[39] = hc_bytealign_be (w[17], w[18], offset);\n      w[38] = hc_bytealign_be (w[16], w[17], offset);\n      w[37] = hc_bytealign_be (w[15], w[16], offset);\n      w[36] = hc_bytealign_be (w[14], w[15], offset);\n      w[35] = hc_bytealign_be (w[13], w[14], offset);\n      w[34] = hc_bytealign_be (w[12], w[13], offset);\n      w[33] = hc_bytealign_be (w[11], w[12], offset);\n      w[32] = hc_bytealign_be (w[10], w[11], offset);\n      w[31] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[30] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[29] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[28] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[27] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[26] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[25] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[24] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[23] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[22] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[21] = hc_bytealign_be (    0, w[ 0], offset);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_bytealign_be (w[40], w[41], offset);\n      w[62] = hc_bytealign_be (w[39], w[40], offset);\n      w[61] = hc_bytealign_be (w[38], w[39], offset);\n      w[60] = hc_bytealign_be (w[37], w[38], offset);\n      w[59] = hc_bytealign_be (w[36], w[37], offset);\n      w[58] = hc_bytealign_be (w[35], w[36], offset);\n      w[57] = hc_bytealign_be (w[34], w[35], offset);\n      w[56] = hc_bytealign_be (w[33], w[34], offset);\n      w[55] = hc_bytealign_be (w[32], w[33], offset);\n      w[54] = hc_bytealign_be (w[31], w[32], offset);\n      w[53] = hc_bytealign_be (w[30], w[31], offset);\n      w[52] = hc_bytealign_be (w[29], w[30], offset);\n      w[51] = hc_bytealign_be (w[28], w[29], offset);\n      w[50] = hc_bytealign_be (w[27], w[28], offset);\n      w[49] = hc_bytealign_be (w[26], w[27], offset);\n      w[48] = hc_bytealign_be (w[25], w[26], offset);\n      w[47] = hc_bytealign_be (w[24], w[25], offset);\n      w[46] = hc_bytealign_be (w[23], w[24], offset);\n      w[45] = hc_bytealign_be (w[22], w[23], offset);\n      w[44] = hc_bytealign_be (w[21], w[22], offset);\n      w[43] = hc_bytealign_be (w[20], w[21], offset);\n      w[42] = hc_bytealign_be (w[19], w[20], offset);\n      w[41] = hc_bytealign_be (w[18], w[19], offset);\n      w[40] = hc_bytealign_be (w[17], w[18], offset);\n      w[39] = hc_bytealign_be (w[16], w[17], offset);\n      w[38] = hc_bytealign_be (w[15], w[16], offset);\n      w[37] = hc_bytealign_be (w[14], w[15], offset);\n      w[36] = hc_bytealign_be (w[13], w[14], offset);\n      w[35] = hc_bytealign_be (w[12], w[13], offset);\n      w[34] = hc_bytealign_be (w[11], w[12], offset);\n      w[33] = hc_bytealign_be (w[10], w[11], offset);\n      w[32] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[31] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[30] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[29] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[28] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[27] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[26] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[25] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[24] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[23] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[22] = hc_bytealign_be (    0, w[ 0], offset);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_bytealign_be (w[39], w[40], offset);\n      w[62] = hc_bytealign_be (w[38], w[39], offset);\n      w[61] = hc_bytealign_be (w[37], w[38], offset);\n      w[60] = hc_bytealign_be (w[36], w[37], offset);\n      w[59] = hc_bytealign_be (w[35], w[36], offset);\n      w[58] = hc_bytealign_be (w[34], w[35], offset);\n      w[57] = hc_bytealign_be (w[33], w[34], offset);\n      w[56] = hc_bytealign_be (w[32], w[33], offset);\n      w[55] = hc_bytealign_be (w[31], w[32], offset);\n      w[54] = hc_bytealign_be (w[30], w[31], offset);\n      w[53] = hc_bytealign_be (w[29], w[30], offset);\n      w[52] = hc_bytealign_be (w[28], w[29], offset);\n      w[51] = hc_bytealign_be (w[27], w[28], offset);\n      w[50] = hc_bytealign_be (w[26], w[27], offset);\n      w[49] = hc_bytealign_be (w[25], w[26], offset);\n      w[48] = hc_bytealign_be (w[24], w[25], offset);\n      w[47] = hc_bytealign_be (w[23], w[24], offset);\n      w[46] = hc_bytealign_be (w[22], w[23], offset);\n      w[45] = hc_bytealign_be (w[21], w[22], offset);\n      w[44] = hc_bytealign_be (w[20], w[21], offset);\n      w[43] = hc_bytealign_be (w[19], w[20], offset);\n      w[42] = hc_bytealign_be (w[18], w[19], offset);\n      w[41] = hc_bytealign_be (w[17], w[18], offset);\n      w[40] = hc_bytealign_be (w[16], w[17], offset);\n      w[39] = hc_bytealign_be (w[15], w[16], offset);\n      w[38] = hc_bytealign_be (w[14], w[15], offset);\n      w[37] = hc_bytealign_be (w[13], w[14], offset);\n      w[36] = hc_bytealign_be (w[12], w[13], offset);\n      w[35] = hc_bytealign_be (w[11], w[12], offset);\n      w[34] = hc_bytealign_be (w[10], w[11], offset);\n      w[33] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[32] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[31] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[30] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[29] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[28] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[27] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[26] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[25] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[24] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[23] = hc_bytealign_be (    0, w[ 0], offset);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_bytealign_be (w[38], w[39], offset);\n      w[62] = hc_bytealign_be (w[37], w[38], offset);\n      w[61] = hc_bytealign_be (w[36], w[37], offset);\n      w[60] = hc_bytealign_be (w[35], w[36], offset);\n      w[59] = hc_bytealign_be (w[34], w[35], offset);\n      w[58] = hc_bytealign_be (w[33], w[34], offset);\n      w[57] = hc_bytealign_be (w[32], w[33], offset);\n      w[56] = hc_bytealign_be (w[31], w[32], offset);\n      w[55] = hc_bytealign_be (w[30], w[31], offset);\n      w[54] = hc_bytealign_be (w[29], w[30], offset);\n      w[53] = hc_bytealign_be (w[28], w[29], offset);\n      w[52] = hc_bytealign_be (w[27], w[28], offset);\n      w[51] = hc_bytealign_be (w[26], w[27], offset);\n      w[50] = hc_bytealign_be (w[25], w[26], offset);\n      w[49] = hc_bytealign_be (w[24], w[25], offset);\n      w[48] = hc_bytealign_be (w[23], w[24], offset);\n      w[47] = hc_bytealign_be (w[22], w[23], offset);\n      w[46] = hc_bytealign_be (w[21], w[22], offset);\n      w[45] = hc_bytealign_be (w[20], w[21], offset);\n      w[44] = hc_bytealign_be (w[19], w[20], offset);\n      w[43] = hc_bytealign_be (w[18], w[19], offset);\n      w[42] = hc_bytealign_be (w[17], w[18], offset);\n      w[41] = hc_bytealign_be (w[16], w[17], offset);\n      w[40] = hc_bytealign_be (w[15], w[16], offset);\n      w[39] = hc_bytealign_be (w[14], w[15], offset);\n      w[38] = hc_bytealign_be (w[13], w[14], offset);\n      w[37] = hc_bytealign_be (w[12], w[13], offset);\n      w[36] = hc_bytealign_be (w[11], w[12], offset);\n      w[35] = hc_bytealign_be (w[10], w[11], offset);\n      w[34] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[33] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[32] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[31] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[30] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[29] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[28] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[27] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[26] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[25] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[24] = hc_bytealign_be (    0, w[ 0], offset);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_bytealign_be (w[37], w[38], offset);\n      w[62] = hc_bytealign_be (w[36], w[37], offset);\n      w[61] = hc_bytealign_be (w[35], w[36], offset);\n      w[60] = hc_bytealign_be (w[34], w[35], offset);\n      w[59] = hc_bytealign_be (w[33], w[34], offset);\n      w[58] = hc_bytealign_be (w[32], w[33], offset);\n      w[57] = hc_bytealign_be (w[31], w[32], offset);\n      w[56] = hc_bytealign_be (w[30], w[31], offset);\n      w[55] = hc_bytealign_be (w[29], w[30], offset);\n      w[54] = hc_bytealign_be (w[28], w[29], offset);\n      w[53] = hc_bytealign_be (w[27], w[28], offset);\n      w[52] = hc_bytealign_be (w[26], w[27], offset);\n      w[51] = hc_bytealign_be (w[25], w[26], offset);\n      w[50] = hc_bytealign_be (w[24], w[25], offset);\n      w[49] = hc_bytealign_be (w[23], w[24], offset);\n      w[48] = hc_bytealign_be (w[22], w[23], offset);\n      w[47] = hc_bytealign_be (w[21], w[22], offset);\n      w[46] = hc_bytealign_be (w[20], w[21], offset);\n      w[45] = hc_bytealign_be (w[19], w[20], offset);\n      w[44] = hc_bytealign_be (w[18], w[19], offset);\n      w[43] = hc_bytealign_be (w[17], w[18], offset);\n      w[42] = hc_bytealign_be (w[16], w[17], offset);\n      w[41] = hc_bytealign_be (w[15], w[16], offset);\n      w[40] = hc_bytealign_be (w[14], w[15], offset);\n      w[39] = hc_bytealign_be (w[13], w[14], offset);\n      w[38] = hc_bytealign_be (w[12], w[13], offset);\n      w[37] = hc_bytealign_be (w[11], w[12], offset);\n      w[36] = hc_bytealign_be (w[10], w[11], offset);\n      w[35] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[34] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[33] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[32] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[31] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[30] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[29] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[28] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[27] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[26] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[25] = hc_bytealign_be (    0, w[ 0], offset);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_bytealign_be (w[36], w[37], offset);\n      w[62] = hc_bytealign_be (w[35], w[36], offset);\n      w[61] = hc_bytealign_be (w[34], w[35], offset);\n      w[60] = hc_bytealign_be (w[33], w[34], offset);\n      w[59] = hc_bytealign_be (w[32], w[33], offset);\n      w[58] = hc_bytealign_be (w[31], w[32], offset);\n      w[57] = hc_bytealign_be (w[30], w[31], offset);\n      w[56] = hc_bytealign_be (w[29], w[30], offset);\n      w[55] = hc_bytealign_be (w[28], w[29], offset);\n      w[54] = hc_bytealign_be (w[27], w[28], offset);\n      w[53] = hc_bytealign_be (w[26], w[27], offset);\n      w[52] = hc_bytealign_be (w[25], w[26], offset);\n      w[51] = hc_bytealign_be (w[24], w[25], offset);\n      w[50] = hc_bytealign_be (w[23], w[24], offset);\n      w[49] = hc_bytealign_be (w[22], w[23], offset);\n      w[48] = hc_bytealign_be (w[21], w[22], offset);\n      w[47] = hc_bytealign_be (w[20], w[21], offset);\n      w[46] = hc_bytealign_be (w[19], w[20], offset);\n      w[45] = hc_bytealign_be (w[18], w[19], offset);\n      w[44] = hc_bytealign_be (w[17], w[18], offset);\n      w[43] = hc_bytealign_be (w[16], w[17], offset);\n      w[42] = hc_bytealign_be (w[15], w[16], offset);\n      w[41] = hc_bytealign_be (w[14], w[15], offset);\n      w[40] = hc_bytealign_be (w[13], w[14], offset);\n      w[39] = hc_bytealign_be (w[12], w[13], offset);\n      w[38] = hc_bytealign_be (w[11], w[12], offset);\n      w[37] = hc_bytealign_be (w[10], w[11], offset);\n      w[36] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[35] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[34] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[33] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[32] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[31] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[30] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[29] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[28] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[27] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[26] = hc_bytealign_be (    0, w[ 0], offset);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_bytealign_be (w[35], w[36], offset);\n      w[62] = hc_bytealign_be (w[34], w[35], offset);\n      w[61] = hc_bytealign_be (w[33], w[34], offset);\n      w[60] = hc_bytealign_be (w[32], w[33], offset);\n      w[59] = hc_bytealign_be (w[31], w[32], offset);\n      w[58] = hc_bytealign_be (w[30], w[31], offset);\n      w[57] = hc_bytealign_be (w[29], w[30], offset);\n      w[56] = hc_bytealign_be (w[28], w[29], offset);\n      w[55] = hc_bytealign_be (w[27], w[28], offset);\n      w[54] = hc_bytealign_be (w[26], w[27], offset);\n      w[53] = hc_bytealign_be (w[25], w[26], offset);\n      w[52] = hc_bytealign_be (w[24], w[25], offset);\n      w[51] = hc_bytealign_be (w[23], w[24], offset);\n      w[50] = hc_bytealign_be (w[22], w[23], offset);\n      w[49] = hc_bytealign_be (w[21], w[22], offset);\n      w[48] = hc_bytealign_be (w[20], w[21], offset);\n      w[47] = hc_bytealign_be (w[19], w[20], offset);\n      w[46] = hc_bytealign_be (w[18], w[19], offset);\n      w[45] = hc_bytealign_be (w[17], w[18], offset);\n      w[44] = hc_bytealign_be (w[16], w[17], offset);\n      w[43] = hc_bytealign_be (w[15], w[16], offset);\n      w[42] = hc_bytealign_be (w[14], w[15], offset);\n      w[41] = hc_bytealign_be (w[13], w[14], offset);\n      w[40] = hc_bytealign_be (w[12], w[13], offset);\n      w[39] = hc_bytealign_be (w[11], w[12], offset);\n      w[38] = hc_bytealign_be (w[10], w[11], offset);\n      w[37] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[36] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[35] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[34] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[33] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[32] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[31] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[30] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[29] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[28] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[27] = hc_bytealign_be (    0, w[ 0], offset);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_bytealign_be (w[34], w[35], offset);\n      w[62] = hc_bytealign_be (w[33], w[34], offset);\n      w[61] = hc_bytealign_be (w[32], w[33], offset);\n      w[60] = hc_bytealign_be (w[31], w[32], offset);\n      w[59] = hc_bytealign_be (w[30], w[31], offset);\n      w[58] = hc_bytealign_be (w[29], w[30], offset);\n      w[57] = hc_bytealign_be (w[28], w[29], offset);\n      w[56] = hc_bytealign_be (w[27], w[28], offset);\n      w[55] = hc_bytealign_be (w[26], w[27], offset);\n      w[54] = hc_bytealign_be (w[25], w[26], offset);\n      w[53] = hc_bytealign_be (w[24], w[25], offset);\n      w[52] = hc_bytealign_be (w[23], w[24], offset);\n      w[51] = hc_bytealign_be (w[22], w[23], offset);\n      w[50] = hc_bytealign_be (w[21], w[22], offset);\n      w[49] = hc_bytealign_be (w[20], w[21], offset);\n      w[48] = hc_bytealign_be (w[19], w[20], offset);\n      w[47] = hc_bytealign_be (w[18], w[19], offset);\n      w[46] = hc_bytealign_be (w[17], w[18], offset);\n      w[45] = hc_bytealign_be (w[16], w[17], offset);\n      w[44] = hc_bytealign_be (w[15], w[16], offset);\n      w[43] = hc_bytealign_be (w[14], w[15], offset);\n      w[42] = hc_bytealign_be (w[13], w[14], offset);\n      w[41] = hc_bytealign_be (w[12], w[13], offset);\n      w[40] = hc_bytealign_be (w[11], w[12], offset);\n      w[39] = hc_bytealign_be (w[10], w[11], offset);\n      w[38] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[37] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[36] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[35] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[34] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[33] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[32] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[31] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[30] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[29] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[28] = hc_bytealign_be (    0, w[ 0], offset);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_bytealign_be (w[33], w[34], offset);\n      w[62] = hc_bytealign_be (w[32], w[33], offset);\n      w[61] = hc_bytealign_be (w[31], w[32], offset);\n      w[60] = hc_bytealign_be (w[30], w[31], offset);\n      w[59] = hc_bytealign_be (w[29], w[30], offset);\n      w[58] = hc_bytealign_be (w[28], w[29], offset);\n      w[57] = hc_bytealign_be (w[27], w[28], offset);\n      w[56] = hc_bytealign_be (w[26], w[27], offset);\n      w[55] = hc_bytealign_be (w[25], w[26], offset);\n      w[54] = hc_bytealign_be (w[24], w[25], offset);\n      w[53] = hc_bytealign_be (w[23], w[24], offset);\n      w[52] = hc_bytealign_be (w[22], w[23], offset);\n      w[51] = hc_bytealign_be (w[21], w[22], offset);\n      w[50] = hc_bytealign_be (w[20], w[21], offset);\n      w[49] = hc_bytealign_be (w[19], w[20], offset);\n      w[48] = hc_bytealign_be (w[18], w[19], offset);\n      w[47] = hc_bytealign_be (w[17], w[18], offset);\n      w[46] = hc_bytealign_be (w[16], w[17], offset);\n      w[45] = hc_bytealign_be (w[15], w[16], offset);\n      w[44] = hc_bytealign_be (w[14], w[15], offset);\n      w[43] = hc_bytealign_be (w[13], w[14], offset);\n      w[42] = hc_bytealign_be (w[12], w[13], offset);\n      w[41] = hc_bytealign_be (w[11], w[12], offset);\n      w[40] = hc_bytealign_be (w[10], w[11], offset);\n      w[39] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[38] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[37] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[36] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[35] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[34] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[33] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[32] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[31] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[30] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[29] = hc_bytealign_be (    0, w[ 0], offset);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_bytealign_be (w[32], w[33], offset);\n      w[62] = hc_bytealign_be (w[31], w[32], offset);\n      w[61] = hc_bytealign_be (w[30], w[31], offset);\n      w[60] = hc_bytealign_be (w[29], w[30], offset);\n      w[59] = hc_bytealign_be (w[28], w[29], offset);\n      w[58] = hc_bytealign_be (w[27], w[28], offset);\n      w[57] = hc_bytealign_be (w[26], w[27], offset);\n      w[56] = hc_bytealign_be (w[25], w[26], offset);\n      w[55] = hc_bytealign_be (w[24], w[25], offset);\n      w[54] = hc_bytealign_be (w[23], w[24], offset);\n      w[53] = hc_bytealign_be (w[22], w[23], offset);\n      w[52] = hc_bytealign_be (w[21], w[22], offset);\n      w[51] = hc_bytealign_be (w[20], w[21], offset);\n      w[50] = hc_bytealign_be (w[19], w[20], offset);\n      w[49] = hc_bytealign_be (w[18], w[19], offset);\n      w[48] = hc_bytealign_be (w[17], w[18], offset);\n      w[47] = hc_bytealign_be (w[16], w[17], offset);\n      w[46] = hc_bytealign_be (w[15], w[16], offset);\n      w[45] = hc_bytealign_be (w[14], w[15], offset);\n      w[44] = hc_bytealign_be (w[13], w[14], offset);\n      w[43] = hc_bytealign_be (w[12], w[13], offset);\n      w[42] = hc_bytealign_be (w[11], w[12], offset);\n      w[41] = hc_bytealign_be (w[10], w[11], offset);\n      w[40] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[39] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[38] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[37] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[36] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[35] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[34] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[33] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[32] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[31] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[30] = hc_bytealign_be (    0, w[ 0], offset);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_bytealign_be (w[31], w[32], offset);\n      w[62] = hc_bytealign_be (w[30], w[31], offset);\n      w[61] = hc_bytealign_be (w[29], w[30], offset);\n      w[60] = hc_bytealign_be (w[28], w[29], offset);\n      w[59] = hc_bytealign_be (w[27], w[28], offset);\n      w[58] = hc_bytealign_be (w[26], w[27], offset);\n      w[57] = hc_bytealign_be (w[25], w[26], offset);\n      w[56] = hc_bytealign_be (w[24], w[25], offset);\n      w[55] = hc_bytealign_be (w[23], w[24], offset);\n      w[54] = hc_bytealign_be (w[22], w[23], offset);\n      w[53] = hc_bytealign_be (w[21], w[22], offset);\n      w[52] = hc_bytealign_be (w[20], w[21], offset);\n      w[51] = hc_bytealign_be (w[19], w[20], offset);\n      w[50] = hc_bytealign_be (w[18], w[19], offset);\n      w[49] = hc_bytealign_be (w[17], w[18], offset);\n      w[48] = hc_bytealign_be (w[16], w[17], offset);\n      w[47] = hc_bytealign_be (w[15], w[16], offset);\n      w[46] = hc_bytealign_be (w[14], w[15], offset);\n      w[45] = hc_bytealign_be (w[13], w[14], offset);\n      w[44] = hc_bytealign_be (w[12], w[13], offset);\n      w[43] = hc_bytealign_be (w[11], w[12], offset);\n      w[42] = hc_bytealign_be (w[10], w[11], offset);\n      w[41] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[40] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[39] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[38] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[37] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[36] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[35] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[34] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[33] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[32] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[31] = hc_bytealign_be (    0, w[ 0], offset);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_bytealign_be (w[30], w[31], offset);\n      w[62] = hc_bytealign_be (w[29], w[30], offset);\n      w[61] = hc_bytealign_be (w[28], w[29], offset);\n      w[60] = hc_bytealign_be (w[27], w[28], offset);\n      w[59] = hc_bytealign_be (w[26], w[27], offset);\n      w[58] = hc_bytealign_be (w[25], w[26], offset);\n      w[57] = hc_bytealign_be (w[24], w[25], offset);\n      w[56] = hc_bytealign_be (w[23], w[24], offset);\n      w[55] = hc_bytealign_be (w[22], w[23], offset);\n      w[54] = hc_bytealign_be (w[21], w[22], offset);\n      w[53] = hc_bytealign_be (w[20], w[21], offset);\n      w[52] = hc_bytealign_be (w[19], w[20], offset);\n      w[51] = hc_bytealign_be (w[18], w[19], offset);\n      w[50] = hc_bytealign_be (w[17], w[18], offset);\n      w[49] = hc_bytealign_be (w[16], w[17], offset);\n      w[48] = hc_bytealign_be (w[15], w[16], offset);\n      w[47] = hc_bytealign_be (w[14], w[15], offset);\n      w[46] = hc_bytealign_be (w[13], w[14], offset);\n      w[45] = hc_bytealign_be (w[12], w[13], offset);\n      w[44] = hc_bytealign_be (w[11], w[12], offset);\n      w[43] = hc_bytealign_be (w[10], w[11], offset);\n      w[42] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[41] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[40] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[39] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[38] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[37] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[36] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[35] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[34] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[33] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[32] = hc_bytealign_be (    0, w[ 0], offset);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_bytealign_be (w[29], w[30], offset);\n      w[62] = hc_bytealign_be (w[28], w[29], offset);\n      w[61] = hc_bytealign_be (w[27], w[28], offset);\n      w[60] = hc_bytealign_be (w[26], w[27], offset);\n      w[59] = hc_bytealign_be (w[25], w[26], offset);\n      w[58] = hc_bytealign_be (w[24], w[25], offset);\n      w[57] = hc_bytealign_be (w[23], w[24], offset);\n      w[56] = hc_bytealign_be (w[22], w[23], offset);\n      w[55] = hc_bytealign_be (w[21], w[22], offset);\n      w[54] = hc_bytealign_be (w[20], w[21], offset);\n      w[53] = hc_bytealign_be (w[19], w[20], offset);\n      w[52] = hc_bytealign_be (w[18], w[19], offset);\n      w[51] = hc_bytealign_be (w[17], w[18], offset);\n      w[50] = hc_bytealign_be (w[16], w[17], offset);\n      w[49] = hc_bytealign_be (w[15], w[16], offset);\n      w[48] = hc_bytealign_be (w[14], w[15], offset);\n      w[47] = hc_bytealign_be (w[13], w[14], offset);\n      w[46] = hc_bytealign_be (w[12], w[13], offset);\n      w[45] = hc_bytealign_be (w[11], w[12], offset);\n      w[44] = hc_bytealign_be (w[10], w[11], offset);\n      w[43] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[42] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[41] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[40] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[39] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[38] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[37] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[36] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[35] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[34] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[33] = hc_bytealign_be (    0, w[ 0], offset);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_bytealign_be (w[28], w[29], offset);\n      w[62] = hc_bytealign_be (w[27], w[28], offset);\n      w[61] = hc_bytealign_be (w[26], w[27], offset);\n      w[60] = hc_bytealign_be (w[25], w[26], offset);\n      w[59] = hc_bytealign_be (w[24], w[25], offset);\n      w[58] = hc_bytealign_be (w[23], w[24], offset);\n      w[57] = hc_bytealign_be (w[22], w[23], offset);\n      w[56] = hc_bytealign_be (w[21], w[22], offset);\n      w[55] = hc_bytealign_be (w[20], w[21], offset);\n      w[54] = hc_bytealign_be (w[19], w[20], offset);\n      w[53] = hc_bytealign_be (w[18], w[19], offset);\n      w[52] = hc_bytealign_be (w[17], w[18], offset);\n      w[51] = hc_bytealign_be (w[16], w[17], offset);\n      w[50] = hc_bytealign_be (w[15], w[16], offset);\n      w[49] = hc_bytealign_be (w[14], w[15], offset);\n      w[48] = hc_bytealign_be (w[13], w[14], offset);\n      w[47] = hc_bytealign_be (w[12], w[13], offset);\n      w[46] = hc_bytealign_be (w[11], w[12], offset);\n      w[45] = hc_bytealign_be (w[10], w[11], offset);\n      w[44] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[43] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[42] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[41] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[40] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[39] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[38] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[37] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[36] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[35] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[34] = hc_bytealign_be (    0, w[ 0], offset);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_bytealign_be (w[27], w[28], offset);\n      w[62] = hc_bytealign_be (w[26], w[27], offset);\n      w[61] = hc_bytealign_be (w[25], w[26], offset);\n      w[60] = hc_bytealign_be (w[24], w[25], offset);\n      w[59] = hc_bytealign_be (w[23], w[24], offset);\n      w[58] = hc_bytealign_be (w[22], w[23], offset);\n      w[57] = hc_bytealign_be (w[21], w[22], offset);\n      w[56] = hc_bytealign_be (w[20], w[21], offset);\n      w[55] = hc_bytealign_be (w[19], w[20], offset);\n      w[54] = hc_bytealign_be (w[18], w[19], offset);\n      w[53] = hc_bytealign_be (w[17], w[18], offset);\n      w[52] = hc_bytealign_be (w[16], w[17], offset);\n      w[51] = hc_bytealign_be (w[15], w[16], offset);\n      w[50] = hc_bytealign_be (w[14], w[15], offset);\n      w[49] = hc_bytealign_be (w[13], w[14], offset);\n      w[48] = hc_bytealign_be (w[12], w[13], offset);\n      w[47] = hc_bytealign_be (w[11], w[12], offset);\n      w[46] = hc_bytealign_be (w[10], w[11], offset);\n      w[45] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[44] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[43] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[42] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[41] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[40] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[39] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[38] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[37] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[36] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[35] = hc_bytealign_be (    0, w[ 0], offset);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_bytealign_be (w[26], w[27], offset);\n      w[62] = hc_bytealign_be (w[25], w[26], offset);\n      w[61] = hc_bytealign_be (w[24], w[25], offset);\n      w[60] = hc_bytealign_be (w[23], w[24], offset);\n      w[59] = hc_bytealign_be (w[22], w[23], offset);\n      w[58] = hc_bytealign_be (w[21], w[22], offset);\n      w[57] = hc_bytealign_be (w[20], w[21], offset);\n      w[56] = hc_bytealign_be (w[19], w[20], offset);\n      w[55] = hc_bytealign_be (w[18], w[19], offset);\n      w[54] = hc_bytealign_be (w[17], w[18], offset);\n      w[53] = hc_bytealign_be (w[16], w[17], offset);\n      w[52] = hc_bytealign_be (w[15], w[16], offset);\n      w[51] = hc_bytealign_be (w[14], w[15], offset);\n      w[50] = hc_bytealign_be (w[13], w[14], offset);\n      w[49] = hc_bytealign_be (w[12], w[13], offset);\n      w[48] = hc_bytealign_be (w[11], w[12], offset);\n      w[47] = hc_bytealign_be (w[10], w[11], offset);\n      w[46] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[45] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[44] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[43] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[42] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[41] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[40] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[39] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[38] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[37] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[36] = hc_bytealign_be (    0, w[ 0], offset);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_bytealign_be (w[25], w[26], offset);\n      w[62] = hc_bytealign_be (w[24], w[25], offset);\n      w[61] = hc_bytealign_be (w[23], w[24], offset);\n      w[60] = hc_bytealign_be (w[22], w[23], offset);\n      w[59] = hc_bytealign_be (w[21], w[22], offset);\n      w[58] = hc_bytealign_be (w[20], w[21], offset);\n      w[57] = hc_bytealign_be (w[19], w[20], offset);\n      w[56] = hc_bytealign_be (w[18], w[19], offset);\n      w[55] = hc_bytealign_be (w[17], w[18], offset);\n      w[54] = hc_bytealign_be (w[16], w[17], offset);\n      w[53] = hc_bytealign_be (w[15], w[16], offset);\n      w[52] = hc_bytealign_be (w[14], w[15], offset);\n      w[51] = hc_bytealign_be (w[13], w[14], offset);\n      w[50] = hc_bytealign_be (w[12], w[13], offset);\n      w[49] = hc_bytealign_be (w[11], w[12], offset);\n      w[48] = hc_bytealign_be (w[10], w[11], offset);\n      w[47] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[46] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[45] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[44] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[43] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[42] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[41] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[40] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[39] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[38] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[37] = hc_bytealign_be (    0, w[ 0], offset);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_bytealign_be (w[24], w[25], offset);\n      w[62] = hc_bytealign_be (w[23], w[24], offset);\n      w[61] = hc_bytealign_be (w[22], w[23], offset);\n      w[60] = hc_bytealign_be (w[21], w[22], offset);\n      w[59] = hc_bytealign_be (w[20], w[21], offset);\n      w[58] = hc_bytealign_be (w[19], w[20], offset);\n      w[57] = hc_bytealign_be (w[18], w[19], offset);\n      w[56] = hc_bytealign_be (w[17], w[18], offset);\n      w[55] = hc_bytealign_be (w[16], w[17], offset);\n      w[54] = hc_bytealign_be (w[15], w[16], offset);\n      w[53] = hc_bytealign_be (w[14], w[15], offset);\n      w[52] = hc_bytealign_be (w[13], w[14], offset);\n      w[51] = hc_bytealign_be (w[12], w[13], offset);\n      w[50] = hc_bytealign_be (w[11], w[12], offset);\n      w[49] = hc_bytealign_be (w[10], w[11], offset);\n      w[48] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[47] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[46] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[45] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[44] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[43] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[42] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[41] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[40] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[39] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[38] = hc_bytealign_be (    0, w[ 0], offset);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_bytealign_be (w[23], w[24], offset);\n      w[62] = hc_bytealign_be (w[22], w[23], offset);\n      w[61] = hc_bytealign_be (w[21], w[22], offset);\n      w[60] = hc_bytealign_be (w[20], w[21], offset);\n      w[59] = hc_bytealign_be (w[19], w[20], offset);\n      w[58] = hc_bytealign_be (w[18], w[19], offset);\n      w[57] = hc_bytealign_be (w[17], w[18], offset);\n      w[56] = hc_bytealign_be (w[16], w[17], offset);\n      w[55] = hc_bytealign_be (w[15], w[16], offset);\n      w[54] = hc_bytealign_be (w[14], w[15], offset);\n      w[53] = hc_bytealign_be (w[13], w[14], offset);\n      w[52] = hc_bytealign_be (w[12], w[13], offset);\n      w[51] = hc_bytealign_be (w[11], w[12], offset);\n      w[50] = hc_bytealign_be (w[10], w[11], offset);\n      w[49] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[48] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[47] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[46] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[45] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[44] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[43] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[42] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[41] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[40] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[39] = hc_bytealign_be (    0, w[ 0], offset);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_bytealign_be (w[22], w[23], offset);\n      w[62] = hc_bytealign_be (w[21], w[22], offset);\n      w[61] = hc_bytealign_be (w[20], w[21], offset);\n      w[60] = hc_bytealign_be (w[19], w[20], offset);\n      w[59] = hc_bytealign_be (w[18], w[19], offset);\n      w[58] = hc_bytealign_be (w[17], w[18], offset);\n      w[57] = hc_bytealign_be (w[16], w[17], offset);\n      w[56] = hc_bytealign_be (w[15], w[16], offset);\n      w[55] = hc_bytealign_be (w[14], w[15], offset);\n      w[54] = hc_bytealign_be (w[13], w[14], offset);\n      w[53] = hc_bytealign_be (w[12], w[13], offset);\n      w[52] = hc_bytealign_be (w[11], w[12], offset);\n      w[51] = hc_bytealign_be (w[10], w[11], offset);\n      w[50] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[49] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[48] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[47] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[46] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[45] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[44] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[43] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[42] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[41] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[40] = hc_bytealign_be (    0, w[ 0], offset);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_bytealign_be (w[21], w[22], offset);\n      w[62] = hc_bytealign_be (w[20], w[21], offset);\n      w[61] = hc_bytealign_be (w[19], w[20], offset);\n      w[60] = hc_bytealign_be (w[18], w[19], offset);\n      w[59] = hc_bytealign_be (w[17], w[18], offset);\n      w[58] = hc_bytealign_be (w[16], w[17], offset);\n      w[57] = hc_bytealign_be (w[15], w[16], offset);\n      w[56] = hc_bytealign_be (w[14], w[15], offset);\n      w[55] = hc_bytealign_be (w[13], w[14], offset);\n      w[54] = hc_bytealign_be (w[12], w[13], offset);\n      w[53] = hc_bytealign_be (w[11], w[12], offset);\n      w[52] = hc_bytealign_be (w[10], w[11], offset);\n      w[51] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[50] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[49] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[48] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[47] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[46] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[45] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[44] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[43] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[42] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[41] = hc_bytealign_be (    0, w[ 0], offset);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_bytealign_be (w[20], w[21], offset);\n      w[62] = hc_bytealign_be (w[19], w[20], offset);\n      w[61] = hc_bytealign_be (w[18], w[19], offset);\n      w[60] = hc_bytealign_be (w[17], w[18], offset);\n      w[59] = hc_bytealign_be (w[16], w[17], offset);\n      w[58] = hc_bytealign_be (w[15], w[16], offset);\n      w[57] = hc_bytealign_be (w[14], w[15], offset);\n      w[56] = hc_bytealign_be (w[13], w[14], offset);\n      w[55] = hc_bytealign_be (w[12], w[13], offset);\n      w[54] = hc_bytealign_be (w[11], w[12], offset);\n      w[53] = hc_bytealign_be (w[10], w[11], offset);\n      w[52] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[51] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[50] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[49] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[48] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[47] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[46] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[45] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[44] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[43] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[42] = hc_bytealign_be (    0, w[ 0], offset);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_bytealign_be (w[19], w[20], offset);\n      w[62] = hc_bytealign_be (w[18], w[19], offset);\n      w[61] = hc_bytealign_be (w[17], w[18], offset);\n      w[60] = hc_bytealign_be (w[16], w[17], offset);\n      w[59] = hc_bytealign_be (w[15], w[16], offset);\n      w[58] = hc_bytealign_be (w[14], w[15], offset);\n      w[57] = hc_bytealign_be (w[13], w[14], offset);\n      w[56] = hc_bytealign_be (w[12], w[13], offset);\n      w[55] = hc_bytealign_be (w[11], w[12], offset);\n      w[54] = hc_bytealign_be (w[10], w[11], offset);\n      w[53] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[52] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[51] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[50] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[49] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[48] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[47] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[46] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[45] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[44] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[43] = hc_bytealign_be (    0, w[ 0], offset);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_bytealign_be (w[18], w[19], offset);\n      w[62] = hc_bytealign_be (w[17], w[18], offset);\n      w[61] = hc_bytealign_be (w[16], w[17], offset);\n      w[60] = hc_bytealign_be (w[15], w[16], offset);\n      w[59] = hc_bytealign_be (w[14], w[15], offset);\n      w[58] = hc_bytealign_be (w[13], w[14], offset);\n      w[57] = hc_bytealign_be (w[12], w[13], offset);\n      w[56] = hc_bytealign_be (w[11], w[12], offset);\n      w[55] = hc_bytealign_be (w[10], w[11], offset);\n      w[54] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[53] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[52] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[51] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[50] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[49] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[48] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[47] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[46] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[45] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[44] = hc_bytealign_be (    0, w[ 0], offset);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_bytealign_be (w[17], w[18], offset);\n      w[62] = hc_bytealign_be (w[16], w[17], offset);\n      w[61] = hc_bytealign_be (w[15], w[16], offset);\n      w[60] = hc_bytealign_be (w[14], w[15], offset);\n      w[59] = hc_bytealign_be (w[13], w[14], offset);\n      w[58] = hc_bytealign_be (w[12], w[13], offset);\n      w[57] = hc_bytealign_be (w[11], w[12], offset);\n      w[56] = hc_bytealign_be (w[10], w[11], offset);\n      w[55] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[54] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[53] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[52] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[51] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[50] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[49] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[48] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[47] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[46] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[45] = hc_bytealign_be (    0, w[ 0], offset);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_bytealign_be (w[16], w[17], offset);\n      w[62] = hc_bytealign_be (w[15], w[16], offset);\n      w[61] = hc_bytealign_be (w[14], w[15], offset);\n      w[60] = hc_bytealign_be (w[13], w[14], offset);\n      w[59] = hc_bytealign_be (w[12], w[13], offset);\n      w[58] = hc_bytealign_be (w[11], w[12], offset);\n      w[57] = hc_bytealign_be (w[10], w[11], offset);\n      w[56] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[55] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[54] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[53] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[52] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[51] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[50] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[49] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[48] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[47] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[46] = hc_bytealign_be (    0, w[ 0], offset);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_bytealign_be (w[15], w[16], offset);\n      w[62] = hc_bytealign_be (w[14], w[15], offset);\n      w[61] = hc_bytealign_be (w[13], w[14], offset);\n      w[60] = hc_bytealign_be (w[12], w[13], offset);\n      w[59] = hc_bytealign_be (w[11], w[12], offset);\n      w[58] = hc_bytealign_be (w[10], w[11], offset);\n      w[57] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[56] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[55] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[54] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[53] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[52] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[51] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[50] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[49] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[48] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[47] = hc_bytealign_be (    0, w[ 0], offset);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_bytealign_be (w[14], w[15], offset);\n      w[62] = hc_bytealign_be (w[13], w[14], offset);\n      w[61] = hc_bytealign_be (w[12], w[13], offset);\n      w[60] = hc_bytealign_be (w[11], w[12], offset);\n      w[59] = hc_bytealign_be (w[10], w[11], offset);\n      w[58] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[57] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[56] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[55] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[54] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[53] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[52] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[51] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[50] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[49] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[48] = hc_bytealign_be (    0, w[ 0], offset);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_bytealign_be (w[13], w[14], offset);\n      w[62] = hc_bytealign_be (w[12], w[13], offset);\n      w[61] = hc_bytealign_be (w[11], w[12], offset);\n      w[60] = hc_bytealign_be (w[10], w[11], offset);\n      w[59] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[58] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[57] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[56] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[55] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[54] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[53] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[52] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[51] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[50] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[49] = hc_bytealign_be (    0, w[ 0], offset);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_bytealign_be (w[12], w[13], offset);\n      w[62] = hc_bytealign_be (w[11], w[12], offset);\n      w[61] = hc_bytealign_be (w[10], w[11], offset);\n      w[60] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[59] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[58] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[57] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[56] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[55] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[54] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[53] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[52] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[51] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[50] = hc_bytealign_be (    0, w[ 0], offset);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_bytealign_be (w[11], w[12], offset);\n      w[62] = hc_bytealign_be (w[10], w[11], offset);\n      w[61] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[60] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[59] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[58] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[57] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[56] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[55] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[54] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[53] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[52] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[51] = hc_bytealign_be (    0, w[ 0], offset);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_bytealign_be (w[10], w[11], offset);\n      w[62] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[61] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[60] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[59] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[58] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[57] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[56] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[55] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[54] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[53] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[52] = hc_bytealign_be (    0, w[ 0], offset);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_bytealign_be (w[ 9], w[10], offset);\n      w[62] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[61] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[60] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[59] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[58] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[57] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[56] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[55] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[54] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[53] = hc_bytealign_be (    0, w[ 0], offset);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_bytealign_be (w[ 8], w[ 9], offset);\n      w[62] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[61] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[60] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[59] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[58] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[57] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[56] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[55] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[54] = hc_bytealign_be (    0, w[ 0], offset);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_bytealign_be (w[ 7], w[ 8], offset);\n      w[62] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[61] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[60] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[59] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[58] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[57] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[56] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[55] = hc_bytealign_be (    0, w[ 0], offset);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_bytealign_be (w[ 6], w[ 7], offset);\n      w[62] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[61] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[60] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[59] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[58] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[57] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[56] = hc_bytealign_be (    0, w[ 0], offset);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_bytealign_be (w[ 5], w[ 6], offset);\n      w[62] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[61] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[60] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[59] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[58] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[57] = hc_bytealign_be (    0, w[ 0], offset);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_bytealign_be (w[ 4], w[ 5], offset);\n      w[62] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[61] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[60] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[59] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[58] = hc_bytealign_be (    0, w[ 0], offset);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_bytealign_be (w[ 3], w[ 4], offset);\n      w[62] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[61] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[60] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[59] = hc_bytealign_be (    0, w[ 0], offset);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_bytealign_be (w[ 2], w[ 3], offset);\n      w[62] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[61] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[60] = hc_bytealign_be (    0, w[ 0], offset);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_bytealign_be (w[ 1], w[ 2], offset);\n      w[62] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[61] = hc_bytealign_be (    0, w[ 0], offset);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_bytealign_be (w[ 0], w[ 1], offset);\n      w[62] = hc_bytealign_be (    0, w[ 0], offset);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_bytealign_be (    0, w[ 0], offset);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_byte_perm (w[63], w[62], selector);\n      w[62] = hc_byte_perm (w[62], w[61], selector);\n      w[61] = hc_byte_perm (w[61], w[60], selector);\n      w[60] = hc_byte_perm (w[60], w[59], selector);\n      w[59] = hc_byte_perm (w[59], w[58], selector);\n      w[58] = hc_byte_perm (w[58], w[57], selector);\n      w[57] = hc_byte_perm (w[57], w[56], selector);\n      w[56] = hc_byte_perm (w[56], w[55], selector);\n      w[55] = hc_byte_perm (w[55], w[54], selector);\n      w[54] = hc_byte_perm (w[54], w[53], selector);\n      w[53] = hc_byte_perm (w[53], w[52], selector);\n      w[52] = hc_byte_perm (w[52], w[51], selector);\n      w[51] = hc_byte_perm (w[51], w[50], selector);\n      w[50] = hc_byte_perm (w[50], w[49], selector);\n      w[49] = hc_byte_perm (w[49], w[48], selector);\n      w[48] = hc_byte_perm (w[48], w[47], selector);\n      w[47] = hc_byte_perm (w[47], w[46], selector);\n      w[46] = hc_byte_perm (w[46], w[45], selector);\n      w[45] = hc_byte_perm (w[45], w[44], selector);\n      w[44] = hc_byte_perm (w[44], w[43], selector);\n      w[43] = hc_byte_perm (w[43], w[42], selector);\n      w[42] = hc_byte_perm (w[42], w[41], selector);\n      w[41] = hc_byte_perm (w[41], w[40], selector);\n      w[40] = hc_byte_perm (w[40], w[39], selector);\n      w[39] = hc_byte_perm (w[39], w[38], selector);\n      w[38] = hc_byte_perm (w[38], w[37], selector);\n      w[37] = hc_byte_perm (w[37], w[36], selector);\n      w[36] = hc_byte_perm (w[36], w[35], selector);\n      w[35] = hc_byte_perm (w[35], w[34], selector);\n      w[34] = hc_byte_perm (w[34], w[33], selector);\n      w[33] = hc_byte_perm (w[33], w[32], selector);\n      w[32] = hc_byte_perm (w[32], w[31], selector);\n      w[31] = hc_byte_perm (w[31], w[30], selector);\n      w[30] = hc_byte_perm (w[30], w[29], selector);\n      w[29] = hc_byte_perm (w[29], w[28], selector);\n      w[28] = hc_byte_perm (w[28], w[27], selector);\n      w[27] = hc_byte_perm (w[27], w[26], selector);\n      w[26] = hc_byte_perm (w[26], w[25], selector);\n      w[25] = hc_byte_perm (w[25], w[24], selector);\n      w[24] = hc_byte_perm (w[24], w[23], selector);\n      w[23] = hc_byte_perm (w[23], w[22], selector);\n      w[22] = hc_byte_perm (w[22], w[21], selector);\n      w[21] = hc_byte_perm (w[21], w[20], selector);\n      w[20] = hc_byte_perm (w[20], w[19], selector);\n      w[19] = hc_byte_perm (w[19], w[18], selector);\n      w[18] = hc_byte_perm (w[18], w[17], selector);\n      w[17] = hc_byte_perm (w[17], w[16], selector);\n      w[16] = hc_byte_perm (w[16], w[15], selector);\n      w[15] = hc_byte_perm (w[15], w[14], selector);\n      w[14] = hc_byte_perm (w[14], w[13], selector);\n      w[13] = hc_byte_perm (w[13], w[12], selector);\n      w[12] = hc_byte_perm (w[12], w[11], selector);\n      w[11] = hc_byte_perm (w[11], w[10], selector);\n      w[10] = hc_byte_perm (w[10], w[ 9], selector);\n      w[ 9] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[ 8] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[ 7] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[ 6] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[ 5] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[ 4] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 3] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 2] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 1] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 0] = hc_byte_perm (w[ 0],     0, selector);\n\n      break;\n\n    case  1:\n      w[63] = hc_byte_perm (w[62], w[61], selector);\n      w[62] = hc_byte_perm (w[61], w[60], selector);\n      w[61] = hc_byte_perm (w[60], w[59], selector);\n      w[60] = hc_byte_perm (w[59], w[58], selector);\n      w[59] = hc_byte_perm (w[58], w[57], selector);\n      w[58] = hc_byte_perm (w[57], w[56], selector);\n      w[57] = hc_byte_perm (w[56], w[55], selector);\n      w[56] = hc_byte_perm (w[55], w[54], selector);\n      w[55] = hc_byte_perm (w[54], w[53], selector);\n      w[54] = hc_byte_perm (w[53], w[52], selector);\n      w[53] = hc_byte_perm (w[52], w[51], selector);\n      w[52] = hc_byte_perm (w[51], w[50], selector);\n      w[51] = hc_byte_perm (w[50], w[49], selector);\n      w[50] = hc_byte_perm (w[49], w[48], selector);\n      w[49] = hc_byte_perm (w[48], w[47], selector);\n      w[48] = hc_byte_perm (w[47], w[46], selector);\n      w[47] = hc_byte_perm (w[46], w[45], selector);\n      w[46] = hc_byte_perm (w[45], w[44], selector);\n      w[45] = hc_byte_perm (w[44], w[43], selector);\n      w[44] = hc_byte_perm (w[43], w[42], selector);\n      w[43] = hc_byte_perm (w[42], w[41], selector);\n      w[42] = hc_byte_perm (w[41], w[40], selector);\n      w[41] = hc_byte_perm (w[40], w[39], selector);\n      w[40] = hc_byte_perm (w[39], w[38], selector);\n      w[39] = hc_byte_perm (w[38], w[37], selector);\n      w[38] = hc_byte_perm (w[37], w[36], selector);\n      w[37] = hc_byte_perm (w[36], w[35], selector);\n      w[36] = hc_byte_perm (w[35], w[34], selector);\n      w[35] = hc_byte_perm (w[34], w[33], selector);\n      w[34] = hc_byte_perm (w[33], w[32], selector);\n      w[33] = hc_byte_perm (w[32], w[31], selector);\n      w[32] = hc_byte_perm (w[31], w[30], selector);\n      w[31] = hc_byte_perm (w[30], w[29], selector);\n      w[30] = hc_byte_perm (w[29], w[28], selector);\n      w[29] = hc_byte_perm (w[28], w[27], selector);\n      w[28] = hc_byte_perm (w[27], w[26], selector);\n      w[27] = hc_byte_perm (w[26], w[25], selector);\n      w[26] = hc_byte_perm (w[25], w[24], selector);\n      w[25] = hc_byte_perm (w[24], w[23], selector);\n      w[24] = hc_byte_perm (w[23], w[22], selector);\n      w[23] = hc_byte_perm (w[22], w[21], selector);\n      w[22] = hc_byte_perm (w[21], w[20], selector);\n      w[21] = hc_byte_perm (w[20], w[19], selector);\n      w[20] = hc_byte_perm (w[19], w[18], selector);\n      w[19] = hc_byte_perm (w[18], w[17], selector);\n      w[18] = hc_byte_perm (w[17], w[16], selector);\n      w[17] = hc_byte_perm (w[16], w[15], selector);\n      w[16] = hc_byte_perm (w[15], w[14], selector);\n      w[15] = hc_byte_perm (w[14], w[13], selector);\n      w[14] = hc_byte_perm (w[13], w[12], selector);\n      w[13] = hc_byte_perm (w[12], w[11], selector);\n      w[12] = hc_byte_perm (w[11], w[10], selector);\n      w[11] = hc_byte_perm (w[10], w[ 9], selector);\n      w[10] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[ 9] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[ 8] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[ 7] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[ 6] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[ 5] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 4] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 3] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 2] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 1] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_byte_perm (w[61], w[60], selector);\n      w[62] = hc_byte_perm (w[60], w[59], selector);\n      w[61] = hc_byte_perm (w[59], w[58], selector);\n      w[60] = hc_byte_perm (w[58], w[57], selector);\n      w[59] = hc_byte_perm (w[57], w[56], selector);\n      w[58] = hc_byte_perm (w[56], w[55], selector);\n      w[57] = hc_byte_perm (w[55], w[54], selector);\n      w[56] = hc_byte_perm (w[54], w[53], selector);\n      w[55] = hc_byte_perm (w[53], w[52], selector);\n      w[54] = hc_byte_perm (w[52], w[51], selector);\n      w[53] = hc_byte_perm (w[51], w[50], selector);\n      w[52] = hc_byte_perm (w[50], w[49], selector);\n      w[51] = hc_byte_perm (w[49], w[48], selector);\n      w[50] = hc_byte_perm (w[48], w[47], selector);\n      w[49] = hc_byte_perm (w[47], w[46], selector);\n      w[48] = hc_byte_perm (w[46], w[45], selector);\n      w[47] = hc_byte_perm (w[45], w[44], selector);\n      w[46] = hc_byte_perm (w[44], w[43], selector);\n      w[45] = hc_byte_perm (w[43], w[42], selector);\n      w[44] = hc_byte_perm (w[42], w[41], selector);\n      w[43] = hc_byte_perm (w[41], w[40], selector);\n      w[42] = hc_byte_perm (w[40], w[39], selector);\n      w[41] = hc_byte_perm (w[39], w[38], selector);\n      w[40] = hc_byte_perm (w[38], w[37], selector);\n      w[39] = hc_byte_perm (w[37], w[36], selector);\n      w[38] = hc_byte_perm (w[36], w[35], selector);\n      w[37] = hc_byte_perm (w[35], w[34], selector);\n      w[36] = hc_byte_perm (w[34], w[33], selector);\n      w[35] = hc_byte_perm (w[33], w[32], selector);\n      w[34] = hc_byte_perm (w[32], w[31], selector);\n      w[33] = hc_byte_perm (w[31], w[30], selector);\n      w[32] = hc_byte_perm (w[30], w[29], selector);\n      w[31] = hc_byte_perm (w[29], w[28], selector);\n      w[30] = hc_byte_perm (w[28], w[27], selector);\n      w[29] = hc_byte_perm (w[27], w[26], selector);\n      w[28] = hc_byte_perm (w[26], w[25], selector);\n      w[27] = hc_byte_perm (w[25], w[24], selector);\n      w[26] = hc_byte_perm (w[24], w[23], selector);\n      w[25] = hc_byte_perm (w[23], w[22], selector);\n      w[24] = hc_byte_perm (w[22], w[21], selector);\n      w[23] = hc_byte_perm (w[21], w[20], selector);\n      w[22] = hc_byte_perm (w[20], w[19], selector);\n      w[21] = hc_byte_perm (w[19], w[18], selector);\n      w[20] = hc_byte_perm (w[18], w[17], selector);\n      w[19] = hc_byte_perm (w[17], w[16], selector);\n      w[18] = hc_byte_perm (w[16], w[15], selector);\n      w[17] = hc_byte_perm (w[15], w[14], selector);\n      w[16] = hc_byte_perm (w[14], w[13], selector);\n      w[15] = hc_byte_perm (w[13], w[12], selector);\n      w[14] = hc_byte_perm (w[12], w[11], selector);\n      w[13] = hc_byte_perm (w[11], w[10], selector);\n      w[12] = hc_byte_perm (w[10], w[ 9], selector);\n      w[11] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[10] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[ 9] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[ 8] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[ 7] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[ 6] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 5] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 4] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 3] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 2] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_byte_perm (w[60], w[59], selector);\n      w[62] = hc_byte_perm (w[59], w[58], selector);\n      w[61] = hc_byte_perm (w[58], w[57], selector);\n      w[60] = hc_byte_perm (w[57], w[56], selector);\n      w[59] = hc_byte_perm (w[56], w[55], selector);\n      w[58] = hc_byte_perm (w[55], w[54], selector);\n      w[57] = hc_byte_perm (w[54], w[53], selector);\n      w[56] = hc_byte_perm (w[53], w[52], selector);\n      w[55] = hc_byte_perm (w[52], w[51], selector);\n      w[54] = hc_byte_perm (w[51], w[50], selector);\n      w[53] = hc_byte_perm (w[50], w[49], selector);\n      w[52] = hc_byte_perm (w[49], w[48], selector);\n      w[51] = hc_byte_perm (w[48], w[47], selector);\n      w[50] = hc_byte_perm (w[47], w[46], selector);\n      w[49] = hc_byte_perm (w[46], w[45], selector);\n      w[48] = hc_byte_perm (w[45], w[44], selector);\n      w[47] = hc_byte_perm (w[44], w[43], selector);\n      w[46] = hc_byte_perm (w[43], w[42], selector);\n      w[45] = hc_byte_perm (w[42], w[41], selector);\n      w[44] = hc_byte_perm (w[41], w[40], selector);\n      w[43] = hc_byte_perm (w[40], w[39], selector);\n      w[42] = hc_byte_perm (w[39], w[38], selector);\n      w[41] = hc_byte_perm (w[38], w[37], selector);\n      w[40] = hc_byte_perm (w[37], w[36], selector);\n      w[39] = hc_byte_perm (w[36], w[35], selector);\n      w[38] = hc_byte_perm (w[35], w[34], selector);\n      w[37] = hc_byte_perm (w[34], w[33], selector);\n      w[36] = hc_byte_perm (w[33], w[32], selector);\n      w[35] = hc_byte_perm (w[32], w[31], selector);\n      w[34] = hc_byte_perm (w[31], w[30], selector);\n      w[33] = hc_byte_perm (w[30], w[29], selector);\n      w[32] = hc_byte_perm (w[29], w[28], selector);\n      w[31] = hc_byte_perm (w[28], w[27], selector);\n      w[30] = hc_byte_perm (w[27], w[26], selector);\n      w[29] = hc_byte_perm (w[26], w[25], selector);\n      w[28] = hc_byte_perm (w[25], w[24], selector);\n      w[27] = hc_byte_perm (w[24], w[23], selector);\n      w[26] = hc_byte_perm (w[23], w[22], selector);\n      w[25] = hc_byte_perm (w[22], w[21], selector);\n      w[24] = hc_byte_perm (w[21], w[20], selector);\n      w[23] = hc_byte_perm (w[20], w[19], selector);\n      w[22] = hc_byte_perm (w[19], w[18], selector);\n      w[21] = hc_byte_perm (w[18], w[17], selector);\n      w[20] = hc_byte_perm (w[17], w[16], selector);\n      w[19] = hc_byte_perm (w[16], w[15], selector);\n      w[18] = hc_byte_perm (w[15], w[14], selector);\n      w[17] = hc_byte_perm (w[14], w[13], selector);\n      w[16] = hc_byte_perm (w[13], w[12], selector);\n      w[15] = hc_byte_perm (w[12], w[11], selector);\n      w[14] = hc_byte_perm (w[11], w[10], selector);\n      w[13] = hc_byte_perm (w[10], w[ 9], selector);\n      w[12] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[11] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[10] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[ 9] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[ 8] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[ 7] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 6] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 5] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 4] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 3] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_byte_perm (w[59], w[58], selector);\n      w[62] = hc_byte_perm (w[58], w[57], selector);\n      w[61] = hc_byte_perm (w[57], w[56], selector);\n      w[60] = hc_byte_perm (w[56], w[55], selector);\n      w[59] = hc_byte_perm (w[55], w[54], selector);\n      w[58] = hc_byte_perm (w[54], w[53], selector);\n      w[57] = hc_byte_perm (w[53], w[52], selector);\n      w[56] = hc_byte_perm (w[52], w[51], selector);\n      w[55] = hc_byte_perm (w[51], w[50], selector);\n      w[54] = hc_byte_perm (w[50], w[49], selector);\n      w[53] = hc_byte_perm (w[49], w[48], selector);\n      w[52] = hc_byte_perm (w[48], w[47], selector);\n      w[51] = hc_byte_perm (w[47], w[46], selector);\n      w[50] = hc_byte_perm (w[46], w[45], selector);\n      w[49] = hc_byte_perm (w[45], w[44], selector);\n      w[48] = hc_byte_perm (w[44], w[43], selector);\n      w[47] = hc_byte_perm (w[43], w[42], selector);\n      w[46] = hc_byte_perm (w[42], w[41], selector);\n      w[45] = hc_byte_perm (w[41], w[40], selector);\n      w[44] = hc_byte_perm (w[40], w[39], selector);\n      w[43] = hc_byte_perm (w[39], w[38], selector);\n      w[42] = hc_byte_perm (w[38], w[37], selector);\n      w[41] = hc_byte_perm (w[37], w[36], selector);\n      w[40] = hc_byte_perm (w[36], w[35], selector);\n      w[39] = hc_byte_perm (w[35], w[34], selector);\n      w[38] = hc_byte_perm (w[34], w[33], selector);\n      w[37] = hc_byte_perm (w[33], w[32], selector);\n      w[36] = hc_byte_perm (w[32], w[31], selector);\n      w[35] = hc_byte_perm (w[31], w[30], selector);\n      w[34] = hc_byte_perm (w[30], w[29], selector);\n      w[33] = hc_byte_perm (w[29], w[28], selector);\n      w[32] = hc_byte_perm (w[28], w[27], selector);\n      w[31] = hc_byte_perm (w[27], w[26], selector);\n      w[30] = hc_byte_perm (w[26], w[25], selector);\n      w[29] = hc_byte_perm (w[25], w[24], selector);\n      w[28] = hc_byte_perm (w[24], w[23], selector);\n      w[27] = hc_byte_perm (w[23], w[22], selector);\n      w[26] = hc_byte_perm (w[22], w[21], selector);\n      w[25] = hc_byte_perm (w[21], w[20], selector);\n      w[24] = hc_byte_perm (w[20], w[19], selector);\n      w[23] = hc_byte_perm (w[19], w[18], selector);\n      w[22] = hc_byte_perm (w[18], w[17], selector);\n      w[21] = hc_byte_perm (w[17], w[16], selector);\n      w[20] = hc_byte_perm (w[16], w[15], selector);\n      w[19] = hc_byte_perm (w[15], w[14], selector);\n      w[18] = hc_byte_perm (w[14], w[13], selector);\n      w[17] = hc_byte_perm (w[13], w[12], selector);\n      w[16] = hc_byte_perm (w[12], w[11], selector);\n      w[15] = hc_byte_perm (w[11], w[10], selector);\n      w[14] = hc_byte_perm (w[10], w[ 9], selector);\n      w[13] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[12] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[11] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[10] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[ 9] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[ 8] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 7] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 6] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 5] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 4] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_byte_perm (w[58], w[57], selector);\n      w[62] = hc_byte_perm (w[57], w[56], selector);\n      w[61] = hc_byte_perm (w[56], w[55], selector);\n      w[60] = hc_byte_perm (w[55], w[54], selector);\n      w[59] = hc_byte_perm (w[54], w[53], selector);\n      w[58] = hc_byte_perm (w[53], w[52], selector);\n      w[57] = hc_byte_perm (w[52], w[51], selector);\n      w[56] = hc_byte_perm (w[51], w[50], selector);\n      w[55] = hc_byte_perm (w[50], w[49], selector);\n      w[54] = hc_byte_perm (w[49], w[48], selector);\n      w[53] = hc_byte_perm (w[48], w[47], selector);\n      w[52] = hc_byte_perm (w[47], w[46], selector);\n      w[51] = hc_byte_perm (w[46], w[45], selector);\n      w[50] = hc_byte_perm (w[45], w[44], selector);\n      w[49] = hc_byte_perm (w[44], w[43], selector);\n      w[48] = hc_byte_perm (w[43], w[42], selector);\n      w[47] = hc_byte_perm (w[42], w[41], selector);\n      w[46] = hc_byte_perm (w[41], w[40], selector);\n      w[45] = hc_byte_perm (w[40], w[39], selector);\n      w[44] = hc_byte_perm (w[39], w[38], selector);\n      w[43] = hc_byte_perm (w[38], w[37], selector);\n      w[42] = hc_byte_perm (w[37], w[36], selector);\n      w[41] = hc_byte_perm (w[36], w[35], selector);\n      w[40] = hc_byte_perm (w[35], w[34], selector);\n      w[39] = hc_byte_perm (w[34], w[33], selector);\n      w[38] = hc_byte_perm (w[33], w[32], selector);\n      w[37] = hc_byte_perm (w[32], w[31], selector);\n      w[36] = hc_byte_perm (w[31], w[30], selector);\n      w[35] = hc_byte_perm (w[30], w[29], selector);\n      w[34] = hc_byte_perm (w[29], w[28], selector);\n      w[33] = hc_byte_perm (w[28], w[27], selector);\n      w[32] = hc_byte_perm (w[27], w[26], selector);\n      w[31] = hc_byte_perm (w[26], w[25], selector);\n      w[30] = hc_byte_perm (w[25], w[24], selector);\n      w[29] = hc_byte_perm (w[24], w[23], selector);\n      w[28] = hc_byte_perm (w[23], w[22], selector);\n      w[27] = hc_byte_perm (w[22], w[21], selector);\n      w[26] = hc_byte_perm (w[21], w[20], selector);\n      w[25] = hc_byte_perm (w[20], w[19], selector);\n      w[24] = hc_byte_perm (w[19], w[18], selector);\n      w[23] = hc_byte_perm (w[18], w[17], selector);\n      w[22] = hc_byte_perm (w[17], w[16], selector);\n      w[21] = hc_byte_perm (w[16], w[15], selector);\n      w[20] = hc_byte_perm (w[15], w[14], selector);\n      w[19] = hc_byte_perm (w[14], w[13], selector);\n      w[18] = hc_byte_perm (w[13], w[12], selector);\n      w[17] = hc_byte_perm (w[12], w[11], selector);\n      w[16] = hc_byte_perm (w[11], w[10], selector);\n      w[15] = hc_byte_perm (w[10], w[ 9], selector);\n      w[14] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[13] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[12] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[11] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[10] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[ 9] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 8] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 7] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 6] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 5] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_byte_perm (w[57], w[56], selector);\n      w[62] = hc_byte_perm (w[56], w[55], selector);\n      w[61] = hc_byte_perm (w[55], w[54], selector);\n      w[60] = hc_byte_perm (w[54], w[53], selector);\n      w[59] = hc_byte_perm (w[53], w[52], selector);\n      w[58] = hc_byte_perm (w[52], w[51], selector);\n      w[57] = hc_byte_perm (w[51], w[50], selector);\n      w[56] = hc_byte_perm (w[50], w[49], selector);\n      w[55] = hc_byte_perm (w[49], w[48], selector);\n      w[54] = hc_byte_perm (w[48], w[47], selector);\n      w[53] = hc_byte_perm (w[47], w[46], selector);\n      w[52] = hc_byte_perm (w[46], w[45], selector);\n      w[51] = hc_byte_perm (w[45], w[44], selector);\n      w[50] = hc_byte_perm (w[44], w[43], selector);\n      w[49] = hc_byte_perm (w[43], w[42], selector);\n      w[48] = hc_byte_perm (w[42], w[41], selector);\n      w[47] = hc_byte_perm (w[41], w[40], selector);\n      w[46] = hc_byte_perm (w[40], w[39], selector);\n      w[45] = hc_byte_perm (w[39], w[38], selector);\n      w[44] = hc_byte_perm (w[38], w[37], selector);\n      w[43] = hc_byte_perm (w[37], w[36], selector);\n      w[42] = hc_byte_perm (w[36], w[35], selector);\n      w[41] = hc_byte_perm (w[35], w[34], selector);\n      w[40] = hc_byte_perm (w[34], w[33], selector);\n      w[39] = hc_byte_perm (w[33], w[32], selector);\n      w[38] = hc_byte_perm (w[32], w[31], selector);\n      w[37] = hc_byte_perm (w[31], w[30], selector);\n      w[36] = hc_byte_perm (w[30], w[29], selector);\n      w[35] = hc_byte_perm (w[29], w[28], selector);\n      w[34] = hc_byte_perm (w[28], w[27], selector);\n      w[33] = hc_byte_perm (w[27], w[26], selector);\n      w[32] = hc_byte_perm (w[26], w[25], selector);\n      w[31] = hc_byte_perm (w[25], w[24], selector);\n      w[30] = hc_byte_perm (w[24], w[23], selector);\n      w[29] = hc_byte_perm (w[23], w[22], selector);\n      w[28] = hc_byte_perm (w[22], w[21], selector);\n      w[27] = hc_byte_perm (w[21], w[20], selector);\n      w[26] = hc_byte_perm (w[20], w[19], selector);\n      w[25] = hc_byte_perm (w[19], w[18], selector);\n      w[24] = hc_byte_perm (w[18], w[17], selector);\n      w[23] = hc_byte_perm (w[17], w[16], selector);\n      w[22] = hc_byte_perm (w[16], w[15], selector);\n      w[21] = hc_byte_perm (w[15], w[14], selector);\n      w[20] = hc_byte_perm (w[14], w[13], selector);\n      w[19] = hc_byte_perm (w[13], w[12], selector);\n      w[18] = hc_byte_perm (w[12], w[11], selector);\n      w[17] = hc_byte_perm (w[11], w[10], selector);\n      w[16] = hc_byte_perm (w[10], w[ 9], selector);\n      w[15] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[14] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[13] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[12] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[11] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[10] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[ 9] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 8] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 7] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 6] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_byte_perm (w[56], w[55], selector);\n      w[62] = hc_byte_perm (w[55], w[54], selector);\n      w[61] = hc_byte_perm (w[54], w[53], selector);\n      w[60] = hc_byte_perm (w[53], w[52], selector);\n      w[59] = hc_byte_perm (w[52], w[51], selector);\n      w[58] = hc_byte_perm (w[51], w[50], selector);\n      w[57] = hc_byte_perm (w[50], w[49], selector);\n      w[56] = hc_byte_perm (w[49], w[48], selector);\n      w[55] = hc_byte_perm (w[48], w[47], selector);\n      w[54] = hc_byte_perm (w[47], w[46], selector);\n      w[53] = hc_byte_perm (w[46], w[45], selector);\n      w[52] = hc_byte_perm (w[45], w[44], selector);\n      w[51] = hc_byte_perm (w[44], w[43], selector);\n      w[50] = hc_byte_perm (w[43], w[42], selector);\n      w[49] = hc_byte_perm (w[42], w[41], selector);\n      w[48] = hc_byte_perm (w[41], w[40], selector);\n      w[47] = hc_byte_perm (w[40], w[39], selector);\n      w[46] = hc_byte_perm (w[39], w[38], selector);\n      w[45] = hc_byte_perm (w[38], w[37], selector);\n      w[44] = hc_byte_perm (w[37], w[36], selector);\n      w[43] = hc_byte_perm (w[36], w[35], selector);\n      w[42] = hc_byte_perm (w[35], w[34], selector);\n      w[41] = hc_byte_perm (w[34], w[33], selector);\n      w[40] = hc_byte_perm (w[33], w[32], selector);\n      w[39] = hc_byte_perm (w[32], w[31], selector);\n      w[38] = hc_byte_perm (w[31], w[30], selector);\n      w[37] = hc_byte_perm (w[30], w[29], selector);\n      w[36] = hc_byte_perm (w[29], w[28], selector);\n      w[35] = hc_byte_perm (w[28], w[27], selector);\n      w[34] = hc_byte_perm (w[27], w[26], selector);\n      w[33] = hc_byte_perm (w[26], w[25], selector);\n      w[32] = hc_byte_perm (w[25], w[24], selector);\n      w[31] = hc_byte_perm (w[24], w[23], selector);\n      w[30] = hc_byte_perm (w[23], w[22], selector);\n      w[29] = hc_byte_perm (w[22], w[21], selector);\n      w[28] = hc_byte_perm (w[21], w[20], selector);\n      w[27] = hc_byte_perm (w[20], w[19], selector);\n      w[26] = hc_byte_perm (w[19], w[18], selector);\n      w[25] = hc_byte_perm (w[18], w[17], selector);\n      w[24] = hc_byte_perm (w[17], w[16], selector);\n      w[23] = hc_byte_perm (w[16], w[15], selector);\n      w[22] = hc_byte_perm (w[15], w[14], selector);\n      w[21] = hc_byte_perm (w[14], w[13], selector);\n      w[20] = hc_byte_perm (w[13], w[12], selector);\n      w[19] = hc_byte_perm (w[12], w[11], selector);\n      w[18] = hc_byte_perm (w[11], w[10], selector);\n      w[17] = hc_byte_perm (w[10], w[ 9], selector);\n      w[16] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[15] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[14] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[13] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[12] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[11] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[10] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[ 9] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 8] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 7] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_byte_perm (w[55], w[54], selector);\n      w[62] = hc_byte_perm (w[54], w[53], selector);\n      w[61] = hc_byte_perm (w[53], w[52], selector);\n      w[60] = hc_byte_perm (w[52], w[51], selector);\n      w[59] = hc_byte_perm (w[51], w[50], selector);\n      w[58] = hc_byte_perm (w[50], w[49], selector);\n      w[57] = hc_byte_perm (w[49], w[48], selector);\n      w[56] = hc_byte_perm (w[48], w[47], selector);\n      w[55] = hc_byte_perm (w[47], w[46], selector);\n      w[54] = hc_byte_perm (w[46], w[45], selector);\n      w[53] = hc_byte_perm (w[45], w[44], selector);\n      w[52] = hc_byte_perm (w[44], w[43], selector);\n      w[51] = hc_byte_perm (w[43], w[42], selector);\n      w[50] = hc_byte_perm (w[42], w[41], selector);\n      w[49] = hc_byte_perm (w[41], w[40], selector);\n      w[48] = hc_byte_perm (w[40], w[39], selector);\n      w[47] = hc_byte_perm (w[39], w[38], selector);\n      w[46] = hc_byte_perm (w[38], w[37], selector);\n      w[45] = hc_byte_perm (w[37], w[36], selector);\n      w[44] = hc_byte_perm (w[36], w[35], selector);\n      w[43] = hc_byte_perm (w[35], w[34], selector);\n      w[42] = hc_byte_perm (w[34], w[33], selector);\n      w[41] = hc_byte_perm (w[33], w[32], selector);\n      w[40] = hc_byte_perm (w[32], w[31], selector);\n      w[39] = hc_byte_perm (w[31], w[30], selector);\n      w[38] = hc_byte_perm (w[30], w[29], selector);\n      w[37] = hc_byte_perm (w[29], w[28], selector);\n      w[36] = hc_byte_perm (w[28], w[27], selector);\n      w[35] = hc_byte_perm (w[27], w[26], selector);\n      w[34] = hc_byte_perm (w[26], w[25], selector);\n      w[33] = hc_byte_perm (w[25], w[24], selector);\n      w[32] = hc_byte_perm (w[24], w[23], selector);\n      w[31] = hc_byte_perm (w[23], w[22], selector);\n      w[30] = hc_byte_perm (w[22], w[21], selector);\n      w[29] = hc_byte_perm (w[21], w[20], selector);\n      w[28] = hc_byte_perm (w[20], w[19], selector);\n      w[27] = hc_byte_perm (w[19], w[18], selector);\n      w[26] = hc_byte_perm (w[18], w[17], selector);\n      w[25] = hc_byte_perm (w[17], w[16], selector);\n      w[24] = hc_byte_perm (w[16], w[15], selector);\n      w[23] = hc_byte_perm (w[15], w[14], selector);\n      w[22] = hc_byte_perm (w[14], w[13], selector);\n      w[21] = hc_byte_perm (w[13], w[12], selector);\n      w[20] = hc_byte_perm (w[12], w[11], selector);\n      w[19] = hc_byte_perm (w[11], w[10], selector);\n      w[18] = hc_byte_perm (w[10], w[ 9], selector);\n      w[17] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[16] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[15] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[14] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[13] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[12] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[11] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[10] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[ 9] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 8] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_byte_perm (w[54], w[53], selector);\n      w[62] = hc_byte_perm (w[53], w[52], selector);\n      w[61] = hc_byte_perm (w[52], w[51], selector);\n      w[60] = hc_byte_perm (w[51], w[50], selector);\n      w[59] = hc_byte_perm (w[50], w[49], selector);\n      w[58] = hc_byte_perm (w[49], w[48], selector);\n      w[57] = hc_byte_perm (w[48], w[47], selector);\n      w[56] = hc_byte_perm (w[47], w[46], selector);\n      w[55] = hc_byte_perm (w[46], w[45], selector);\n      w[54] = hc_byte_perm (w[45], w[44], selector);\n      w[53] = hc_byte_perm (w[44], w[43], selector);\n      w[52] = hc_byte_perm (w[43], w[42], selector);\n      w[51] = hc_byte_perm (w[42], w[41], selector);\n      w[50] = hc_byte_perm (w[41], w[40], selector);\n      w[49] = hc_byte_perm (w[40], w[39], selector);\n      w[48] = hc_byte_perm (w[39], w[38], selector);\n      w[47] = hc_byte_perm (w[38], w[37], selector);\n      w[46] = hc_byte_perm (w[37], w[36], selector);\n      w[45] = hc_byte_perm (w[36], w[35], selector);\n      w[44] = hc_byte_perm (w[35], w[34], selector);\n      w[43] = hc_byte_perm (w[34], w[33], selector);\n      w[42] = hc_byte_perm (w[33], w[32], selector);\n      w[41] = hc_byte_perm (w[32], w[31], selector);\n      w[40] = hc_byte_perm (w[31], w[30], selector);\n      w[39] = hc_byte_perm (w[30], w[29], selector);\n      w[38] = hc_byte_perm (w[29], w[28], selector);\n      w[37] = hc_byte_perm (w[28], w[27], selector);\n      w[36] = hc_byte_perm (w[27], w[26], selector);\n      w[35] = hc_byte_perm (w[26], w[25], selector);\n      w[34] = hc_byte_perm (w[25], w[24], selector);\n      w[33] = hc_byte_perm (w[24], w[23], selector);\n      w[32] = hc_byte_perm (w[23], w[22], selector);\n      w[31] = hc_byte_perm (w[22], w[21], selector);\n      w[30] = hc_byte_perm (w[21], w[20], selector);\n      w[29] = hc_byte_perm (w[20], w[19], selector);\n      w[28] = hc_byte_perm (w[19], w[18], selector);\n      w[27] = hc_byte_perm (w[18], w[17], selector);\n      w[26] = hc_byte_perm (w[17], w[16], selector);\n      w[25] = hc_byte_perm (w[16], w[15], selector);\n      w[24] = hc_byte_perm (w[15], w[14], selector);\n      w[23] = hc_byte_perm (w[14], w[13], selector);\n      w[22] = hc_byte_perm (w[13], w[12], selector);\n      w[21] = hc_byte_perm (w[12], w[11], selector);\n      w[20] = hc_byte_perm (w[11], w[10], selector);\n      w[19] = hc_byte_perm (w[10], w[ 9], selector);\n      w[18] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[17] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[16] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[15] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[14] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[13] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[12] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[11] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[10] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[ 9] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_byte_perm (w[53], w[52], selector);\n      w[62] = hc_byte_perm (w[52], w[51], selector);\n      w[61] = hc_byte_perm (w[51], w[50], selector);\n      w[60] = hc_byte_perm (w[50], w[49], selector);\n      w[59] = hc_byte_perm (w[49], w[48], selector);\n      w[58] = hc_byte_perm (w[48], w[47], selector);\n      w[57] = hc_byte_perm (w[47], w[46], selector);\n      w[56] = hc_byte_perm (w[46], w[45], selector);\n      w[55] = hc_byte_perm (w[45], w[44], selector);\n      w[54] = hc_byte_perm (w[44], w[43], selector);\n      w[53] = hc_byte_perm (w[43], w[42], selector);\n      w[52] = hc_byte_perm (w[42], w[41], selector);\n      w[51] = hc_byte_perm (w[41], w[40], selector);\n      w[50] = hc_byte_perm (w[40], w[39], selector);\n      w[49] = hc_byte_perm (w[39], w[38], selector);\n      w[48] = hc_byte_perm (w[38], w[37], selector);\n      w[47] = hc_byte_perm (w[37], w[36], selector);\n      w[46] = hc_byte_perm (w[36], w[35], selector);\n      w[45] = hc_byte_perm (w[35], w[34], selector);\n      w[44] = hc_byte_perm (w[34], w[33], selector);\n      w[43] = hc_byte_perm (w[33], w[32], selector);\n      w[42] = hc_byte_perm (w[32], w[31], selector);\n      w[41] = hc_byte_perm (w[31], w[30], selector);\n      w[40] = hc_byte_perm (w[30], w[29], selector);\n      w[39] = hc_byte_perm (w[29], w[28], selector);\n      w[38] = hc_byte_perm (w[28], w[27], selector);\n      w[37] = hc_byte_perm (w[27], w[26], selector);\n      w[36] = hc_byte_perm (w[26], w[25], selector);\n      w[35] = hc_byte_perm (w[25], w[24], selector);\n      w[34] = hc_byte_perm (w[24], w[23], selector);\n      w[33] = hc_byte_perm (w[23], w[22], selector);\n      w[32] = hc_byte_perm (w[22], w[21], selector);\n      w[31] = hc_byte_perm (w[21], w[20], selector);\n      w[30] = hc_byte_perm (w[20], w[19], selector);\n      w[29] = hc_byte_perm (w[19], w[18], selector);\n      w[28] = hc_byte_perm (w[18], w[17], selector);\n      w[27] = hc_byte_perm (w[17], w[16], selector);\n      w[26] = hc_byte_perm (w[16], w[15], selector);\n      w[25] = hc_byte_perm (w[15], w[14], selector);\n      w[24] = hc_byte_perm (w[14], w[13], selector);\n      w[23] = hc_byte_perm (w[13], w[12], selector);\n      w[22] = hc_byte_perm (w[12], w[11], selector);\n      w[21] = hc_byte_perm (w[11], w[10], selector);\n      w[20] = hc_byte_perm (w[10], w[ 9], selector);\n      w[19] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[18] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[17] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[16] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[15] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[14] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[13] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[12] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[11] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[10] = hc_byte_perm (w[ 0],     0, selector);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_byte_perm (w[52], w[51], selector);\n      w[62] = hc_byte_perm (w[51], w[50], selector);\n      w[61] = hc_byte_perm (w[50], w[49], selector);\n      w[60] = hc_byte_perm (w[49], w[48], selector);\n      w[59] = hc_byte_perm (w[48], w[47], selector);\n      w[58] = hc_byte_perm (w[47], w[46], selector);\n      w[57] = hc_byte_perm (w[46], w[45], selector);\n      w[56] = hc_byte_perm (w[45], w[44], selector);\n      w[55] = hc_byte_perm (w[44], w[43], selector);\n      w[54] = hc_byte_perm (w[43], w[42], selector);\n      w[53] = hc_byte_perm (w[42], w[41], selector);\n      w[52] = hc_byte_perm (w[41], w[40], selector);\n      w[51] = hc_byte_perm (w[40], w[39], selector);\n      w[50] = hc_byte_perm (w[39], w[38], selector);\n      w[49] = hc_byte_perm (w[38], w[37], selector);\n      w[48] = hc_byte_perm (w[37], w[36], selector);\n      w[47] = hc_byte_perm (w[36], w[35], selector);\n      w[46] = hc_byte_perm (w[35], w[34], selector);\n      w[45] = hc_byte_perm (w[34], w[33], selector);\n      w[44] = hc_byte_perm (w[33], w[32], selector);\n      w[43] = hc_byte_perm (w[32], w[31], selector);\n      w[42] = hc_byte_perm (w[31], w[30], selector);\n      w[41] = hc_byte_perm (w[30], w[29], selector);\n      w[40] = hc_byte_perm (w[29], w[28], selector);\n      w[39] = hc_byte_perm (w[28], w[27], selector);\n      w[38] = hc_byte_perm (w[27], w[26], selector);\n      w[37] = hc_byte_perm (w[26], w[25], selector);\n      w[36] = hc_byte_perm (w[25], w[24], selector);\n      w[35] = hc_byte_perm (w[24], w[23], selector);\n      w[34] = hc_byte_perm (w[23], w[22], selector);\n      w[33] = hc_byte_perm (w[22], w[21], selector);\n      w[32] = hc_byte_perm (w[21], w[20], selector);\n      w[31] = hc_byte_perm (w[20], w[19], selector);\n      w[30] = hc_byte_perm (w[19], w[18], selector);\n      w[29] = hc_byte_perm (w[18], w[17], selector);\n      w[28] = hc_byte_perm (w[17], w[16], selector);\n      w[27] = hc_byte_perm (w[16], w[15], selector);\n      w[26] = hc_byte_perm (w[15], w[14], selector);\n      w[25] = hc_byte_perm (w[14], w[13], selector);\n      w[24] = hc_byte_perm (w[13], w[12], selector);\n      w[23] = hc_byte_perm (w[12], w[11], selector);\n      w[22] = hc_byte_perm (w[11], w[10], selector);\n      w[21] = hc_byte_perm (w[10], w[ 9], selector);\n      w[20] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[19] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[18] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[17] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[16] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[15] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[14] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[13] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[12] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[11] = hc_byte_perm (w[ 0],     0, selector);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_byte_perm (w[51], w[50], selector);\n      w[62] = hc_byte_perm (w[50], w[49], selector);\n      w[61] = hc_byte_perm (w[49], w[48], selector);\n      w[60] = hc_byte_perm (w[48], w[47], selector);\n      w[59] = hc_byte_perm (w[47], w[46], selector);\n      w[58] = hc_byte_perm (w[46], w[45], selector);\n      w[57] = hc_byte_perm (w[45], w[44], selector);\n      w[56] = hc_byte_perm (w[44], w[43], selector);\n      w[55] = hc_byte_perm (w[43], w[42], selector);\n      w[54] = hc_byte_perm (w[42], w[41], selector);\n      w[53] = hc_byte_perm (w[41], w[40], selector);\n      w[52] = hc_byte_perm (w[40], w[39], selector);\n      w[51] = hc_byte_perm (w[39], w[38], selector);\n      w[50] = hc_byte_perm (w[38], w[37], selector);\n      w[49] = hc_byte_perm (w[37], w[36], selector);\n      w[48] = hc_byte_perm (w[36], w[35], selector);\n      w[47] = hc_byte_perm (w[35], w[34], selector);\n      w[46] = hc_byte_perm (w[34], w[33], selector);\n      w[45] = hc_byte_perm (w[33], w[32], selector);\n      w[44] = hc_byte_perm (w[32], w[31], selector);\n      w[43] = hc_byte_perm (w[31], w[30], selector);\n      w[42] = hc_byte_perm (w[30], w[29], selector);\n      w[41] = hc_byte_perm (w[29], w[28], selector);\n      w[40] = hc_byte_perm (w[28], w[27], selector);\n      w[39] = hc_byte_perm (w[27], w[26], selector);\n      w[38] = hc_byte_perm (w[26], w[25], selector);\n      w[37] = hc_byte_perm (w[25], w[24], selector);\n      w[36] = hc_byte_perm (w[24], w[23], selector);\n      w[35] = hc_byte_perm (w[23], w[22], selector);\n      w[34] = hc_byte_perm (w[22], w[21], selector);\n      w[33] = hc_byte_perm (w[21], w[20], selector);\n      w[32] = hc_byte_perm (w[20], w[19], selector);\n      w[31] = hc_byte_perm (w[19], w[18], selector);\n      w[30] = hc_byte_perm (w[18], w[17], selector);\n      w[29] = hc_byte_perm (w[17], w[16], selector);\n      w[28] = hc_byte_perm (w[16], w[15], selector);\n      w[27] = hc_byte_perm (w[15], w[14], selector);\n      w[26] = hc_byte_perm (w[14], w[13], selector);\n      w[25] = hc_byte_perm (w[13], w[12], selector);\n      w[24] = hc_byte_perm (w[12], w[11], selector);\n      w[23] = hc_byte_perm (w[11], w[10], selector);\n      w[22] = hc_byte_perm (w[10], w[ 9], selector);\n      w[21] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[20] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[19] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[18] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[17] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[16] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[15] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[14] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[13] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[12] = hc_byte_perm (w[ 0],     0, selector);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_byte_perm (w[50], w[49], selector);\n      w[62] = hc_byte_perm (w[49], w[48], selector);\n      w[61] = hc_byte_perm (w[48], w[47], selector);\n      w[60] = hc_byte_perm (w[47], w[46], selector);\n      w[59] = hc_byte_perm (w[46], w[45], selector);\n      w[58] = hc_byte_perm (w[45], w[44], selector);\n      w[57] = hc_byte_perm (w[44], w[43], selector);\n      w[56] = hc_byte_perm (w[43], w[42], selector);\n      w[55] = hc_byte_perm (w[42], w[41], selector);\n      w[54] = hc_byte_perm (w[41], w[40], selector);\n      w[53] = hc_byte_perm (w[40], w[39], selector);\n      w[52] = hc_byte_perm (w[39], w[38], selector);\n      w[51] = hc_byte_perm (w[38], w[37], selector);\n      w[50] = hc_byte_perm (w[37], w[36], selector);\n      w[49] = hc_byte_perm (w[36], w[35], selector);\n      w[48] = hc_byte_perm (w[35], w[34], selector);\n      w[47] = hc_byte_perm (w[34], w[33], selector);\n      w[46] = hc_byte_perm (w[33], w[32], selector);\n      w[45] = hc_byte_perm (w[32], w[31], selector);\n      w[44] = hc_byte_perm (w[31], w[30], selector);\n      w[43] = hc_byte_perm (w[30], w[29], selector);\n      w[42] = hc_byte_perm (w[29], w[28], selector);\n      w[41] = hc_byte_perm (w[28], w[27], selector);\n      w[40] = hc_byte_perm (w[27], w[26], selector);\n      w[39] = hc_byte_perm (w[26], w[25], selector);\n      w[38] = hc_byte_perm (w[25], w[24], selector);\n      w[37] = hc_byte_perm (w[24], w[23], selector);\n      w[36] = hc_byte_perm (w[23], w[22], selector);\n      w[35] = hc_byte_perm (w[22], w[21], selector);\n      w[34] = hc_byte_perm (w[21], w[20], selector);\n      w[33] = hc_byte_perm (w[20], w[19], selector);\n      w[32] = hc_byte_perm (w[19], w[18], selector);\n      w[31] = hc_byte_perm (w[18], w[17], selector);\n      w[30] = hc_byte_perm (w[17], w[16], selector);\n      w[29] = hc_byte_perm (w[16], w[15], selector);\n      w[28] = hc_byte_perm (w[15], w[14], selector);\n      w[27] = hc_byte_perm (w[14], w[13], selector);\n      w[26] = hc_byte_perm (w[13], w[12], selector);\n      w[25] = hc_byte_perm (w[12], w[11], selector);\n      w[24] = hc_byte_perm (w[11], w[10], selector);\n      w[23] = hc_byte_perm (w[10], w[ 9], selector);\n      w[22] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[21] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[20] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[19] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[18] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[17] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[16] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[15] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[14] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[13] = hc_byte_perm (w[ 0],     0, selector);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_byte_perm (w[49], w[48], selector);\n      w[62] = hc_byte_perm (w[48], w[47], selector);\n      w[61] = hc_byte_perm (w[47], w[46], selector);\n      w[60] = hc_byte_perm (w[46], w[45], selector);\n      w[59] = hc_byte_perm (w[45], w[44], selector);\n      w[58] = hc_byte_perm (w[44], w[43], selector);\n      w[57] = hc_byte_perm (w[43], w[42], selector);\n      w[56] = hc_byte_perm (w[42], w[41], selector);\n      w[55] = hc_byte_perm (w[41], w[40], selector);\n      w[54] = hc_byte_perm (w[40], w[39], selector);\n      w[53] = hc_byte_perm (w[39], w[38], selector);\n      w[52] = hc_byte_perm (w[38], w[37], selector);\n      w[51] = hc_byte_perm (w[37], w[36], selector);\n      w[50] = hc_byte_perm (w[36], w[35], selector);\n      w[49] = hc_byte_perm (w[35], w[34], selector);\n      w[48] = hc_byte_perm (w[34], w[33], selector);\n      w[47] = hc_byte_perm (w[33], w[32], selector);\n      w[46] = hc_byte_perm (w[32], w[31], selector);\n      w[45] = hc_byte_perm (w[31], w[30], selector);\n      w[44] = hc_byte_perm (w[30], w[29], selector);\n      w[43] = hc_byte_perm (w[29], w[28], selector);\n      w[42] = hc_byte_perm (w[28], w[27], selector);\n      w[41] = hc_byte_perm (w[27], w[26], selector);\n      w[40] = hc_byte_perm (w[26], w[25], selector);\n      w[39] = hc_byte_perm (w[25], w[24], selector);\n      w[38] = hc_byte_perm (w[24], w[23], selector);\n      w[37] = hc_byte_perm (w[23], w[22], selector);\n      w[36] = hc_byte_perm (w[22], w[21], selector);\n      w[35] = hc_byte_perm (w[21], w[20], selector);\n      w[34] = hc_byte_perm (w[20], w[19], selector);\n      w[33] = hc_byte_perm (w[19], w[18], selector);\n      w[32] = hc_byte_perm (w[18], w[17], selector);\n      w[31] = hc_byte_perm (w[17], w[16], selector);\n      w[30] = hc_byte_perm (w[16], w[15], selector);\n      w[29] = hc_byte_perm (w[15], w[14], selector);\n      w[28] = hc_byte_perm (w[14], w[13], selector);\n      w[27] = hc_byte_perm (w[13], w[12], selector);\n      w[26] = hc_byte_perm (w[12], w[11], selector);\n      w[25] = hc_byte_perm (w[11], w[10], selector);\n      w[24] = hc_byte_perm (w[10], w[ 9], selector);\n      w[23] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[22] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[21] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[20] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[19] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[18] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[17] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[16] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[15] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[14] = hc_byte_perm (w[ 0],     0, selector);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_byte_perm (w[48], w[47], selector);\n      w[62] = hc_byte_perm (w[47], w[46], selector);\n      w[61] = hc_byte_perm (w[46], w[45], selector);\n      w[60] = hc_byte_perm (w[45], w[44], selector);\n      w[59] = hc_byte_perm (w[44], w[43], selector);\n      w[58] = hc_byte_perm (w[43], w[42], selector);\n      w[57] = hc_byte_perm (w[42], w[41], selector);\n      w[56] = hc_byte_perm (w[41], w[40], selector);\n      w[55] = hc_byte_perm (w[40], w[39], selector);\n      w[54] = hc_byte_perm (w[39], w[38], selector);\n      w[53] = hc_byte_perm (w[38], w[37], selector);\n      w[52] = hc_byte_perm (w[37], w[36], selector);\n      w[51] = hc_byte_perm (w[36], w[35], selector);\n      w[50] = hc_byte_perm (w[35], w[34], selector);\n      w[49] = hc_byte_perm (w[34], w[33], selector);\n      w[48] = hc_byte_perm (w[33], w[32], selector);\n      w[47] = hc_byte_perm (w[32], w[31], selector);\n      w[46] = hc_byte_perm (w[31], w[30], selector);\n      w[45] = hc_byte_perm (w[30], w[29], selector);\n      w[44] = hc_byte_perm (w[29], w[28], selector);\n      w[43] = hc_byte_perm (w[28], w[27], selector);\n      w[42] = hc_byte_perm (w[27], w[26], selector);\n      w[41] = hc_byte_perm (w[26], w[25], selector);\n      w[40] = hc_byte_perm (w[25], w[24], selector);\n      w[39] = hc_byte_perm (w[24], w[23], selector);\n      w[38] = hc_byte_perm (w[23], w[22], selector);\n      w[37] = hc_byte_perm (w[22], w[21], selector);\n      w[36] = hc_byte_perm (w[21], w[20], selector);\n      w[35] = hc_byte_perm (w[20], w[19], selector);\n      w[34] = hc_byte_perm (w[19], w[18], selector);\n      w[33] = hc_byte_perm (w[18], w[17], selector);\n      w[32] = hc_byte_perm (w[17], w[16], selector);\n      w[31] = hc_byte_perm (w[16], w[15], selector);\n      w[30] = hc_byte_perm (w[15], w[14], selector);\n      w[29] = hc_byte_perm (w[14], w[13], selector);\n      w[28] = hc_byte_perm (w[13], w[12], selector);\n      w[27] = hc_byte_perm (w[12], w[11], selector);\n      w[26] = hc_byte_perm (w[11], w[10], selector);\n      w[25] = hc_byte_perm (w[10], w[ 9], selector);\n      w[24] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[23] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[22] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[21] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[20] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[19] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[18] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[17] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[16] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[15] = hc_byte_perm (w[ 0],     0, selector);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_byte_perm (w[47], w[46], selector);\n      w[62] = hc_byte_perm (w[46], w[45], selector);\n      w[61] = hc_byte_perm (w[45], w[44], selector);\n      w[60] = hc_byte_perm (w[44], w[43], selector);\n      w[59] = hc_byte_perm (w[43], w[42], selector);\n      w[58] = hc_byte_perm (w[42], w[41], selector);\n      w[57] = hc_byte_perm (w[41], w[40], selector);\n      w[56] = hc_byte_perm (w[40], w[39], selector);\n      w[55] = hc_byte_perm (w[39], w[38], selector);\n      w[54] = hc_byte_perm (w[38], w[37], selector);\n      w[53] = hc_byte_perm (w[37], w[36], selector);\n      w[52] = hc_byte_perm (w[36], w[35], selector);\n      w[51] = hc_byte_perm (w[35], w[34], selector);\n      w[50] = hc_byte_perm (w[34], w[33], selector);\n      w[49] = hc_byte_perm (w[33], w[32], selector);\n      w[48] = hc_byte_perm (w[32], w[31], selector);\n      w[47] = hc_byte_perm (w[31], w[30], selector);\n      w[46] = hc_byte_perm (w[30], w[29], selector);\n      w[45] = hc_byte_perm (w[29], w[28], selector);\n      w[44] = hc_byte_perm (w[28], w[27], selector);\n      w[43] = hc_byte_perm (w[27], w[26], selector);\n      w[42] = hc_byte_perm (w[26], w[25], selector);\n      w[41] = hc_byte_perm (w[25], w[24], selector);\n      w[40] = hc_byte_perm (w[24], w[23], selector);\n      w[39] = hc_byte_perm (w[23], w[22], selector);\n      w[38] = hc_byte_perm (w[22], w[21], selector);\n      w[37] = hc_byte_perm (w[21], w[20], selector);\n      w[36] = hc_byte_perm (w[20], w[19], selector);\n      w[35] = hc_byte_perm (w[19], w[18], selector);\n      w[34] = hc_byte_perm (w[18], w[17], selector);\n      w[33] = hc_byte_perm (w[17], w[16], selector);\n      w[32] = hc_byte_perm (w[16], w[15], selector);\n      w[31] = hc_byte_perm (w[15], w[14], selector);\n      w[30] = hc_byte_perm (w[14], w[13], selector);\n      w[29] = hc_byte_perm (w[13], w[12], selector);\n      w[28] = hc_byte_perm (w[12], w[11], selector);\n      w[27] = hc_byte_perm (w[11], w[10], selector);\n      w[26] = hc_byte_perm (w[10], w[ 9], selector);\n      w[25] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[24] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[23] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[22] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[21] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[20] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[19] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[18] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[17] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[16] = hc_byte_perm (w[ 0],     0, selector);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_byte_perm (w[46], w[45], selector);\n      w[62] = hc_byte_perm (w[45], w[44], selector);\n      w[61] = hc_byte_perm (w[44], w[43], selector);\n      w[60] = hc_byte_perm (w[43], w[42], selector);\n      w[59] = hc_byte_perm (w[42], w[41], selector);\n      w[58] = hc_byte_perm (w[41], w[40], selector);\n      w[57] = hc_byte_perm (w[40], w[39], selector);\n      w[56] = hc_byte_perm (w[39], w[38], selector);\n      w[55] = hc_byte_perm (w[38], w[37], selector);\n      w[54] = hc_byte_perm (w[37], w[36], selector);\n      w[53] = hc_byte_perm (w[36], w[35], selector);\n      w[52] = hc_byte_perm (w[35], w[34], selector);\n      w[51] = hc_byte_perm (w[34], w[33], selector);\n      w[50] = hc_byte_perm (w[33], w[32], selector);\n      w[49] = hc_byte_perm (w[32], w[31], selector);\n      w[48] = hc_byte_perm (w[31], w[30], selector);\n      w[47] = hc_byte_perm (w[30], w[29], selector);\n      w[46] = hc_byte_perm (w[29], w[28], selector);\n      w[45] = hc_byte_perm (w[28], w[27], selector);\n      w[44] = hc_byte_perm (w[27], w[26], selector);\n      w[43] = hc_byte_perm (w[26], w[25], selector);\n      w[42] = hc_byte_perm (w[25], w[24], selector);\n      w[41] = hc_byte_perm (w[24], w[23], selector);\n      w[40] = hc_byte_perm (w[23], w[22], selector);\n      w[39] = hc_byte_perm (w[22], w[21], selector);\n      w[38] = hc_byte_perm (w[21], w[20], selector);\n      w[37] = hc_byte_perm (w[20], w[19], selector);\n      w[36] = hc_byte_perm (w[19], w[18], selector);\n      w[35] = hc_byte_perm (w[18], w[17], selector);\n      w[34] = hc_byte_perm (w[17], w[16], selector);\n      w[33] = hc_byte_perm (w[16], w[15], selector);\n      w[32] = hc_byte_perm (w[15], w[14], selector);\n      w[31] = hc_byte_perm (w[14], w[13], selector);\n      w[30] = hc_byte_perm (w[13], w[12], selector);\n      w[29] = hc_byte_perm (w[12], w[11], selector);\n      w[28] = hc_byte_perm (w[11], w[10], selector);\n      w[27] = hc_byte_perm (w[10], w[ 9], selector);\n      w[26] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[25] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[24] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[23] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[22] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[21] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[20] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[19] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[18] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[17] = hc_byte_perm (w[ 0],     0, selector);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_byte_perm (w[45], w[44], selector);\n      w[62] = hc_byte_perm (w[44], w[43], selector);\n      w[61] = hc_byte_perm (w[43], w[42], selector);\n      w[60] = hc_byte_perm (w[42], w[41], selector);\n      w[59] = hc_byte_perm (w[41], w[40], selector);\n      w[58] = hc_byte_perm (w[40], w[39], selector);\n      w[57] = hc_byte_perm (w[39], w[38], selector);\n      w[56] = hc_byte_perm (w[38], w[37], selector);\n      w[55] = hc_byte_perm (w[37], w[36], selector);\n      w[54] = hc_byte_perm (w[36], w[35], selector);\n      w[53] = hc_byte_perm (w[35], w[34], selector);\n      w[52] = hc_byte_perm (w[34], w[33], selector);\n      w[51] = hc_byte_perm (w[33], w[32], selector);\n      w[50] = hc_byte_perm (w[32], w[31], selector);\n      w[49] = hc_byte_perm (w[31], w[30], selector);\n      w[48] = hc_byte_perm (w[30], w[29], selector);\n      w[47] = hc_byte_perm (w[29], w[28], selector);\n      w[46] = hc_byte_perm (w[28], w[27], selector);\n      w[45] = hc_byte_perm (w[27], w[26], selector);\n      w[44] = hc_byte_perm (w[26], w[25], selector);\n      w[43] = hc_byte_perm (w[25], w[24], selector);\n      w[42] = hc_byte_perm (w[24], w[23], selector);\n      w[41] = hc_byte_perm (w[23], w[22], selector);\n      w[40] = hc_byte_perm (w[22], w[21], selector);\n      w[39] = hc_byte_perm (w[21], w[20], selector);\n      w[38] = hc_byte_perm (w[20], w[19], selector);\n      w[37] = hc_byte_perm (w[19], w[18], selector);\n      w[36] = hc_byte_perm (w[18], w[17], selector);\n      w[35] = hc_byte_perm (w[17], w[16], selector);\n      w[34] = hc_byte_perm (w[16], w[15], selector);\n      w[33] = hc_byte_perm (w[15], w[14], selector);\n      w[32] = hc_byte_perm (w[14], w[13], selector);\n      w[31] = hc_byte_perm (w[13], w[12], selector);\n      w[30] = hc_byte_perm (w[12], w[11], selector);\n      w[29] = hc_byte_perm (w[11], w[10], selector);\n      w[28] = hc_byte_perm (w[10], w[ 9], selector);\n      w[27] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[26] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[25] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[24] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[23] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[22] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[21] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[20] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[19] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[18] = hc_byte_perm (w[ 0],     0, selector);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_byte_perm (w[44], w[43], selector);\n      w[62] = hc_byte_perm (w[43], w[42], selector);\n      w[61] = hc_byte_perm (w[42], w[41], selector);\n      w[60] = hc_byte_perm (w[41], w[40], selector);\n      w[59] = hc_byte_perm (w[40], w[39], selector);\n      w[58] = hc_byte_perm (w[39], w[38], selector);\n      w[57] = hc_byte_perm (w[38], w[37], selector);\n      w[56] = hc_byte_perm (w[37], w[36], selector);\n      w[55] = hc_byte_perm (w[36], w[35], selector);\n      w[54] = hc_byte_perm (w[35], w[34], selector);\n      w[53] = hc_byte_perm (w[34], w[33], selector);\n      w[52] = hc_byte_perm (w[33], w[32], selector);\n      w[51] = hc_byte_perm (w[32], w[31], selector);\n      w[50] = hc_byte_perm (w[31], w[30], selector);\n      w[49] = hc_byte_perm (w[30], w[29], selector);\n      w[48] = hc_byte_perm (w[29], w[28], selector);\n      w[47] = hc_byte_perm (w[28], w[27], selector);\n      w[46] = hc_byte_perm (w[27], w[26], selector);\n      w[45] = hc_byte_perm (w[26], w[25], selector);\n      w[44] = hc_byte_perm (w[25], w[24], selector);\n      w[43] = hc_byte_perm (w[24], w[23], selector);\n      w[42] = hc_byte_perm (w[23], w[22], selector);\n      w[41] = hc_byte_perm (w[22], w[21], selector);\n      w[40] = hc_byte_perm (w[21], w[20], selector);\n      w[39] = hc_byte_perm (w[20], w[19], selector);\n      w[38] = hc_byte_perm (w[19], w[18], selector);\n      w[37] = hc_byte_perm (w[18], w[17], selector);\n      w[36] = hc_byte_perm (w[17], w[16], selector);\n      w[35] = hc_byte_perm (w[16], w[15], selector);\n      w[34] = hc_byte_perm (w[15], w[14], selector);\n      w[33] = hc_byte_perm (w[14], w[13], selector);\n      w[32] = hc_byte_perm (w[13], w[12], selector);\n      w[31] = hc_byte_perm (w[12], w[11], selector);\n      w[30] = hc_byte_perm (w[11], w[10], selector);\n      w[29] = hc_byte_perm (w[10], w[ 9], selector);\n      w[28] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[27] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[26] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[25] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[24] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[23] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[22] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[21] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[20] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[19] = hc_byte_perm (w[ 0],     0, selector);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_byte_perm (w[43], w[42], selector);\n      w[62] = hc_byte_perm (w[42], w[41], selector);\n      w[61] = hc_byte_perm (w[41], w[40], selector);\n      w[60] = hc_byte_perm (w[40], w[39], selector);\n      w[59] = hc_byte_perm (w[39], w[38], selector);\n      w[58] = hc_byte_perm (w[38], w[37], selector);\n      w[57] = hc_byte_perm (w[37], w[36], selector);\n      w[56] = hc_byte_perm (w[36], w[35], selector);\n      w[55] = hc_byte_perm (w[35], w[34], selector);\n      w[54] = hc_byte_perm (w[34], w[33], selector);\n      w[53] = hc_byte_perm (w[33], w[32], selector);\n      w[52] = hc_byte_perm (w[32], w[31], selector);\n      w[51] = hc_byte_perm (w[31], w[30], selector);\n      w[50] = hc_byte_perm (w[30], w[29], selector);\n      w[49] = hc_byte_perm (w[29], w[28], selector);\n      w[48] = hc_byte_perm (w[28], w[27], selector);\n      w[47] = hc_byte_perm (w[27], w[26], selector);\n      w[46] = hc_byte_perm (w[26], w[25], selector);\n      w[45] = hc_byte_perm (w[25], w[24], selector);\n      w[44] = hc_byte_perm (w[24], w[23], selector);\n      w[43] = hc_byte_perm (w[23], w[22], selector);\n      w[42] = hc_byte_perm (w[22], w[21], selector);\n      w[41] = hc_byte_perm (w[21], w[20], selector);\n      w[40] = hc_byte_perm (w[20], w[19], selector);\n      w[39] = hc_byte_perm (w[19], w[18], selector);\n      w[38] = hc_byte_perm (w[18], w[17], selector);\n      w[37] = hc_byte_perm (w[17], w[16], selector);\n      w[36] = hc_byte_perm (w[16], w[15], selector);\n      w[35] = hc_byte_perm (w[15], w[14], selector);\n      w[34] = hc_byte_perm (w[14], w[13], selector);\n      w[33] = hc_byte_perm (w[13], w[12], selector);\n      w[32] = hc_byte_perm (w[12], w[11], selector);\n      w[31] = hc_byte_perm (w[11], w[10], selector);\n      w[30] = hc_byte_perm (w[10], w[ 9], selector);\n      w[29] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[28] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[27] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[26] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[25] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[24] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[23] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[22] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[21] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[20] = hc_byte_perm (w[ 0],     0, selector);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_byte_perm (w[42], w[41], selector);\n      w[62] = hc_byte_perm (w[41], w[40], selector);\n      w[61] = hc_byte_perm (w[40], w[39], selector);\n      w[60] = hc_byte_perm (w[39], w[38], selector);\n      w[59] = hc_byte_perm (w[38], w[37], selector);\n      w[58] = hc_byte_perm (w[37], w[36], selector);\n      w[57] = hc_byte_perm (w[36], w[35], selector);\n      w[56] = hc_byte_perm (w[35], w[34], selector);\n      w[55] = hc_byte_perm (w[34], w[33], selector);\n      w[54] = hc_byte_perm (w[33], w[32], selector);\n      w[53] = hc_byte_perm (w[32], w[31], selector);\n      w[52] = hc_byte_perm (w[31], w[30], selector);\n      w[51] = hc_byte_perm (w[30], w[29], selector);\n      w[50] = hc_byte_perm (w[29], w[28], selector);\n      w[49] = hc_byte_perm (w[28], w[27], selector);\n      w[48] = hc_byte_perm (w[27], w[26], selector);\n      w[47] = hc_byte_perm (w[26], w[25], selector);\n      w[46] = hc_byte_perm (w[25], w[24], selector);\n      w[45] = hc_byte_perm (w[24], w[23], selector);\n      w[44] = hc_byte_perm (w[23], w[22], selector);\n      w[43] = hc_byte_perm (w[22], w[21], selector);\n      w[42] = hc_byte_perm (w[21], w[20], selector);\n      w[41] = hc_byte_perm (w[20], w[19], selector);\n      w[40] = hc_byte_perm (w[19], w[18], selector);\n      w[39] = hc_byte_perm (w[18], w[17], selector);\n      w[38] = hc_byte_perm (w[17], w[16], selector);\n      w[37] = hc_byte_perm (w[16], w[15], selector);\n      w[36] = hc_byte_perm (w[15], w[14], selector);\n      w[35] = hc_byte_perm (w[14], w[13], selector);\n      w[34] = hc_byte_perm (w[13], w[12], selector);\n      w[33] = hc_byte_perm (w[12], w[11], selector);\n      w[32] = hc_byte_perm (w[11], w[10], selector);\n      w[31] = hc_byte_perm (w[10], w[ 9], selector);\n      w[30] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[29] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[28] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[27] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[26] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[25] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[24] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[23] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[22] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[21] = hc_byte_perm (w[ 0],     0, selector);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_byte_perm (w[41], w[40], selector);\n      w[62] = hc_byte_perm (w[40], w[39], selector);\n      w[61] = hc_byte_perm (w[39], w[38], selector);\n      w[60] = hc_byte_perm (w[38], w[37], selector);\n      w[59] = hc_byte_perm (w[37], w[36], selector);\n      w[58] = hc_byte_perm (w[36], w[35], selector);\n      w[57] = hc_byte_perm (w[35], w[34], selector);\n      w[56] = hc_byte_perm (w[34], w[33], selector);\n      w[55] = hc_byte_perm (w[33], w[32], selector);\n      w[54] = hc_byte_perm (w[32], w[31], selector);\n      w[53] = hc_byte_perm (w[31], w[30], selector);\n      w[52] = hc_byte_perm (w[30], w[29], selector);\n      w[51] = hc_byte_perm (w[29], w[28], selector);\n      w[50] = hc_byte_perm (w[28], w[27], selector);\n      w[49] = hc_byte_perm (w[27], w[26], selector);\n      w[48] = hc_byte_perm (w[26], w[25], selector);\n      w[47] = hc_byte_perm (w[25], w[24], selector);\n      w[46] = hc_byte_perm (w[24], w[23], selector);\n      w[45] = hc_byte_perm (w[23], w[22], selector);\n      w[44] = hc_byte_perm (w[22], w[21], selector);\n      w[43] = hc_byte_perm (w[21], w[20], selector);\n      w[42] = hc_byte_perm (w[20], w[19], selector);\n      w[41] = hc_byte_perm (w[19], w[18], selector);\n      w[40] = hc_byte_perm (w[18], w[17], selector);\n      w[39] = hc_byte_perm (w[17], w[16], selector);\n      w[38] = hc_byte_perm (w[16], w[15], selector);\n      w[37] = hc_byte_perm (w[15], w[14], selector);\n      w[36] = hc_byte_perm (w[14], w[13], selector);\n      w[35] = hc_byte_perm (w[13], w[12], selector);\n      w[34] = hc_byte_perm (w[12], w[11], selector);\n      w[33] = hc_byte_perm (w[11], w[10], selector);\n      w[32] = hc_byte_perm (w[10], w[ 9], selector);\n      w[31] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[30] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[29] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[28] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[27] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[26] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[25] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[24] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[23] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[22] = hc_byte_perm (w[ 0],     0, selector);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_byte_perm (w[40], w[39], selector);\n      w[62] = hc_byte_perm (w[39], w[38], selector);\n      w[61] = hc_byte_perm (w[38], w[37], selector);\n      w[60] = hc_byte_perm (w[37], w[36], selector);\n      w[59] = hc_byte_perm (w[36], w[35], selector);\n      w[58] = hc_byte_perm (w[35], w[34], selector);\n      w[57] = hc_byte_perm (w[34], w[33], selector);\n      w[56] = hc_byte_perm (w[33], w[32], selector);\n      w[55] = hc_byte_perm (w[32], w[31], selector);\n      w[54] = hc_byte_perm (w[31], w[30], selector);\n      w[53] = hc_byte_perm (w[30], w[29], selector);\n      w[52] = hc_byte_perm (w[29], w[28], selector);\n      w[51] = hc_byte_perm (w[28], w[27], selector);\n      w[50] = hc_byte_perm (w[27], w[26], selector);\n      w[49] = hc_byte_perm (w[26], w[25], selector);\n      w[48] = hc_byte_perm (w[25], w[24], selector);\n      w[47] = hc_byte_perm (w[24], w[23], selector);\n      w[46] = hc_byte_perm (w[23], w[22], selector);\n      w[45] = hc_byte_perm (w[22], w[21], selector);\n      w[44] = hc_byte_perm (w[21], w[20], selector);\n      w[43] = hc_byte_perm (w[20], w[19], selector);\n      w[42] = hc_byte_perm (w[19], w[18], selector);\n      w[41] = hc_byte_perm (w[18], w[17], selector);\n      w[40] = hc_byte_perm (w[17], w[16], selector);\n      w[39] = hc_byte_perm (w[16], w[15], selector);\n      w[38] = hc_byte_perm (w[15], w[14], selector);\n      w[37] = hc_byte_perm (w[14], w[13], selector);\n      w[36] = hc_byte_perm (w[13], w[12], selector);\n      w[35] = hc_byte_perm (w[12], w[11], selector);\n      w[34] = hc_byte_perm (w[11], w[10], selector);\n      w[33] = hc_byte_perm (w[10], w[ 9], selector);\n      w[32] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[31] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[30] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[29] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[28] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[27] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[26] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[25] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[24] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[23] = hc_byte_perm (w[ 0],     0, selector);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_byte_perm (w[39], w[38], selector);\n      w[62] = hc_byte_perm (w[38], w[37], selector);\n      w[61] = hc_byte_perm (w[37], w[36], selector);\n      w[60] = hc_byte_perm (w[36], w[35], selector);\n      w[59] = hc_byte_perm (w[35], w[34], selector);\n      w[58] = hc_byte_perm (w[34], w[33], selector);\n      w[57] = hc_byte_perm (w[33], w[32], selector);\n      w[56] = hc_byte_perm (w[32], w[31], selector);\n      w[55] = hc_byte_perm (w[31], w[30], selector);\n      w[54] = hc_byte_perm (w[30], w[29], selector);\n      w[53] = hc_byte_perm (w[29], w[28], selector);\n      w[52] = hc_byte_perm (w[28], w[27], selector);\n      w[51] = hc_byte_perm (w[27], w[26], selector);\n      w[50] = hc_byte_perm (w[26], w[25], selector);\n      w[49] = hc_byte_perm (w[25], w[24], selector);\n      w[48] = hc_byte_perm (w[24], w[23], selector);\n      w[47] = hc_byte_perm (w[23], w[22], selector);\n      w[46] = hc_byte_perm (w[22], w[21], selector);\n      w[45] = hc_byte_perm (w[21], w[20], selector);\n      w[44] = hc_byte_perm (w[20], w[19], selector);\n      w[43] = hc_byte_perm (w[19], w[18], selector);\n      w[42] = hc_byte_perm (w[18], w[17], selector);\n      w[41] = hc_byte_perm (w[17], w[16], selector);\n      w[40] = hc_byte_perm (w[16], w[15], selector);\n      w[39] = hc_byte_perm (w[15], w[14], selector);\n      w[38] = hc_byte_perm (w[14], w[13], selector);\n      w[37] = hc_byte_perm (w[13], w[12], selector);\n      w[36] = hc_byte_perm (w[12], w[11], selector);\n      w[35] = hc_byte_perm (w[11], w[10], selector);\n      w[34] = hc_byte_perm (w[10], w[ 9], selector);\n      w[33] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[32] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[31] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[30] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[29] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[28] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[27] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[26] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[25] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[24] = hc_byte_perm (w[ 0],     0, selector);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_byte_perm (w[38], w[37], selector);\n      w[62] = hc_byte_perm (w[37], w[36], selector);\n      w[61] = hc_byte_perm (w[36], w[35], selector);\n      w[60] = hc_byte_perm (w[35], w[34], selector);\n      w[59] = hc_byte_perm (w[34], w[33], selector);\n      w[58] = hc_byte_perm (w[33], w[32], selector);\n      w[57] = hc_byte_perm (w[32], w[31], selector);\n      w[56] = hc_byte_perm (w[31], w[30], selector);\n      w[55] = hc_byte_perm (w[30], w[29], selector);\n      w[54] = hc_byte_perm (w[29], w[28], selector);\n      w[53] = hc_byte_perm (w[28], w[27], selector);\n      w[52] = hc_byte_perm (w[27], w[26], selector);\n      w[51] = hc_byte_perm (w[26], w[25], selector);\n      w[50] = hc_byte_perm (w[25], w[24], selector);\n      w[49] = hc_byte_perm (w[24], w[23], selector);\n      w[48] = hc_byte_perm (w[23], w[22], selector);\n      w[47] = hc_byte_perm (w[22], w[21], selector);\n      w[46] = hc_byte_perm (w[21], w[20], selector);\n      w[45] = hc_byte_perm (w[20], w[19], selector);\n      w[44] = hc_byte_perm (w[19], w[18], selector);\n      w[43] = hc_byte_perm (w[18], w[17], selector);\n      w[42] = hc_byte_perm (w[17], w[16], selector);\n      w[41] = hc_byte_perm (w[16], w[15], selector);\n      w[40] = hc_byte_perm (w[15], w[14], selector);\n      w[39] = hc_byte_perm (w[14], w[13], selector);\n      w[38] = hc_byte_perm (w[13], w[12], selector);\n      w[37] = hc_byte_perm (w[12], w[11], selector);\n      w[36] = hc_byte_perm (w[11], w[10], selector);\n      w[35] = hc_byte_perm (w[10], w[ 9], selector);\n      w[34] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[33] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[32] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[31] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[30] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[29] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[28] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[27] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[26] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[25] = hc_byte_perm (w[ 0],     0, selector);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_byte_perm (w[37], w[36], selector);\n      w[62] = hc_byte_perm (w[36], w[35], selector);\n      w[61] = hc_byte_perm (w[35], w[34], selector);\n      w[60] = hc_byte_perm (w[34], w[33], selector);\n      w[59] = hc_byte_perm (w[33], w[32], selector);\n      w[58] = hc_byte_perm (w[32], w[31], selector);\n      w[57] = hc_byte_perm (w[31], w[30], selector);\n      w[56] = hc_byte_perm (w[30], w[29], selector);\n      w[55] = hc_byte_perm (w[29], w[28], selector);\n      w[54] = hc_byte_perm (w[28], w[27], selector);\n      w[53] = hc_byte_perm (w[27], w[26], selector);\n      w[52] = hc_byte_perm (w[26], w[25], selector);\n      w[51] = hc_byte_perm (w[25], w[24], selector);\n      w[50] = hc_byte_perm (w[24], w[23], selector);\n      w[49] = hc_byte_perm (w[23], w[22], selector);\n      w[48] = hc_byte_perm (w[22], w[21], selector);\n      w[47] = hc_byte_perm (w[21], w[20], selector);\n      w[46] = hc_byte_perm (w[20], w[19], selector);\n      w[45] = hc_byte_perm (w[19], w[18], selector);\n      w[44] = hc_byte_perm (w[18], w[17], selector);\n      w[43] = hc_byte_perm (w[17], w[16], selector);\n      w[42] = hc_byte_perm (w[16], w[15], selector);\n      w[41] = hc_byte_perm (w[15], w[14], selector);\n      w[40] = hc_byte_perm (w[14], w[13], selector);\n      w[39] = hc_byte_perm (w[13], w[12], selector);\n      w[38] = hc_byte_perm (w[12], w[11], selector);\n      w[37] = hc_byte_perm (w[11], w[10], selector);\n      w[36] = hc_byte_perm (w[10], w[ 9], selector);\n      w[35] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[34] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[33] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[32] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[31] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[30] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[29] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[28] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[27] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[26] = hc_byte_perm (w[ 0],     0, selector);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_byte_perm (w[36], w[35], selector);\n      w[62] = hc_byte_perm (w[35], w[34], selector);\n      w[61] = hc_byte_perm (w[34], w[33], selector);\n      w[60] = hc_byte_perm (w[33], w[32], selector);\n      w[59] = hc_byte_perm (w[32], w[31], selector);\n      w[58] = hc_byte_perm (w[31], w[30], selector);\n      w[57] = hc_byte_perm (w[30], w[29], selector);\n      w[56] = hc_byte_perm (w[29], w[28], selector);\n      w[55] = hc_byte_perm (w[28], w[27], selector);\n      w[54] = hc_byte_perm (w[27], w[26], selector);\n      w[53] = hc_byte_perm (w[26], w[25], selector);\n      w[52] = hc_byte_perm (w[25], w[24], selector);\n      w[51] = hc_byte_perm (w[24], w[23], selector);\n      w[50] = hc_byte_perm (w[23], w[22], selector);\n      w[49] = hc_byte_perm (w[22], w[21], selector);\n      w[48] = hc_byte_perm (w[21], w[20], selector);\n      w[47] = hc_byte_perm (w[20], w[19], selector);\n      w[46] = hc_byte_perm (w[19], w[18], selector);\n      w[45] = hc_byte_perm (w[18], w[17], selector);\n      w[44] = hc_byte_perm (w[17], w[16], selector);\n      w[43] = hc_byte_perm (w[16], w[15], selector);\n      w[42] = hc_byte_perm (w[15], w[14], selector);\n      w[41] = hc_byte_perm (w[14], w[13], selector);\n      w[40] = hc_byte_perm (w[13], w[12], selector);\n      w[39] = hc_byte_perm (w[12], w[11], selector);\n      w[38] = hc_byte_perm (w[11], w[10], selector);\n      w[37] = hc_byte_perm (w[10], w[ 9], selector);\n      w[36] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[35] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[34] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[33] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[32] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[31] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[30] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[29] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[28] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[27] = hc_byte_perm (w[ 0],     0, selector);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_byte_perm (w[35], w[34], selector);\n      w[62] = hc_byte_perm (w[34], w[33], selector);\n      w[61] = hc_byte_perm (w[33], w[32], selector);\n      w[60] = hc_byte_perm (w[32], w[31], selector);\n      w[59] = hc_byte_perm (w[31], w[30], selector);\n      w[58] = hc_byte_perm (w[30], w[29], selector);\n      w[57] = hc_byte_perm (w[29], w[28], selector);\n      w[56] = hc_byte_perm (w[28], w[27], selector);\n      w[55] = hc_byte_perm (w[27], w[26], selector);\n      w[54] = hc_byte_perm (w[26], w[25], selector);\n      w[53] = hc_byte_perm (w[25], w[24], selector);\n      w[52] = hc_byte_perm (w[24], w[23], selector);\n      w[51] = hc_byte_perm (w[23], w[22], selector);\n      w[50] = hc_byte_perm (w[22], w[21], selector);\n      w[49] = hc_byte_perm (w[21], w[20], selector);\n      w[48] = hc_byte_perm (w[20], w[19], selector);\n      w[47] = hc_byte_perm (w[19], w[18], selector);\n      w[46] = hc_byte_perm (w[18], w[17], selector);\n      w[45] = hc_byte_perm (w[17], w[16], selector);\n      w[44] = hc_byte_perm (w[16], w[15], selector);\n      w[43] = hc_byte_perm (w[15], w[14], selector);\n      w[42] = hc_byte_perm (w[14], w[13], selector);\n      w[41] = hc_byte_perm (w[13], w[12], selector);\n      w[40] = hc_byte_perm (w[12], w[11], selector);\n      w[39] = hc_byte_perm (w[11], w[10], selector);\n      w[38] = hc_byte_perm (w[10], w[ 9], selector);\n      w[37] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[36] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[35] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[34] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[33] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[32] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[31] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[30] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[29] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[28] = hc_byte_perm (w[ 0],     0, selector);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_byte_perm (w[34], w[33], selector);\n      w[62] = hc_byte_perm (w[33], w[32], selector);\n      w[61] = hc_byte_perm (w[32], w[31], selector);\n      w[60] = hc_byte_perm (w[31], w[30], selector);\n      w[59] = hc_byte_perm (w[30], w[29], selector);\n      w[58] = hc_byte_perm (w[29], w[28], selector);\n      w[57] = hc_byte_perm (w[28], w[27], selector);\n      w[56] = hc_byte_perm (w[27], w[26], selector);\n      w[55] = hc_byte_perm (w[26], w[25], selector);\n      w[54] = hc_byte_perm (w[25], w[24], selector);\n      w[53] = hc_byte_perm (w[24], w[23], selector);\n      w[52] = hc_byte_perm (w[23], w[22], selector);\n      w[51] = hc_byte_perm (w[22], w[21], selector);\n      w[50] = hc_byte_perm (w[21], w[20], selector);\n      w[49] = hc_byte_perm (w[20], w[19], selector);\n      w[48] = hc_byte_perm (w[19], w[18], selector);\n      w[47] = hc_byte_perm (w[18], w[17], selector);\n      w[46] = hc_byte_perm (w[17], w[16], selector);\n      w[45] = hc_byte_perm (w[16], w[15], selector);\n      w[44] = hc_byte_perm (w[15], w[14], selector);\n      w[43] = hc_byte_perm (w[14], w[13], selector);\n      w[42] = hc_byte_perm (w[13], w[12], selector);\n      w[41] = hc_byte_perm (w[12], w[11], selector);\n      w[40] = hc_byte_perm (w[11], w[10], selector);\n      w[39] = hc_byte_perm (w[10], w[ 9], selector);\n      w[38] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[37] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[36] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[35] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[34] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[33] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[32] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[31] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[30] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[29] = hc_byte_perm (w[ 0],     0, selector);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_byte_perm (w[33], w[32], selector);\n      w[62] = hc_byte_perm (w[32], w[31], selector);\n      w[61] = hc_byte_perm (w[31], w[30], selector);\n      w[60] = hc_byte_perm (w[30], w[29], selector);\n      w[59] = hc_byte_perm (w[29], w[28], selector);\n      w[58] = hc_byte_perm (w[28], w[27], selector);\n      w[57] = hc_byte_perm (w[27], w[26], selector);\n      w[56] = hc_byte_perm (w[26], w[25], selector);\n      w[55] = hc_byte_perm (w[25], w[24], selector);\n      w[54] = hc_byte_perm (w[24], w[23], selector);\n      w[53] = hc_byte_perm (w[23], w[22], selector);\n      w[52] = hc_byte_perm (w[22], w[21], selector);\n      w[51] = hc_byte_perm (w[21], w[20], selector);\n      w[50] = hc_byte_perm (w[20], w[19], selector);\n      w[49] = hc_byte_perm (w[19], w[18], selector);\n      w[48] = hc_byte_perm (w[18], w[17], selector);\n      w[47] = hc_byte_perm (w[17], w[16], selector);\n      w[46] = hc_byte_perm (w[16], w[15], selector);\n      w[45] = hc_byte_perm (w[15], w[14], selector);\n      w[44] = hc_byte_perm (w[14], w[13], selector);\n      w[43] = hc_byte_perm (w[13], w[12], selector);\n      w[42] = hc_byte_perm (w[12], w[11], selector);\n      w[41] = hc_byte_perm (w[11], w[10], selector);\n      w[40] = hc_byte_perm (w[10], w[ 9], selector);\n      w[39] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[38] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[37] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[36] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[35] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[34] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[33] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[32] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[31] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[30] = hc_byte_perm (w[ 0],     0, selector);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_byte_perm (w[32], w[31], selector);\n      w[62] = hc_byte_perm (w[31], w[30], selector);\n      w[61] = hc_byte_perm (w[30], w[29], selector);\n      w[60] = hc_byte_perm (w[29], w[28], selector);\n      w[59] = hc_byte_perm (w[28], w[27], selector);\n      w[58] = hc_byte_perm (w[27], w[26], selector);\n      w[57] = hc_byte_perm (w[26], w[25], selector);\n      w[56] = hc_byte_perm (w[25], w[24], selector);\n      w[55] = hc_byte_perm (w[24], w[23], selector);\n      w[54] = hc_byte_perm (w[23], w[22], selector);\n      w[53] = hc_byte_perm (w[22], w[21], selector);\n      w[52] = hc_byte_perm (w[21], w[20], selector);\n      w[51] = hc_byte_perm (w[20], w[19], selector);\n      w[50] = hc_byte_perm (w[19], w[18], selector);\n      w[49] = hc_byte_perm (w[18], w[17], selector);\n      w[48] = hc_byte_perm (w[17], w[16], selector);\n      w[47] = hc_byte_perm (w[16], w[15], selector);\n      w[46] = hc_byte_perm (w[15], w[14], selector);\n      w[45] = hc_byte_perm (w[14], w[13], selector);\n      w[44] = hc_byte_perm (w[13], w[12], selector);\n      w[43] = hc_byte_perm (w[12], w[11], selector);\n      w[42] = hc_byte_perm (w[11], w[10], selector);\n      w[41] = hc_byte_perm (w[10], w[ 9], selector);\n      w[40] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[39] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[38] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[37] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[36] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[35] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[34] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[33] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[32] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[31] = hc_byte_perm (w[ 0],     0, selector);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_byte_perm (w[31], w[30], selector);\n      w[62] = hc_byte_perm (w[30], w[29], selector);\n      w[61] = hc_byte_perm (w[29], w[28], selector);\n      w[60] = hc_byte_perm (w[28], w[27], selector);\n      w[59] = hc_byte_perm (w[27], w[26], selector);\n      w[58] = hc_byte_perm (w[26], w[25], selector);\n      w[57] = hc_byte_perm (w[25], w[24], selector);\n      w[56] = hc_byte_perm (w[24], w[23], selector);\n      w[55] = hc_byte_perm (w[23], w[22], selector);\n      w[54] = hc_byte_perm (w[22], w[21], selector);\n      w[53] = hc_byte_perm (w[21], w[20], selector);\n      w[52] = hc_byte_perm (w[20], w[19], selector);\n      w[51] = hc_byte_perm (w[19], w[18], selector);\n      w[50] = hc_byte_perm (w[18], w[17], selector);\n      w[49] = hc_byte_perm (w[17], w[16], selector);\n      w[48] = hc_byte_perm (w[16], w[15], selector);\n      w[47] = hc_byte_perm (w[15], w[14], selector);\n      w[46] = hc_byte_perm (w[14], w[13], selector);\n      w[45] = hc_byte_perm (w[13], w[12], selector);\n      w[44] = hc_byte_perm (w[12], w[11], selector);\n      w[43] = hc_byte_perm (w[11], w[10], selector);\n      w[42] = hc_byte_perm (w[10], w[ 9], selector);\n      w[41] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[40] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[39] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[38] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[37] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[36] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[35] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[34] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[33] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[32] = hc_byte_perm (w[ 0],     0, selector);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_byte_perm (w[30], w[29], selector);\n      w[62] = hc_byte_perm (w[29], w[28], selector);\n      w[61] = hc_byte_perm (w[28], w[27], selector);\n      w[60] = hc_byte_perm (w[27], w[26], selector);\n      w[59] = hc_byte_perm (w[26], w[25], selector);\n      w[58] = hc_byte_perm (w[25], w[24], selector);\n      w[57] = hc_byte_perm (w[24], w[23], selector);\n      w[56] = hc_byte_perm (w[23], w[22], selector);\n      w[55] = hc_byte_perm (w[22], w[21], selector);\n      w[54] = hc_byte_perm (w[21], w[20], selector);\n      w[53] = hc_byte_perm (w[20], w[19], selector);\n      w[52] = hc_byte_perm (w[19], w[18], selector);\n      w[51] = hc_byte_perm (w[18], w[17], selector);\n      w[50] = hc_byte_perm (w[17], w[16], selector);\n      w[49] = hc_byte_perm (w[16], w[15], selector);\n      w[48] = hc_byte_perm (w[15], w[14], selector);\n      w[47] = hc_byte_perm (w[14], w[13], selector);\n      w[46] = hc_byte_perm (w[13], w[12], selector);\n      w[45] = hc_byte_perm (w[12], w[11], selector);\n      w[44] = hc_byte_perm (w[11], w[10], selector);\n      w[43] = hc_byte_perm (w[10], w[ 9], selector);\n      w[42] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[41] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[40] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[39] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[38] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[37] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[36] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[35] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[34] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[33] = hc_byte_perm (w[ 0],     0, selector);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_byte_perm (w[29], w[28], selector);\n      w[62] = hc_byte_perm (w[28], w[27], selector);\n      w[61] = hc_byte_perm (w[27], w[26], selector);\n      w[60] = hc_byte_perm (w[26], w[25], selector);\n      w[59] = hc_byte_perm (w[25], w[24], selector);\n      w[58] = hc_byte_perm (w[24], w[23], selector);\n      w[57] = hc_byte_perm (w[23], w[22], selector);\n      w[56] = hc_byte_perm (w[22], w[21], selector);\n      w[55] = hc_byte_perm (w[21], w[20], selector);\n      w[54] = hc_byte_perm (w[20], w[19], selector);\n      w[53] = hc_byte_perm (w[19], w[18], selector);\n      w[52] = hc_byte_perm (w[18], w[17], selector);\n      w[51] = hc_byte_perm (w[17], w[16], selector);\n      w[50] = hc_byte_perm (w[16], w[15], selector);\n      w[49] = hc_byte_perm (w[15], w[14], selector);\n      w[48] = hc_byte_perm (w[14], w[13], selector);\n      w[47] = hc_byte_perm (w[13], w[12], selector);\n      w[46] = hc_byte_perm (w[12], w[11], selector);\n      w[45] = hc_byte_perm (w[11], w[10], selector);\n      w[44] = hc_byte_perm (w[10], w[ 9], selector);\n      w[43] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[42] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[41] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[40] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[39] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[38] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[37] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[36] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[35] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[34] = hc_byte_perm (w[ 0],     0, selector);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_byte_perm (w[28], w[27], selector);\n      w[62] = hc_byte_perm (w[27], w[26], selector);\n      w[61] = hc_byte_perm (w[26], w[25], selector);\n      w[60] = hc_byte_perm (w[25], w[24], selector);\n      w[59] = hc_byte_perm (w[24], w[23], selector);\n      w[58] = hc_byte_perm (w[23], w[22], selector);\n      w[57] = hc_byte_perm (w[22], w[21], selector);\n      w[56] = hc_byte_perm (w[21], w[20], selector);\n      w[55] = hc_byte_perm (w[20], w[19], selector);\n      w[54] = hc_byte_perm (w[19], w[18], selector);\n      w[53] = hc_byte_perm (w[18], w[17], selector);\n      w[52] = hc_byte_perm (w[17], w[16], selector);\n      w[51] = hc_byte_perm (w[16], w[15], selector);\n      w[50] = hc_byte_perm (w[15], w[14], selector);\n      w[49] = hc_byte_perm (w[14], w[13], selector);\n      w[48] = hc_byte_perm (w[13], w[12], selector);\n      w[47] = hc_byte_perm (w[12], w[11], selector);\n      w[46] = hc_byte_perm (w[11], w[10], selector);\n      w[45] = hc_byte_perm (w[10], w[ 9], selector);\n      w[44] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[43] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[42] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[41] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[40] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[39] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[38] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[37] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[36] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[35] = hc_byte_perm (w[ 0],     0, selector);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_byte_perm (w[27], w[26], selector);\n      w[62] = hc_byte_perm (w[26], w[25], selector);\n      w[61] = hc_byte_perm (w[25], w[24], selector);\n      w[60] = hc_byte_perm (w[24], w[23], selector);\n      w[59] = hc_byte_perm (w[23], w[22], selector);\n      w[58] = hc_byte_perm (w[22], w[21], selector);\n      w[57] = hc_byte_perm (w[21], w[20], selector);\n      w[56] = hc_byte_perm (w[20], w[19], selector);\n      w[55] = hc_byte_perm (w[19], w[18], selector);\n      w[54] = hc_byte_perm (w[18], w[17], selector);\n      w[53] = hc_byte_perm (w[17], w[16], selector);\n      w[52] = hc_byte_perm (w[16], w[15], selector);\n      w[51] = hc_byte_perm (w[15], w[14], selector);\n      w[50] = hc_byte_perm (w[14], w[13], selector);\n      w[49] = hc_byte_perm (w[13], w[12], selector);\n      w[48] = hc_byte_perm (w[12], w[11], selector);\n      w[47] = hc_byte_perm (w[11], w[10], selector);\n      w[46] = hc_byte_perm (w[10], w[ 9], selector);\n      w[45] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[44] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[43] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[42] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[41] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[40] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[39] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[38] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[37] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[36] = hc_byte_perm (w[ 0],     0, selector);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_byte_perm (w[26], w[25], selector);\n      w[62] = hc_byte_perm (w[25], w[24], selector);\n      w[61] = hc_byte_perm (w[24], w[23], selector);\n      w[60] = hc_byte_perm (w[23], w[22], selector);\n      w[59] = hc_byte_perm (w[22], w[21], selector);\n      w[58] = hc_byte_perm (w[21], w[20], selector);\n      w[57] = hc_byte_perm (w[20], w[19], selector);\n      w[56] = hc_byte_perm (w[19], w[18], selector);\n      w[55] = hc_byte_perm (w[18], w[17], selector);\n      w[54] = hc_byte_perm (w[17], w[16], selector);\n      w[53] = hc_byte_perm (w[16], w[15], selector);\n      w[52] = hc_byte_perm (w[15], w[14], selector);\n      w[51] = hc_byte_perm (w[14], w[13], selector);\n      w[50] = hc_byte_perm (w[13], w[12], selector);\n      w[49] = hc_byte_perm (w[12], w[11], selector);\n      w[48] = hc_byte_perm (w[11], w[10], selector);\n      w[47] = hc_byte_perm (w[10], w[ 9], selector);\n      w[46] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[45] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[44] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[43] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[42] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[41] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[40] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[39] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[38] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[37] = hc_byte_perm (w[ 0],     0, selector);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_byte_perm (w[25], w[24], selector);\n      w[62] = hc_byte_perm (w[24], w[23], selector);\n      w[61] = hc_byte_perm (w[23], w[22], selector);\n      w[60] = hc_byte_perm (w[22], w[21], selector);\n      w[59] = hc_byte_perm (w[21], w[20], selector);\n      w[58] = hc_byte_perm (w[20], w[19], selector);\n      w[57] = hc_byte_perm (w[19], w[18], selector);\n      w[56] = hc_byte_perm (w[18], w[17], selector);\n      w[55] = hc_byte_perm (w[17], w[16], selector);\n      w[54] = hc_byte_perm (w[16], w[15], selector);\n      w[53] = hc_byte_perm (w[15], w[14], selector);\n      w[52] = hc_byte_perm (w[14], w[13], selector);\n      w[51] = hc_byte_perm (w[13], w[12], selector);\n      w[50] = hc_byte_perm (w[12], w[11], selector);\n      w[49] = hc_byte_perm (w[11], w[10], selector);\n      w[48] = hc_byte_perm (w[10], w[ 9], selector);\n      w[47] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[46] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[45] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[44] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[43] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[42] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[41] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[40] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[39] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[38] = hc_byte_perm (w[ 0],     0, selector);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_byte_perm (w[24], w[23], selector);\n      w[62] = hc_byte_perm (w[23], w[22], selector);\n      w[61] = hc_byte_perm (w[22], w[21], selector);\n      w[60] = hc_byte_perm (w[21], w[20], selector);\n      w[59] = hc_byte_perm (w[20], w[19], selector);\n      w[58] = hc_byte_perm (w[19], w[18], selector);\n      w[57] = hc_byte_perm (w[18], w[17], selector);\n      w[56] = hc_byte_perm (w[17], w[16], selector);\n      w[55] = hc_byte_perm (w[16], w[15], selector);\n      w[54] = hc_byte_perm (w[15], w[14], selector);\n      w[53] = hc_byte_perm (w[14], w[13], selector);\n      w[52] = hc_byte_perm (w[13], w[12], selector);\n      w[51] = hc_byte_perm (w[12], w[11], selector);\n      w[50] = hc_byte_perm (w[11], w[10], selector);\n      w[49] = hc_byte_perm (w[10], w[ 9], selector);\n      w[48] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[47] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[46] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[45] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[44] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[43] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[42] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[41] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[40] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[39] = hc_byte_perm (w[ 0],     0, selector);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_byte_perm (w[23], w[22], selector);\n      w[62] = hc_byte_perm (w[22], w[21], selector);\n      w[61] = hc_byte_perm (w[21], w[20], selector);\n      w[60] = hc_byte_perm (w[20], w[19], selector);\n      w[59] = hc_byte_perm (w[19], w[18], selector);\n      w[58] = hc_byte_perm (w[18], w[17], selector);\n      w[57] = hc_byte_perm (w[17], w[16], selector);\n      w[56] = hc_byte_perm (w[16], w[15], selector);\n      w[55] = hc_byte_perm (w[15], w[14], selector);\n      w[54] = hc_byte_perm (w[14], w[13], selector);\n      w[53] = hc_byte_perm (w[13], w[12], selector);\n      w[52] = hc_byte_perm (w[12], w[11], selector);\n      w[51] = hc_byte_perm (w[11], w[10], selector);\n      w[50] = hc_byte_perm (w[10], w[ 9], selector);\n      w[49] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[48] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[47] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[46] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[45] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[44] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[43] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[42] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[41] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[40] = hc_byte_perm (w[ 0],     0, selector);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_byte_perm (w[22], w[21], selector);\n      w[62] = hc_byte_perm (w[21], w[20], selector);\n      w[61] = hc_byte_perm (w[20], w[19], selector);\n      w[60] = hc_byte_perm (w[19], w[18], selector);\n      w[59] = hc_byte_perm (w[18], w[17], selector);\n      w[58] = hc_byte_perm (w[17], w[16], selector);\n      w[57] = hc_byte_perm (w[16], w[15], selector);\n      w[56] = hc_byte_perm (w[15], w[14], selector);\n      w[55] = hc_byte_perm (w[14], w[13], selector);\n      w[54] = hc_byte_perm (w[13], w[12], selector);\n      w[53] = hc_byte_perm (w[12], w[11], selector);\n      w[52] = hc_byte_perm (w[11], w[10], selector);\n      w[51] = hc_byte_perm (w[10], w[ 9], selector);\n      w[50] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[49] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[48] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[47] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[46] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[45] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[44] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[43] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[42] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[41] = hc_byte_perm (w[ 0],     0, selector);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_byte_perm (w[21], w[20], selector);\n      w[62] = hc_byte_perm (w[20], w[19], selector);\n      w[61] = hc_byte_perm (w[19], w[18], selector);\n      w[60] = hc_byte_perm (w[18], w[17], selector);\n      w[59] = hc_byte_perm (w[17], w[16], selector);\n      w[58] = hc_byte_perm (w[16], w[15], selector);\n      w[57] = hc_byte_perm (w[15], w[14], selector);\n      w[56] = hc_byte_perm (w[14], w[13], selector);\n      w[55] = hc_byte_perm (w[13], w[12], selector);\n      w[54] = hc_byte_perm (w[12], w[11], selector);\n      w[53] = hc_byte_perm (w[11], w[10], selector);\n      w[52] = hc_byte_perm (w[10], w[ 9], selector);\n      w[51] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[50] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[49] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[48] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[47] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[46] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[45] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[44] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[43] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[42] = hc_byte_perm (w[ 0],     0, selector);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_byte_perm (w[20], w[19], selector);\n      w[62] = hc_byte_perm (w[19], w[18], selector);\n      w[61] = hc_byte_perm (w[18], w[17], selector);\n      w[60] = hc_byte_perm (w[17], w[16], selector);\n      w[59] = hc_byte_perm (w[16], w[15], selector);\n      w[58] = hc_byte_perm (w[15], w[14], selector);\n      w[57] = hc_byte_perm (w[14], w[13], selector);\n      w[56] = hc_byte_perm (w[13], w[12], selector);\n      w[55] = hc_byte_perm (w[12], w[11], selector);\n      w[54] = hc_byte_perm (w[11], w[10], selector);\n      w[53] = hc_byte_perm (w[10], w[ 9], selector);\n      w[52] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[51] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[50] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[49] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[48] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[47] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[46] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[45] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[44] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[43] = hc_byte_perm (w[ 0],     0, selector);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_byte_perm (w[19], w[18], selector);\n      w[62] = hc_byte_perm (w[18], w[17], selector);\n      w[61] = hc_byte_perm (w[17], w[16], selector);\n      w[60] = hc_byte_perm (w[16], w[15], selector);\n      w[59] = hc_byte_perm (w[15], w[14], selector);\n      w[58] = hc_byte_perm (w[14], w[13], selector);\n      w[57] = hc_byte_perm (w[13], w[12], selector);\n      w[56] = hc_byte_perm (w[12], w[11], selector);\n      w[55] = hc_byte_perm (w[11], w[10], selector);\n      w[54] = hc_byte_perm (w[10], w[ 9], selector);\n      w[53] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[52] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[51] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[50] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[49] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[48] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[47] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[46] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[45] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[44] = hc_byte_perm (w[ 0],     0, selector);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_byte_perm (w[18], w[17], selector);\n      w[62] = hc_byte_perm (w[17], w[16], selector);\n      w[61] = hc_byte_perm (w[16], w[15], selector);\n      w[60] = hc_byte_perm (w[15], w[14], selector);\n      w[59] = hc_byte_perm (w[14], w[13], selector);\n      w[58] = hc_byte_perm (w[13], w[12], selector);\n      w[57] = hc_byte_perm (w[12], w[11], selector);\n      w[56] = hc_byte_perm (w[11], w[10], selector);\n      w[55] = hc_byte_perm (w[10], w[ 9], selector);\n      w[54] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[53] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[52] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[51] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[50] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[49] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[48] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[47] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[46] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[45] = hc_byte_perm (w[ 0],     0, selector);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_byte_perm (w[17], w[16], selector);\n      w[62] = hc_byte_perm (w[16], w[15], selector);\n      w[61] = hc_byte_perm (w[15], w[14], selector);\n      w[60] = hc_byte_perm (w[14], w[13], selector);\n      w[59] = hc_byte_perm (w[13], w[12], selector);\n      w[58] = hc_byte_perm (w[12], w[11], selector);\n      w[57] = hc_byte_perm (w[11], w[10], selector);\n      w[56] = hc_byte_perm (w[10], w[ 9], selector);\n      w[55] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[54] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[53] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[52] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[51] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[50] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[49] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[48] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[47] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[46] = hc_byte_perm (w[ 0],     0, selector);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_byte_perm (w[16], w[15], selector);\n      w[62] = hc_byte_perm (w[15], w[14], selector);\n      w[61] = hc_byte_perm (w[14], w[13], selector);\n      w[60] = hc_byte_perm (w[13], w[12], selector);\n      w[59] = hc_byte_perm (w[12], w[11], selector);\n      w[58] = hc_byte_perm (w[11], w[10], selector);\n      w[57] = hc_byte_perm (w[10], w[ 9], selector);\n      w[56] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[55] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[54] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[53] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[52] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[51] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[50] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[49] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[48] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[47] = hc_byte_perm (w[ 0],     0, selector);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_byte_perm (w[15], w[14], selector);\n      w[62] = hc_byte_perm (w[14], w[13], selector);\n      w[61] = hc_byte_perm (w[13], w[12], selector);\n      w[60] = hc_byte_perm (w[12], w[11], selector);\n      w[59] = hc_byte_perm (w[11], w[10], selector);\n      w[58] = hc_byte_perm (w[10], w[ 9], selector);\n      w[57] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[56] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[55] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[54] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[53] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[52] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[51] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[50] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[49] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[48] = hc_byte_perm (w[ 0],     0, selector);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_byte_perm (w[14], w[13], selector);\n      w[62] = hc_byte_perm (w[13], w[12], selector);\n      w[61] = hc_byte_perm (w[12], w[11], selector);\n      w[60] = hc_byte_perm (w[11], w[10], selector);\n      w[59] = hc_byte_perm (w[10], w[ 9], selector);\n      w[58] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[57] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[56] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[55] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[54] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[53] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[52] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[51] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[50] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[49] = hc_byte_perm (w[ 0],     0, selector);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_byte_perm (w[13], w[12], selector);\n      w[62] = hc_byte_perm (w[12], w[11], selector);\n      w[61] = hc_byte_perm (w[11], w[10], selector);\n      w[60] = hc_byte_perm (w[10], w[ 9], selector);\n      w[59] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[58] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[57] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[56] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[55] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[54] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[53] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[52] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[51] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[50] = hc_byte_perm (w[ 0],     0, selector);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_byte_perm (w[12], w[11], selector);\n      w[62] = hc_byte_perm (w[11], w[10], selector);\n      w[61] = hc_byte_perm (w[10], w[ 9], selector);\n      w[60] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[59] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[58] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[57] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[56] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[55] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[54] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[53] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[52] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[51] = hc_byte_perm (w[ 0],     0, selector);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_byte_perm (w[11], w[10], selector);\n      w[62] = hc_byte_perm (w[10], w[ 9], selector);\n      w[61] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[60] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[59] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[58] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[57] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[56] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[55] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[54] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[53] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[52] = hc_byte_perm (w[ 0],     0, selector);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_byte_perm (w[10], w[ 9], selector);\n      w[62] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[61] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[60] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[59] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[58] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[57] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[56] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[55] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[54] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[53] = hc_byte_perm (w[ 0],     0, selector);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_byte_perm (w[ 9], w[ 8], selector);\n      w[62] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[61] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[60] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[59] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[58] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[57] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[56] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[55] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[54] = hc_byte_perm (w[ 0],     0, selector);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_byte_perm (w[ 8], w[ 7], selector);\n      w[62] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[61] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[60] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[59] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[58] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[57] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[56] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[55] = hc_byte_perm (w[ 0],     0, selector);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_byte_perm (w[ 7], w[ 6], selector);\n      w[62] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[61] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[60] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[59] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[58] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[57] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[56] = hc_byte_perm (w[ 0],     0, selector);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_byte_perm (w[ 6], w[ 5], selector);\n      w[62] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[61] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[60] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[59] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[58] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[57] = hc_byte_perm (w[ 0],     0, selector);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_byte_perm (w[ 5], w[ 4], selector);\n      w[62] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[61] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[60] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[59] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[58] = hc_byte_perm (w[ 0],     0, selector);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_byte_perm (w[ 4], w[ 3], selector);\n      w[62] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[61] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[60] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[59] = hc_byte_perm (w[ 0],     0, selector);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_byte_perm (w[ 3], w[ 2], selector);\n      w[62] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[61] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[60] = hc_byte_perm (w[ 0],     0, selector);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_byte_perm (w[ 2], w[ 1], selector);\n      w[62] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[61] = hc_byte_perm (w[ 0],     0, selector);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_byte_perm (w[ 1], w[ 0], selector);\n      w[62] = hc_byte_perm (w[ 0],     0, selector);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_byte_perm (w[ 0],     0, selector);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n}\n\n/**\n * vector functions as scalar (for outer loop usage)\n */\n\nDECLSPEC void truncate_block_4x4_le_S (PRIVATE_AS u32 *w0, const u32 len)\n{\n  switch (len)\n  {\n    case  0:\n      w0[0]  = 0;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  1:\n      w0[0] &= 0x000000ff;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  2:\n      w0[0] &= 0x0000ffff;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  3:\n      w0[0] &= 0x00ffffff;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  4:\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  5:\n      w0[1] &= 0x000000ff;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  6:\n      w0[1] &= 0x0000ffff;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  7:\n      w0[1] &= 0x00ffffff;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  8:\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  9:\n      w0[2] &= 0x000000ff;\n      w0[3]  = 0;\n\n      break;\n\n    case 10:\n      w0[2] &= 0x0000ffff;\n      w0[3]  = 0;\n\n      break;\n\n    case 11:\n      w0[2] &= 0x00ffffff;\n      w0[3]  = 0;\n\n      break;\n\n    case 12:\n      w0[3]  = 0;\n\n      break;\n\n    case 13:\n      w0[3] &= 0x000000ff;\n\n      break;\n\n    case 14:\n      w0[3] &= 0x0000ffff;\n\n      break;\n\n    case 15:\n      w0[3] &= 0x00ffffff;\n\n      break;\n  }\n}\n\nDECLSPEC void truncate_block_4x4_be_S (PRIVATE_AS u32 *w0, const u32 len)\n{\n  switch (len)\n  {\n    case  0:\n      w0[0]  = 0;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  1:\n      w0[0] &= 0xff000000;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  2:\n      w0[0] &= 0xffff0000;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  3:\n      w0[0] &= 0xffffff00;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  4:\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  5:\n      w0[1] &= 0xff000000;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  6:\n      w0[1] &= 0xffff0000;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  7:\n      w0[1] &= 0xffffff00;\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  8:\n      w0[2]  = 0;\n      w0[3]  = 0;\n\n      break;\n\n    case  9:\n      w0[2] &= 0xff000000;\n      w0[3]  = 0;\n\n      break;\n\n    case 10:\n      w0[2] &= 0xffff0000;\n      w0[3]  = 0;\n\n      break;\n\n    case 11:\n      w0[2] &= 0xffffff00;\n      w0[3]  = 0;\n\n      break;\n\n    case 12:\n      w0[3]  = 0;\n\n      break;\n\n    case 13:\n      w0[3] &= 0xff000000;\n\n      break;\n\n    case 14:\n      w0[3] &= 0xffff0000;\n\n      break;\n\n    case 15:\n      w0[3] &= 0xffffff00;\n\n      break;\n  }\n}\n\nDECLSPEC void truncate_block_16x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len)\n{\n  switch (len)\n  {\n    case  0:\n      w0[0]  = 0;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  1:\n      w0[0] &= 0x000000ff;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  2:\n      w0[0] &= 0x0000ffff;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  3:\n      w0[0] &= 0x00ffffff;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  4:\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  5:\n      w0[1] &= 0x000000ff;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  6:\n      w0[1] &= 0x0000ffff;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  7:\n      w0[1] &= 0x00ffffff;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  8:\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  9:\n      w0[2] &= 0x000000ff;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 10:\n      w0[2] &= 0x0000ffff;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 11:\n      w0[2] &= 0x00ffffff;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 12:\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 13:\n      w0[3] &= 0x000000ff;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 14:\n      w0[3] &= 0x0000ffff;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 15:\n      w0[3] &= 0x00ffffff;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 16:\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 17:\n      w1[0] &= 0x000000ff;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 18:\n      w1[0] &= 0x0000ffff;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 19:\n      w1[0] &= 0x00ffffff;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 20:\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 21:\n      w1[1] &= 0x000000ff;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 22:\n      w1[1] &= 0x0000ffff;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 23:\n      w1[1] &= 0x00ffffff;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 24:\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 25:\n      w1[2] &= 0x000000ff;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 26:\n      w1[2] &= 0x0000ffff;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 27:\n      w1[2] &= 0x00ffffff;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 28:\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 29:\n      w1[3] &= 0x000000ff;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 30:\n      w1[3] &= 0x0000ffff;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 31:\n      w1[3] &= 0x00ffffff;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 32:\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 33:\n      w2[0] &= 0x000000ff;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 34:\n      w2[0] &= 0x0000ffff;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 35:\n      w2[0] &= 0x00ffffff;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 36:\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 37:\n      w2[1] &= 0x000000ff;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 38:\n      w2[1] &= 0x0000ffff;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 39:\n      w2[1] &= 0x00ffffff;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 40:\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 41:\n      w2[2] &= 0x000000ff;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 42:\n      w2[2] &= 0x0000ffff;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 43:\n      w2[2] &= 0x00ffffff;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 44:\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 45:\n      w2[3] &= 0x000000ff;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 46:\n      w2[3] &= 0x0000ffff;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 47:\n      w2[3] &= 0x00ffffff;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 48:\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 49:\n      w3[0] &= 0x000000ff;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 50:\n      w3[0] &= 0x0000ffff;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 51:\n      w3[0] &= 0x00ffffff;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 52:\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 53:\n      w3[1] &= 0x000000ff;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 54:\n      w3[1] &= 0x0000ffff;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 55:\n      w3[1] &= 0x00ffffff;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 56:\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 57:\n      w3[2] &= 0x000000ff;\n      w3[3]  = 0;\n\n      break;\n\n    case 58:\n      w3[2] &= 0x0000ffff;\n      w3[3]  = 0;\n\n      break;\n\n    case 59:\n      w3[2] &= 0x00ffffff;\n      w3[3]  = 0;\n\n      break;\n\n    case 60:\n      w3[3]  = 0;\n\n      break;\n\n    case 61:\n      w3[3] &= 0x000000ff;\n\n      break;\n\n    case 62:\n      w3[3] &= 0x0000ffff;\n\n      break;\n\n    case 63:\n      w3[3] &= 0x00ffffff;\n\n      break;\n  }\n}\n\nDECLSPEC void truncate_block_16x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len)\n{\n  switch (len)\n  {\n    case  0:\n      w0[0]  = 0;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  1:\n      w0[0] &= 0xff000000;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  2:\n      w0[0] &= 0xffff0000;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  3:\n      w0[0] &= 0xffffff00;\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  4:\n      w0[1]  = 0;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  5:\n      w0[1] &= 0xff000000;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  6:\n      w0[1] &= 0xffff0000;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  7:\n      w0[1] &= 0xffffff00;\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  8:\n      w0[2]  = 0;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case  9:\n      w0[2] &= 0xff000000;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 10:\n      w0[2] &= 0xffff0000;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 11:\n      w0[2] &= 0xffffff00;\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 12:\n      w0[3]  = 0;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 13:\n      w0[3] &= 0xff000000;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 14:\n      w0[3] &= 0xffff0000;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 15:\n      w0[3] &= 0xffffff00;\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 16:\n      w1[0]  = 0;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 17:\n      w1[0] &= 0xff000000;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 18:\n      w1[0] &= 0xffff0000;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 19:\n      w1[0] &= 0xffffff00;\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 20:\n      w1[1]  = 0;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 21:\n      w1[1] &= 0xff000000;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 22:\n      w1[1] &= 0xffff0000;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 23:\n      w1[1] &= 0xffffff00;\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 24:\n      w1[2]  = 0;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 25:\n      w1[2] &= 0xff000000;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 26:\n      w1[2] &= 0xffff0000;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 27:\n      w1[2] &= 0xffffff00;\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 28:\n      w1[3]  = 0;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 29:\n      w1[3] &= 0xff000000;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 30:\n      w1[3] &= 0xffff0000;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 31:\n      w1[3] &= 0xffffff00;\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 32:\n      w2[0]  = 0;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 33:\n      w2[0] &= 0xff000000;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 34:\n      w2[0] &= 0xffff0000;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 35:\n      w2[0] &= 0xffffff00;\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 36:\n      w2[1]  = 0;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 37:\n      w2[1] &= 0xff000000;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 38:\n      w2[1] &= 0xffff0000;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 39:\n      w2[1] &= 0xffffff00;\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 40:\n      w2[2]  = 0;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 41:\n      w2[2] &= 0xff000000;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 42:\n      w2[2] &= 0xffff0000;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 43:\n      w2[2] &= 0xffffff00;\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 44:\n      w2[3]  = 0;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 45:\n      w2[3] &= 0xff000000;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 46:\n      w2[3] &= 0xffff0000;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 47:\n      w2[3] &= 0xffffff00;\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 48:\n      w3[0]  = 0;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 49:\n      w3[0] &= 0xff000000;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 50:\n      w3[0] &= 0xffff0000;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 51:\n      w3[0] &= 0xffffff00;\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 52:\n      w3[1]  = 0;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 53:\n      w3[1] &= 0xff000000;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 54:\n      w3[1] &= 0xffff0000;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 55:\n      w3[1] &= 0xffffff00;\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 56:\n      w3[2]  = 0;\n      w3[3]  = 0;\n\n      break;\n\n    case 57:\n      w3[2] &= 0xff000000;\n      w3[3]  = 0;\n\n      break;\n\n    case 58:\n      w3[2] &= 0xffff0000;\n      w3[3]  = 0;\n\n      break;\n\n    case 59:\n      w3[2] &= 0xffffff00;\n      w3[3]  = 0;\n\n      break;\n\n    case 60:\n      w3[3]  = 0;\n\n      break;\n\n    case 61:\n      w3[3] &= 0xff000000;\n\n      break;\n\n    case 62:\n      w3[3] &= 0xffff0000;\n\n      break;\n\n    case 63:\n      w3[3] &= 0xffffff00;\n\n      break;\n  }\n}\n\nDECLSPEC void set_mark_1x4_S (PRIVATE_AS u32 *v, const u32 offset)\n{\n  const u32 c = (offset & 15) / 4;\n  const u32 r = 0xff << ((offset & 3) * 8);\n\n  v[0] = (c == 0) ? r : 0;\n  v[1] = (c == 1) ? r : 0;\n  v[2] = (c == 2) ? r : 0;\n  v[3] = (c == 3) ? r : 0;\n}\n\nDECLSPEC void append_helper_1x4_S (PRIVATE_AS u32 *r, const u32 v, PRIVATE_AS const u32 *m)\n{\n  r[0] |= v & m[0];\n  r[1] |= v & m[1];\n  r[2] |= v & m[2];\n  r[3] |= v & m[3];\n}\n\nDECLSPEC void append_0x01_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x01010101 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x01010101 : 0), v);\n}\n\nDECLSPEC void append_0x06_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x06060606 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x06060606 : 0), v);\n}\n\nDECLSPEC void append_0x01_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x01010101 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x01010101 : 0), v);\n  append_helper_1x4_S (w2, ((offset16 == 2) ? 0x01010101 : 0), v);\n  append_helper_1x4_S (w3, ((offset16 == 3) ? 0x01010101 : 0), v);\n}\n\nDECLSPEC void append_0x2d_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x2d2d2d2d : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x2d2d2d2d : 0), v);\n  append_helper_1x4_S (w2, ((offset16 == 2) ? 0x2d2d2d2d : 0), v);\n  append_helper_1x4_S (w3, ((offset16 == 3) ? 0x2d2d2d2d : 0), v);\n}\n\nDECLSPEC void append_0x3a_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x3a3a3a3a : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x3a3a3a3a : 0), v);\n  append_helper_1x4_S (w2, ((offset16 == 2) ? 0x3a3a3a3a : 0), v);\n  append_helper_1x4_S (w3, ((offset16 == 3) ? 0x3a3a3a3a : 0), v);\n}\n\nDECLSPEC void append_0x80_1x4_S (PRIVATE_AS u32 *w0, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  append_helper_1x4_S (w0, 0x80808080, v);\n}\n\nDECLSPEC void append_0x80_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_3x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w2, ((offset16 == 2) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w2, ((offset16 == 2) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w3, ((offset16 == 3) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void append_0x80_8x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset)\n{\n  u32 v[4];\n\n  set_mark_1x4_S (v, offset);\n\n  const u32 offset16 = offset / 16;\n\n  append_helper_1x4_S (w0, ((offset16 == 0) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w1, ((offset16 == 1) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w2, ((offset16 == 2) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w3, ((offset16 == 3) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w4, ((offset16 == 4) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w5, ((offset16 == 5) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w6, ((offset16 == 6) ? 0x80808080 : 0), v);\n  append_helper_1x4_S (w7, ((offset16 == 7) ? 0x80808080 : 0), v);\n}\n\nDECLSPEC void make_utf16be_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm_S (in[3], 0, 0x3727);\n  out2[2] = hc_byte_perm_S (in[3], 0, 0x1707);\n  out2[1] = hc_byte_perm_S (in[2], 0, 0x3727);\n  out2[0] = hc_byte_perm_S (in[2], 0, 0x1707);\n  out1[3] = hc_byte_perm_S (in[1], 0, 0x3727);\n  out1[2] = hc_byte_perm_S (in[1], 0, 0x1707);\n  out1[1] = hc_byte_perm_S (in[0], 0, 0x3727);\n  out1[0] = hc_byte_perm_S (in[0], 0, 0x1707);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm_S (in[3], 0, 0x03070207);\n  out2[2] = hc_byte_perm_S (in[3], 0, 0x01070007);\n  out2[1] = hc_byte_perm_S (in[2], 0, 0x03070207);\n  out2[0] = hc_byte_perm_S (in[2], 0, 0x01070007);\n  out1[3] = hc_byte_perm_S (in[1], 0, 0x03070207);\n  out1[2] = hc_byte_perm_S (in[1], 0, 0x01070007);\n  out1[1] = hc_byte_perm_S (in[0], 0, 0x03070207);\n  out1[0] = hc_byte_perm_S (in[0], 0, 0x01070007);\n\n  #else\n\n  out2[3] = ((in[3] >>  0) & 0xFF000000) | ((in[3] >> 8) & 0x0000FF00);\n  out2[2] = ((in[3] << 16) & 0xFF000000) | ((in[3] << 8) & 0x0000FF00);\n  out2[1] = ((in[2] >>  0) & 0xFF000000) | ((in[2] >> 8) & 0x0000FF00);\n  out2[0] = ((in[2] << 16) & 0xFF000000) | ((in[2] << 8) & 0x0000FF00);\n  out1[3] = ((in[1] >>  0) & 0xFF000000) | ((in[1] >> 8) & 0x0000FF00);\n  out1[2] = ((in[1] << 16) & 0xFF000000) | ((in[1] << 8) & 0x0000FF00);\n  out1[1] = ((in[0] >>  0) & 0xFF000000) | ((in[0] >> 8) & 0x0000FF00);\n  out1[0] = ((in[0] << 16) & 0xFF000000) | ((in[0] << 8) & 0x0000FF00);\n\n  #endif\n}\n\nDECLSPEC void make_utf16beN_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm_S (in[3], 0, 0x1707);\n  out2[2] = hc_byte_perm_S (in[3], 0, 0x3727);\n  out2[1] = hc_byte_perm_S (in[2], 0, 0x1707);\n  out2[0] = hc_byte_perm_S (in[2], 0, 0x3727);\n  out1[3] = hc_byte_perm_S (in[1], 0, 0x1707);\n  out1[2] = hc_byte_perm_S (in[1], 0, 0x3727);\n  out1[1] = hc_byte_perm_S (in[0], 0, 0x1707);\n  out1[0] = hc_byte_perm_S (in[0], 0, 0x3727);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm_S (in[3], 0, 0x01070007);\n  out2[2] = hc_byte_perm_S (in[3], 0, 0x03070207);\n  out2[1] = hc_byte_perm_S (in[2], 0, 0x01070007);\n  out2[0] = hc_byte_perm_S (in[2], 0, 0x03070207);\n  out1[3] = hc_byte_perm_S (in[1], 0, 0x01070007);\n  out1[2] = hc_byte_perm_S (in[1], 0, 0x03070207);\n  out1[1] = hc_byte_perm_S (in[0], 0, 0x01070007);\n  out1[0] = hc_byte_perm_S (in[0], 0, 0x03070207);\n\n  #else\n\n  out2[3] = ((in[3] << 16) & 0xFF000000) | ((in[3] << 8) & 0x0000FF00);\n  out2[2] = ((in[3] >>  0) & 0xFF000000) | ((in[3] >> 8) & 0x0000FF00);\n  out2[1] = ((in[2] << 16) & 0xFF000000) | ((in[2] << 8) & 0x0000FF00);\n  out2[0] = ((in[2] >>  0) & 0xFF000000) | ((in[2] >> 8) & 0x0000FF00);\n  out1[3] = ((in[1] << 16) & 0xFF000000) | ((in[1] << 8) & 0x0000FF00);\n  out1[2] = ((in[1] >>  0) & 0xFF000000) | ((in[1] >> 8) & 0x0000FF00);\n  out1[1] = ((in[0] << 16) & 0xFF000000) | ((in[0] << 8) & 0x0000FF00);\n  out1[0] = ((in[0] >>  0) & 0xFF000000) | ((in[0] >> 8) & 0x0000FF00);\n\n  #endif\n}\n\nDECLSPEC void make_utf16le_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2)\n{\n  #if defined IS_NV\n\n  out2[3] = hc_byte_perm_S (in[3], 0, 0x7372);\n  out2[2] = hc_byte_perm_S (in[3], 0, 0x7170);\n  out2[1] = hc_byte_perm_S (in[2], 0, 0x7372);\n  out2[0] = hc_byte_perm_S (in[2], 0, 0x7170);\n  out1[3] = hc_byte_perm_S (in[1], 0, 0x7372);\n  out1[2] = hc_byte_perm_S (in[1], 0, 0x7170);\n  out1[1] = hc_byte_perm_S (in[0], 0, 0x7372);\n  out1[0] = hc_byte_perm_S (in[0], 0, 0x7170);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out2[3] = hc_byte_perm_S (in[3], 0, 0x07030702);\n  out2[2] = hc_byte_perm_S (in[3], 0, 0x07010700);\n  out2[1] = hc_byte_perm_S (in[2], 0, 0x07030702);\n  out2[0] = hc_byte_perm_S (in[2], 0, 0x07010700);\n  out1[3] = hc_byte_perm_S (in[1], 0, 0x07030702);\n  out1[2] = hc_byte_perm_S (in[1], 0, 0x07010700);\n  out1[1] = hc_byte_perm_S (in[0], 0, 0x07030702);\n  out1[0] = hc_byte_perm_S (in[0], 0, 0x07010700);\n\n  #else\n\n  out2[3] = ((in[3] >> 8) & 0x00FF0000) | ((in[3] >> 16) & 0x000000FF);\n  out2[2] = ((in[3] << 8) & 0x00FF0000) | ((in[3] >>  0) & 0x000000FF);\n  out2[1] = ((in[2] >> 8) & 0x00FF0000) | ((in[2] >> 16) & 0x000000FF);\n  out2[0] = ((in[2] << 8) & 0x00FF0000) | ((in[2] >>  0) & 0x000000FF);\n  out1[3] = ((in[1] >> 8) & 0x00FF0000) | ((in[1] >> 16) & 0x000000FF);\n  out1[2] = ((in[1] << 8) & 0x00FF0000) | ((in[1] >>  0) & 0x000000FF);\n  out1[1] = ((in[0] >> 8) & 0x00FF0000) | ((in[0] >> 16) & 0x000000FF);\n  out1[0] = ((in[0] << 8) & 0x00FF0000) | ((in[0] >>  0) & 0x000000FF);\n\n  #endif\n}\n\nDECLSPEC void undo_utf16be_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out)\n{\n  #if defined IS_NV\n\n  out[0] = hc_byte_perm_S (in1[0], in1[1], 0x4602);\n  out[1] = hc_byte_perm_S (in1[2], in1[3], 0x4602);\n  out[2] = hc_byte_perm_S (in2[0], in2[1], 0x4602);\n  out[3] = hc_byte_perm_S (in2[2], in2[3], 0x4602);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out[0] = hc_byte_perm_S (in1[0], in1[1], 0x04060002);\n  out[1] = hc_byte_perm_S (in1[2], in1[3], 0x04060002);\n  out[2] = hc_byte_perm_S (in2[0], in2[1], 0x04060002);\n  out[3] = hc_byte_perm_S (in2[2], in2[3], 0x04060002);\n\n  #else\n\n  out[0] = ((in1[0] & 0x0000ff00) >>  8) | ((in1[0] & 0xff000000) >> 16)\n         | ((in1[1] & 0x0000ff00) <<  8) | ((in1[1] & 0xff000000) <<  0);\n  out[1] = ((in1[2] & 0x0000ff00) >>  8) | ((in1[2] & 0xff000000) >> 16)\n         | ((in1[3] & 0x0000ff00) <<  8) | ((in1[3] & 0xff000000) <<  0);\n  out[2] = ((in2[0] & 0x0000ff00) >>  8) | ((in2[0] & 0xff000000) >> 16)\n         | ((in2[1] & 0x0000ff00) <<  8) | ((in2[1] & 0xff000000) <<  0);\n  out[3] = ((in2[2] & 0x0000ff00) >>  8) | ((in2[2] & 0xff000000) >> 16)\n         | ((in2[3] & 0x0000ff00) <<  8) | ((in2[3] & 0xff000000) <<  0);\n\n  #endif\n}\n\nDECLSPEC void undo_utf16le_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out)\n{\n  #if defined IS_NV\n\n  out[0] = hc_byte_perm_S (in1[0], in1[1], 0x6420);\n  out[1] = hc_byte_perm_S (in1[2], in1[3], 0x6420);\n  out[2] = hc_byte_perm_S (in2[0], in2[1], 0x6420);\n  out[3] = hc_byte_perm_S (in2[2], in2[3], 0x6420);\n\n  #elif (defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1\n\n  out[0] = hc_byte_perm_S (in1[0], in1[1], 0x06040200);\n  out[1] = hc_byte_perm_S (in1[2], in1[3], 0x06040200);\n  out[2] = hc_byte_perm_S (in2[0], in2[1], 0x06040200);\n  out[3] = hc_byte_perm_S (in2[2], in2[3], 0x06040200);\n\n  #else\n\n  out[0] = ((in1[0] & 0x000000ff) >>  0) | ((in1[0] & 0x00ff0000) >>  8)\n         | ((in1[1] & 0x000000ff) << 16) | ((in1[1] & 0x00ff0000) <<  8);\n  out[1] = ((in1[2] & 0x000000ff) >>  0) | ((in1[2] & 0x00ff0000) >>  8)\n         | ((in1[3] & 0x000000ff) << 16) | ((in1[3] & 0x00ff0000) <<  8);\n  out[2] = ((in2[0] & 0x000000ff) >>  0) | ((in2[0] & 0x00ff0000) >>  8)\n         | ((in2[1] & 0x000000ff) << 16) | ((in2[1] & 0x00ff0000) <<  8);\n  out[3] = ((in2[2] & 0x000000ff) >>  0) | ((in2[2] & 0x00ff0000) >>  8)\n         | ((in2[3] & 0x000000ff) << 16) | ((in2[3] & 0x00ff0000) <<  8);\n\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w3[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_bytealign_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[0] = hc_byte_perm_S (    0, w0[0], selector);\n\n      break;\n\n    case  1:\n      w3[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if (defined IS_AMD || defined IS_HIP) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign_S (w3[3],     0, offset);\n      w3[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign_S (w3[3],     0, offset);\n      c0[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign_S (w3[3],     0, offset);\n      c0[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign_S (w3[3],     0, offset);\n      c0[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign_S (w3[3],     0, offset);\n      c0[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign_S (w3[3],     0, offset);\n      c1[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign_S (w3[3],     0, offset);\n      c1[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign_S (w3[3],     0, offset);\n      c1[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign_S (w3[3],     0, offset);\n      c1[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign_S (w3[3],     0, offset);\n      c2[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_S (w3[3],     0, offset);\n      c2[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_S (w3[3],     0, offset);\n      c2[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_S (w3[3],     0, offset);\n      c2[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_S (w3[3],     0, offset);\n      c3[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_S (w3[3],     0, offset);\n      c3[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_S (w3[3],     0, offset);\n      c3[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #ifdef IS_NV\n  // could be improved, too\n  switch (offset_switch)\n  {\n    case 0:\n      c0[0] = hc_bytealign_S (w3[3],     0, offset);\n      w3[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_S (    0, w0[0], offset);\n\n      break;\n\n    case 1:\n      c0[1] = hc_bytealign_S (w3[3],     0, offset);\n      c0[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case 2:\n      c0[2] = hc_bytealign_S (w3[3],     0, offset);\n      c0[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 3:\n      c0[3] = hc_bytealign_S (w3[3],     0, offset);\n      c0[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 4:\n      c1[0] = hc_bytealign_S (w3[3],     0, offset);\n      c0[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 5:\n      c1[1] = hc_bytealign_S (w3[3],     0, offset);\n      c1[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 6:\n      c1[2] = hc_bytealign_S (w3[3],     0, offset);\n      c1[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 7:\n      c1[3] = hc_bytealign_S (w3[3],     0, offset);\n      c1[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 8:\n      c2[0] = hc_bytealign_S (w3[3],     0, offset);\n      c1[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 9:\n      c2[1] = hc_bytealign_S (w3[3],     0, offset);\n      c2[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_S (w3[3],     0, offset);\n      c2[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_S (w3[3],     0, offset);\n      c2[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_S (w3[3],     0, offset);\n      c2[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_S (w3[3],     0, offset);\n      c3[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_S (w3[3],     0, offset);\n      c3[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_S (w3[3],     0, offset);\n      c3[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w3[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w3[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm_S (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      w3[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w3[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w3[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w3[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w3[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w3[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w3[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w3[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w3[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w3[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w3[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w3[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w3[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w3[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w3[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign_be_S (w3[3],     0, offset);\n      w3[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign_be_S (w3[3],     0, offset);\n      c0[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign_be_S (w3[3],     0, offset);\n      c0[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign_be_S (w3[3],     0, offset);\n      c0[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign_be_S (w3[3],     0, offset);\n      c0[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign_be_S (w3[3],     0, offset);\n      c1[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign_be_S (w3[3],     0, offset);\n      c1[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign_be_S (w3[3],     0, offset);\n      c1[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign_be_S (w3[3],     0, offset);\n      c1[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign_be_S (w3[3],     0, offset);\n      c2[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_be_S (w3[3],     0, offset);\n      c2[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_be_S (w3[3],     0, offset);\n      c2[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_be_S (w3[3],     0, offset);\n      c2[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_be_S (w3[3],     0, offset);\n      c3[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_be_S (w3[3],     0, offset);\n      c3[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_be_S (w3[3],     0, offset);\n      c3[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_byte_perm_S (    0, w3[3], selector);\n      w3[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm_S (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      c0[1] = hc_byte_perm_S (    0, w3[3], selector);\n      c0[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_byte_perm_S (    0, w3[3], selector);\n      c0[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_byte_perm_S (    0, w3[3], selector);\n      c0[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_byte_perm_S (    0, w3[3], selector);\n      c0[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_byte_perm_S (    0, w3[3], selector);\n      c1[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_byte_perm_S (    0, w3[3], selector);\n      c1[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_byte_perm_S (    0, w3[3], selector);\n      c1[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_byte_perm_S (    0, w3[3], selector);\n      c1[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_byte_perm_S (    0, w3[3], selector);\n      c2[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_byte_perm_S (    0, w3[3], selector);\n      c2[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_byte_perm_S (    0, w3[3], selector);\n      c2[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_byte_perm_S (    0, w3[3], selector);\n      c2[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_byte_perm_S (    0, w3[3], selector);\n      c3[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c2[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c1[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      c0[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_byte_perm_S (    0, w3[3], selector);\n      c3[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c3[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c2[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c2[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c1[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c1[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      c0[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      c0[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_byte_perm_S (    0, w3[3], selector);\n      c3[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c3[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c3[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c2[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c2[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c2[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c1[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c1[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c1[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      c0[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      c0[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      c0[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w7[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w7[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w7[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w7[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w7[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w7[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w7[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w7[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w7[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w7[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w7[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w7[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w7[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w7[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w7[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w7[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      w7[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign_S (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      w7[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign_S (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      w7[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign_S (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      w7[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign_S (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      w7[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign_S (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      w7[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign_S (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      w7[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign_S (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      w7[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign_S (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      w7[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign_S (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      w7[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign_S (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      w7[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign_S (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      w7[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign_S (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      w7[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign_S (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      w7[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign_S (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      w7[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign_S (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      w7[3] = hc_bytealign_S (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case 0:\n      w7[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      w7[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      w7[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w6[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w6[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w6[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w5[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w5[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w5[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w4[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w4[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w4[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w3[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[0] = hc_byte_perm_S (    0, w0[0], selector);\n      break;\n\n    case 1:\n      w7[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      w7[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w6[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w6[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w5[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w5[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w4[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w4[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w3[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[0] = 0;\n      break;\n\n    case 2:\n      w7[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w6[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w5[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w4[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 3:\n      w7[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 4:\n      w7[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 5:\n      w7[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 6:\n      w7[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 7:\n      w7[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 8:\n      w7[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 9:\n      w7[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 10:\n      w7[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 11:\n      w7[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 12:\n      w7[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 13:\n      w7[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 14:\n      w7[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w7[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w6[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w5[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w4[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n\n    case 15:\n      w7[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w7[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w7[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w6[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w6[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w5[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w5[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w4[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w4[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign_S (w7[3],     0, offset);\n      w7[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign_S (w7[3],     0, offset);\n      c0[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      w7[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign_S (w7[3],     0, offset);\n      c0[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c0[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      w7[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign_S (w7[3],     0, offset);\n      c0[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c0[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c0[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      w7[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign_S (w7[3],     0, offset);\n      c0[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c0[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c0[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c0[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      w7[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign_S (w7[3],     0, offset);\n      c1[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c0[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c0[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c0[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c0[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      w7[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign_S (w7[3],     0, offset);\n      c1[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c1[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c0[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c0[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c0[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c0[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      w7[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign_S (w7[3],     0, offset);\n      c1[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c1[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c1[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c0[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c0[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c0[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c0[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      w7[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign_S (w7[3],     0, offset);\n      c1[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c1[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c1[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c1[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      c0[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      c0[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      c0[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      c0[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      w7[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign_S (w7[3],     0, offset);\n      c2[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c1[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c1[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c1[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c1[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      c0[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      c0[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      c0[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      c0[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      w7[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_S (w7[3],     0, offset);\n      c2[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c2[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c1[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c1[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c1[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c1[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      c0[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      c0[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      c0[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      c0[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      w7[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_S (w7[3],     0, offset);\n      c2[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c2[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c2[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c1[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c1[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c1[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c1[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      c0[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      c0[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      c0[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      c0[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      w7[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_S (w7[3],     0, offset);\n      c2[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c2[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c2[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c2[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      c1[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      c1[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      c1[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      c1[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      c0[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      c0[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      c0[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      c0[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      w7[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_S (w7[3],     0, offset);\n      c3[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c2[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c2[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c2[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c2[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      c1[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      c1[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      c1[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      c1[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      c0[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      c0[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      c0[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      c0[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      w7[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_S (w7[3],     0, offset);\n      c3[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c3[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c2[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c2[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c2[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c2[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      c1[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      c1[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      c1[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      c1[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      c0[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      c0[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      c0[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      c0[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      w7[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_S (w7[3],     0, offset);\n      c3[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c3[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c3[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c2[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c2[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c2[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c2[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      c1[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      c1[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      c1[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      c1[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      c0[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      c0[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      c0[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      c0[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      w7[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_bytealign_S (w7[3],     0, offset);\n      c3[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c3[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c3[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c3[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      c2[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      c2[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      c2[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      c2[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      c1[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      c1[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      c1[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      c1[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      c0[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      c0[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      c0[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      c0[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      w7[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign_S (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_bytealign_S (w7[3],     0, offset);\n      c4[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c3[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c3[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c3[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c3[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      c2[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      c2[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      c2[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      c2[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      c1[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      c1[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      c1[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      c1[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      c0[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      c0[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      c0[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      c0[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      w7[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign_S (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_bytealign_S (w7[3],     0, offset);\n      c4[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c4[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c3[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c3[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c3[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c3[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      c2[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      c2[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      c2[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      c2[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      c1[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      c1[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      c1[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      c1[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      c0[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      c0[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      c0[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      w7[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign_S (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_bytealign_S (w7[3],     0, offset);\n      c4[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c4[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c4[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c3[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c3[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c3[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c3[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      c2[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      c2[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      c2[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      c2[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      c1[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      c1[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      c1[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      c1[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      c0[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      c0[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      w7[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign_S (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_bytealign_S (w7[3],     0, offset);\n      c4[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c4[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c4[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c4[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      c3[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      c3[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      c3[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      c3[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      c2[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      c2[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      c2[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      c2[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      c1[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      c1[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      c1[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      c1[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      c0[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      w7[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign_S (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_bytealign_S (w7[3],     0, offset);\n      c5[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c4[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c4[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c4[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c4[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      c3[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      c3[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      c3[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      c3[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      c2[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      c2[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      c2[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      c2[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      c1[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      c1[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      c1[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      c1[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      w7[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign_S (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_bytealign_S (w7[3],     0, offset);\n      c5[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c5[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c4[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c4[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c4[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c4[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      c3[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      c3[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      c3[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      c3[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      c2[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      c2[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      c2[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      c2[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      c1[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      c1[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      c1[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      w7[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign_S (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_bytealign_S (w7[3],     0, offset);\n      c5[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c5[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c5[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c4[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c4[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c4[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c4[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      c3[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      c3[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      c3[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      c3[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      c2[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      c2[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      c2[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      c2[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      c1[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      c1[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      w7[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign_S (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_bytealign_S (w7[3],     0, offset);\n      c5[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c5[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c5[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c5[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      c4[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      c4[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      c4[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      c4[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      c3[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      c3[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      c3[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      c3[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      c2[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      c2[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      c2[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      c2[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      c1[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      w7[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign_S (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_bytealign_S (w7[3],     0, offset);\n      c6[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c5[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c5[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c5[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c5[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      c4[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      c4[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      c4[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      c4[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      c3[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      c3[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      c3[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      c3[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      c2[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      c2[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      c2[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      c2[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      w7[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign_S (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_bytealign_S (w7[3],     0, offset);\n      c6[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c6[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c5[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c5[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c5[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c5[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      c4[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      c4[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      c4[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      c4[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      c3[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      c3[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      c3[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      c3[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      c2[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      c2[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      c2[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      w7[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign_S (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_bytealign_S (w7[3],     0, offset);\n      c6[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c6[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c6[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c5[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c5[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c5[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c5[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      c4[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      c4[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      c4[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      c4[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      c3[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      c3[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      c3[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      c3[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      c2[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      c2[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      w7[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign_S (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_bytealign_S (w7[3],     0, offset);\n      c6[3] = hc_bytealign_S (w7[2], w7[3], offset);\n      c6[2] = hc_bytealign_S (w7[1], w7[2], offset);\n      c6[1] = hc_bytealign_S (w7[0], w7[1], offset);\n      c6[0] = hc_bytealign_S (w6[3], w7[0], offset);\n      c5[3] = hc_bytealign_S (w6[2], w6[3], offset);\n      c5[2] = hc_bytealign_S (w6[1], w6[2], offset);\n      c5[1] = hc_bytealign_S (w6[0], w6[1], offset);\n      c5[0] = hc_bytealign_S (w5[3], w6[0], offset);\n      c4[3] = hc_bytealign_S (w5[2], w5[3], offset);\n      c4[2] = hc_bytealign_S (w5[1], w5[2], offset);\n      c4[1] = hc_bytealign_S (w5[0], w5[1], offset);\n      c4[0] = hc_bytealign_S (w4[3], w5[0], offset);\n      c3[3] = hc_bytealign_S (w4[2], w4[3], offset);\n      c3[2] = hc_bytealign_S (w4[1], w4[2], offset);\n      c3[1] = hc_bytealign_S (w4[0], w4[1], offset);\n      c3[0] = hc_bytealign_S (w3[3], w4[0], offset);\n      c2[3] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_S (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_S (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_S (w0[3], w1[0], offset);\n      w7[3] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign_S (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_bytealign_S (w7[3],     0, offset);\n      c7[0] = hc_bytealign_S (w7[2], w7[3], offset);\n      c6[3] = hc_bytealign_S (w7[1], w7[2], offset);\n      c6[2] = hc_bytealign_S (w7[0], w7[1], offset);\n      c6[1] = hc_bytealign_S (w6[3], w7[0], offset);\n      c6[0] = hc_bytealign_S (w6[2], w6[3], offset);\n      c5[3] = hc_bytealign_S (w6[1], w6[2], offset);\n      c5[2] = hc_bytealign_S (w6[0], w6[1], offset);\n      c5[1] = hc_bytealign_S (w5[3], w6[0], offset);\n      c5[0] = hc_bytealign_S (w5[2], w5[3], offset);\n      c4[3] = hc_bytealign_S (w5[1], w5[2], offset);\n      c4[2] = hc_bytealign_S (w5[0], w5[1], offset);\n      c4[1] = hc_bytealign_S (w4[3], w5[0], offset);\n      c4[0] = hc_bytealign_S (w4[2], w4[3], offset);\n      c3[3] = hc_bytealign_S (w4[1], w4[2], offset);\n      c3[2] = hc_bytealign_S (w4[0], w4[1], offset);\n      c3[1] = hc_bytealign_S (w3[3], w4[0], offset);\n      c3[0] = hc_bytealign_S (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_S (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_S (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_S (w0[2], w0[3], offset);\n      w7[3] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign_S (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_bytealign_S (w7[3],     0, offset);\n      c7[1] = hc_bytealign_S (w7[2], w7[3], offset);\n      c7[0] = hc_bytealign_S (w7[1], w7[2], offset);\n      c6[3] = hc_bytealign_S (w7[0], w7[1], offset);\n      c6[2] = hc_bytealign_S (w6[3], w7[0], offset);\n      c6[1] = hc_bytealign_S (w6[2], w6[3], offset);\n      c6[0] = hc_bytealign_S (w6[1], w6[2], offset);\n      c5[3] = hc_bytealign_S (w6[0], w6[1], offset);\n      c5[2] = hc_bytealign_S (w5[3], w6[0], offset);\n      c5[1] = hc_bytealign_S (w5[2], w5[3], offset);\n      c5[0] = hc_bytealign_S (w5[1], w5[2], offset);\n      c4[3] = hc_bytealign_S (w5[0], w5[1], offset);\n      c4[2] = hc_bytealign_S (w4[3], w5[0], offset);\n      c4[1] = hc_bytealign_S (w4[2], w4[3], offset);\n      c4[0] = hc_bytealign_S (w4[1], w4[2], offset);\n      c3[3] = hc_bytealign_S (w4[0], w4[1], offset);\n      c3[2] = hc_bytealign_S (w3[3], w4[0], offset);\n      c3[1] = hc_bytealign_S (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_S (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_S (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_S (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_S (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_S (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_S (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_S (w0[1], w0[2], offset);\n      w7[3] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign_S (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_bytealign_S (w7[3],     0, offset);\n      c7[2] = hc_bytealign_S (w7[2], w7[3], offset);\n      c7[1] = hc_bytealign_S (w7[1], w7[2], offset);\n      c7[0] = hc_bytealign_S (w7[0], w7[1], offset);\n      c6[3] = hc_bytealign_S (w6[3], w7[0], offset);\n      c6[2] = hc_bytealign_S (w6[2], w6[3], offset);\n      c6[1] = hc_bytealign_S (w6[1], w6[2], offset);\n      c6[0] = hc_bytealign_S (w6[0], w6[1], offset);\n      c5[3] = hc_bytealign_S (w5[3], w6[0], offset);\n      c5[2] = hc_bytealign_S (w5[2], w5[3], offset);\n      c5[1] = hc_bytealign_S (w5[1], w5[2], offset);\n      c5[0] = hc_bytealign_S (w5[0], w5[1], offset);\n      c4[3] = hc_bytealign_S (w4[3], w5[0], offset);\n      c4[2] = hc_bytealign_S (w4[2], w4[3], offset);\n      c4[1] = hc_bytealign_S (w4[1], w4[2], offset);\n      c4[0] = hc_bytealign_S (w4[0], w4[1], offset);\n      c3[3] = hc_bytealign_S (w3[3], w4[0], offset);\n      c3[2] = hc_bytealign_S (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_S (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_S (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_S (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_S (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_S (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_S (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_S (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_S (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_S (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_S (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_S (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_S (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_S (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_S (w0[0], w0[1], offset);\n      w7[3] = hc_bytealign_S (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_byte_perm_S (w7[3],     0, selector);\n      w7[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      w7[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      w7[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w6[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w6[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w6[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w5[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w5[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w5[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w4[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w4[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w4[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w3[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[0] = hc_byte_perm_S (    0, w0[0], selector);\n\n      break;\n\n    case  1:\n      c0[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c0[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      w7[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      w7[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w6[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w6[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w5[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w5[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w4[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w4[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w3[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c0[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c0[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      w7[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w6[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w5[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w4[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w3[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c0[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c0[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c0[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      w7[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w6[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w5[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w4[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w3[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w0[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c0[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c0[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c0[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c0[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      w7[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w6[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w5[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w4[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w3[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c1[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c0[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c0[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c0[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c0[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      w7[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w6[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w5[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w4[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w3[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c1[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c1[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c0[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c0[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c0[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c0[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      w7[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w6[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w5[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w4[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w3[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c1[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c1[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c1[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c0[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c0[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c0[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c0[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      w7[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w6[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w5[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w4[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w3[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w1[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c1[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c1[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c1[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c1[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c0[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c0[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c0[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c0[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      w7[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w6[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w5[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w4[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w3[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c2[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c1[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c1[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c1[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c1[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c0[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c0[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c0[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c0[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      w7[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w6[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w5[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w4[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w3[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c2[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c2[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c1[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c1[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c1[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c1[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c0[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c0[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c0[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c0[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      w7[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w6[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w5[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w4[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w3[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c2[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c2[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c2[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c1[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c1[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c1[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c1[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c0[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c0[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c0[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c0[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      w7[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w6[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w5[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w4[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w3[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w2[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c2[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c2[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c2[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c2[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c1[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c1[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c1[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c1[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c0[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c0[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c0[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c0[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      w7[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w6[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w5[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w4[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w3[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c3[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c2[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c2[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c2[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c2[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c1[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c1[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c1[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c1[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c0[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c0[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c0[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c0[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      w7[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w6[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w5[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w4[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w3[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c3[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c3[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c2[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c2[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c2[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c2[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c1[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c1[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c1[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c1[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c0[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c0[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c0[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c0[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      w7[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w7[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w6[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w6[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w5[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w5[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w4[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w4[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w3[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c3[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c3[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c3[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c2[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c2[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c2[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c2[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c1[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c1[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c1[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c1[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c0[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c0[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c0[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c0[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      w7[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w7[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w7[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w6[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w6[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w6[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w5[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w5[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w5[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w4[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w4[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w4[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w3[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c3[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c3[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c3[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c3[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c2[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c2[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c2[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c2[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c1[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c1[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c1[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c1[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c0[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c0[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c0[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c0[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      w7[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w7[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w7[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w7[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w6[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w6[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w6[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w6[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w5[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w5[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w5[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w5[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w4[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w4[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w4[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w4[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c4[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c3[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c3[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c3[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c3[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c2[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c2[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c2[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c2[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c1[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c1[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c1[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c1[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c0[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c0[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c0[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c0[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      w7[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w7[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w7[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w7[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w6[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w6[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w6[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w6[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w5[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w5[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w5[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w5[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w4[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w4[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w4[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c4[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c4[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c3[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c3[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c3[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c3[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c2[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c2[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c2[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c2[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c1[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c1[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c1[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c1[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c0[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c0[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c0[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c0[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      w7[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w7[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w7[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w7[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w6[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w6[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w6[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w6[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w5[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w5[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w5[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w5[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w4[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w4[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c4[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c4[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c4[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c3[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c3[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c3[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c3[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c2[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c2[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c2[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c2[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c1[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c1[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c1[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c1[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c0[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c0[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c0[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c0[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      w7[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w7[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w7[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w7[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w6[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w6[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w6[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w6[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w5[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w5[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w5[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w5[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w4[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c4[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c4[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c4[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c4[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c3[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c3[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c3[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c3[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c2[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c2[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c2[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c2[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c1[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c1[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c1[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c1[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c0[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c0[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c0[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c0[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      w7[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w7[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w7[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w7[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w6[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w6[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w6[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w6[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w5[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w5[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w5[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w5[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c5[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c4[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c4[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c4[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c4[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c3[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c3[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c3[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c3[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c2[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c2[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c2[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c2[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c1[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c1[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c1[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c1[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c0[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c0[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c0[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c0[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      w7[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w7[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w7[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w7[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w6[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w6[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w6[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w6[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w5[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w5[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w5[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c5[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c5[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c4[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c4[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c4[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c4[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c3[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c3[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c3[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c3[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c2[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c2[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c2[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c2[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c1[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c1[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c1[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c1[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c0[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c0[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c0[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c0[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      w7[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w7[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w7[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w7[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w6[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w6[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w6[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w6[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w5[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w5[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c5[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c5[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c5[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c4[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c4[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c4[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c4[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c3[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c3[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c3[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c3[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c2[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c2[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c2[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c2[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c1[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c1[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c1[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c1[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c0[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c0[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c0[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c0[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      w7[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w7[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w7[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w7[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w6[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w6[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w6[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w6[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w5[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c5[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c5[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c5[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c5[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c4[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c4[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c4[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c4[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c3[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c3[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c3[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c3[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c2[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c2[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c2[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c2[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c1[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c1[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c1[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c1[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c0[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c0[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c0[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c0[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      w7[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w7[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w7[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w7[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w6[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w6[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w6[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w6[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c6[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c5[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c5[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c5[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c5[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c4[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c4[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c4[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c4[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c3[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c3[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c3[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c3[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c2[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c2[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c2[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c2[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c1[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c1[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c1[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c1[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c0[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c0[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c0[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c0[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      w7[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w7[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w7[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w7[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w6[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w6[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w6[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c6[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c6[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c5[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c5[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c5[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c5[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c4[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c4[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c4[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c4[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c3[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c3[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c3[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c3[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c2[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c2[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c2[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c2[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c1[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c1[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c1[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c1[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c0[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c0[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c0[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      c0[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      w7[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w7[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w7[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w7[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w6[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w6[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c6[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c6[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c6[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c5[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c5[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c5[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c5[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c4[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c4[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c4[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c4[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c3[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c3[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c3[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c3[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c2[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c2[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c2[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c2[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c1[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c1[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c1[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c1[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c0[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c0[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      c0[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      c0[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      w7[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w7[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w7[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w7[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w6[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_byte_perm_S (w7[3],     0, selector);\n      c6[3] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c6[2] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c6[1] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c6[0] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c5[3] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c5[2] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c5[1] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c5[0] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c4[3] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c4[2] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c4[1] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c4[0] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c3[3] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c3[2] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c3[1] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c3[0] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c2[3] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c2[2] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c2[1] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c2[0] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c1[3] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c1[2] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c1[1] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c1[0] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c0[3] = hc_byte_perm_S (w1[2], w1[3], selector);\n      c0[2] = hc_byte_perm_S (w1[1], w1[2], selector);\n      c0[1] = hc_byte_perm_S (w1[0], w1[1], selector);\n      c0[0] = hc_byte_perm_S (w0[3], w1[0], selector);\n      w7[3] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w7[2] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w7[1] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w7[0] = hc_byte_perm_S (    0, w0[0], selector);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_byte_perm_S (w7[3],     0, selector);\n      c7[0] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c6[3] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c6[2] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c6[1] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c6[0] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c5[3] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c5[2] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c5[1] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c5[0] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c4[3] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c4[2] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c4[1] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c4[0] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c3[3] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c3[2] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c3[1] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c3[0] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c2[3] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c2[2] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c2[1] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c2[0] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c1[3] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c1[2] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c1[1] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c1[0] = hc_byte_perm_S (w1[2], w1[3], selector);\n      c0[3] = hc_byte_perm_S (w1[1], w1[2], selector);\n      c0[2] = hc_byte_perm_S (w1[0], w1[1], selector);\n      c0[1] = hc_byte_perm_S (w0[3], w1[0], selector);\n      c0[0] = hc_byte_perm_S (w0[2], w0[3], selector);\n      w7[3] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w7[2] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w7[1] = hc_byte_perm_S (    0, w0[0], selector);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_byte_perm_S (w7[3],     0, selector);\n      c7[1] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c7[0] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c6[3] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c6[2] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c6[1] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c6[0] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c5[3] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c5[2] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c5[1] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c5[0] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c4[3] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c4[2] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c4[1] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c4[0] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c3[3] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c3[2] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c3[1] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c3[0] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c2[3] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c2[2] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c2[1] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c2[0] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c1[3] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c1[2] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c1[1] = hc_byte_perm_S (w1[2], w1[3], selector);\n      c1[0] = hc_byte_perm_S (w1[1], w1[2], selector);\n      c0[3] = hc_byte_perm_S (w1[0], w1[1], selector);\n      c0[2] = hc_byte_perm_S (w0[3], w1[0], selector);\n      c0[1] = hc_byte_perm_S (w0[2], w0[3], selector);\n      c0[0] = hc_byte_perm_S (w0[1], w0[2], selector);\n      w7[3] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w7[2] = hc_byte_perm_S (    0, w0[0], selector);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_byte_perm_S (w7[3],     0, selector);\n      c7[2] = hc_byte_perm_S (w7[2], w7[3], selector);\n      c7[1] = hc_byte_perm_S (w7[1], w7[2], selector);\n      c7[0] = hc_byte_perm_S (w7[0], w7[1], selector);\n      c6[3] = hc_byte_perm_S (w6[3], w7[0], selector);\n      c6[2] = hc_byte_perm_S (w6[2], w6[3], selector);\n      c6[1] = hc_byte_perm_S (w6[1], w6[2], selector);\n      c6[0] = hc_byte_perm_S (w6[0], w6[1], selector);\n      c5[3] = hc_byte_perm_S (w5[3], w6[0], selector);\n      c5[2] = hc_byte_perm_S (w5[2], w5[3], selector);\n      c5[1] = hc_byte_perm_S (w5[1], w5[2], selector);\n      c5[0] = hc_byte_perm_S (w5[0], w5[1], selector);\n      c4[3] = hc_byte_perm_S (w4[3], w5[0], selector);\n      c4[2] = hc_byte_perm_S (w4[2], w4[3], selector);\n      c4[1] = hc_byte_perm_S (w4[1], w4[2], selector);\n      c4[0] = hc_byte_perm_S (w4[0], w4[1], selector);\n      c3[3] = hc_byte_perm_S (w3[3], w4[0], selector);\n      c3[2] = hc_byte_perm_S (w3[2], w3[3], selector);\n      c3[1] = hc_byte_perm_S (w3[1], w3[2], selector);\n      c3[0] = hc_byte_perm_S (w3[0], w3[1], selector);\n      c2[3] = hc_byte_perm_S (w2[3], w3[0], selector);\n      c2[2] = hc_byte_perm_S (w2[2], w2[3], selector);\n      c2[1] = hc_byte_perm_S (w2[1], w2[2], selector);\n      c2[0] = hc_byte_perm_S (w2[0], w2[1], selector);\n      c1[3] = hc_byte_perm_S (w1[3], w2[0], selector);\n      c1[2] = hc_byte_perm_S (w1[2], w1[3], selector);\n      c1[1] = hc_byte_perm_S (w1[1], w1[2], selector);\n      c1[0] = hc_byte_perm_S (w1[0], w1[1], selector);\n      c0[3] = hc_byte_perm_S (w0[3], w1[0], selector);\n      c0[2] = hc_byte_perm_S (w0[2], w0[3], selector);\n      c0[1] = hc_byte_perm_S (w0[1], w0[2], selector);\n      c0[0] = hc_byte_perm_S (w0[0], w0[1], selector);\n      w7[3] = hc_byte_perm_S (    0, w0[0], selector);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w7[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      w7[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w7[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w7[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w7[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w7[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w7[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w7[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w7[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w7[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w7[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w7[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w7[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w7[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w7[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w7[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      w7[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      w7[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      w7[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      w7[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      w7[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      w7[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      w7[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      w7[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      w7[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      w7[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      w7[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      w7[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      w7[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      w7[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      w7[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      w7[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w7[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      w7[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      w7[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w6[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w6[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w6[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w5[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w5[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w5[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w4[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w4[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w4[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w3[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm_S (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      w7[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      w7[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w6[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w6[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w5[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w5[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w4[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w4[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      w7[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w6[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w5[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w4[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      w7[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      w7[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      w7[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      w7[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      w7[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      w7[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      w7[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      w7[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      w7[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      w7[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      w7[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      w7[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      w7[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      w7[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      w7[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      w7[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      w7[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      w7[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      w7[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      w7[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      w7[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      w7[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      w7[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      w7[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      w7[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      w7[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      w7[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      w7[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      w7[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      w7[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      w7[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      w7[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w6[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w6[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w6[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w5[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w5[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w5[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w4[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w4[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w4[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w3[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w2[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w1[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w0[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[0] = hc_bytealign_be_S (    0, w0[0], offset);\n\n      break;\n\n    case  1:\n      c0[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c0[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      w7[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      w7[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w6[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w6[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w5[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w5[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w4[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w4[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w3[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w2[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w1[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w0[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c0[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c0[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      w7[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w6[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w5[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w4[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w3[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w2[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w1[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w0[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c0[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c0[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c0[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      w7[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w6[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w5[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w4[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w3[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w2[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w1[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w0[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c0[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c0[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c0[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c0[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      w7[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w6[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w5[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w4[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w3[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w2[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w1[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c1[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c0[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c0[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c0[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c0[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      w7[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w6[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w5[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w4[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w3[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w2[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w1[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c1[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c1[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c0[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c0[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c0[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c0[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      w7[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w6[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w5[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w4[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w3[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w2[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w1[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c1[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c1[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c1[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c0[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c0[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c0[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c0[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      w7[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w6[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w5[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w4[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w3[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w2[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w1[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c1[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c1[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c1[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c1[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c0[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c0[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c0[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c0[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      w7[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w6[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w5[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w4[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w3[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w2[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c2[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c1[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c1[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c1[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c1[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c0[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c0[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c0[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c0[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      w7[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w6[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w5[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w4[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w3[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w2[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c2[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c2[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c1[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c1[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c1[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c1[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c0[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c0[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c0[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c0[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      w7[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w6[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w5[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w4[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w3[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w2[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c2[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c2[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c2[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c1[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c1[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c1[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c1[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c0[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c0[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c0[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c0[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      w7[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w6[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w5[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w4[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w3[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w2[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c2[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c2[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c2[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c2[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c1[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c1[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c1[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c1[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c0[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c0[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c0[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c0[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      w7[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w6[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w5[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w4[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w3[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c3[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c2[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c2[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c2[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c2[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c1[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c1[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c1[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c1[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c0[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c0[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c0[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c0[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      w7[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w6[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w5[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w4[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w3[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c3[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c3[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c2[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c2[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c2[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c2[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c1[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c1[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c1[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c1[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c0[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c0[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c0[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c0[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      w7[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w6[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w5[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w4[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w3[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c3[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c3[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c3[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c2[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c2[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c2[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c2[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c1[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c1[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c1[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c1[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c0[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c0[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c0[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c0[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      w7[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w6[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w5[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w4[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w3[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c3[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c3[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c3[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c3[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c2[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c2[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c2[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c2[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c1[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c1[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c1[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c1[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c0[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c0[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c0[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c0[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      w7[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w6[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w5[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w4[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c4[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c3[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c3[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c3[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c3[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c2[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c2[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c2[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c2[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c1[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c1[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c1[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c1[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c0[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c0[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c0[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c0[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      w7[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w6[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w5[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w4[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c4[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c4[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c3[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c3[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c3[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c3[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c2[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c2[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c2[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c2[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c1[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c1[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c1[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c1[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c0[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c0[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c0[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      w7[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w6[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w5[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w4[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c4[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c4[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c4[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c3[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c3[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c3[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c3[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c2[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c2[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c2[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c2[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c1[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c1[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c1[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c1[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c0[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c0[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      w7[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w6[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w5[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w4[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c4[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c4[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c4[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c4[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c3[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c3[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c3[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c3[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c2[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c2[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c2[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c2[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c1[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c1[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c1[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c1[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c0[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      w7[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w6[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w5[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c5[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c4[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c4[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c4[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c4[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c3[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c3[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c3[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c3[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c2[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c2[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c2[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c2[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c1[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c1[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c1[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c1[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c0[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      w7[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w6[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w5[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c5[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c5[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c4[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c4[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c4[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c4[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c3[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c3[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c3[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c3[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c2[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c2[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c2[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c2[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c1[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c1[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c1[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c0[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      w7[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w6[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w5[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c5[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c5[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c5[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c4[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c4[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c4[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c4[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c3[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c3[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c3[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c3[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c2[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c2[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c2[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c2[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c1[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c1[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c0[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      w7[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w6[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w5[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c5[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c5[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c5[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c5[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c4[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c4[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c4[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c4[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c3[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c3[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c3[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c3[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c2[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c2[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c2[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c2[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c1[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c0[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      w7[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w6[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c6[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c5[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c5[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c5[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c5[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c4[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c4[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c4[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c4[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c3[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c3[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c3[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c3[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c2[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c2[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c2[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c2[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c1[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c0[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      w7[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w6[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c6[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c6[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c5[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c5[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c5[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c5[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c4[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c4[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c4[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c4[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c3[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c3[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c3[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c3[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c2[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c2[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c2[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c1[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c0[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      w7[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w6[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c6[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c6[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c6[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c5[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c5[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c5[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c5[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c4[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c4[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c4[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c4[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c3[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c3[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c3[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c3[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c2[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c2[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c1[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c0[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      w7[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w6[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_bytealign_be_S (w7[3],     0, offset);\n      c6[3] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c6[2] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c6[1] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c6[0] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c5[3] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c5[2] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c5[1] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c5[0] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c4[3] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c4[2] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c4[1] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c4[0] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c3[3] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c3[2] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c3[1] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c3[0] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c2[3] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[2] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[1] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[0] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c1[3] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[2] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[1] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[0] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c0[3] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[2] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[1] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[0] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      w7[3] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[2] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[1] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[0] = hc_bytealign_be_S (    0, w0[0], offset);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_bytealign_be_S (w7[3],     0, offset);\n      c7[0] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c6[3] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c6[2] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c6[1] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c6[0] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c5[3] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c5[2] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c5[1] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c5[0] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c4[3] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c4[2] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c4[1] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c4[0] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c3[3] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c3[2] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c3[1] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c3[0] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c2[3] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[2] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[1] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c2[0] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c1[3] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[2] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[1] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c1[0] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c0[3] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[2] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[1] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      c0[0] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      w7[3] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[2] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[1] = hc_bytealign_be_S (    0, w0[0], offset);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_bytealign_be_S (w7[3],     0, offset);\n      c7[1] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c7[0] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c6[3] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c6[2] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c6[1] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c6[0] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c5[3] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c5[2] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c5[1] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c5[0] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c4[3] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c4[2] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c4[1] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c4[0] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c3[3] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c3[2] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c3[1] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c3[0] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c2[3] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[2] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c2[1] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c2[0] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c1[3] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[2] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c1[1] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c1[0] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c0[3] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[2] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      c0[1] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      c0[0] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      w7[3] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[2] = hc_bytealign_be_S (    0, w0[0], offset);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_bytealign_be_S (w7[3],     0, offset);\n      c7[2] = hc_bytealign_be_S (w7[2], w7[3], offset);\n      c7[1] = hc_bytealign_be_S (w7[1], w7[2], offset);\n      c7[0] = hc_bytealign_be_S (w7[0], w7[1], offset);\n      c6[3] = hc_bytealign_be_S (w6[3], w7[0], offset);\n      c6[2] = hc_bytealign_be_S (w6[2], w6[3], offset);\n      c6[1] = hc_bytealign_be_S (w6[1], w6[2], offset);\n      c6[0] = hc_bytealign_be_S (w6[0], w6[1], offset);\n      c5[3] = hc_bytealign_be_S (w5[3], w6[0], offset);\n      c5[2] = hc_bytealign_be_S (w5[2], w5[3], offset);\n      c5[1] = hc_bytealign_be_S (w5[1], w5[2], offset);\n      c5[0] = hc_bytealign_be_S (w5[0], w5[1], offset);\n      c4[3] = hc_bytealign_be_S (w4[3], w5[0], offset);\n      c4[2] = hc_bytealign_be_S (w4[2], w4[3], offset);\n      c4[1] = hc_bytealign_be_S (w4[1], w4[2], offset);\n      c4[0] = hc_bytealign_be_S (w4[0], w4[1], offset);\n      c3[3] = hc_bytealign_be_S (w3[3], w4[0], offset);\n      c3[2] = hc_bytealign_be_S (w3[2], w3[3], offset);\n      c3[1] = hc_bytealign_be_S (w3[1], w3[2], offset);\n      c3[0] = hc_bytealign_be_S (w3[0], w3[1], offset);\n      c2[3] = hc_bytealign_be_S (w2[3], w3[0], offset);\n      c2[2] = hc_bytealign_be_S (w2[2], w2[3], offset);\n      c2[1] = hc_bytealign_be_S (w2[1], w2[2], offset);\n      c2[0] = hc_bytealign_be_S (w2[0], w2[1], offset);\n      c1[3] = hc_bytealign_be_S (w1[3], w2[0], offset);\n      c1[2] = hc_bytealign_be_S (w1[2], w1[3], offset);\n      c1[1] = hc_bytealign_be_S (w1[1], w1[2], offset);\n      c1[0] = hc_bytealign_be_S (w1[0], w1[1], offset);\n      c0[3] = hc_bytealign_be_S (w0[3], w1[0], offset);\n      c0[2] = hc_bytealign_be_S (w0[2], w0[3], offset);\n      c0[1] = hc_bytealign_be_S (w0[1], w0[2], offset);\n      c0[0] = hc_bytealign_be_S (w0[0], w0[1], offset);\n      w7[3] = hc_bytealign_be_S (    0, w0[0], offset);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      c0[0] = hc_byte_perm_S (    0, w7[3], selector);\n      w7[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      w7[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      w7[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w6[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w6[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w6[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w5[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w5[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w5[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w4[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w4[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w4[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w3[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w2[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w1[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w0[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[0] = hc_byte_perm_S (w0[0],     0, selector);\n\n      break;\n\n    case  1:\n      c0[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c0[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      w7[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      w7[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w6[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w6[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w5[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w5[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w4[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w4[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w3[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w2[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w1[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w0[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[0] = 0;\n\n      break;\n\n    case  2:\n      c0[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c0[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c0[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      w7[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w6[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w5[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w4[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w3[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w2[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w1[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w0[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  3:\n      c0[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c0[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c0[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c0[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      w7[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w6[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w5[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w4[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w3[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w2[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w1[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w0[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  4:\n      c1[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c0[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c0[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c0[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c0[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      w7[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w6[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w5[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w4[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w3[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w2[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w1[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  5:\n      c1[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c1[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c0[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c0[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c0[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c0[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      w7[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w6[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w5[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w4[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w3[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w2[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w1[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  6:\n      c1[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c1[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c1[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c0[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c0[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c0[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c0[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      w7[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w6[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w5[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w4[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w3[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w2[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w1[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  7:\n      c1[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c1[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c1[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c1[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c0[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c0[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c0[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c0[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      w7[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w6[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w5[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w4[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w3[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w2[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w1[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  8:\n      c2[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c1[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c1[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c1[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c1[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c0[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c0[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c0[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c0[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      w7[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w6[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w5[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w4[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w3[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w2[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case  9:\n      c2[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c2[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c1[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c1[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c1[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c1[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c0[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c0[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c0[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c0[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      w7[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w6[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w5[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w4[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w3[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w2[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 10:\n      c2[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c2[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c2[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c1[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c1[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c1[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c1[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c0[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c0[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c0[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c0[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      w7[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w6[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w5[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w4[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w3[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w2[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 11:\n      c2[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c2[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c2[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c2[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c1[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c1[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c1[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c1[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c0[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c0[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c0[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c0[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      w7[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w6[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w5[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w4[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w3[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w2[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 12:\n      c3[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c2[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c2[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c2[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c2[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c1[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c1[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c1[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c1[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c0[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c0[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c0[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c0[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      w7[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w6[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w5[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w4[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w3[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 13:\n      c3[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c3[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c2[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c2[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c2[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c2[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c1[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c1[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c1[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c1[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c0[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c0[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c0[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c0[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      w7[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w6[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w5[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w4[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w3[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 14:\n      c3[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c3[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c3[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c2[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c2[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c2[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c2[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c1[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c1[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c1[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c1[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c0[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c0[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c0[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c0[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      w7[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w6[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w5[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w4[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w3[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 15:\n      c3[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c3[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c3[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c3[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c2[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c2[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c2[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c2[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c1[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c1[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c1[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c1[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c0[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c0[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c0[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c0[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      w7[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w6[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w5[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w4[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w3[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 16:\n      c4[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c3[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c3[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c3[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c3[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c2[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c2[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c2[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c2[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c1[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c1[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c1[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c1[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c0[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c0[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c0[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c0[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      w7[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w6[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w5[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w4[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 17:\n      c4[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c4[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c3[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c3[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c3[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c3[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c2[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c2[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c2[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c2[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c1[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c1[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c1[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c1[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c0[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c0[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c0[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c0[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      w7[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w6[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w5[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w4[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 18:\n      c4[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c4[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c4[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c3[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c3[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c3[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c3[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c2[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c2[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c2[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c2[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c1[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c1[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c1[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c1[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c0[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c0[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c0[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      w7[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w6[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w5[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w4[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 19:\n      c4[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c4[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c4[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c4[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c3[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c3[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c3[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c3[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c2[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c2[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c2[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c2[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c1[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c1[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c1[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c1[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c0[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c0[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      w7[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w6[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w5[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w4[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 20:\n      c5[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c4[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c4[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c4[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c4[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c3[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c3[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c3[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c3[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c2[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c2[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c2[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c2[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c1[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c1[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c1[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c1[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c0[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      w7[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w6[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w5[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 21:\n      c5[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c5[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c4[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c4[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c4[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c4[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c3[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c3[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c3[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c3[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c2[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c2[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c2[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c2[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c1[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c1[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c1[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c1[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c0[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      w7[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w6[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w5[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 22:\n      c5[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c5[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c5[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c4[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c4[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c4[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c4[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c3[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c3[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c3[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c3[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c2[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c2[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c2[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c2[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c1[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c1[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c1[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c0[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      w7[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w6[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w5[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 23:\n      c5[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c5[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c5[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c5[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c4[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c4[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c4[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c4[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c3[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c3[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c3[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c3[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c2[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c2[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c2[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c2[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c1[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c1[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c0[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      w7[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w6[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w5[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 24:\n      c6[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c5[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c5[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c5[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c5[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c4[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c4[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c4[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c4[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c3[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c3[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c3[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c3[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c2[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c2[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c2[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c2[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c1[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c0[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      w7[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w6[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 25:\n      c6[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c6[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c5[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c5[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c5[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c5[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c4[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c4[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c4[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c4[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c3[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c3[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c3[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c3[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c2[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c2[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c2[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c2[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c1[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c0[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      w7[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w6[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 26:\n      c6[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c6[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c6[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c5[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c5[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c5[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c5[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c4[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c4[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c4[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c4[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c3[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c3[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c3[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c3[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c2[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c2[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c2[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c1[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c0[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      w7[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w6[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 27:\n      c6[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c6[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c6[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c6[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c5[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c5[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c5[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c5[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c4[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c4[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c4[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c4[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c3[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c3[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c3[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c3[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c2[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c2[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c1[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c0[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      w7[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w6[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 28:\n      c7[0] = hc_byte_perm_S (    0, w7[3], selector);\n      c6[3] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c6[2] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c6[1] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c6[0] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c5[3] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c5[2] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c5[1] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c5[0] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c4[3] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c4[2] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c4[1] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c4[0] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c3[3] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c3[2] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c3[1] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c3[0] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c2[3] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[2] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[1] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[0] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c1[3] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[2] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[1] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[0] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c0[3] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[2] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[1] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[0] = hc_byte_perm_S (w1[0], w0[3], selector);\n      w7[3] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[2] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[1] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[0] = hc_byte_perm_S (w0[0],     0, selector);\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 29:\n      c7[1] = hc_byte_perm_S (    0, w7[3], selector);\n      c7[0] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c6[3] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c6[2] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c6[1] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c6[0] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c5[3] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c5[2] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c5[1] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c5[0] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c4[3] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c4[2] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c4[1] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c4[0] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c3[3] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c3[2] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c3[1] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c3[0] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c2[3] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[2] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[1] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c2[0] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c1[3] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[2] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[1] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c1[0] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c0[3] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[2] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[1] = hc_byte_perm_S (w1[0], w0[3], selector);\n      c0[0] = hc_byte_perm_S (w0[3], w0[2], selector);\n      w7[3] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[2] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[1] = hc_byte_perm_S (w0[0],     0, selector);\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 30:\n      c7[2] = hc_byte_perm_S (    0, w7[3], selector);\n      c7[1] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c7[0] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c6[3] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c6[2] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c6[1] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c6[0] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c5[3] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c5[2] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c5[1] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c5[0] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c4[3] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c4[2] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c4[1] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c4[0] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c3[3] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c3[2] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c3[1] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c3[0] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c2[3] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[2] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c2[1] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c2[0] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c1[3] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[2] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c1[1] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c1[0] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c0[3] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[2] = hc_byte_perm_S (w1[0], w0[3], selector);\n      c0[1] = hc_byte_perm_S (w0[3], w0[2], selector);\n      c0[0] = hc_byte_perm_S (w0[2], w0[1], selector);\n      w7[3] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[2] = hc_byte_perm_S (w0[0],     0, selector);\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n\n    case 31:\n      c7[3] = hc_byte_perm_S (    0, w7[3], selector);\n      c7[2] = hc_byte_perm_S (w7[3], w7[2], selector);\n      c7[1] = hc_byte_perm_S (w7[2], w7[1], selector);\n      c7[0] = hc_byte_perm_S (w7[1], w7[0], selector);\n      c6[3] = hc_byte_perm_S (w7[0], w6[3], selector);\n      c6[2] = hc_byte_perm_S (w6[3], w6[2], selector);\n      c6[1] = hc_byte_perm_S (w6[2], w6[1], selector);\n      c6[0] = hc_byte_perm_S (w6[1], w6[0], selector);\n      c5[3] = hc_byte_perm_S (w6[0], w5[3], selector);\n      c5[2] = hc_byte_perm_S (w5[3], w5[2], selector);\n      c5[1] = hc_byte_perm_S (w5[2], w5[1], selector);\n      c5[0] = hc_byte_perm_S (w5[1], w5[0], selector);\n      c4[3] = hc_byte_perm_S (w5[0], w4[3], selector);\n      c4[2] = hc_byte_perm_S (w4[3], w4[2], selector);\n      c4[1] = hc_byte_perm_S (w4[2], w4[1], selector);\n      c4[0] = hc_byte_perm_S (w4[1], w4[0], selector);\n      c3[3] = hc_byte_perm_S (w4[0], w3[3], selector);\n      c3[2] = hc_byte_perm_S (w3[3], w3[2], selector);\n      c3[1] = hc_byte_perm_S (w3[2], w3[1], selector);\n      c3[0] = hc_byte_perm_S (w3[1], w3[0], selector);\n      c2[3] = hc_byte_perm_S (w3[0], w2[3], selector);\n      c2[2] = hc_byte_perm_S (w2[3], w2[2], selector);\n      c2[1] = hc_byte_perm_S (w2[2], w2[1], selector);\n      c2[0] = hc_byte_perm_S (w2[1], w2[0], selector);\n      c1[3] = hc_byte_perm_S (w2[0], w1[3], selector);\n      c1[2] = hc_byte_perm_S (w1[3], w1[2], selector);\n      c1[1] = hc_byte_perm_S (w1[2], w1[1], selector);\n      c1[0] = hc_byte_perm_S (w1[1], w1[0], selector);\n      c0[3] = hc_byte_perm_S (w1[0], w0[3], selector);\n      c0[2] = hc_byte_perm_S (w0[3], w0[2], selector);\n      c0[1] = hc_byte_perm_S (w0[2], w0[1], selector);\n      c0[0] = hc_byte_perm_S (w0[1], w0[0], selector);\n      w7[3] = hc_byte_perm_S (w0[0],     0, selector);\n      w7[2] = 0;\n      w7[1] = 0;\n      w7[0] = 0;\n      w6[3] = 0;\n      w6[2] = 0;\n      w6[1] = 0;\n      w6[0] = 0;\n      w5[3] = 0;\n      w5[2] = 0;\n      w5[1] = 0;\n      w5[0] = 0;\n      w4[3] = 0;\n      w4[2] = 0;\n      w4[1] = 0;\n      w4[0] = 0;\n      w3[3] = 0;\n      w3[2] = 0;\n      w3[1] = 0;\n      w3[0] = 0;\n      w2[3] = 0;\n      w2[2] = 0;\n      w2[1] = 0;\n      w2[0] = 0;\n      w1[3] = 0;\n      w1[2] = 0;\n      w1[1] = 0;\n      w1[0] = 0;\n      w0[3] = 0;\n      w0[2] = 0;\n      w0[1] = 0;\n      w0[0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_1x64_le_S (PRIVATE_AS u32 *w, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_bytealign_S (w[62], w[63], offset);\n      w[62] = hc_bytealign_S (w[61], w[62], offset);\n      w[61] = hc_bytealign_S (w[60], w[61], offset);\n      w[60] = hc_bytealign_S (w[59], w[60], offset);\n      w[59] = hc_bytealign_S (w[58], w[59], offset);\n      w[58] = hc_bytealign_S (w[57], w[58], offset);\n      w[57] = hc_bytealign_S (w[56], w[57], offset);\n      w[56] = hc_bytealign_S (w[55], w[56], offset);\n      w[55] = hc_bytealign_S (w[54], w[55], offset);\n      w[54] = hc_bytealign_S (w[53], w[54], offset);\n      w[53] = hc_bytealign_S (w[52], w[53], offset);\n      w[52] = hc_bytealign_S (w[51], w[52], offset);\n      w[51] = hc_bytealign_S (w[50], w[51], offset);\n      w[50] = hc_bytealign_S (w[49], w[50], offset);\n      w[49] = hc_bytealign_S (w[48], w[49], offset);\n      w[48] = hc_bytealign_S (w[47], w[48], offset);\n      w[47] = hc_bytealign_S (w[46], w[47], offset);\n      w[46] = hc_bytealign_S (w[45], w[46], offset);\n      w[45] = hc_bytealign_S (w[44], w[45], offset);\n      w[44] = hc_bytealign_S (w[43], w[44], offset);\n      w[43] = hc_bytealign_S (w[42], w[43], offset);\n      w[42] = hc_bytealign_S (w[41], w[42], offset);\n      w[41] = hc_bytealign_S (w[40], w[41], offset);\n      w[40] = hc_bytealign_S (w[39], w[40], offset);\n      w[39] = hc_bytealign_S (w[38], w[39], offset);\n      w[38] = hc_bytealign_S (w[37], w[38], offset);\n      w[37] = hc_bytealign_S (w[36], w[37], offset);\n      w[36] = hc_bytealign_S (w[35], w[36], offset);\n      w[35] = hc_bytealign_S (w[34], w[35], offset);\n      w[34] = hc_bytealign_S (w[33], w[34], offset);\n      w[33] = hc_bytealign_S (w[32], w[33], offset);\n      w[32] = hc_bytealign_S (w[31], w[32], offset);\n      w[31] = hc_bytealign_S (w[30], w[31], offset);\n      w[30] = hc_bytealign_S (w[29], w[30], offset);\n      w[29] = hc_bytealign_S (w[28], w[29], offset);\n      w[28] = hc_bytealign_S (w[27], w[28], offset);\n      w[27] = hc_bytealign_S (w[26], w[27], offset);\n      w[26] = hc_bytealign_S (w[25], w[26], offset);\n      w[25] = hc_bytealign_S (w[24], w[25], offset);\n      w[24] = hc_bytealign_S (w[23], w[24], offset);\n      w[23] = hc_bytealign_S (w[22], w[23], offset);\n      w[22] = hc_bytealign_S (w[21], w[22], offset);\n      w[21] = hc_bytealign_S (w[20], w[21], offset);\n      w[20] = hc_bytealign_S (w[19], w[20], offset);\n      w[19] = hc_bytealign_S (w[18], w[19], offset);\n      w[18] = hc_bytealign_S (w[17], w[18], offset);\n      w[17] = hc_bytealign_S (w[16], w[17], offset);\n      w[16] = hc_bytealign_S (w[15], w[16], offset);\n      w[15] = hc_bytealign_S (w[14], w[15], offset);\n      w[14] = hc_bytealign_S (w[13], w[14], offset);\n      w[13] = hc_bytealign_S (w[12], w[13], offset);\n      w[12] = hc_bytealign_S (w[11], w[12], offset);\n      w[11] = hc_bytealign_S (w[10], w[11], offset);\n      w[10] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[ 9] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[ 8] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[ 7] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[ 6] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[ 5] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[ 4] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 3] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 2] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 1] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 0] = hc_bytealign_S (    0, w[ 0], offset);\n\n      break;\n\n    case  1:\n      w[63] = hc_bytealign_S (w[61], w[62], offset);\n      w[62] = hc_bytealign_S (w[60], w[61], offset);\n      w[61] = hc_bytealign_S (w[59], w[60], offset);\n      w[60] = hc_bytealign_S (w[58], w[59], offset);\n      w[59] = hc_bytealign_S (w[57], w[58], offset);\n      w[58] = hc_bytealign_S (w[56], w[57], offset);\n      w[57] = hc_bytealign_S (w[55], w[56], offset);\n      w[56] = hc_bytealign_S (w[54], w[55], offset);\n      w[55] = hc_bytealign_S (w[53], w[54], offset);\n      w[54] = hc_bytealign_S (w[52], w[53], offset);\n      w[53] = hc_bytealign_S (w[51], w[52], offset);\n      w[52] = hc_bytealign_S (w[50], w[51], offset);\n      w[51] = hc_bytealign_S (w[49], w[50], offset);\n      w[50] = hc_bytealign_S (w[48], w[49], offset);\n      w[49] = hc_bytealign_S (w[47], w[48], offset);\n      w[48] = hc_bytealign_S (w[46], w[47], offset);\n      w[47] = hc_bytealign_S (w[45], w[46], offset);\n      w[46] = hc_bytealign_S (w[44], w[45], offset);\n      w[45] = hc_bytealign_S (w[43], w[44], offset);\n      w[44] = hc_bytealign_S (w[42], w[43], offset);\n      w[43] = hc_bytealign_S (w[41], w[42], offset);\n      w[42] = hc_bytealign_S (w[40], w[41], offset);\n      w[41] = hc_bytealign_S (w[39], w[40], offset);\n      w[40] = hc_bytealign_S (w[38], w[39], offset);\n      w[39] = hc_bytealign_S (w[37], w[38], offset);\n      w[38] = hc_bytealign_S (w[36], w[37], offset);\n      w[37] = hc_bytealign_S (w[35], w[36], offset);\n      w[36] = hc_bytealign_S (w[34], w[35], offset);\n      w[35] = hc_bytealign_S (w[33], w[34], offset);\n      w[34] = hc_bytealign_S (w[32], w[33], offset);\n      w[33] = hc_bytealign_S (w[31], w[32], offset);\n      w[32] = hc_bytealign_S (w[30], w[31], offset);\n      w[31] = hc_bytealign_S (w[29], w[30], offset);\n      w[30] = hc_bytealign_S (w[28], w[29], offset);\n      w[29] = hc_bytealign_S (w[27], w[28], offset);\n      w[28] = hc_bytealign_S (w[26], w[27], offset);\n      w[27] = hc_bytealign_S (w[25], w[26], offset);\n      w[26] = hc_bytealign_S (w[24], w[25], offset);\n      w[25] = hc_bytealign_S (w[23], w[24], offset);\n      w[24] = hc_bytealign_S (w[22], w[23], offset);\n      w[23] = hc_bytealign_S (w[21], w[22], offset);\n      w[22] = hc_bytealign_S (w[20], w[21], offset);\n      w[21] = hc_bytealign_S (w[19], w[20], offset);\n      w[20] = hc_bytealign_S (w[18], w[19], offset);\n      w[19] = hc_bytealign_S (w[17], w[18], offset);\n      w[18] = hc_bytealign_S (w[16], w[17], offset);\n      w[17] = hc_bytealign_S (w[15], w[16], offset);\n      w[16] = hc_bytealign_S (w[14], w[15], offset);\n      w[15] = hc_bytealign_S (w[13], w[14], offset);\n      w[14] = hc_bytealign_S (w[12], w[13], offset);\n      w[13] = hc_bytealign_S (w[11], w[12], offset);\n      w[12] = hc_bytealign_S (w[10], w[11], offset);\n      w[11] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[10] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[ 9] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[ 8] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[ 7] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[ 6] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[ 5] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 4] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 3] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 2] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 1] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_bytealign_S (w[60], w[61], offset);\n      w[62] = hc_bytealign_S (w[59], w[60], offset);\n      w[61] = hc_bytealign_S (w[58], w[59], offset);\n      w[60] = hc_bytealign_S (w[57], w[58], offset);\n      w[59] = hc_bytealign_S (w[56], w[57], offset);\n      w[58] = hc_bytealign_S (w[55], w[56], offset);\n      w[57] = hc_bytealign_S (w[54], w[55], offset);\n      w[56] = hc_bytealign_S (w[53], w[54], offset);\n      w[55] = hc_bytealign_S (w[52], w[53], offset);\n      w[54] = hc_bytealign_S (w[51], w[52], offset);\n      w[53] = hc_bytealign_S (w[50], w[51], offset);\n      w[52] = hc_bytealign_S (w[49], w[50], offset);\n      w[51] = hc_bytealign_S (w[48], w[49], offset);\n      w[50] = hc_bytealign_S (w[47], w[48], offset);\n      w[49] = hc_bytealign_S (w[46], w[47], offset);\n      w[48] = hc_bytealign_S (w[45], w[46], offset);\n      w[47] = hc_bytealign_S (w[44], w[45], offset);\n      w[46] = hc_bytealign_S (w[43], w[44], offset);\n      w[45] = hc_bytealign_S (w[42], w[43], offset);\n      w[44] = hc_bytealign_S (w[41], w[42], offset);\n      w[43] = hc_bytealign_S (w[40], w[41], offset);\n      w[42] = hc_bytealign_S (w[39], w[40], offset);\n      w[41] = hc_bytealign_S (w[38], w[39], offset);\n      w[40] = hc_bytealign_S (w[37], w[38], offset);\n      w[39] = hc_bytealign_S (w[36], w[37], offset);\n      w[38] = hc_bytealign_S (w[35], w[36], offset);\n      w[37] = hc_bytealign_S (w[34], w[35], offset);\n      w[36] = hc_bytealign_S (w[33], w[34], offset);\n      w[35] = hc_bytealign_S (w[32], w[33], offset);\n      w[34] = hc_bytealign_S (w[31], w[32], offset);\n      w[33] = hc_bytealign_S (w[30], w[31], offset);\n      w[32] = hc_bytealign_S (w[29], w[30], offset);\n      w[31] = hc_bytealign_S (w[28], w[29], offset);\n      w[30] = hc_bytealign_S (w[27], w[28], offset);\n      w[29] = hc_bytealign_S (w[26], w[27], offset);\n      w[28] = hc_bytealign_S (w[25], w[26], offset);\n      w[27] = hc_bytealign_S (w[24], w[25], offset);\n      w[26] = hc_bytealign_S (w[23], w[24], offset);\n      w[25] = hc_bytealign_S (w[22], w[23], offset);\n      w[24] = hc_bytealign_S (w[21], w[22], offset);\n      w[23] = hc_bytealign_S (w[20], w[21], offset);\n      w[22] = hc_bytealign_S (w[19], w[20], offset);\n      w[21] = hc_bytealign_S (w[18], w[19], offset);\n      w[20] = hc_bytealign_S (w[17], w[18], offset);\n      w[19] = hc_bytealign_S (w[16], w[17], offset);\n      w[18] = hc_bytealign_S (w[15], w[16], offset);\n      w[17] = hc_bytealign_S (w[14], w[15], offset);\n      w[16] = hc_bytealign_S (w[13], w[14], offset);\n      w[15] = hc_bytealign_S (w[12], w[13], offset);\n      w[14] = hc_bytealign_S (w[11], w[12], offset);\n      w[13] = hc_bytealign_S (w[10], w[11], offset);\n      w[12] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[11] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[10] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[ 9] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[ 8] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[ 7] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[ 6] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 5] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 4] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 3] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 2] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_bytealign_S (w[59], w[60], offset);\n      w[62] = hc_bytealign_S (w[58], w[59], offset);\n      w[61] = hc_bytealign_S (w[57], w[58], offset);\n      w[60] = hc_bytealign_S (w[56], w[57], offset);\n      w[59] = hc_bytealign_S (w[55], w[56], offset);\n      w[58] = hc_bytealign_S (w[54], w[55], offset);\n      w[57] = hc_bytealign_S (w[53], w[54], offset);\n      w[56] = hc_bytealign_S (w[52], w[53], offset);\n      w[55] = hc_bytealign_S (w[51], w[52], offset);\n      w[54] = hc_bytealign_S (w[50], w[51], offset);\n      w[53] = hc_bytealign_S (w[49], w[50], offset);\n      w[52] = hc_bytealign_S (w[48], w[49], offset);\n      w[51] = hc_bytealign_S (w[47], w[48], offset);\n      w[50] = hc_bytealign_S (w[46], w[47], offset);\n      w[49] = hc_bytealign_S (w[45], w[46], offset);\n      w[48] = hc_bytealign_S (w[44], w[45], offset);\n      w[47] = hc_bytealign_S (w[43], w[44], offset);\n      w[46] = hc_bytealign_S (w[42], w[43], offset);\n      w[45] = hc_bytealign_S (w[41], w[42], offset);\n      w[44] = hc_bytealign_S (w[40], w[41], offset);\n      w[43] = hc_bytealign_S (w[39], w[40], offset);\n      w[42] = hc_bytealign_S (w[38], w[39], offset);\n      w[41] = hc_bytealign_S (w[37], w[38], offset);\n      w[40] = hc_bytealign_S (w[36], w[37], offset);\n      w[39] = hc_bytealign_S (w[35], w[36], offset);\n      w[38] = hc_bytealign_S (w[34], w[35], offset);\n      w[37] = hc_bytealign_S (w[33], w[34], offset);\n      w[36] = hc_bytealign_S (w[32], w[33], offset);\n      w[35] = hc_bytealign_S (w[31], w[32], offset);\n      w[34] = hc_bytealign_S (w[30], w[31], offset);\n      w[33] = hc_bytealign_S (w[29], w[30], offset);\n      w[32] = hc_bytealign_S (w[28], w[29], offset);\n      w[31] = hc_bytealign_S (w[27], w[28], offset);\n      w[30] = hc_bytealign_S (w[26], w[27], offset);\n      w[29] = hc_bytealign_S (w[25], w[26], offset);\n      w[28] = hc_bytealign_S (w[24], w[25], offset);\n      w[27] = hc_bytealign_S (w[23], w[24], offset);\n      w[26] = hc_bytealign_S (w[22], w[23], offset);\n      w[25] = hc_bytealign_S (w[21], w[22], offset);\n      w[24] = hc_bytealign_S (w[20], w[21], offset);\n      w[23] = hc_bytealign_S (w[19], w[20], offset);\n      w[22] = hc_bytealign_S (w[18], w[19], offset);\n      w[21] = hc_bytealign_S (w[17], w[18], offset);\n      w[20] = hc_bytealign_S (w[16], w[17], offset);\n      w[19] = hc_bytealign_S (w[15], w[16], offset);\n      w[18] = hc_bytealign_S (w[14], w[15], offset);\n      w[17] = hc_bytealign_S (w[13], w[14], offset);\n      w[16] = hc_bytealign_S (w[12], w[13], offset);\n      w[15] = hc_bytealign_S (w[11], w[12], offset);\n      w[14] = hc_bytealign_S (w[10], w[11], offset);\n      w[13] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[12] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[11] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[10] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[ 9] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[ 8] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[ 7] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 6] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 5] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 4] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 3] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_bytealign_S (w[58], w[59], offset);\n      w[62] = hc_bytealign_S (w[57], w[58], offset);\n      w[61] = hc_bytealign_S (w[56], w[57], offset);\n      w[60] = hc_bytealign_S (w[55], w[56], offset);\n      w[59] = hc_bytealign_S (w[54], w[55], offset);\n      w[58] = hc_bytealign_S (w[53], w[54], offset);\n      w[57] = hc_bytealign_S (w[52], w[53], offset);\n      w[56] = hc_bytealign_S (w[51], w[52], offset);\n      w[55] = hc_bytealign_S (w[50], w[51], offset);\n      w[54] = hc_bytealign_S (w[49], w[50], offset);\n      w[53] = hc_bytealign_S (w[48], w[49], offset);\n      w[52] = hc_bytealign_S (w[47], w[48], offset);\n      w[51] = hc_bytealign_S (w[46], w[47], offset);\n      w[50] = hc_bytealign_S (w[45], w[46], offset);\n      w[49] = hc_bytealign_S (w[44], w[45], offset);\n      w[48] = hc_bytealign_S (w[43], w[44], offset);\n      w[47] = hc_bytealign_S (w[42], w[43], offset);\n      w[46] = hc_bytealign_S (w[41], w[42], offset);\n      w[45] = hc_bytealign_S (w[40], w[41], offset);\n      w[44] = hc_bytealign_S (w[39], w[40], offset);\n      w[43] = hc_bytealign_S (w[38], w[39], offset);\n      w[42] = hc_bytealign_S (w[37], w[38], offset);\n      w[41] = hc_bytealign_S (w[36], w[37], offset);\n      w[40] = hc_bytealign_S (w[35], w[36], offset);\n      w[39] = hc_bytealign_S (w[34], w[35], offset);\n      w[38] = hc_bytealign_S (w[33], w[34], offset);\n      w[37] = hc_bytealign_S (w[32], w[33], offset);\n      w[36] = hc_bytealign_S (w[31], w[32], offset);\n      w[35] = hc_bytealign_S (w[30], w[31], offset);\n      w[34] = hc_bytealign_S (w[29], w[30], offset);\n      w[33] = hc_bytealign_S (w[28], w[29], offset);\n      w[32] = hc_bytealign_S (w[27], w[28], offset);\n      w[31] = hc_bytealign_S (w[26], w[27], offset);\n      w[30] = hc_bytealign_S (w[25], w[26], offset);\n      w[29] = hc_bytealign_S (w[24], w[25], offset);\n      w[28] = hc_bytealign_S (w[23], w[24], offset);\n      w[27] = hc_bytealign_S (w[22], w[23], offset);\n      w[26] = hc_bytealign_S (w[21], w[22], offset);\n      w[25] = hc_bytealign_S (w[20], w[21], offset);\n      w[24] = hc_bytealign_S (w[19], w[20], offset);\n      w[23] = hc_bytealign_S (w[18], w[19], offset);\n      w[22] = hc_bytealign_S (w[17], w[18], offset);\n      w[21] = hc_bytealign_S (w[16], w[17], offset);\n      w[20] = hc_bytealign_S (w[15], w[16], offset);\n      w[19] = hc_bytealign_S (w[14], w[15], offset);\n      w[18] = hc_bytealign_S (w[13], w[14], offset);\n      w[17] = hc_bytealign_S (w[12], w[13], offset);\n      w[16] = hc_bytealign_S (w[11], w[12], offset);\n      w[15] = hc_bytealign_S (w[10], w[11], offset);\n      w[14] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[13] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[12] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[11] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[10] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[ 9] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[ 8] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 7] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 6] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 5] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 4] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_bytealign_S (w[57], w[58], offset);\n      w[62] = hc_bytealign_S (w[56], w[57], offset);\n      w[61] = hc_bytealign_S (w[55], w[56], offset);\n      w[60] = hc_bytealign_S (w[54], w[55], offset);\n      w[59] = hc_bytealign_S (w[53], w[54], offset);\n      w[58] = hc_bytealign_S (w[52], w[53], offset);\n      w[57] = hc_bytealign_S (w[51], w[52], offset);\n      w[56] = hc_bytealign_S (w[50], w[51], offset);\n      w[55] = hc_bytealign_S (w[49], w[50], offset);\n      w[54] = hc_bytealign_S (w[48], w[49], offset);\n      w[53] = hc_bytealign_S (w[47], w[48], offset);\n      w[52] = hc_bytealign_S (w[46], w[47], offset);\n      w[51] = hc_bytealign_S (w[45], w[46], offset);\n      w[50] = hc_bytealign_S (w[44], w[45], offset);\n      w[49] = hc_bytealign_S (w[43], w[44], offset);\n      w[48] = hc_bytealign_S (w[42], w[43], offset);\n      w[47] = hc_bytealign_S (w[41], w[42], offset);\n      w[46] = hc_bytealign_S (w[40], w[41], offset);\n      w[45] = hc_bytealign_S (w[39], w[40], offset);\n      w[44] = hc_bytealign_S (w[38], w[39], offset);\n      w[43] = hc_bytealign_S (w[37], w[38], offset);\n      w[42] = hc_bytealign_S (w[36], w[37], offset);\n      w[41] = hc_bytealign_S (w[35], w[36], offset);\n      w[40] = hc_bytealign_S (w[34], w[35], offset);\n      w[39] = hc_bytealign_S (w[33], w[34], offset);\n      w[38] = hc_bytealign_S (w[32], w[33], offset);\n      w[37] = hc_bytealign_S (w[31], w[32], offset);\n      w[36] = hc_bytealign_S (w[30], w[31], offset);\n      w[35] = hc_bytealign_S (w[29], w[30], offset);\n      w[34] = hc_bytealign_S (w[28], w[29], offset);\n      w[33] = hc_bytealign_S (w[27], w[28], offset);\n      w[32] = hc_bytealign_S (w[26], w[27], offset);\n      w[31] = hc_bytealign_S (w[25], w[26], offset);\n      w[30] = hc_bytealign_S (w[24], w[25], offset);\n      w[29] = hc_bytealign_S (w[23], w[24], offset);\n      w[28] = hc_bytealign_S (w[22], w[23], offset);\n      w[27] = hc_bytealign_S (w[21], w[22], offset);\n      w[26] = hc_bytealign_S (w[20], w[21], offset);\n      w[25] = hc_bytealign_S (w[19], w[20], offset);\n      w[24] = hc_bytealign_S (w[18], w[19], offset);\n      w[23] = hc_bytealign_S (w[17], w[18], offset);\n      w[22] = hc_bytealign_S (w[16], w[17], offset);\n      w[21] = hc_bytealign_S (w[15], w[16], offset);\n      w[20] = hc_bytealign_S (w[14], w[15], offset);\n      w[19] = hc_bytealign_S (w[13], w[14], offset);\n      w[18] = hc_bytealign_S (w[12], w[13], offset);\n      w[17] = hc_bytealign_S (w[11], w[12], offset);\n      w[16] = hc_bytealign_S (w[10], w[11], offset);\n      w[15] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[14] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[13] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[12] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[11] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[10] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[ 9] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 8] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 7] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 6] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 5] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_bytealign_S (w[56], w[57], offset);\n      w[62] = hc_bytealign_S (w[55], w[56], offset);\n      w[61] = hc_bytealign_S (w[54], w[55], offset);\n      w[60] = hc_bytealign_S (w[53], w[54], offset);\n      w[59] = hc_bytealign_S (w[52], w[53], offset);\n      w[58] = hc_bytealign_S (w[51], w[52], offset);\n      w[57] = hc_bytealign_S (w[50], w[51], offset);\n      w[56] = hc_bytealign_S (w[49], w[50], offset);\n      w[55] = hc_bytealign_S (w[48], w[49], offset);\n      w[54] = hc_bytealign_S (w[47], w[48], offset);\n      w[53] = hc_bytealign_S (w[46], w[47], offset);\n      w[52] = hc_bytealign_S (w[45], w[46], offset);\n      w[51] = hc_bytealign_S (w[44], w[45], offset);\n      w[50] = hc_bytealign_S (w[43], w[44], offset);\n      w[49] = hc_bytealign_S (w[42], w[43], offset);\n      w[48] = hc_bytealign_S (w[41], w[42], offset);\n      w[47] = hc_bytealign_S (w[40], w[41], offset);\n      w[46] = hc_bytealign_S (w[39], w[40], offset);\n      w[45] = hc_bytealign_S (w[38], w[39], offset);\n      w[44] = hc_bytealign_S (w[37], w[38], offset);\n      w[43] = hc_bytealign_S (w[36], w[37], offset);\n      w[42] = hc_bytealign_S (w[35], w[36], offset);\n      w[41] = hc_bytealign_S (w[34], w[35], offset);\n      w[40] = hc_bytealign_S (w[33], w[34], offset);\n      w[39] = hc_bytealign_S (w[32], w[33], offset);\n      w[38] = hc_bytealign_S (w[31], w[32], offset);\n      w[37] = hc_bytealign_S (w[30], w[31], offset);\n      w[36] = hc_bytealign_S (w[29], w[30], offset);\n      w[35] = hc_bytealign_S (w[28], w[29], offset);\n      w[34] = hc_bytealign_S (w[27], w[28], offset);\n      w[33] = hc_bytealign_S (w[26], w[27], offset);\n      w[32] = hc_bytealign_S (w[25], w[26], offset);\n      w[31] = hc_bytealign_S (w[24], w[25], offset);\n      w[30] = hc_bytealign_S (w[23], w[24], offset);\n      w[29] = hc_bytealign_S (w[22], w[23], offset);\n      w[28] = hc_bytealign_S (w[21], w[22], offset);\n      w[27] = hc_bytealign_S (w[20], w[21], offset);\n      w[26] = hc_bytealign_S (w[19], w[20], offset);\n      w[25] = hc_bytealign_S (w[18], w[19], offset);\n      w[24] = hc_bytealign_S (w[17], w[18], offset);\n      w[23] = hc_bytealign_S (w[16], w[17], offset);\n      w[22] = hc_bytealign_S (w[15], w[16], offset);\n      w[21] = hc_bytealign_S (w[14], w[15], offset);\n      w[20] = hc_bytealign_S (w[13], w[14], offset);\n      w[19] = hc_bytealign_S (w[12], w[13], offset);\n      w[18] = hc_bytealign_S (w[11], w[12], offset);\n      w[17] = hc_bytealign_S (w[10], w[11], offset);\n      w[16] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[15] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[14] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[13] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[12] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[11] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[10] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[ 9] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 8] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 7] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 6] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_bytealign_S (w[55], w[56], offset);\n      w[62] = hc_bytealign_S (w[54], w[55], offset);\n      w[61] = hc_bytealign_S (w[53], w[54], offset);\n      w[60] = hc_bytealign_S (w[52], w[53], offset);\n      w[59] = hc_bytealign_S (w[51], w[52], offset);\n      w[58] = hc_bytealign_S (w[50], w[51], offset);\n      w[57] = hc_bytealign_S (w[49], w[50], offset);\n      w[56] = hc_bytealign_S (w[48], w[49], offset);\n      w[55] = hc_bytealign_S (w[47], w[48], offset);\n      w[54] = hc_bytealign_S (w[46], w[47], offset);\n      w[53] = hc_bytealign_S (w[45], w[46], offset);\n      w[52] = hc_bytealign_S (w[44], w[45], offset);\n      w[51] = hc_bytealign_S (w[43], w[44], offset);\n      w[50] = hc_bytealign_S (w[42], w[43], offset);\n      w[49] = hc_bytealign_S (w[41], w[42], offset);\n      w[48] = hc_bytealign_S (w[40], w[41], offset);\n      w[47] = hc_bytealign_S (w[39], w[40], offset);\n      w[46] = hc_bytealign_S (w[38], w[39], offset);\n      w[45] = hc_bytealign_S (w[37], w[38], offset);\n      w[44] = hc_bytealign_S (w[36], w[37], offset);\n      w[43] = hc_bytealign_S (w[35], w[36], offset);\n      w[42] = hc_bytealign_S (w[34], w[35], offset);\n      w[41] = hc_bytealign_S (w[33], w[34], offset);\n      w[40] = hc_bytealign_S (w[32], w[33], offset);\n      w[39] = hc_bytealign_S (w[31], w[32], offset);\n      w[38] = hc_bytealign_S (w[30], w[31], offset);\n      w[37] = hc_bytealign_S (w[29], w[30], offset);\n      w[36] = hc_bytealign_S (w[28], w[29], offset);\n      w[35] = hc_bytealign_S (w[27], w[28], offset);\n      w[34] = hc_bytealign_S (w[26], w[27], offset);\n      w[33] = hc_bytealign_S (w[25], w[26], offset);\n      w[32] = hc_bytealign_S (w[24], w[25], offset);\n      w[31] = hc_bytealign_S (w[23], w[24], offset);\n      w[30] = hc_bytealign_S (w[22], w[23], offset);\n      w[29] = hc_bytealign_S (w[21], w[22], offset);\n      w[28] = hc_bytealign_S (w[20], w[21], offset);\n      w[27] = hc_bytealign_S (w[19], w[20], offset);\n      w[26] = hc_bytealign_S (w[18], w[19], offset);\n      w[25] = hc_bytealign_S (w[17], w[18], offset);\n      w[24] = hc_bytealign_S (w[16], w[17], offset);\n      w[23] = hc_bytealign_S (w[15], w[16], offset);\n      w[22] = hc_bytealign_S (w[14], w[15], offset);\n      w[21] = hc_bytealign_S (w[13], w[14], offset);\n      w[20] = hc_bytealign_S (w[12], w[13], offset);\n      w[19] = hc_bytealign_S (w[11], w[12], offset);\n      w[18] = hc_bytealign_S (w[10], w[11], offset);\n      w[17] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[16] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[15] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[14] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[13] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[12] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[11] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[10] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[ 9] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 8] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 7] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_bytealign_S (w[54], w[55], offset);\n      w[62] = hc_bytealign_S (w[53], w[54], offset);\n      w[61] = hc_bytealign_S (w[52], w[53], offset);\n      w[60] = hc_bytealign_S (w[51], w[52], offset);\n      w[59] = hc_bytealign_S (w[50], w[51], offset);\n      w[58] = hc_bytealign_S (w[49], w[50], offset);\n      w[57] = hc_bytealign_S (w[48], w[49], offset);\n      w[56] = hc_bytealign_S (w[47], w[48], offset);\n      w[55] = hc_bytealign_S (w[46], w[47], offset);\n      w[54] = hc_bytealign_S (w[45], w[46], offset);\n      w[53] = hc_bytealign_S (w[44], w[45], offset);\n      w[52] = hc_bytealign_S (w[43], w[44], offset);\n      w[51] = hc_bytealign_S (w[42], w[43], offset);\n      w[50] = hc_bytealign_S (w[41], w[42], offset);\n      w[49] = hc_bytealign_S (w[40], w[41], offset);\n      w[48] = hc_bytealign_S (w[39], w[40], offset);\n      w[47] = hc_bytealign_S (w[38], w[39], offset);\n      w[46] = hc_bytealign_S (w[37], w[38], offset);\n      w[45] = hc_bytealign_S (w[36], w[37], offset);\n      w[44] = hc_bytealign_S (w[35], w[36], offset);\n      w[43] = hc_bytealign_S (w[34], w[35], offset);\n      w[42] = hc_bytealign_S (w[33], w[34], offset);\n      w[41] = hc_bytealign_S (w[32], w[33], offset);\n      w[40] = hc_bytealign_S (w[31], w[32], offset);\n      w[39] = hc_bytealign_S (w[30], w[31], offset);\n      w[38] = hc_bytealign_S (w[29], w[30], offset);\n      w[37] = hc_bytealign_S (w[28], w[29], offset);\n      w[36] = hc_bytealign_S (w[27], w[28], offset);\n      w[35] = hc_bytealign_S (w[26], w[27], offset);\n      w[34] = hc_bytealign_S (w[25], w[26], offset);\n      w[33] = hc_bytealign_S (w[24], w[25], offset);\n      w[32] = hc_bytealign_S (w[23], w[24], offset);\n      w[31] = hc_bytealign_S (w[22], w[23], offset);\n      w[30] = hc_bytealign_S (w[21], w[22], offset);\n      w[29] = hc_bytealign_S (w[20], w[21], offset);\n      w[28] = hc_bytealign_S (w[19], w[20], offset);\n      w[27] = hc_bytealign_S (w[18], w[19], offset);\n      w[26] = hc_bytealign_S (w[17], w[18], offset);\n      w[25] = hc_bytealign_S (w[16], w[17], offset);\n      w[24] = hc_bytealign_S (w[15], w[16], offset);\n      w[23] = hc_bytealign_S (w[14], w[15], offset);\n      w[22] = hc_bytealign_S (w[13], w[14], offset);\n      w[21] = hc_bytealign_S (w[12], w[13], offset);\n      w[20] = hc_bytealign_S (w[11], w[12], offset);\n      w[19] = hc_bytealign_S (w[10], w[11], offset);\n      w[18] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[17] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[16] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[15] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[14] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[13] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[12] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[11] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[10] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[ 9] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 8] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_bytealign_S (w[53], w[54], offset);\n      w[62] = hc_bytealign_S (w[52], w[53], offset);\n      w[61] = hc_bytealign_S (w[51], w[52], offset);\n      w[60] = hc_bytealign_S (w[50], w[51], offset);\n      w[59] = hc_bytealign_S (w[49], w[50], offset);\n      w[58] = hc_bytealign_S (w[48], w[49], offset);\n      w[57] = hc_bytealign_S (w[47], w[48], offset);\n      w[56] = hc_bytealign_S (w[46], w[47], offset);\n      w[55] = hc_bytealign_S (w[45], w[46], offset);\n      w[54] = hc_bytealign_S (w[44], w[45], offset);\n      w[53] = hc_bytealign_S (w[43], w[44], offset);\n      w[52] = hc_bytealign_S (w[42], w[43], offset);\n      w[51] = hc_bytealign_S (w[41], w[42], offset);\n      w[50] = hc_bytealign_S (w[40], w[41], offset);\n      w[49] = hc_bytealign_S (w[39], w[40], offset);\n      w[48] = hc_bytealign_S (w[38], w[39], offset);\n      w[47] = hc_bytealign_S (w[37], w[38], offset);\n      w[46] = hc_bytealign_S (w[36], w[37], offset);\n      w[45] = hc_bytealign_S (w[35], w[36], offset);\n      w[44] = hc_bytealign_S (w[34], w[35], offset);\n      w[43] = hc_bytealign_S (w[33], w[34], offset);\n      w[42] = hc_bytealign_S (w[32], w[33], offset);\n      w[41] = hc_bytealign_S (w[31], w[32], offset);\n      w[40] = hc_bytealign_S (w[30], w[31], offset);\n      w[39] = hc_bytealign_S (w[29], w[30], offset);\n      w[38] = hc_bytealign_S (w[28], w[29], offset);\n      w[37] = hc_bytealign_S (w[27], w[28], offset);\n      w[36] = hc_bytealign_S (w[26], w[27], offset);\n      w[35] = hc_bytealign_S (w[25], w[26], offset);\n      w[34] = hc_bytealign_S (w[24], w[25], offset);\n      w[33] = hc_bytealign_S (w[23], w[24], offset);\n      w[32] = hc_bytealign_S (w[22], w[23], offset);\n      w[31] = hc_bytealign_S (w[21], w[22], offset);\n      w[30] = hc_bytealign_S (w[20], w[21], offset);\n      w[29] = hc_bytealign_S (w[19], w[20], offset);\n      w[28] = hc_bytealign_S (w[18], w[19], offset);\n      w[27] = hc_bytealign_S (w[17], w[18], offset);\n      w[26] = hc_bytealign_S (w[16], w[17], offset);\n      w[25] = hc_bytealign_S (w[15], w[16], offset);\n      w[24] = hc_bytealign_S (w[14], w[15], offset);\n      w[23] = hc_bytealign_S (w[13], w[14], offset);\n      w[22] = hc_bytealign_S (w[12], w[13], offset);\n      w[21] = hc_bytealign_S (w[11], w[12], offset);\n      w[20] = hc_bytealign_S (w[10], w[11], offset);\n      w[19] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[18] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[17] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[16] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[15] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[14] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[13] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[12] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[11] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[10] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[ 9] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_bytealign_S (w[52], w[53], offset);\n      w[62] = hc_bytealign_S (w[51], w[52], offset);\n      w[61] = hc_bytealign_S (w[50], w[51], offset);\n      w[60] = hc_bytealign_S (w[49], w[50], offset);\n      w[59] = hc_bytealign_S (w[48], w[49], offset);\n      w[58] = hc_bytealign_S (w[47], w[48], offset);\n      w[57] = hc_bytealign_S (w[46], w[47], offset);\n      w[56] = hc_bytealign_S (w[45], w[46], offset);\n      w[55] = hc_bytealign_S (w[44], w[45], offset);\n      w[54] = hc_bytealign_S (w[43], w[44], offset);\n      w[53] = hc_bytealign_S (w[42], w[43], offset);\n      w[52] = hc_bytealign_S (w[41], w[42], offset);\n      w[51] = hc_bytealign_S (w[40], w[41], offset);\n      w[50] = hc_bytealign_S (w[39], w[40], offset);\n      w[49] = hc_bytealign_S (w[38], w[39], offset);\n      w[48] = hc_bytealign_S (w[37], w[38], offset);\n      w[47] = hc_bytealign_S (w[36], w[37], offset);\n      w[46] = hc_bytealign_S (w[35], w[36], offset);\n      w[45] = hc_bytealign_S (w[34], w[35], offset);\n      w[44] = hc_bytealign_S (w[33], w[34], offset);\n      w[43] = hc_bytealign_S (w[32], w[33], offset);\n      w[42] = hc_bytealign_S (w[31], w[32], offset);\n      w[41] = hc_bytealign_S (w[30], w[31], offset);\n      w[40] = hc_bytealign_S (w[29], w[30], offset);\n      w[39] = hc_bytealign_S (w[28], w[29], offset);\n      w[38] = hc_bytealign_S (w[27], w[28], offset);\n      w[37] = hc_bytealign_S (w[26], w[27], offset);\n      w[36] = hc_bytealign_S (w[25], w[26], offset);\n      w[35] = hc_bytealign_S (w[24], w[25], offset);\n      w[34] = hc_bytealign_S (w[23], w[24], offset);\n      w[33] = hc_bytealign_S (w[22], w[23], offset);\n      w[32] = hc_bytealign_S (w[21], w[22], offset);\n      w[31] = hc_bytealign_S (w[20], w[21], offset);\n      w[30] = hc_bytealign_S (w[19], w[20], offset);\n      w[29] = hc_bytealign_S (w[18], w[19], offset);\n      w[28] = hc_bytealign_S (w[17], w[18], offset);\n      w[27] = hc_bytealign_S (w[16], w[17], offset);\n      w[26] = hc_bytealign_S (w[15], w[16], offset);\n      w[25] = hc_bytealign_S (w[14], w[15], offset);\n      w[24] = hc_bytealign_S (w[13], w[14], offset);\n      w[23] = hc_bytealign_S (w[12], w[13], offset);\n      w[22] = hc_bytealign_S (w[11], w[12], offset);\n      w[21] = hc_bytealign_S (w[10], w[11], offset);\n      w[20] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[19] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[18] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[17] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[16] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[15] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[14] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[13] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[12] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[11] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[10] = hc_bytealign_S (    0, w[ 0], offset);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_bytealign_S (w[51], w[52], offset);\n      w[62] = hc_bytealign_S (w[50], w[51], offset);\n      w[61] = hc_bytealign_S (w[49], w[50], offset);\n      w[60] = hc_bytealign_S (w[48], w[49], offset);\n      w[59] = hc_bytealign_S (w[47], w[48], offset);\n      w[58] = hc_bytealign_S (w[46], w[47], offset);\n      w[57] = hc_bytealign_S (w[45], w[46], offset);\n      w[56] = hc_bytealign_S (w[44], w[45], offset);\n      w[55] = hc_bytealign_S (w[43], w[44], offset);\n      w[54] = hc_bytealign_S (w[42], w[43], offset);\n      w[53] = hc_bytealign_S (w[41], w[42], offset);\n      w[52] = hc_bytealign_S (w[40], w[41], offset);\n      w[51] = hc_bytealign_S (w[39], w[40], offset);\n      w[50] = hc_bytealign_S (w[38], w[39], offset);\n      w[49] = hc_bytealign_S (w[37], w[38], offset);\n      w[48] = hc_bytealign_S (w[36], w[37], offset);\n      w[47] = hc_bytealign_S (w[35], w[36], offset);\n      w[46] = hc_bytealign_S (w[34], w[35], offset);\n      w[45] = hc_bytealign_S (w[33], w[34], offset);\n      w[44] = hc_bytealign_S (w[32], w[33], offset);\n      w[43] = hc_bytealign_S (w[31], w[32], offset);\n      w[42] = hc_bytealign_S (w[30], w[31], offset);\n      w[41] = hc_bytealign_S (w[29], w[30], offset);\n      w[40] = hc_bytealign_S (w[28], w[29], offset);\n      w[39] = hc_bytealign_S (w[27], w[28], offset);\n      w[38] = hc_bytealign_S (w[26], w[27], offset);\n      w[37] = hc_bytealign_S (w[25], w[26], offset);\n      w[36] = hc_bytealign_S (w[24], w[25], offset);\n      w[35] = hc_bytealign_S (w[23], w[24], offset);\n      w[34] = hc_bytealign_S (w[22], w[23], offset);\n      w[33] = hc_bytealign_S (w[21], w[22], offset);\n      w[32] = hc_bytealign_S (w[20], w[21], offset);\n      w[31] = hc_bytealign_S (w[19], w[20], offset);\n      w[30] = hc_bytealign_S (w[18], w[19], offset);\n      w[29] = hc_bytealign_S (w[17], w[18], offset);\n      w[28] = hc_bytealign_S (w[16], w[17], offset);\n      w[27] = hc_bytealign_S (w[15], w[16], offset);\n      w[26] = hc_bytealign_S (w[14], w[15], offset);\n      w[25] = hc_bytealign_S (w[13], w[14], offset);\n      w[24] = hc_bytealign_S (w[12], w[13], offset);\n      w[23] = hc_bytealign_S (w[11], w[12], offset);\n      w[22] = hc_bytealign_S (w[10], w[11], offset);\n      w[21] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[20] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[19] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[18] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[17] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[16] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[15] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[14] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[13] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[12] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[11] = hc_bytealign_S (    0, w[ 0], offset);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_bytealign_S (w[50], w[51], offset);\n      w[62] = hc_bytealign_S (w[49], w[50], offset);\n      w[61] = hc_bytealign_S (w[48], w[49], offset);\n      w[60] = hc_bytealign_S (w[47], w[48], offset);\n      w[59] = hc_bytealign_S (w[46], w[47], offset);\n      w[58] = hc_bytealign_S (w[45], w[46], offset);\n      w[57] = hc_bytealign_S (w[44], w[45], offset);\n      w[56] = hc_bytealign_S (w[43], w[44], offset);\n      w[55] = hc_bytealign_S (w[42], w[43], offset);\n      w[54] = hc_bytealign_S (w[41], w[42], offset);\n      w[53] = hc_bytealign_S (w[40], w[41], offset);\n      w[52] = hc_bytealign_S (w[39], w[40], offset);\n      w[51] = hc_bytealign_S (w[38], w[39], offset);\n      w[50] = hc_bytealign_S (w[37], w[38], offset);\n      w[49] = hc_bytealign_S (w[36], w[37], offset);\n      w[48] = hc_bytealign_S (w[35], w[36], offset);\n      w[47] = hc_bytealign_S (w[34], w[35], offset);\n      w[46] = hc_bytealign_S (w[33], w[34], offset);\n      w[45] = hc_bytealign_S (w[32], w[33], offset);\n      w[44] = hc_bytealign_S (w[31], w[32], offset);\n      w[43] = hc_bytealign_S (w[30], w[31], offset);\n      w[42] = hc_bytealign_S (w[29], w[30], offset);\n      w[41] = hc_bytealign_S (w[28], w[29], offset);\n      w[40] = hc_bytealign_S (w[27], w[28], offset);\n      w[39] = hc_bytealign_S (w[26], w[27], offset);\n      w[38] = hc_bytealign_S (w[25], w[26], offset);\n      w[37] = hc_bytealign_S (w[24], w[25], offset);\n      w[36] = hc_bytealign_S (w[23], w[24], offset);\n      w[35] = hc_bytealign_S (w[22], w[23], offset);\n      w[34] = hc_bytealign_S (w[21], w[22], offset);\n      w[33] = hc_bytealign_S (w[20], w[21], offset);\n      w[32] = hc_bytealign_S (w[19], w[20], offset);\n      w[31] = hc_bytealign_S (w[18], w[19], offset);\n      w[30] = hc_bytealign_S (w[17], w[18], offset);\n      w[29] = hc_bytealign_S (w[16], w[17], offset);\n      w[28] = hc_bytealign_S (w[15], w[16], offset);\n      w[27] = hc_bytealign_S (w[14], w[15], offset);\n      w[26] = hc_bytealign_S (w[13], w[14], offset);\n      w[25] = hc_bytealign_S (w[12], w[13], offset);\n      w[24] = hc_bytealign_S (w[11], w[12], offset);\n      w[23] = hc_bytealign_S (w[10], w[11], offset);\n      w[22] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[21] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[20] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[19] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[18] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[17] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[16] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[15] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[14] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[13] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[12] = hc_bytealign_S (    0, w[ 0], offset);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_bytealign_S (w[49], w[50], offset);\n      w[62] = hc_bytealign_S (w[48], w[49], offset);\n      w[61] = hc_bytealign_S (w[47], w[48], offset);\n      w[60] = hc_bytealign_S (w[46], w[47], offset);\n      w[59] = hc_bytealign_S (w[45], w[46], offset);\n      w[58] = hc_bytealign_S (w[44], w[45], offset);\n      w[57] = hc_bytealign_S (w[43], w[44], offset);\n      w[56] = hc_bytealign_S (w[42], w[43], offset);\n      w[55] = hc_bytealign_S (w[41], w[42], offset);\n      w[54] = hc_bytealign_S (w[40], w[41], offset);\n      w[53] = hc_bytealign_S (w[39], w[40], offset);\n      w[52] = hc_bytealign_S (w[38], w[39], offset);\n      w[51] = hc_bytealign_S (w[37], w[38], offset);\n      w[50] = hc_bytealign_S (w[36], w[37], offset);\n      w[49] = hc_bytealign_S (w[35], w[36], offset);\n      w[48] = hc_bytealign_S (w[34], w[35], offset);\n      w[47] = hc_bytealign_S (w[33], w[34], offset);\n      w[46] = hc_bytealign_S (w[32], w[33], offset);\n      w[45] = hc_bytealign_S (w[31], w[32], offset);\n      w[44] = hc_bytealign_S (w[30], w[31], offset);\n      w[43] = hc_bytealign_S (w[29], w[30], offset);\n      w[42] = hc_bytealign_S (w[28], w[29], offset);\n      w[41] = hc_bytealign_S (w[27], w[28], offset);\n      w[40] = hc_bytealign_S (w[26], w[27], offset);\n      w[39] = hc_bytealign_S (w[25], w[26], offset);\n      w[38] = hc_bytealign_S (w[24], w[25], offset);\n      w[37] = hc_bytealign_S (w[23], w[24], offset);\n      w[36] = hc_bytealign_S (w[22], w[23], offset);\n      w[35] = hc_bytealign_S (w[21], w[22], offset);\n      w[34] = hc_bytealign_S (w[20], w[21], offset);\n      w[33] = hc_bytealign_S (w[19], w[20], offset);\n      w[32] = hc_bytealign_S (w[18], w[19], offset);\n      w[31] = hc_bytealign_S (w[17], w[18], offset);\n      w[30] = hc_bytealign_S (w[16], w[17], offset);\n      w[29] = hc_bytealign_S (w[15], w[16], offset);\n      w[28] = hc_bytealign_S (w[14], w[15], offset);\n      w[27] = hc_bytealign_S (w[13], w[14], offset);\n      w[26] = hc_bytealign_S (w[12], w[13], offset);\n      w[25] = hc_bytealign_S (w[11], w[12], offset);\n      w[24] = hc_bytealign_S (w[10], w[11], offset);\n      w[23] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[22] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[21] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[20] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[19] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[18] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[17] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[16] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[15] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[14] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[13] = hc_bytealign_S (    0, w[ 0], offset);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_bytealign_S (w[48], w[49], offset);\n      w[62] = hc_bytealign_S (w[47], w[48], offset);\n      w[61] = hc_bytealign_S (w[46], w[47], offset);\n      w[60] = hc_bytealign_S (w[45], w[46], offset);\n      w[59] = hc_bytealign_S (w[44], w[45], offset);\n      w[58] = hc_bytealign_S (w[43], w[44], offset);\n      w[57] = hc_bytealign_S (w[42], w[43], offset);\n      w[56] = hc_bytealign_S (w[41], w[42], offset);\n      w[55] = hc_bytealign_S (w[40], w[41], offset);\n      w[54] = hc_bytealign_S (w[39], w[40], offset);\n      w[53] = hc_bytealign_S (w[38], w[39], offset);\n      w[52] = hc_bytealign_S (w[37], w[38], offset);\n      w[51] = hc_bytealign_S (w[36], w[37], offset);\n      w[50] = hc_bytealign_S (w[35], w[36], offset);\n      w[49] = hc_bytealign_S (w[34], w[35], offset);\n      w[48] = hc_bytealign_S (w[33], w[34], offset);\n      w[47] = hc_bytealign_S (w[32], w[33], offset);\n      w[46] = hc_bytealign_S (w[31], w[32], offset);\n      w[45] = hc_bytealign_S (w[30], w[31], offset);\n      w[44] = hc_bytealign_S (w[29], w[30], offset);\n      w[43] = hc_bytealign_S (w[28], w[29], offset);\n      w[42] = hc_bytealign_S (w[27], w[28], offset);\n      w[41] = hc_bytealign_S (w[26], w[27], offset);\n      w[40] = hc_bytealign_S (w[25], w[26], offset);\n      w[39] = hc_bytealign_S (w[24], w[25], offset);\n      w[38] = hc_bytealign_S (w[23], w[24], offset);\n      w[37] = hc_bytealign_S (w[22], w[23], offset);\n      w[36] = hc_bytealign_S (w[21], w[22], offset);\n      w[35] = hc_bytealign_S (w[20], w[21], offset);\n      w[34] = hc_bytealign_S (w[19], w[20], offset);\n      w[33] = hc_bytealign_S (w[18], w[19], offset);\n      w[32] = hc_bytealign_S (w[17], w[18], offset);\n      w[31] = hc_bytealign_S (w[16], w[17], offset);\n      w[30] = hc_bytealign_S (w[15], w[16], offset);\n      w[29] = hc_bytealign_S (w[14], w[15], offset);\n      w[28] = hc_bytealign_S (w[13], w[14], offset);\n      w[27] = hc_bytealign_S (w[12], w[13], offset);\n      w[26] = hc_bytealign_S (w[11], w[12], offset);\n      w[25] = hc_bytealign_S (w[10], w[11], offset);\n      w[24] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[23] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[22] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[21] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[20] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[19] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[18] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[17] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[16] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[15] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[14] = hc_bytealign_S (    0, w[ 0], offset);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_bytealign_S (w[47], w[48], offset);\n      w[62] = hc_bytealign_S (w[46], w[47], offset);\n      w[61] = hc_bytealign_S (w[45], w[46], offset);\n      w[60] = hc_bytealign_S (w[44], w[45], offset);\n      w[59] = hc_bytealign_S (w[43], w[44], offset);\n      w[58] = hc_bytealign_S (w[42], w[43], offset);\n      w[57] = hc_bytealign_S (w[41], w[42], offset);\n      w[56] = hc_bytealign_S (w[40], w[41], offset);\n      w[55] = hc_bytealign_S (w[39], w[40], offset);\n      w[54] = hc_bytealign_S (w[38], w[39], offset);\n      w[53] = hc_bytealign_S (w[37], w[38], offset);\n      w[52] = hc_bytealign_S (w[36], w[37], offset);\n      w[51] = hc_bytealign_S (w[35], w[36], offset);\n      w[50] = hc_bytealign_S (w[34], w[35], offset);\n      w[49] = hc_bytealign_S (w[33], w[34], offset);\n      w[48] = hc_bytealign_S (w[32], w[33], offset);\n      w[47] = hc_bytealign_S (w[31], w[32], offset);\n      w[46] = hc_bytealign_S (w[30], w[31], offset);\n      w[45] = hc_bytealign_S (w[29], w[30], offset);\n      w[44] = hc_bytealign_S (w[28], w[29], offset);\n      w[43] = hc_bytealign_S (w[27], w[28], offset);\n      w[42] = hc_bytealign_S (w[26], w[27], offset);\n      w[41] = hc_bytealign_S (w[25], w[26], offset);\n      w[40] = hc_bytealign_S (w[24], w[25], offset);\n      w[39] = hc_bytealign_S (w[23], w[24], offset);\n      w[38] = hc_bytealign_S (w[22], w[23], offset);\n      w[37] = hc_bytealign_S (w[21], w[22], offset);\n      w[36] = hc_bytealign_S (w[20], w[21], offset);\n      w[35] = hc_bytealign_S (w[19], w[20], offset);\n      w[34] = hc_bytealign_S (w[18], w[19], offset);\n      w[33] = hc_bytealign_S (w[17], w[18], offset);\n      w[32] = hc_bytealign_S (w[16], w[17], offset);\n      w[31] = hc_bytealign_S (w[15], w[16], offset);\n      w[30] = hc_bytealign_S (w[14], w[15], offset);\n      w[29] = hc_bytealign_S (w[13], w[14], offset);\n      w[28] = hc_bytealign_S (w[12], w[13], offset);\n      w[27] = hc_bytealign_S (w[11], w[12], offset);\n      w[26] = hc_bytealign_S (w[10], w[11], offset);\n      w[25] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[24] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[23] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[22] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[21] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[20] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[19] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[18] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[17] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[16] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[15] = hc_bytealign_S (    0, w[ 0], offset);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_bytealign_S (w[46], w[47], offset);\n      w[62] = hc_bytealign_S (w[45], w[46], offset);\n      w[61] = hc_bytealign_S (w[44], w[45], offset);\n      w[60] = hc_bytealign_S (w[43], w[44], offset);\n      w[59] = hc_bytealign_S (w[42], w[43], offset);\n      w[58] = hc_bytealign_S (w[41], w[42], offset);\n      w[57] = hc_bytealign_S (w[40], w[41], offset);\n      w[56] = hc_bytealign_S (w[39], w[40], offset);\n      w[55] = hc_bytealign_S (w[38], w[39], offset);\n      w[54] = hc_bytealign_S (w[37], w[38], offset);\n      w[53] = hc_bytealign_S (w[36], w[37], offset);\n      w[52] = hc_bytealign_S (w[35], w[36], offset);\n      w[51] = hc_bytealign_S (w[34], w[35], offset);\n      w[50] = hc_bytealign_S (w[33], w[34], offset);\n      w[49] = hc_bytealign_S (w[32], w[33], offset);\n      w[48] = hc_bytealign_S (w[31], w[32], offset);\n      w[47] = hc_bytealign_S (w[30], w[31], offset);\n      w[46] = hc_bytealign_S (w[29], w[30], offset);\n      w[45] = hc_bytealign_S (w[28], w[29], offset);\n      w[44] = hc_bytealign_S (w[27], w[28], offset);\n      w[43] = hc_bytealign_S (w[26], w[27], offset);\n      w[42] = hc_bytealign_S (w[25], w[26], offset);\n      w[41] = hc_bytealign_S (w[24], w[25], offset);\n      w[40] = hc_bytealign_S (w[23], w[24], offset);\n      w[39] = hc_bytealign_S (w[22], w[23], offset);\n      w[38] = hc_bytealign_S (w[21], w[22], offset);\n      w[37] = hc_bytealign_S (w[20], w[21], offset);\n      w[36] = hc_bytealign_S (w[19], w[20], offset);\n      w[35] = hc_bytealign_S (w[18], w[19], offset);\n      w[34] = hc_bytealign_S (w[17], w[18], offset);\n      w[33] = hc_bytealign_S (w[16], w[17], offset);\n      w[32] = hc_bytealign_S (w[15], w[16], offset);\n      w[31] = hc_bytealign_S (w[14], w[15], offset);\n      w[30] = hc_bytealign_S (w[13], w[14], offset);\n      w[29] = hc_bytealign_S (w[12], w[13], offset);\n      w[28] = hc_bytealign_S (w[11], w[12], offset);\n      w[27] = hc_bytealign_S (w[10], w[11], offset);\n      w[26] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[25] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[24] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[23] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[22] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[21] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[20] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[19] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[18] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[17] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[16] = hc_bytealign_S (    0, w[ 0], offset);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_bytealign_S (w[45], w[46], offset);\n      w[62] = hc_bytealign_S (w[44], w[45], offset);\n      w[61] = hc_bytealign_S (w[43], w[44], offset);\n      w[60] = hc_bytealign_S (w[42], w[43], offset);\n      w[59] = hc_bytealign_S (w[41], w[42], offset);\n      w[58] = hc_bytealign_S (w[40], w[41], offset);\n      w[57] = hc_bytealign_S (w[39], w[40], offset);\n      w[56] = hc_bytealign_S (w[38], w[39], offset);\n      w[55] = hc_bytealign_S (w[37], w[38], offset);\n      w[54] = hc_bytealign_S (w[36], w[37], offset);\n      w[53] = hc_bytealign_S (w[35], w[36], offset);\n      w[52] = hc_bytealign_S (w[34], w[35], offset);\n      w[51] = hc_bytealign_S (w[33], w[34], offset);\n      w[50] = hc_bytealign_S (w[32], w[33], offset);\n      w[49] = hc_bytealign_S (w[31], w[32], offset);\n      w[48] = hc_bytealign_S (w[30], w[31], offset);\n      w[47] = hc_bytealign_S (w[29], w[30], offset);\n      w[46] = hc_bytealign_S (w[28], w[29], offset);\n      w[45] = hc_bytealign_S (w[27], w[28], offset);\n      w[44] = hc_bytealign_S (w[26], w[27], offset);\n      w[43] = hc_bytealign_S (w[25], w[26], offset);\n      w[42] = hc_bytealign_S (w[24], w[25], offset);\n      w[41] = hc_bytealign_S (w[23], w[24], offset);\n      w[40] = hc_bytealign_S (w[22], w[23], offset);\n      w[39] = hc_bytealign_S (w[21], w[22], offset);\n      w[38] = hc_bytealign_S (w[20], w[21], offset);\n      w[37] = hc_bytealign_S (w[19], w[20], offset);\n      w[36] = hc_bytealign_S (w[18], w[19], offset);\n      w[35] = hc_bytealign_S (w[17], w[18], offset);\n      w[34] = hc_bytealign_S (w[16], w[17], offset);\n      w[33] = hc_bytealign_S (w[15], w[16], offset);\n      w[32] = hc_bytealign_S (w[14], w[15], offset);\n      w[31] = hc_bytealign_S (w[13], w[14], offset);\n      w[30] = hc_bytealign_S (w[12], w[13], offset);\n      w[29] = hc_bytealign_S (w[11], w[12], offset);\n      w[28] = hc_bytealign_S (w[10], w[11], offset);\n      w[27] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[26] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[25] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[24] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[23] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[22] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[21] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[20] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[19] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[18] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[17] = hc_bytealign_S (    0, w[ 0], offset);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_bytealign_S (w[44], w[45], offset);\n      w[62] = hc_bytealign_S (w[43], w[44], offset);\n      w[61] = hc_bytealign_S (w[42], w[43], offset);\n      w[60] = hc_bytealign_S (w[41], w[42], offset);\n      w[59] = hc_bytealign_S (w[40], w[41], offset);\n      w[58] = hc_bytealign_S (w[39], w[40], offset);\n      w[57] = hc_bytealign_S (w[38], w[39], offset);\n      w[56] = hc_bytealign_S (w[37], w[38], offset);\n      w[55] = hc_bytealign_S (w[36], w[37], offset);\n      w[54] = hc_bytealign_S (w[35], w[36], offset);\n      w[53] = hc_bytealign_S (w[34], w[35], offset);\n      w[52] = hc_bytealign_S (w[33], w[34], offset);\n      w[51] = hc_bytealign_S (w[32], w[33], offset);\n      w[50] = hc_bytealign_S (w[31], w[32], offset);\n      w[49] = hc_bytealign_S (w[30], w[31], offset);\n      w[48] = hc_bytealign_S (w[29], w[30], offset);\n      w[47] = hc_bytealign_S (w[28], w[29], offset);\n      w[46] = hc_bytealign_S (w[27], w[28], offset);\n      w[45] = hc_bytealign_S (w[26], w[27], offset);\n      w[44] = hc_bytealign_S (w[25], w[26], offset);\n      w[43] = hc_bytealign_S (w[24], w[25], offset);\n      w[42] = hc_bytealign_S (w[23], w[24], offset);\n      w[41] = hc_bytealign_S (w[22], w[23], offset);\n      w[40] = hc_bytealign_S (w[21], w[22], offset);\n      w[39] = hc_bytealign_S (w[20], w[21], offset);\n      w[38] = hc_bytealign_S (w[19], w[20], offset);\n      w[37] = hc_bytealign_S (w[18], w[19], offset);\n      w[36] = hc_bytealign_S (w[17], w[18], offset);\n      w[35] = hc_bytealign_S (w[16], w[17], offset);\n      w[34] = hc_bytealign_S (w[15], w[16], offset);\n      w[33] = hc_bytealign_S (w[14], w[15], offset);\n      w[32] = hc_bytealign_S (w[13], w[14], offset);\n      w[31] = hc_bytealign_S (w[12], w[13], offset);\n      w[30] = hc_bytealign_S (w[11], w[12], offset);\n      w[29] = hc_bytealign_S (w[10], w[11], offset);\n      w[28] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[27] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[26] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[25] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[24] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[23] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[22] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[21] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[20] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[19] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[18] = hc_bytealign_S (    0, w[ 0], offset);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_bytealign_S (w[43], w[44], offset);\n      w[62] = hc_bytealign_S (w[42], w[43], offset);\n      w[61] = hc_bytealign_S (w[41], w[42], offset);\n      w[60] = hc_bytealign_S (w[40], w[41], offset);\n      w[59] = hc_bytealign_S (w[39], w[40], offset);\n      w[58] = hc_bytealign_S (w[38], w[39], offset);\n      w[57] = hc_bytealign_S (w[37], w[38], offset);\n      w[56] = hc_bytealign_S (w[36], w[37], offset);\n      w[55] = hc_bytealign_S (w[35], w[36], offset);\n      w[54] = hc_bytealign_S (w[34], w[35], offset);\n      w[53] = hc_bytealign_S (w[33], w[34], offset);\n      w[52] = hc_bytealign_S (w[32], w[33], offset);\n      w[51] = hc_bytealign_S (w[31], w[32], offset);\n      w[50] = hc_bytealign_S (w[30], w[31], offset);\n      w[49] = hc_bytealign_S (w[29], w[30], offset);\n      w[48] = hc_bytealign_S (w[28], w[29], offset);\n      w[47] = hc_bytealign_S (w[27], w[28], offset);\n      w[46] = hc_bytealign_S (w[26], w[27], offset);\n      w[45] = hc_bytealign_S (w[25], w[26], offset);\n      w[44] = hc_bytealign_S (w[24], w[25], offset);\n      w[43] = hc_bytealign_S (w[23], w[24], offset);\n      w[42] = hc_bytealign_S (w[22], w[23], offset);\n      w[41] = hc_bytealign_S (w[21], w[22], offset);\n      w[40] = hc_bytealign_S (w[20], w[21], offset);\n      w[39] = hc_bytealign_S (w[19], w[20], offset);\n      w[38] = hc_bytealign_S (w[18], w[19], offset);\n      w[37] = hc_bytealign_S (w[17], w[18], offset);\n      w[36] = hc_bytealign_S (w[16], w[17], offset);\n      w[35] = hc_bytealign_S (w[15], w[16], offset);\n      w[34] = hc_bytealign_S (w[14], w[15], offset);\n      w[33] = hc_bytealign_S (w[13], w[14], offset);\n      w[32] = hc_bytealign_S (w[12], w[13], offset);\n      w[31] = hc_bytealign_S (w[11], w[12], offset);\n      w[30] = hc_bytealign_S (w[10], w[11], offset);\n      w[29] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[28] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[27] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[26] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[25] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[24] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[23] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[22] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[21] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[20] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[19] = hc_bytealign_S (    0, w[ 0], offset);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_bytealign_S (w[42], w[43], offset);\n      w[62] = hc_bytealign_S (w[41], w[42], offset);\n      w[61] = hc_bytealign_S (w[40], w[41], offset);\n      w[60] = hc_bytealign_S (w[39], w[40], offset);\n      w[59] = hc_bytealign_S (w[38], w[39], offset);\n      w[58] = hc_bytealign_S (w[37], w[38], offset);\n      w[57] = hc_bytealign_S (w[36], w[37], offset);\n      w[56] = hc_bytealign_S (w[35], w[36], offset);\n      w[55] = hc_bytealign_S (w[34], w[35], offset);\n      w[54] = hc_bytealign_S (w[33], w[34], offset);\n      w[53] = hc_bytealign_S (w[32], w[33], offset);\n      w[52] = hc_bytealign_S (w[31], w[32], offset);\n      w[51] = hc_bytealign_S (w[30], w[31], offset);\n      w[50] = hc_bytealign_S (w[29], w[30], offset);\n      w[49] = hc_bytealign_S (w[28], w[29], offset);\n      w[48] = hc_bytealign_S (w[27], w[28], offset);\n      w[47] = hc_bytealign_S (w[26], w[27], offset);\n      w[46] = hc_bytealign_S (w[25], w[26], offset);\n      w[45] = hc_bytealign_S (w[24], w[25], offset);\n      w[44] = hc_bytealign_S (w[23], w[24], offset);\n      w[43] = hc_bytealign_S (w[22], w[23], offset);\n      w[42] = hc_bytealign_S (w[21], w[22], offset);\n      w[41] = hc_bytealign_S (w[20], w[21], offset);\n      w[40] = hc_bytealign_S (w[19], w[20], offset);\n      w[39] = hc_bytealign_S (w[18], w[19], offset);\n      w[38] = hc_bytealign_S (w[17], w[18], offset);\n      w[37] = hc_bytealign_S (w[16], w[17], offset);\n      w[36] = hc_bytealign_S (w[15], w[16], offset);\n      w[35] = hc_bytealign_S (w[14], w[15], offset);\n      w[34] = hc_bytealign_S (w[13], w[14], offset);\n      w[33] = hc_bytealign_S (w[12], w[13], offset);\n      w[32] = hc_bytealign_S (w[11], w[12], offset);\n      w[31] = hc_bytealign_S (w[10], w[11], offset);\n      w[30] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[29] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[28] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[27] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[26] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[25] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[24] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[23] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[22] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[21] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[20] = hc_bytealign_S (    0, w[ 0], offset);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_bytealign_S (w[41], w[42], offset);\n      w[62] = hc_bytealign_S (w[40], w[41], offset);\n      w[61] = hc_bytealign_S (w[39], w[40], offset);\n      w[60] = hc_bytealign_S (w[38], w[39], offset);\n      w[59] = hc_bytealign_S (w[37], w[38], offset);\n      w[58] = hc_bytealign_S (w[36], w[37], offset);\n      w[57] = hc_bytealign_S (w[35], w[36], offset);\n      w[56] = hc_bytealign_S (w[34], w[35], offset);\n      w[55] = hc_bytealign_S (w[33], w[34], offset);\n      w[54] = hc_bytealign_S (w[32], w[33], offset);\n      w[53] = hc_bytealign_S (w[31], w[32], offset);\n      w[52] = hc_bytealign_S (w[30], w[31], offset);\n      w[51] = hc_bytealign_S (w[29], w[30], offset);\n      w[50] = hc_bytealign_S (w[28], w[29], offset);\n      w[49] = hc_bytealign_S (w[27], w[28], offset);\n      w[48] = hc_bytealign_S (w[26], w[27], offset);\n      w[47] = hc_bytealign_S (w[25], w[26], offset);\n      w[46] = hc_bytealign_S (w[24], w[25], offset);\n      w[45] = hc_bytealign_S (w[23], w[24], offset);\n      w[44] = hc_bytealign_S (w[22], w[23], offset);\n      w[43] = hc_bytealign_S (w[21], w[22], offset);\n      w[42] = hc_bytealign_S (w[20], w[21], offset);\n      w[41] = hc_bytealign_S (w[19], w[20], offset);\n      w[40] = hc_bytealign_S (w[18], w[19], offset);\n      w[39] = hc_bytealign_S (w[17], w[18], offset);\n      w[38] = hc_bytealign_S (w[16], w[17], offset);\n      w[37] = hc_bytealign_S (w[15], w[16], offset);\n      w[36] = hc_bytealign_S (w[14], w[15], offset);\n      w[35] = hc_bytealign_S (w[13], w[14], offset);\n      w[34] = hc_bytealign_S (w[12], w[13], offset);\n      w[33] = hc_bytealign_S (w[11], w[12], offset);\n      w[32] = hc_bytealign_S (w[10], w[11], offset);\n      w[31] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[30] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[29] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[28] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[27] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[26] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[25] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[24] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[23] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[22] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[21] = hc_bytealign_S (    0, w[ 0], offset);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_bytealign_S (w[40], w[41], offset);\n      w[62] = hc_bytealign_S (w[39], w[40], offset);\n      w[61] = hc_bytealign_S (w[38], w[39], offset);\n      w[60] = hc_bytealign_S (w[37], w[38], offset);\n      w[59] = hc_bytealign_S (w[36], w[37], offset);\n      w[58] = hc_bytealign_S (w[35], w[36], offset);\n      w[57] = hc_bytealign_S (w[34], w[35], offset);\n      w[56] = hc_bytealign_S (w[33], w[34], offset);\n      w[55] = hc_bytealign_S (w[32], w[33], offset);\n      w[54] = hc_bytealign_S (w[31], w[32], offset);\n      w[53] = hc_bytealign_S (w[30], w[31], offset);\n      w[52] = hc_bytealign_S (w[29], w[30], offset);\n      w[51] = hc_bytealign_S (w[28], w[29], offset);\n      w[50] = hc_bytealign_S (w[27], w[28], offset);\n      w[49] = hc_bytealign_S (w[26], w[27], offset);\n      w[48] = hc_bytealign_S (w[25], w[26], offset);\n      w[47] = hc_bytealign_S (w[24], w[25], offset);\n      w[46] = hc_bytealign_S (w[23], w[24], offset);\n      w[45] = hc_bytealign_S (w[22], w[23], offset);\n      w[44] = hc_bytealign_S (w[21], w[22], offset);\n      w[43] = hc_bytealign_S (w[20], w[21], offset);\n      w[42] = hc_bytealign_S (w[19], w[20], offset);\n      w[41] = hc_bytealign_S (w[18], w[19], offset);\n      w[40] = hc_bytealign_S (w[17], w[18], offset);\n      w[39] = hc_bytealign_S (w[16], w[17], offset);\n      w[38] = hc_bytealign_S (w[15], w[16], offset);\n      w[37] = hc_bytealign_S (w[14], w[15], offset);\n      w[36] = hc_bytealign_S (w[13], w[14], offset);\n      w[35] = hc_bytealign_S (w[12], w[13], offset);\n      w[34] = hc_bytealign_S (w[11], w[12], offset);\n      w[33] = hc_bytealign_S (w[10], w[11], offset);\n      w[32] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[31] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[30] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[29] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[28] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[27] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[26] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[25] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[24] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[23] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[22] = hc_bytealign_S (    0, w[ 0], offset);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_bytealign_S (w[39], w[40], offset);\n      w[62] = hc_bytealign_S (w[38], w[39], offset);\n      w[61] = hc_bytealign_S (w[37], w[38], offset);\n      w[60] = hc_bytealign_S (w[36], w[37], offset);\n      w[59] = hc_bytealign_S (w[35], w[36], offset);\n      w[58] = hc_bytealign_S (w[34], w[35], offset);\n      w[57] = hc_bytealign_S (w[33], w[34], offset);\n      w[56] = hc_bytealign_S (w[32], w[33], offset);\n      w[55] = hc_bytealign_S (w[31], w[32], offset);\n      w[54] = hc_bytealign_S (w[30], w[31], offset);\n      w[53] = hc_bytealign_S (w[29], w[30], offset);\n      w[52] = hc_bytealign_S (w[28], w[29], offset);\n      w[51] = hc_bytealign_S (w[27], w[28], offset);\n      w[50] = hc_bytealign_S (w[26], w[27], offset);\n      w[49] = hc_bytealign_S (w[25], w[26], offset);\n      w[48] = hc_bytealign_S (w[24], w[25], offset);\n      w[47] = hc_bytealign_S (w[23], w[24], offset);\n      w[46] = hc_bytealign_S (w[22], w[23], offset);\n      w[45] = hc_bytealign_S (w[21], w[22], offset);\n      w[44] = hc_bytealign_S (w[20], w[21], offset);\n      w[43] = hc_bytealign_S (w[19], w[20], offset);\n      w[42] = hc_bytealign_S (w[18], w[19], offset);\n      w[41] = hc_bytealign_S (w[17], w[18], offset);\n      w[40] = hc_bytealign_S (w[16], w[17], offset);\n      w[39] = hc_bytealign_S (w[15], w[16], offset);\n      w[38] = hc_bytealign_S (w[14], w[15], offset);\n      w[37] = hc_bytealign_S (w[13], w[14], offset);\n      w[36] = hc_bytealign_S (w[12], w[13], offset);\n      w[35] = hc_bytealign_S (w[11], w[12], offset);\n      w[34] = hc_bytealign_S (w[10], w[11], offset);\n      w[33] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[32] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[31] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[30] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[29] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[28] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[27] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[26] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[25] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[24] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[23] = hc_bytealign_S (    0, w[ 0], offset);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_bytealign_S (w[38], w[39], offset);\n      w[62] = hc_bytealign_S (w[37], w[38], offset);\n      w[61] = hc_bytealign_S (w[36], w[37], offset);\n      w[60] = hc_bytealign_S (w[35], w[36], offset);\n      w[59] = hc_bytealign_S (w[34], w[35], offset);\n      w[58] = hc_bytealign_S (w[33], w[34], offset);\n      w[57] = hc_bytealign_S (w[32], w[33], offset);\n      w[56] = hc_bytealign_S (w[31], w[32], offset);\n      w[55] = hc_bytealign_S (w[30], w[31], offset);\n      w[54] = hc_bytealign_S (w[29], w[30], offset);\n      w[53] = hc_bytealign_S (w[28], w[29], offset);\n      w[52] = hc_bytealign_S (w[27], w[28], offset);\n      w[51] = hc_bytealign_S (w[26], w[27], offset);\n      w[50] = hc_bytealign_S (w[25], w[26], offset);\n      w[49] = hc_bytealign_S (w[24], w[25], offset);\n      w[48] = hc_bytealign_S (w[23], w[24], offset);\n      w[47] = hc_bytealign_S (w[22], w[23], offset);\n      w[46] = hc_bytealign_S (w[21], w[22], offset);\n      w[45] = hc_bytealign_S (w[20], w[21], offset);\n      w[44] = hc_bytealign_S (w[19], w[20], offset);\n      w[43] = hc_bytealign_S (w[18], w[19], offset);\n      w[42] = hc_bytealign_S (w[17], w[18], offset);\n      w[41] = hc_bytealign_S (w[16], w[17], offset);\n      w[40] = hc_bytealign_S (w[15], w[16], offset);\n      w[39] = hc_bytealign_S (w[14], w[15], offset);\n      w[38] = hc_bytealign_S (w[13], w[14], offset);\n      w[37] = hc_bytealign_S (w[12], w[13], offset);\n      w[36] = hc_bytealign_S (w[11], w[12], offset);\n      w[35] = hc_bytealign_S (w[10], w[11], offset);\n      w[34] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[33] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[32] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[31] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[30] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[29] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[28] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[27] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[26] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[25] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[24] = hc_bytealign_S (    0, w[ 0], offset);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_bytealign_S (w[37], w[38], offset);\n      w[62] = hc_bytealign_S (w[36], w[37], offset);\n      w[61] = hc_bytealign_S (w[35], w[36], offset);\n      w[60] = hc_bytealign_S (w[34], w[35], offset);\n      w[59] = hc_bytealign_S (w[33], w[34], offset);\n      w[58] = hc_bytealign_S (w[32], w[33], offset);\n      w[57] = hc_bytealign_S (w[31], w[32], offset);\n      w[56] = hc_bytealign_S (w[30], w[31], offset);\n      w[55] = hc_bytealign_S (w[29], w[30], offset);\n      w[54] = hc_bytealign_S (w[28], w[29], offset);\n      w[53] = hc_bytealign_S (w[27], w[28], offset);\n      w[52] = hc_bytealign_S (w[26], w[27], offset);\n      w[51] = hc_bytealign_S (w[25], w[26], offset);\n      w[50] = hc_bytealign_S (w[24], w[25], offset);\n      w[49] = hc_bytealign_S (w[23], w[24], offset);\n      w[48] = hc_bytealign_S (w[22], w[23], offset);\n      w[47] = hc_bytealign_S (w[21], w[22], offset);\n      w[46] = hc_bytealign_S (w[20], w[21], offset);\n      w[45] = hc_bytealign_S (w[19], w[20], offset);\n      w[44] = hc_bytealign_S (w[18], w[19], offset);\n      w[43] = hc_bytealign_S (w[17], w[18], offset);\n      w[42] = hc_bytealign_S (w[16], w[17], offset);\n      w[41] = hc_bytealign_S (w[15], w[16], offset);\n      w[40] = hc_bytealign_S (w[14], w[15], offset);\n      w[39] = hc_bytealign_S (w[13], w[14], offset);\n      w[38] = hc_bytealign_S (w[12], w[13], offset);\n      w[37] = hc_bytealign_S (w[11], w[12], offset);\n      w[36] = hc_bytealign_S (w[10], w[11], offset);\n      w[35] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[34] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[33] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[32] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[31] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[30] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[29] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[28] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[27] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[26] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[25] = hc_bytealign_S (    0, w[ 0], offset);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_bytealign_S (w[36], w[37], offset);\n      w[62] = hc_bytealign_S (w[35], w[36], offset);\n      w[61] = hc_bytealign_S (w[34], w[35], offset);\n      w[60] = hc_bytealign_S (w[33], w[34], offset);\n      w[59] = hc_bytealign_S (w[32], w[33], offset);\n      w[58] = hc_bytealign_S (w[31], w[32], offset);\n      w[57] = hc_bytealign_S (w[30], w[31], offset);\n      w[56] = hc_bytealign_S (w[29], w[30], offset);\n      w[55] = hc_bytealign_S (w[28], w[29], offset);\n      w[54] = hc_bytealign_S (w[27], w[28], offset);\n      w[53] = hc_bytealign_S (w[26], w[27], offset);\n      w[52] = hc_bytealign_S (w[25], w[26], offset);\n      w[51] = hc_bytealign_S (w[24], w[25], offset);\n      w[50] = hc_bytealign_S (w[23], w[24], offset);\n      w[49] = hc_bytealign_S (w[22], w[23], offset);\n      w[48] = hc_bytealign_S (w[21], w[22], offset);\n      w[47] = hc_bytealign_S (w[20], w[21], offset);\n      w[46] = hc_bytealign_S (w[19], w[20], offset);\n      w[45] = hc_bytealign_S (w[18], w[19], offset);\n      w[44] = hc_bytealign_S (w[17], w[18], offset);\n      w[43] = hc_bytealign_S (w[16], w[17], offset);\n      w[42] = hc_bytealign_S (w[15], w[16], offset);\n      w[41] = hc_bytealign_S (w[14], w[15], offset);\n      w[40] = hc_bytealign_S (w[13], w[14], offset);\n      w[39] = hc_bytealign_S (w[12], w[13], offset);\n      w[38] = hc_bytealign_S (w[11], w[12], offset);\n      w[37] = hc_bytealign_S (w[10], w[11], offset);\n      w[36] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[35] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[34] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[33] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[32] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[31] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[30] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[29] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[28] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[27] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[26] = hc_bytealign_S (    0, w[ 0], offset);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_bytealign_S (w[35], w[36], offset);\n      w[62] = hc_bytealign_S (w[34], w[35], offset);\n      w[61] = hc_bytealign_S (w[33], w[34], offset);\n      w[60] = hc_bytealign_S (w[32], w[33], offset);\n      w[59] = hc_bytealign_S (w[31], w[32], offset);\n      w[58] = hc_bytealign_S (w[30], w[31], offset);\n      w[57] = hc_bytealign_S (w[29], w[30], offset);\n      w[56] = hc_bytealign_S (w[28], w[29], offset);\n      w[55] = hc_bytealign_S (w[27], w[28], offset);\n      w[54] = hc_bytealign_S (w[26], w[27], offset);\n      w[53] = hc_bytealign_S (w[25], w[26], offset);\n      w[52] = hc_bytealign_S (w[24], w[25], offset);\n      w[51] = hc_bytealign_S (w[23], w[24], offset);\n      w[50] = hc_bytealign_S (w[22], w[23], offset);\n      w[49] = hc_bytealign_S (w[21], w[22], offset);\n      w[48] = hc_bytealign_S (w[20], w[21], offset);\n      w[47] = hc_bytealign_S (w[19], w[20], offset);\n      w[46] = hc_bytealign_S (w[18], w[19], offset);\n      w[45] = hc_bytealign_S (w[17], w[18], offset);\n      w[44] = hc_bytealign_S (w[16], w[17], offset);\n      w[43] = hc_bytealign_S (w[15], w[16], offset);\n      w[42] = hc_bytealign_S (w[14], w[15], offset);\n      w[41] = hc_bytealign_S (w[13], w[14], offset);\n      w[40] = hc_bytealign_S (w[12], w[13], offset);\n      w[39] = hc_bytealign_S (w[11], w[12], offset);\n      w[38] = hc_bytealign_S (w[10], w[11], offset);\n      w[37] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[36] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[35] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[34] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[33] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[32] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[31] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[30] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[29] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[28] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[27] = hc_bytealign_S (    0, w[ 0], offset);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_bytealign_S (w[34], w[35], offset);\n      w[62] = hc_bytealign_S (w[33], w[34], offset);\n      w[61] = hc_bytealign_S (w[32], w[33], offset);\n      w[60] = hc_bytealign_S (w[31], w[32], offset);\n      w[59] = hc_bytealign_S (w[30], w[31], offset);\n      w[58] = hc_bytealign_S (w[29], w[30], offset);\n      w[57] = hc_bytealign_S (w[28], w[29], offset);\n      w[56] = hc_bytealign_S (w[27], w[28], offset);\n      w[55] = hc_bytealign_S (w[26], w[27], offset);\n      w[54] = hc_bytealign_S (w[25], w[26], offset);\n      w[53] = hc_bytealign_S (w[24], w[25], offset);\n      w[52] = hc_bytealign_S (w[23], w[24], offset);\n      w[51] = hc_bytealign_S (w[22], w[23], offset);\n      w[50] = hc_bytealign_S (w[21], w[22], offset);\n      w[49] = hc_bytealign_S (w[20], w[21], offset);\n      w[48] = hc_bytealign_S (w[19], w[20], offset);\n      w[47] = hc_bytealign_S (w[18], w[19], offset);\n      w[46] = hc_bytealign_S (w[17], w[18], offset);\n      w[45] = hc_bytealign_S (w[16], w[17], offset);\n      w[44] = hc_bytealign_S (w[15], w[16], offset);\n      w[43] = hc_bytealign_S (w[14], w[15], offset);\n      w[42] = hc_bytealign_S (w[13], w[14], offset);\n      w[41] = hc_bytealign_S (w[12], w[13], offset);\n      w[40] = hc_bytealign_S (w[11], w[12], offset);\n      w[39] = hc_bytealign_S (w[10], w[11], offset);\n      w[38] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[37] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[36] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[35] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[34] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[33] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[32] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[31] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[30] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[29] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[28] = hc_bytealign_S (    0, w[ 0], offset);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_bytealign_S (w[33], w[34], offset);\n      w[62] = hc_bytealign_S (w[32], w[33], offset);\n      w[61] = hc_bytealign_S (w[31], w[32], offset);\n      w[60] = hc_bytealign_S (w[30], w[31], offset);\n      w[59] = hc_bytealign_S (w[29], w[30], offset);\n      w[58] = hc_bytealign_S (w[28], w[29], offset);\n      w[57] = hc_bytealign_S (w[27], w[28], offset);\n      w[56] = hc_bytealign_S (w[26], w[27], offset);\n      w[55] = hc_bytealign_S (w[25], w[26], offset);\n      w[54] = hc_bytealign_S (w[24], w[25], offset);\n      w[53] = hc_bytealign_S (w[23], w[24], offset);\n      w[52] = hc_bytealign_S (w[22], w[23], offset);\n      w[51] = hc_bytealign_S (w[21], w[22], offset);\n      w[50] = hc_bytealign_S (w[20], w[21], offset);\n      w[49] = hc_bytealign_S (w[19], w[20], offset);\n      w[48] = hc_bytealign_S (w[18], w[19], offset);\n      w[47] = hc_bytealign_S (w[17], w[18], offset);\n      w[46] = hc_bytealign_S (w[16], w[17], offset);\n      w[45] = hc_bytealign_S (w[15], w[16], offset);\n      w[44] = hc_bytealign_S (w[14], w[15], offset);\n      w[43] = hc_bytealign_S (w[13], w[14], offset);\n      w[42] = hc_bytealign_S (w[12], w[13], offset);\n      w[41] = hc_bytealign_S (w[11], w[12], offset);\n      w[40] = hc_bytealign_S (w[10], w[11], offset);\n      w[39] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[38] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[37] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[36] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[35] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[34] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[33] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[32] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[31] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[30] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[29] = hc_bytealign_S (    0, w[ 0], offset);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_bytealign_S (w[32], w[33], offset);\n      w[62] = hc_bytealign_S (w[31], w[32], offset);\n      w[61] = hc_bytealign_S (w[30], w[31], offset);\n      w[60] = hc_bytealign_S (w[29], w[30], offset);\n      w[59] = hc_bytealign_S (w[28], w[29], offset);\n      w[58] = hc_bytealign_S (w[27], w[28], offset);\n      w[57] = hc_bytealign_S (w[26], w[27], offset);\n      w[56] = hc_bytealign_S (w[25], w[26], offset);\n      w[55] = hc_bytealign_S (w[24], w[25], offset);\n      w[54] = hc_bytealign_S (w[23], w[24], offset);\n      w[53] = hc_bytealign_S (w[22], w[23], offset);\n      w[52] = hc_bytealign_S (w[21], w[22], offset);\n      w[51] = hc_bytealign_S (w[20], w[21], offset);\n      w[50] = hc_bytealign_S (w[19], w[20], offset);\n      w[49] = hc_bytealign_S (w[18], w[19], offset);\n      w[48] = hc_bytealign_S (w[17], w[18], offset);\n      w[47] = hc_bytealign_S (w[16], w[17], offset);\n      w[46] = hc_bytealign_S (w[15], w[16], offset);\n      w[45] = hc_bytealign_S (w[14], w[15], offset);\n      w[44] = hc_bytealign_S (w[13], w[14], offset);\n      w[43] = hc_bytealign_S (w[12], w[13], offset);\n      w[42] = hc_bytealign_S (w[11], w[12], offset);\n      w[41] = hc_bytealign_S (w[10], w[11], offset);\n      w[40] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[39] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[38] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[37] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[36] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[35] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[34] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[33] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[32] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[31] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[30] = hc_bytealign_S (    0, w[ 0], offset);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_bytealign_S (w[31], w[32], offset);\n      w[62] = hc_bytealign_S (w[30], w[31], offset);\n      w[61] = hc_bytealign_S (w[29], w[30], offset);\n      w[60] = hc_bytealign_S (w[28], w[29], offset);\n      w[59] = hc_bytealign_S (w[27], w[28], offset);\n      w[58] = hc_bytealign_S (w[26], w[27], offset);\n      w[57] = hc_bytealign_S (w[25], w[26], offset);\n      w[56] = hc_bytealign_S (w[24], w[25], offset);\n      w[55] = hc_bytealign_S (w[23], w[24], offset);\n      w[54] = hc_bytealign_S (w[22], w[23], offset);\n      w[53] = hc_bytealign_S (w[21], w[22], offset);\n      w[52] = hc_bytealign_S (w[20], w[21], offset);\n      w[51] = hc_bytealign_S (w[19], w[20], offset);\n      w[50] = hc_bytealign_S (w[18], w[19], offset);\n      w[49] = hc_bytealign_S (w[17], w[18], offset);\n      w[48] = hc_bytealign_S (w[16], w[17], offset);\n      w[47] = hc_bytealign_S (w[15], w[16], offset);\n      w[46] = hc_bytealign_S (w[14], w[15], offset);\n      w[45] = hc_bytealign_S (w[13], w[14], offset);\n      w[44] = hc_bytealign_S (w[12], w[13], offset);\n      w[43] = hc_bytealign_S (w[11], w[12], offset);\n      w[42] = hc_bytealign_S (w[10], w[11], offset);\n      w[41] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[40] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[39] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[38] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[37] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[36] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[35] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[34] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[33] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[32] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[31] = hc_bytealign_S (    0, w[ 0], offset);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_bytealign_S (w[30], w[31], offset);\n      w[62] = hc_bytealign_S (w[29], w[30], offset);\n      w[61] = hc_bytealign_S (w[28], w[29], offset);\n      w[60] = hc_bytealign_S (w[27], w[28], offset);\n      w[59] = hc_bytealign_S (w[26], w[27], offset);\n      w[58] = hc_bytealign_S (w[25], w[26], offset);\n      w[57] = hc_bytealign_S (w[24], w[25], offset);\n      w[56] = hc_bytealign_S (w[23], w[24], offset);\n      w[55] = hc_bytealign_S (w[22], w[23], offset);\n      w[54] = hc_bytealign_S (w[21], w[22], offset);\n      w[53] = hc_bytealign_S (w[20], w[21], offset);\n      w[52] = hc_bytealign_S (w[19], w[20], offset);\n      w[51] = hc_bytealign_S (w[18], w[19], offset);\n      w[50] = hc_bytealign_S (w[17], w[18], offset);\n      w[49] = hc_bytealign_S (w[16], w[17], offset);\n      w[48] = hc_bytealign_S (w[15], w[16], offset);\n      w[47] = hc_bytealign_S (w[14], w[15], offset);\n      w[46] = hc_bytealign_S (w[13], w[14], offset);\n      w[45] = hc_bytealign_S (w[12], w[13], offset);\n      w[44] = hc_bytealign_S (w[11], w[12], offset);\n      w[43] = hc_bytealign_S (w[10], w[11], offset);\n      w[42] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[41] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[40] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[39] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[38] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[37] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[36] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[35] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[34] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[33] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[32] = hc_bytealign_S (    0, w[ 0], offset);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_bytealign_S (w[29], w[30], offset);\n      w[62] = hc_bytealign_S (w[28], w[29], offset);\n      w[61] = hc_bytealign_S (w[27], w[28], offset);\n      w[60] = hc_bytealign_S (w[26], w[27], offset);\n      w[59] = hc_bytealign_S (w[25], w[26], offset);\n      w[58] = hc_bytealign_S (w[24], w[25], offset);\n      w[57] = hc_bytealign_S (w[23], w[24], offset);\n      w[56] = hc_bytealign_S (w[22], w[23], offset);\n      w[55] = hc_bytealign_S (w[21], w[22], offset);\n      w[54] = hc_bytealign_S (w[20], w[21], offset);\n      w[53] = hc_bytealign_S (w[19], w[20], offset);\n      w[52] = hc_bytealign_S (w[18], w[19], offset);\n      w[51] = hc_bytealign_S (w[17], w[18], offset);\n      w[50] = hc_bytealign_S (w[16], w[17], offset);\n      w[49] = hc_bytealign_S (w[15], w[16], offset);\n      w[48] = hc_bytealign_S (w[14], w[15], offset);\n      w[47] = hc_bytealign_S (w[13], w[14], offset);\n      w[46] = hc_bytealign_S (w[12], w[13], offset);\n      w[45] = hc_bytealign_S (w[11], w[12], offset);\n      w[44] = hc_bytealign_S (w[10], w[11], offset);\n      w[43] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[42] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[41] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[40] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[39] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[38] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[37] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[36] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[35] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[34] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[33] = hc_bytealign_S (    0, w[ 0], offset);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_bytealign_S (w[28], w[29], offset);\n      w[62] = hc_bytealign_S (w[27], w[28], offset);\n      w[61] = hc_bytealign_S (w[26], w[27], offset);\n      w[60] = hc_bytealign_S (w[25], w[26], offset);\n      w[59] = hc_bytealign_S (w[24], w[25], offset);\n      w[58] = hc_bytealign_S (w[23], w[24], offset);\n      w[57] = hc_bytealign_S (w[22], w[23], offset);\n      w[56] = hc_bytealign_S (w[21], w[22], offset);\n      w[55] = hc_bytealign_S (w[20], w[21], offset);\n      w[54] = hc_bytealign_S (w[19], w[20], offset);\n      w[53] = hc_bytealign_S (w[18], w[19], offset);\n      w[52] = hc_bytealign_S (w[17], w[18], offset);\n      w[51] = hc_bytealign_S (w[16], w[17], offset);\n      w[50] = hc_bytealign_S (w[15], w[16], offset);\n      w[49] = hc_bytealign_S (w[14], w[15], offset);\n      w[48] = hc_bytealign_S (w[13], w[14], offset);\n      w[47] = hc_bytealign_S (w[12], w[13], offset);\n      w[46] = hc_bytealign_S (w[11], w[12], offset);\n      w[45] = hc_bytealign_S (w[10], w[11], offset);\n      w[44] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[43] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[42] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[41] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[40] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[39] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[38] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[37] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[36] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[35] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[34] = hc_bytealign_S (    0, w[ 0], offset);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_bytealign_S (w[27], w[28], offset);\n      w[62] = hc_bytealign_S (w[26], w[27], offset);\n      w[61] = hc_bytealign_S (w[25], w[26], offset);\n      w[60] = hc_bytealign_S (w[24], w[25], offset);\n      w[59] = hc_bytealign_S (w[23], w[24], offset);\n      w[58] = hc_bytealign_S (w[22], w[23], offset);\n      w[57] = hc_bytealign_S (w[21], w[22], offset);\n      w[56] = hc_bytealign_S (w[20], w[21], offset);\n      w[55] = hc_bytealign_S (w[19], w[20], offset);\n      w[54] = hc_bytealign_S (w[18], w[19], offset);\n      w[53] = hc_bytealign_S (w[17], w[18], offset);\n      w[52] = hc_bytealign_S (w[16], w[17], offset);\n      w[51] = hc_bytealign_S (w[15], w[16], offset);\n      w[50] = hc_bytealign_S (w[14], w[15], offset);\n      w[49] = hc_bytealign_S (w[13], w[14], offset);\n      w[48] = hc_bytealign_S (w[12], w[13], offset);\n      w[47] = hc_bytealign_S (w[11], w[12], offset);\n      w[46] = hc_bytealign_S (w[10], w[11], offset);\n      w[45] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[44] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[43] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[42] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[41] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[40] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[39] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[38] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[37] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[36] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[35] = hc_bytealign_S (    0, w[ 0], offset);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_bytealign_S (w[26], w[27], offset);\n      w[62] = hc_bytealign_S (w[25], w[26], offset);\n      w[61] = hc_bytealign_S (w[24], w[25], offset);\n      w[60] = hc_bytealign_S (w[23], w[24], offset);\n      w[59] = hc_bytealign_S (w[22], w[23], offset);\n      w[58] = hc_bytealign_S (w[21], w[22], offset);\n      w[57] = hc_bytealign_S (w[20], w[21], offset);\n      w[56] = hc_bytealign_S (w[19], w[20], offset);\n      w[55] = hc_bytealign_S (w[18], w[19], offset);\n      w[54] = hc_bytealign_S (w[17], w[18], offset);\n      w[53] = hc_bytealign_S (w[16], w[17], offset);\n      w[52] = hc_bytealign_S (w[15], w[16], offset);\n      w[51] = hc_bytealign_S (w[14], w[15], offset);\n      w[50] = hc_bytealign_S (w[13], w[14], offset);\n      w[49] = hc_bytealign_S (w[12], w[13], offset);\n      w[48] = hc_bytealign_S (w[11], w[12], offset);\n      w[47] = hc_bytealign_S (w[10], w[11], offset);\n      w[46] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[45] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[44] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[43] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[42] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[41] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[40] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[39] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[38] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[37] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[36] = hc_bytealign_S (    0, w[ 0], offset);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_bytealign_S (w[25], w[26], offset);\n      w[62] = hc_bytealign_S (w[24], w[25], offset);\n      w[61] = hc_bytealign_S (w[23], w[24], offset);\n      w[60] = hc_bytealign_S (w[22], w[23], offset);\n      w[59] = hc_bytealign_S (w[21], w[22], offset);\n      w[58] = hc_bytealign_S (w[20], w[21], offset);\n      w[57] = hc_bytealign_S (w[19], w[20], offset);\n      w[56] = hc_bytealign_S (w[18], w[19], offset);\n      w[55] = hc_bytealign_S (w[17], w[18], offset);\n      w[54] = hc_bytealign_S (w[16], w[17], offset);\n      w[53] = hc_bytealign_S (w[15], w[16], offset);\n      w[52] = hc_bytealign_S (w[14], w[15], offset);\n      w[51] = hc_bytealign_S (w[13], w[14], offset);\n      w[50] = hc_bytealign_S (w[12], w[13], offset);\n      w[49] = hc_bytealign_S (w[11], w[12], offset);\n      w[48] = hc_bytealign_S (w[10], w[11], offset);\n      w[47] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[46] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[45] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[44] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[43] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[42] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[41] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[40] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[39] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[38] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[37] = hc_bytealign_S (    0, w[ 0], offset);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_bytealign_S (w[24], w[25], offset);\n      w[62] = hc_bytealign_S (w[23], w[24], offset);\n      w[61] = hc_bytealign_S (w[22], w[23], offset);\n      w[60] = hc_bytealign_S (w[21], w[22], offset);\n      w[59] = hc_bytealign_S (w[20], w[21], offset);\n      w[58] = hc_bytealign_S (w[19], w[20], offset);\n      w[57] = hc_bytealign_S (w[18], w[19], offset);\n      w[56] = hc_bytealign_S (w[17], w[18], offset);\n      w[55] = hc_bytealign_S (w[16], w[17], offset);\n      w[54] = hc_bytealign_S (w[15], w[16], offset);\n      w[53] = hc_bytealign_S (w[14], w[15], offset);\n      w[52] = hc_bytealign_S (w[13], w[14], offset);\n      w[51] = hc_bytealign_S (w[12], w[13], offset);\n      w[50] = hc_bytealign_S (w[11], w[12], offset);\n      w[49] = hc_bytealign_S (w[10], w[11], offset);\n      w[48] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[47] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[46] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[45] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[44] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[43] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[42] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[41] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[40] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[39] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[38] = hc_bytealign_S (    0, w[ 0], offset);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_bytealign_S (w[23], w[24], offset);\n      w[62] = hc_bytealign_S (w[22], w[23], offset);\n      w[61] = hc_bytealign_S (w[21], w[22], offset);\n      w[60] = hc_bytealign_S (w[20], w[21], offset);\n      w[59] = hc_bytealign_S (w[19], w[20], offset);\n      w[58] = hc_bytealign_S (w[18], w[19], offset);\n      w[57] = hc_bytealign_S (w[17], w[18], offset);\n      w[56] = hc_bytealign_S (w[16], w[17], offset);\n      w[55] = hc_bytealign_S (w[15], w[16], offset);\n      w[54] = hc_bytealign_S (w[14], w[15], offset);\n      w[53] = hc_bytealign_S (w[13], w[14], offset);\n      w[52] = hc_bytealign_S (w[12], w[13], offset);\n      w[51] = hc_bytealign_S (w[11], w[12], offset);\n      w[50] = hc_bytealign_S (w[10], w[11], offset);\n      w[49] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[48] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[47] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[46] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[45] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[44] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[43] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[42] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[41] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[40] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[39] = hc_bytealign_S (    0, w[ 0], offset);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_bytealign_S (w[22], w[23], offset);\n      w[62] = hc_bytealign_S (w[21], w[22], offset);\n      w[61] = hc_bytealign_S (w[20], w[21], offset);\n      w[60] = hc_bytealign_S (w[19], w[20], offset);\n      w[59] = hc_bytealign_S (w[18], w[19], offset);\n      w[58] = hc_bytealign_S (w[17], w[18], offset);\n      w[57] = hc_bytealign_S (w[16], w[17], offset);\n      w[56] = hc_bytealign_S (w[15], w[16], offset);\n      w[55] = hc_bytealign_S (w[14], w[15], offset);\n      w[54] = hc_bytealign_S (w[13], w[14], offset);\n      w[53] = hc_bytealign_S (w[12], w[13], offset);\n      w[52] = hc_bytealign_S (w[11], w[12], offset);\n      w[51] = hc_bytealign_S (w[10], w[11], offset);\n      w[50] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[49] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[48] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[47] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[46] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[45] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[44] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[43] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[42] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[41] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[40] = hc_bytealign_S (    0, w[ 0], offset);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_bytealign_S (w[21], w[22], offset);\n      w[62] = hc_bytealign_S (w[20], w[21], offset);\n      w[61] = hc_bytealign_S (w[19], w[20], offset);\n      w[60] = hc_bytealign_S (w[18], w[19], offset);\n      w[59] = hc_bytealign_S (w[17], w[18], offset);\n      w[58] = hc_bytealign_S (w[16], w[17], offset);\n      w[57] = hc_bytealign_S (w[15], w[16], offset);\n      w[56] = hc_bytealign_S (w[14], w[15], offset);\n      w[55] = hc_bytealign_S (w[13], w[14], offset);\n      w[54] = hc_bytealign_S (w[12], w[13], offset);\n      w[53] = hc_bytealign_S (w[11], w[12], offset);\n      w[52] = hc_bytealign_S (w[10], w[11], offset);\n      w[51] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[50] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[49] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[48] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[47] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[46] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[45] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[44] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[43] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[42] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[41] = hc_bytealign_S (    0, w[ 0], offset);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_bytealign_S (w[20], w[21], offset);\n      w[62] = hc_bytealign_S (w[19], w[20], offset);\n      w[61] = hc_bytealign_S (w[18], w[19], offset);\n      w[60] = hc_bytealign_S (w[17], w[18], offset);\n      w[59] = hc_bytealign_S (w[16], w[17], offset);\n      w[58] = hc_bytealign_S (w[15], w[16], offset);\n      w[57] = hc_bytealign_S (w[14], w[15], offset);\n      w[56] = hc_bytealign_S (w[13], w[14], offset);\n      w[55] = hc_bytealign_S (w[12], w[13], offset);\n      w[54] = hc_bytealign_S (w[11], w[12], offset);\n      w[53] = hc_bytealign_S (w[10], w[11], offset);\n      w[52] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[51] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[50] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[49] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[48] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[47] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[46] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[45] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[44] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[43] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[42] = hc_bytealign_S (    0, w[ 0], offset);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_bytealign_S (w[19], w[20], offset);\n      w[62] = hc_bytealign_S (w[18], w[19], offset);\n      w[61] = hc_bytealign_S (w[17], w[18], offset);\n      w[60] = hc_bytealign_S (w[16], w[17], offset);\n      w[59] = hc_bytealign_S (w[15], w[16], offset);\n      w[58] = hc_bytealign_S (w[14], w[15], offset);\n      w[57] = hc_bytealign_S (w[13], w[14], offset);\n      w[56] = hc_bytealign_S (w[12], w[13], offset);\n      w[55] = hc_bytealign_S (w[11], w[12], offset);\n      w[54] = hc_bytealign_S (w[10], w[11], offset);\n      w[53] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[52] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[51] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[50] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[49] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[48] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[47] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[46] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[45] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[44] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[43] = hc_bytealign_S (    0, w[ 0], offset);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_bytealign_S (w[18], w[19], offset);\n      w[62] = hc_bytealign_S (w[17], w[18], offset);\n      w[61] = hc_bytealign_S (w[16], w[17], offset);\n      w[60] = hc_bytealign_S (w[15], w[16], offset);\n      w[59] = hc_bytealign_S (w[14], w[15], offset);\n      w[58] = hc_bytealign_S (w[13], w[14], offset);\n      w[57] = hc_bytealign_S (w[12], w[13], offset);\n      w[56] = hc_bytealign_S (w[11], w[12], offset);\n      w[55] = hc_bytealign_S (w[10], w[11], offset);\n      w[54] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[53] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[52] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[51] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[50] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[49] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[48] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[47] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[46] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[45] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[44] = hc_bytealign_S (    0, w[ 0], offset);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_bytealign_S (w[17], w[18], offset);\n      w[62] = hc_bytealign_S (w[16], w[17], offset);\n      w[61] = hc_bytealign_S (w[15], w[16], offset);\n      w[60] = hc_bytealign_S (w[14], w[15], offset);\n      w[59] = hc_bytealign_S (w[13], w[14], offset);\n      w[58] = hc_bytealign_S (w[12], w[13], offset);\n      w[57] = hc_bytealign_S (w[11], w[12], offset);\n      w[56] = hc_bytealign_S (w[10], w[11], offset);\n      w[55] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[54] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[53] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[52] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[51] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[50] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[49] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[48] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[47] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[46] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[45] = hc_bytealign_S (    0, w[ 0], offset);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_bytealign_S (w[16], w[17], offset);\n      w[62] = hc_bytealign_S (w[15], w[16], offset);\n      w[61] = hc_bytealign_S (w[14], w[15], offset);\n      w[60] = hc_bytealign_S (w[13], w[14], offset);\n      w[59] = hc_bytealign_S (w[12], w[13], offset);\n      w[58] = hc_bytealign_S (w[11], w[12], offset);\n      w[57] = hc_bytealign_S (w[10], w[11], offset);\n      w[56] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[55] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[54] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[53] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[52] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[51] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[50] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[49] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[48] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[47] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[46] = hc_bytealign_S (    0, w[ 0], offset);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_bytealign_S (w[15], w[16], offset);\n      w[62] = hc_bytealign_S (w[14], w[15], offset);\n      w[61] = hc_bytealign_S (w[13], w[14], offset);\n      w[60] = hc_bytealign_S (w[12], w[13], offset);\n      w[59] = hc_bytealign_S (w[11], w[12], offset);\n      w[58] = hc_bytealign_S (w[10], w[11], offset);\n      w[57] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[56] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[55] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[54] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[53] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[52] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[51] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[50] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[49] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[48] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[47] = hc_bytealign_S (    0, w[ 0], offset);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_bytealign_S (w[14], w[15], offset);\n      w[62] = hc_bytealign_S (w[13], w[14], offset);\n      w[61] = hc_bytealign_S (w[12], w[13], offset);\n      w[60] = hc_bytealign_S (w[11], w[12], offset);\n      w[59] = hc_bytealign_S (w[10], w[11], offset);\n      w[58] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[57] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[56] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[55] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[54] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[53] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[52] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[51] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[50] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[49] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[48] = hc_bytealign_S (    0, w[ 0], offset);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_bytealign_S (w[13], w[14], offset);\n      w[62] = hc_bytealign_S (w[12], w[13], offset);\n      w[61] = hc_bytealign_S (w[11], w[12], offset);\n      w[60] = hc_bytealign_S (w[10], w[11], offset);\n      w[59] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[58] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[57] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[56] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[55] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[54] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[53] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[52] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[51] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[50] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[49] = hc_bytealign_S (    0, w[ 0], offset);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_bytealign_S (w[12], w[13], offset);\n      w[62] = hc_bytealign_S (w[11], w[12], offset);\n      w[61] = hc_bytealign_S (w[10], w[11], offset);\n      w[60] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[59] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[58] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[57] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[56] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[55] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[54] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[53] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[52] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[51] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[50] = hc_bytealign_S (    0, w[ 0], offset);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_bytealign_S (w[11], w[12], offset);\n      w[62] = hc_bytealign_S (w[10], w[11], offset);\n      w[61] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[60] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[59] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[58] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[57] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[56] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[55] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[54] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[53] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[52] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[51] = hc_bytealign_S (    0, w[ 0], offset);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_bytealign_S (w[10], w[11], offset);\n      w[62] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[61] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[60] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[59] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[58] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[57] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[56] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[55] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[54] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[53] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[52] = hc_bytealign_S (    0, w[ 0], offset);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_bytealign_S (w[ 9], w[10], offset);\n      w[62] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[61] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[60] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[59] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[58] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[57] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[56] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[55] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[54] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[53] = hc_bytealign_S (    0, w[ 0], offset);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_bytealign_S (w[ 8], w[ 9], offset);\n      w[62] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[61] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[60] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[59] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[58] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[57] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[56] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[55] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[54] = hc_bytealign_S (    0, w[ 0], offset);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_bytealign_S (w[ 7], w[ 8], offset);\n      w[62] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[61] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[60] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[59] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[58] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[57] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[56] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[55] = hc_bytealign_S (    0, w[ 0], offset);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_bytealign_S (w[ 6], w[ 7], offset);\n      w[62] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[61] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[60] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[59] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[58] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[57] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[56] = hc_bytealign_S (    0, w[ 0], offset);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_bytealign_S (w[ 5], w[ 6], offset);\n      w[62] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[61] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[60] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[59] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[58] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[57] = hc_bytealign_S (    0, w[ 0], offset);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_bytealign_S (w[ 4], w[ 5], offset);\n      w[62] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[61] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[60] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[59] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[58] = hc_bytealign_S (    0, w[ 0], offset);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_bytealign_S (w[ 3], w[ 4], offset);\n      w[62] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[61] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[60] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[59] = hc_bytealign_S (    0, w[ 0], offset);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_bytealign_S (w[ 2], w[ 3], offset);\n      w[62] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[61] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[60] = hc_bytealign_S (    0, w[ 0], offset);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_bytealign_S (w[ 1], w[ 2], offset);\n      w[62] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[61] = hc_bytealign_S (    0, w[ 0], offset);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_bytealign_S (w[ 0], w[ 1], offset);\n      w[62] = hc_bytealign_S (    0, w[ 0], offset);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_bytealign_S (    0, w[ 0], offset);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  const int offset_mod_4 = offset & 3;\n\n  const int offset_minus_4 = 4 - offset_mod_4;\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> (offset_minus_4 * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> (offset_minus_4 * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_byte_perm_S (w[62], w[63], selector);\n      w[62] = hc_byte_perm_S (w[61], w[62], selector);\n      w[61] = hc_byte_perm_S (w[60], w[61], selector);\n      w[60] = hc_byte_perm_S (w[59], w[60], selector);\n      w[59] = hc_byte_perm_S (w[58], w[59], selector);\n      w[58] = hc_byte_perm_S (w[57], w[58], selector);\n      w[57] = hc_byte_perm_S (w[56], w[57], selector);\n      w[56] = hc_byte_perm_S (w[55], w[56], selector);\n      w[55] = hc_byte_perm_S (w[54], w[55], selector);\n      w[54] = hc_byte_perm_S (w[53], w[54], selector);\n      w[53] = hc_byte_perm_S (w[52], w[53], selector);\n      w[52] = hc_byte_perm_S (w[51], w[52], selector);\n      w[51] = hc_byte_perm_S (w[50], w[51], selector);\n      w[50] = hc_byte_perm_S (w[49], w[50], selector);\n      w[49] = hc_byte_perm_S (w[48], w[49], selector);\n      w[48] = hc_byte_perm_S (w[47], w[48], selector);\n      w[47] = hc_byte_perm_S (w[46], w[47], selector);\n      w[46] = hc_byte_perm_S (w[45], w[46], selector);\n      w[45] = hc_byte_perm_S (w[44], w[45], selector);\n      w[44] = hc_byte_perm_S (w[43], w[44], selector);\n      w[43] = hc_byte_perm_S (w[42], w[43], selector);\n      w[42] = hc_byte_perm_S (w[41], w[42], selector);\n      w[41] = hc_byte_perm_S (w[40], w[41], selector);\n      w[40] = hc_byte_perm_S (w[39], w[40], selector);\n      w[39] = hc_byte_perm_S (w[38], w[39], selector);\n      w[38] = hc_byte_perm_S (w[37], w[38], selector);\n      w[37] = hc_byte_perm_S (w[36], w[37], selector);\n      w[36] = hc_byte_perm_S (w[35], w[36], selector);\n      w[35] = hc_byte_perm_S (w[34], w[35], selector);\n      w[34] = hc_byte_perm_S (w[33], w[34], selector);\n      w[33] = hc_byte_perm_S (w[32], w[33], selector);\n      w[32] = hc_byte_perm_S (w[31], w[32], selector);\n      w[31] = hc_byte_perm_S (w[30], w[31], selector);\n      w[30] = hc_byte_perm_S (w[29], w[30], selector);\n      w[29] = hc_byte_perm_S (w[28], w[29], selector);\n      w[28] = hc_byte_perm_S (w[27], w[28], selector);\n      w[27] = hc_byte_perm_S (w[26], w[27], selector);\n      w[26] = hc_byte_perm_S (w[25], w[26], selector);\n      w[25] = hc_byte_perm_S (w[24], w[25], selector);\n      w[24] = hc_byte_perm_S (w[23], w[24], selector);\n      w[23] = hc_byte_perm_S (w[22], w[23], selector);\n      w[22] = hc_byte_perm_S (w[21], w[22], selector);\n      w[21] = hc_byte_perm_S (w[20], w[21], selector);\n      w[20] = hc_byte_perm_S (w[19], w[20], selector);\n      w[19] = hc_byte_perm_S (w[18], w[19], selector);\n      w[18] = hc_byte_perm_S (w[17], w[18], selector);\n      w[17] = hc_byte_perm_S (w[16], w[17], selector);\n      w[16] = hc_byte_perm_S (w[15], w[16], selector);\n      w[15] = hc_byte_perm_S (w[14], w[15], selector);\n      w[14] = hc_byte_perm_S (w[13], w[14], selector);\n      w[13] = hc_byte_perm_S (w[12], w[13], selector);\n      w[12] = hc_byte_perm_S (w[11], w[12], selector);\n      w[11] = hc_byte_perm_S (w[10], w[11], selector);\n      w[10] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[ 9] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[ 8] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[ 7] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[ 6] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[ 5] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[ 4] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 3] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 2] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 1] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 0] = hc_byte_perm_S (    0, w[ 0], selector);\n\n      break;\n\n    case  1:\n      w[63] = hc_byte_perm_S (w[61], w[62], selector);\n      w[62] = hc_byte_perm_S (w[60], w[61], selector);\n      w[61] = hc_byte_perm_S (w[59], w[60], selector);\n      w[60] = hc_byte_perm_S (w[58], w[59], selector);\n      w[59] = hc_byte_perm_S (w[57], w[58], selector);\n      w[58] = hc_byte_perm_S (w[56], w[57], selector);\n      w[57] = hc_byte_perm_S (w[55], w[56], selector);\n      w[56] = hc_byte_perm_S (w[54], w[55], selector);\n      w[55] = hc_byte_perm_S (w[53], w[54], selector);\n      w[54] = hc_byte_perm_S (w[52], w[53], selector);\n      w[53] = hc_byte_perm_S (w[51], w[52], selector);\n      w[52] = hc_byte_perm_S (w[50], w[51], selector);\n      w[51] = hc_byte_perm_S (w[49], w[50], selector);\n      w[50] = hc_byte_perm_S (w[48], w[49], selector);\n      w[49] = hc_byte_perm_S (w[47], w[48], selector);\n      w[48] = hc_byte_perm_S (w[46], w[47], selector);\n      w[47] = hc_byte_perm_S (w[45], w[46], selector);\n      w[46] = hc_byte_perm_S (w[44], w[45], selector);\n      w[45] = hc_byte_perm_S (w[43], w[44], selector);\n      w[44] = hc_byte_perm_S (w[42], w[43], selector);\n      w[43] = hc_byte_perm_S (w[41], w[42], selector);\n      w[42] = hc_byte_perm_S (w[40], w[41], selector);\n      w[41] = hc_byte_perm_S (w[39], w[40], selector);\n      w[40] = hc_byte_perm_S (w[38], w[39], selector);\n      w[39] = hc_byte_perm_S (w[37], w[38], selector);\n      w[38] = hc_byte_perm_S (w[36], w[37], selector);\n      w[37] = hc_byte_perm_S (w[35], w[36], selector);\n      w[36] = hc_byte_perm_S (w[34], w[35], selector);\n      w[35] = hc_byte_perm_S (w[33], w[34], selector);\n      w[34] = hc_byte_perm_S (w[32], w[33], selector);\n      w[33] = hc_byte_perm_S (w[31], w[32], selector);\n      w[32] = hc_byte_perm_S (w[30], w[31], selector);\n      w[31] = hc_byte_perm_S (w[29], w[30], selector);\n      w[30] = hc_byte_perm_S (w[28], w[29], selector);\n      w[29] = hc_byte_perm_S (w[27], w[28], selector);\n      w[28] = hc_byte_perm_S (w[26], w[27], selector);\n      w[27] = hc_byte_perm_S (w[25], w[26], selector);\n      w[26] = hc_byte_perm_S (w[24], w[25], selector);\n      w[25] = hc_byte_perm_S (w[23], w[24], selector);\n      w[24] = hc_byte_perm_S (w[22], w[23], selector);\n      w[23] = hc_byte_perm_S (w[21], w[22], selector);\n      w[22] = hc_byte_perm_S (w[20], w[21], selector);\n      w[21] = hc_byte_perm_S (w[19], w[20], selector);\n      w[20] = hc_byte_perm_S (w[18], w[19], selector);\n      w[19] = hc_byte_perm_S (w[17], w[18], selector);\n      w[18] = hc_byte_perm_S (w[16], w[17], selector);\n      w[17] = hc_byte_perm_S (w[15], w[16], selector);\n      w[16] = hc_byte_perm_S (w[14], w[15], selector);\n      w[15] = hc_byte_perm_S (w[13], w[14], selector);\n      w[14] = hc_byte_perm_S (w[12], w[13], selector);\n      w[13] = hc_byte_perm_S (w[11], w[12], selector);\n      w[12] = hc_byte_perm_S (w[10], w[11], selector);\n      w[11] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[10] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[ 9] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[ 8] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[ 7] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[ 6] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[ 5] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 4] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 3] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 2] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 1] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_byte_perm_S (w[60], w[61], selector);\n      w[62] = hc_byte_perm_S (w[59], w[60], selector);\n      w[61] = hc_byte_perm_S (w[58], w[59], selector);\n      w[60] = hc_byte_perm_S (w[57], w[58], selector);\n      w[59] = hc_byte_perm_S (w[56], w[57], selector);\n      w[58] = hc_byte_perm_S (w[55], w[56], selector);\n      w[57] = hc_byte_perm_S (w[54], w[55], selector);\n      w[56] = hc_byte_perm_S (w[53], w[54], selector);\n      w[55] = hc_byte_perm_S (w[52], w[53], selector);\n      w[54] = hc_byte_perm_S (w[51], w[52], selector);\n      w[53] = hc_byte_perm_S (w[50], w[51], selector);\n      w[52] = hc_byte_perm_S (w[49], w[50], selector);\n      w[51] = hc_byte_perm_S (w[48], w[49], selector);\n      w[50] = hc_byte_perm_S (w[47], w[48], selector);\n      w[49] = hc_byte_perm_S (w[46], w[47], selector);\n      w[48] = hc_byte_perm_S (w[45], w[46], selector);\n      w[47] = hc_byte_perm_S (w[44], w[45], selector);\n      w[46] = hc_byte_perm_S (w[43], w[44], selector);\n      w[45] = hc_byte_perm_S (w[42], w[43], selector);\n      w[44] = hc_byte_perm_S (w[41], w[42], selector);\n      w[43] = hc_byte_perm_S (w[40], w[41], selector);\n      w[42] = hc_byte_perm_S (w[39], w[40], selector);\n      w[41] = hc_byte_perm_S (w[38], w[39], selector);\n      w[40] = hc_byte_perm_S (w[37], w[38], selector);\n      w[39] = hc_byte_perm_S (w[36], w[37], selector);\n      w[38] = hc_byte_perm_S (w[35], w[36], selector);\n      w[37] = hc_byte_perm_S (w[34], w[35], selector);\n      w[36] = hc_byte_perm_S (w[33], w[34], selector);\n      w[35] = hc_byte_perm_S (w[32], w[33], selector);\n      w[34] = hc_byte_perm_S (w[31], w[32], selector);\n      w[33] = hc_byte_perm_S (w[30], w[31], selector);\n      w[32] = hc_byte_perm_S (w[29], w[30], selector);\n      w[31] = hc_byte_perm_S (w[28], w[29], selector);\n      w[30] = hc_byte_perm_S (w[27], w[28], selector);\n      w[29] = hc_byte_perm_S (w[26], w[27], selector);\n      w[28] = hc_byte_perm_S (w[25], w[26], selector);\n      w[27] = hc_byte_perm_S (w[24], w[25], selector);\n      w[26] = hc_byte_perm_S (w[23], w[24], selector);\n      w[25] = hc_byte_perm_S (w[22], w[23], selector);\n      w[24] = hc_byte_perm_S (w[21], w[22], selector);\n      w[23] = hc_byte_perm_S (w[20], w[21], selector);\n      w[22] = hc_byte_perm_S (w[19], w[20], selector);\n      w[21] = hc_byte_perm_S (w[18], w[19], selector);\n      w[20] = hc_byte_perm_S (w[17], w[18], selector);\n      w[19] = hc_byte_perm_S (w[16], w[17], selector);\n      w[18] = hc_byte_perm_S (w[15], w[16], selector);\n      w[17] = hc_byte_perm_S (w[14], w[15], selector);\n      w[16] = hc_byte_perm_S (w[13], w[14], selector);\n      w[15] = hc_byte_perm_S (w[12], w[13], selector);\n      w[14] = hc_byte_perm_S (w[11], w[12], selector);\n      w[13] = hc_byte_perm_S (w[10], w[11], selector);\n      w[12] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[11] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[10] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[ 9] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[ 8] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[ 7] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[ 6] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 5] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 4] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 3] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 2] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_byte_perm_S (w[59], w[60], selector);\n      w[62] = hc_byte_perm_S (w[58], w[59], selector);\n      w[61] = hc_byte_perm_S (w[57], w[58], selector);\n      w[60] = hc_byte_perm_S (w[56], w[57], selector);\n      w[59] = hc_byte_perm_S (w[55], w[56], selector);\n      w[58] = hc_byte_perm_S (w[54], w[55], selector);\n      w[57] = hc_byte_perm_S (w[53], w[54], selector);\n      w[56] = hc_byte_perm_S (w[52], w[53], selector);\n      w[55] = hc_byte_perm_S (w[51], w[52], selector);\n      w[54] = hc_byte_perm_S (w[50], w[51], selector);\n      w[53] = hc_byte_perm_S (w[49], w[50], selector);\n      w[52] = hc_byte_perm_S (w[48], w[49], selector);\n      w[51] = hc_byte_perm_S (w[47], w[48], selector);\n      w[50] = hc_byte_perm_S (w[46], w[47], selector);\n      w[49] = hc_byte_perm_S (w[45], w[46], selector);\n      w[48] = hc_byte_perm_S (w[44], w[45], selector);\n      w[47] = hc_byte_perm_S (w[43], w[44], selector);\n      w[46] = hc_byte_perm_S (w[42], w[43], selector);\n      w[45] = hc_byte_perm_S (w[41], w[42], selector);\n      w[44] = hc_byte_perm_S (w[40], w[41], selector);\n      w[43] = hc_byte_perm_S (w[39], w[40], selector);\n      w[42] = hc_byte_perm_S (w[38], w[39], selector);\n      w[41] = hc_byte_perm_S (w[37], w[38], selector);\n      w[40] = hc_byte_perm_S (w[36], w[37], selector);\n      w[39] = hc_byte_perm_S (w[35], w[36], selector);\n      w[38] = hc_byte_perm_S (w[34], w[35], selector);\n      w[37] = hc_byte_perm_S (w[33], w[34], selector);\n      w[36] = hc_byte_perm_S (w[32], w[33], selector);\n      w[35] = hc_byte_perm_S (w[31], w[32], selector);\n      w[34] = hc_byte_perm_S (w[30], w[31], selector);\n      w[33] = hc_byte_perm_S (w[29], w[30], selector);\n      w[32] = hc_byte_perm_S (w[28], w[29], selector);\n      w[31] = hc_byte_perm_S (w[27], w[28], selector);\n      w[30] = hc_byte_perm_S (w[26], w[27], selector);\n      w[29] = hc_byte_perm_S (w[25], w[26], selector);\n      w[28] = hc_byte_perm_S (w[24], w[25], selector);\n      w[27] = hc_byte_perm_S (w[23], w[24], selector);\n      w[26] = hc_byte_perm_S (w[22], w[23], selector);\n      w[25] = hc_byte_perm_S (w[21], w[22], selector);\n      w[24] = hc_byte_perm_S (w[20], w[21], selector);\n      w[23] = hc_byte_perm_S (w[19], w[20], selector);\n      w[22] = hc_byte_perm_S (w[18], w[19], selector);\n      w[21] = hc_byte_perm_S (w[17], w[18], selector);\n      w[20] = hc_byte_perm_S (w[16], w[17], selector);\n      w[19] = hc_byte_perm_S (w[15], w[16], selector);\n      w[18] = hc_byte_perm_S (w[14], w[15], selector);\n      w[17] = hc_byte_perm_S (w[13], w[14], selector);\n      w[16] = hc_byte_perm_S (w[12], w[13], selector);\n      w[15] = hc_byte_perm_S (w[11], w[12], selector);\n      w[14] = hc_byte_perm_S (w[10], w[11], selector);\n      w[13] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[12] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[11] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[10] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[ 9] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[ 8] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[ 7] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 6] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 5] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 4] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 3] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_byte_perm_S (w[58], w[59], selector);\n      w[62] = hc_byte_perm_S (w[57], w[58], selector);\n      w[61] = hc_byte_perm_S (w[56], w[57], selector);\n      w[60] = hc_byte_perm_S (w[55], w[56], selector);\n      w[59] = hc_byte_perm_S (w[54], w[55], selector);\n      w[58] = hc_byte_perm_S (w[53], w[54], selector);\n      w[57] = hc_byte_perm_S (w[52], w[53], selector);\n      w[56] = hc_byte_perm_S (w[51], w[52], selector);\n      w[55] = hc_byte_perm_S (w[50], w[51], selector);\n      w[54] = hc_byte_perm_S (w[49], w[50], selector);\n      w[53] = hc_byte_perm_S (w[48], w[49], selector);\n      w[52] = hc_byte_perm_S (w[47], w[48], selector);\n      w[51] = hc_byte_perm_S (w[46], w[47], selector);\n      w[50] = hc_byte_perm_S (w[45], w[46], selector);\n      w[49] = hc_byte_perm_S (w[44], w[45], selector);\n      w[48] = hc_byte_perm_S (w[43], w[44], selector);\n      w[47] = hc_byte_perm_S (w[42], w[43], selector);\n      w[46] = hc_byte_perm_S (w[41], w[42], selector);\n      w[45] = hc_byte_perm_S (w[40], w[41], selector);\n      w[44] = hc_byte_perm_S (w[39], w[40], selector);\n      w[43] = hc_byte_perm_S (w[38], w[39], selector);\n      w[42] = hc_byte_perm_S (w[37], w[38], selector);\n      w[41] = hc_byte_perm_S (w[36], w[37], selector);\n      w[40] = hc_byte_perm_S (w[35], w[36], selector);\n      w[39] = hc_byte_perm_S (w[34], w[35], selector);\n      w[38] = hc_byte_perm_S (w[33], w[34], selector);\n      w[37] = hc_byte_perm_S (w[32], w[33], selector);\n      w[36] = hc_byte_perm_S (w[31], w[32], selector);\n      w[35] = hc_byte_perm_S (w[30], w[31], selector);\n      w[34] = hc_byte_perm_S (w[29], w[30], selector);\n      w[33] = hc_byte_perm_S (w[28], w[29], selector);\n      w[32] = hc_byte_perm_S (w[27], w[28], selector);\n      w[31] = hc_byte_perm_S (w[26], w[27], selector);\n      w[30] = hc_byte_perm_S (w[25], w[26], selector);\n      w[29] = hc_byte_perm_S (w[24], w[25], selector);\n      w[28] = hc_byte_perm_S (w[23], w[24], selector);\n      w[27] = hc_byte_perm_S (w[22], w[23], selector);\n      w[26] = hc_byte_perm_S (w[21], w[22], selector);\n      w[25] = hc_byte_perm_S (w[20], w[21], selector);\n      w[24] = hc_byte_perm_S (w[19], w[20], selector);\n      w[23] = hc_byte_perm_S (w[18], w[19], selector);\n      w[22] = hc_byte_perm_S (w[17], w[18], selector);\n      w[21] = hc_byte_perm_S (w[16], w[17], selector);\n      w[20] = hc_byte_perm_S (w[15], w[16], selector);\n      w[19] = hc_byte_perm_S (w[14], w[15], selector);\n      w[18] = hc_byte_perm_S (w[13], w[14], selector);\n      w[17] = hc_byte_perm_S (w[12], w[13], selector);\n      w[16] = hc_byte_perm_S (w[11], w[12], selector);\n      w[15] = hc_byte_perm_S (w[10], w[11], selector);\n      w[14] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[13] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[12] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[11] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[10] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[ 9] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[ 8] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 7] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 6] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 5] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 4] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_byte_perm_S (w[57], w[58], selector);\n      w[62] = hc_byte_perm_S (w[56], w[57], selector);\n      w[61] = hc_byte_perm_S (w[55], w[56], selector);\n      w[60] = hc_byte_perm_S (w[54], w[55], selector);\n      w[59] = hc_byte_perm_S (w[53], w[54], selector);\n      w[58] = hc_byte_perm_S (w[52], w[53], selector);\n      w[57] = hc_byte_perm_S (w[51], w[52], selector);\n      w[56] = hc_byte_perm_S (w[50], w[51], selector);\n      w[55] = hc_byte_perm_S (w[49], w[50], selector);\n      w[54] = hc_byte_perm_S (w[48], w[49], selector);\n      w[53] = hc_byte_perm_S (w[47], w[48], selector);\n      w[52] = hc_byte_perm_S (w[46], w[47], selector);\n      w[51] = hc_byte_perm_S (w[45], w[46], selector);\n      w[50] = hc_byte_perm_S (w[44], w[45], selector);\n      w[49] = hc_byte_perm_S (w[43], w[44], selector);\n      w[48] = hc_byte_perm_S (w[42], w[43], selector);\n      w[47] = hc_byte_perm_S (w[41], w[42], selector);\n      w[46] = hc_byte_perm_S (w[40], w[41], selector);\n      w[45] = hc_byte_perm_S (w[39], w[40], selector);\n      w[44] = hc_byte_perm_S (w[38], w[39], selector);\n      w[43] = hc_byte_perm_S (w[37], w[38], selector);\n      w[42] = hc_byte_perm_S (w[36], w[37], selector);\n      w[41] = hc_byte_perm_S (w[35], w[36], selector);\n      w[40] = hc_byte_perm_S (w[34], w[35], selector);\n      w[39] = hc_byte_perm_S (w[33], w[34], selector);\n      w[38] = hc_byte_perm_S (w[32], w[33], selector);\n      w[37] = hc_byte_perm_S (w[31], w[32], selector);\n      w[36] = hc_byte_perm_S (w[30], w[31], selector);\n      w[35] = hc_byte_perm_S (w[29], w[30], selector);\n      w[34] = hc_byte_perm_S (w[28], w[29], selector);\n      w[33] = hc_byte_perm_S (w[27], w[28], selector);\n      w[32] = hc_byte_perm_S (w[26], w[27], selector);\n      w[31] = hc_byte_perm_S (w[25], w[26], selector);\n      w[30] = hc_byte_perm_S (w[24], w[25], selector);\n      w[29] = hc_byte_perm_S (w[23], w[24], selector);\n      w[28] = hc_byte_perm_S (w[22], w[23], selector);\n      w[27] = hc_byte_perm_S (w[21], w[22], selector);\n      w[26] = hc_byte_perm_S (w[20], w[21], selector);\n      w[25] = hc_byte_perm_S (w[19], w[20], selector);\n      w[24] = hc_byte_perm_S (w[18], w[19], selector);\n      w[23] = hc_byte_perm_S (w[17], w[18], selector);\n      w[22] = hc_byte_perm_S (w[16], w[17], selector);\n      w[21] = hc_byte_perm_S (w[15], w[16], selector);\n      w[20] = hc_byte_perm_S (w[14], w[15], selector);\n      w[19] = hc_byte_perm_S (w[13], w[14], selector);\n      w[18] = hc_byte_perm_S (w[12], w[13], selector);\n      w[17] = hc_byte_perm_S (w[11], w[12], selector);\n      w[16] = hc_byte_perm_S (w[10], w[11], selector);\n      w[15] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[14] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[13] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[12] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[11] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[10] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[ 9] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 8] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 7] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 6] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 5] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_byte_perm_S (w[56], w[57], selector);\n      w[62] = hc_byte_perm_S (w[55], w[56], selector);\n      w[61] = hc_byte_perm_S (w[54], w[55], selector);\n      w[60] = hc_byte_perm_S (w[53], w[54], selector);\n      w[59] = hc_byte_perm_S (w[52], w[53], selector);\n      w[58] = hc_byte_perm_S (w[51], w[52], selector);\n      w[57] = hc_byte_perm_S (w[50], w[51], selector);\n      w[56] = hc_byte_perm_S (w[49], w[50], selector);\n      w[55] = hc_byte_perm_S (w[48], w[49], selector);\n      w[54] = hc_byte_perm_S (w[47], w[48], selector);\n      w[53] = hc_byte_perm_S (w[46], w[47], selector);\n      w[52] = hc_byte_perm_S (w[45], w[46], selector);\n      w[51] = hc_byte_perm_S (w[44], w[45], selector);\n      w[50] = hc_byte_perm_S (w[43], w[44], selector);\n      w[49] = hc_byte_perm_S (w[42], w[43], selector);\n      w[48] = hc_byte_perm_S (w[41], w[42], selector);\n      w[47] = hc_byte_perm_S (w[40], w[41], selector);\n      w[46] = hc_byte_perm_S (w[39], w[40], selector);\n      w[45] = hc_byte_perm_S (w[38], w[39], selector);\n      w[44] = hc_byte_perm_S (w[37], w[38], selector);\n      w[43] = hc_byte_perm_S (w[36], w[37], selector);\n      w[42] = hc_byte_perm_S (w[35], w[36], selector);\n      w[41] = hc_byte_perm_S (w[34], w[35], selector);\n      w[40] = hc_byte_perm_S (w[33], w[34], selector);\n      w[39] = hc_byte_perm_S (w[32], w[33], selector);\n      w[38] = hc_byte_perm_S (w[31], w[32], selector);\n      w[37] = hc_byte_perm_S (w[30], w[31], selector);\n      w[36] = hc_byte_perm_S (w[29], w[30], selector);\n      w[35] = hc_byte_perm_S (w[28], w[29], selector);\n      w[34] = hc_byte_perm_S (w[27], w[28], selector);\n      w[33] = hc_byte_perm_S (w[26], w[27], selector);\n      w[32] = hc_byte_perm_S (w[25], w[26], selector);\n      w[31] = hc_byte_perm_S (w[24], w[25], selector);\n      w[30] = hc_byte_perm_S (w[23], w[24], selector);\n      w[29] = hc_byte_perm_S (w[22], w[23], selector);\n      w[28] = hc_byte_perm_S (w[21], w[22], selector);\n      w[27] = hc_byte_perm_S (w[20], w[21], selector);\n      w[26] = hc_byte_perm_S (w[19], w[20], selector);\n      w[25] = hc_byte_perm_S (w[18], w[19], selector);\n      w[24] = hc_byte_perm_S (w[17], w[18], selector);\n      w[23] = hc_byte_perm_S (w[16], w[17], selector);\n      w[22] = hc_byte_perm_S (w[15], w[16], selector);\n      w[21] = hc_byte_perm_S (w[14], w[15], selector);\n      w[20] = hc_byte_perm_S (w[13], w[14], selector);\n      w[19] = hc_byte_perm_S (w[12], w[13], selector);\n      w[18] = hc_byte_perm_S (w[11], w[12], selector);\n      w[17] = hc_byte_perm_S (w[10], w[11], selector);\n      w[16] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[15] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[14] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[13] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[12] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[11] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[10] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[ 9] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 8] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 7] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 6] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_byte_perm_S (w[55], w[56], selector);\n      w[62] = hc_byte_perm_S (w[54], w[55], selector);\n      w[61] = hc_byte_perm_S (w[53], w[54], selector);\n      w[60] = hc_byte_perm_S (w[52], w[53], selector);\n      w[59] = hc_byte_perm_S (w[51], w[52], selector);\n      w[58] = hc_byte_perm_S (w[50], w[51], selector);\n      w[57] = hc_byte_perm_S (w[49], w[50], selector);\n      w[56] = hc_byte_perm_S (w[48], w[49], selector);\n      w[55] = hc_byte_perm_S (w[47], w[48], selector);\n      w[54] = hc_byte_perm_S (w[46], w[47], selector);\n      w[53] = hc_byte_perm_S (w[45], w[46], selector);\n      w[52] = hc_byte_perm_S (w[44], w[45], selector);\n      w[51] = hc_byte_perm_S (w[43], w[44], selector);\n      w[50] = hc_byte_perm_S (w[42], w[43], selector);\n      w[49] = hc_byte_perm_S (w[41], w[42], selector);\n      w[48] = hc_byte_perm_S (w[40], w[41], selector);\n      w[47] = hc_byte_perm_S (w[39], w[40], selector);\n      w[46] = hc_byte_perm_S (w[38], w[39], selector);\n      w[45] = hc_byte_perm_S (w[37], w[38], selector);\n      w[44] = hc_byte_perm_S (w[36], w[37], selector);\n      w[43] = hc_byte_perm_S (w[35], w[36], selector);\n      w[42] = hc_byte_perm_S (w[34], w[35], selector);\n      w[41] = hc_byte_perm_S (w[33], w[34], selector);\n      w[40] = hc_byte_perm_S (w[32], w[33], selector);\n      w[39] = hc_byte_perm_S (w[31], w[32], selector);\n      w[38] = hc_byte_perm_S (w[30], w[31], selector);\n      w[37] = hc_byte_perm_S (w[29], w[30], selector);\n      w[36] = hc_byte_perm_S (w[28], w[29], selector);\n      w[35] = hc_byte_perm_S (w[27], w[28], selector);\n      w[34] = hc_byte_perm_S (w[26], w[27], selector);\n      w[33] = hc_byte_perm_S (w[25], w[26], selector);\n      w[32] = hc_byte_perm_S (w[24], w[25], selector);\n      w[31] = hc_byte_perm_S (w[23], w[24], selector);\n      w[30] = hc_byte_perm_S (w[22], w[23], selector);\n      w[29] = hc_byte_perm_S (w[21], w[22], selector);\n      w[28] = hc_byte_perm_S (w[20], w[21], selector);\n      w[27] = hc_byte_perm_S (w[19], w[20], selector);\n      w[26] = hc_byte_perm_S (w[18], w[19], selector);\n      w[25] = hc_byte_perm_S (w[17], w[18], selector);\n      w[24] = hc_byte_perm_S (w[16], w[17], selector);\n      w[23] = hc_byte_perm_S (w[15], w[16], selector);\n      w[22] = hc_byte_perm_S (w[14], w[15], selector);\n      w[21] = hc_byte_perm_S (w[13], w[14], selector);\n      w[20] = hc_byte_perm_S (w[12], w[13], selector);\n      w[19] = hc_byte_perm_S (w[11], w[12], selector);\n      w[18] = hc_byte_perm_S (w[10], w[11], selector);\n      w[17] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[16] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[15] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[14] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[13] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[12] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[11] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[10] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[ 9] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 8] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 7] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_byte_perm_S (w[54], w[55], selector);\n      w[62] = hc_byte_perm_S (w[53], w[54], selector);\n      w[61] = hc_byte_perm_S (w[52], w[53], selector);\n      w[60] = hc_byte_perm_S (w[51], w[52], selector);\n      w[59] = hc_byte_perm_S (w[50], w[51], selector);\n      w[58] = hc_byte_perm_S (w[49], w[50], selector);\n      w[57] = hc_byte_perm_S (w[48], w[49], selector);\n      w[56] = hc_byte_perm_S (w[47], w[48], selector);\n      w[55] = hc_byte_perm_S (w[46], w[47], selector);\n      w[54] = hc_byte_perm_S (w[45], w[46], selector);\n      w[53] = hc_byte_perm_S (w[44], w[45], selector);\n      w[52] = hc_byte_perm_S (w[43], w[44], selector);\n      w[51] = hc_byte_perm_S (w[42], w[43], selector);\n      w[50] = hc_byte_perm_S (w[41], w[42], selector);\n      w[49] = hc_byte_perm_S (w[40], w[41], selector);\n      w[48] = hc_byte_perm_S (w[39], w[40], selector);\n      w[47] = hc_byte_perm_S (w[38], w[39], selector);\n      w[46] = hc_byte_perm_S (w[37], w[38], selector);\n      w[45] = hc_byte_perm_S (w[36], w[37], selector);\n      w[44] = hc_byte_perm_S (w[35], w[36], selector);\n      w[43] = hc_byte_perm_S (w[34], w[35], selector);\n      w[42] = hc_byte_perm_S (w[33], w[34], selector);\n      w[41] = hc_byte_perm_S (w[32], w[33], selector);\n      w[40] = hc_byte_perm_S (w[31], w[32], selector);\n      w[39] = hc_byte_perm_S (w[30], w[31], selector);\n      w[38] = hc_byte_perm_S (w[29], w[30], selector);\n      w[37] = hc_byte_perm_S (w[28], w[29], selector);\n      w[36] = hc_byte_perm_S (w[27], w[28], selector);\n      w[35] = hc_byte_perm_S (w[26], w[27], selector);\n      w[34] = hc_byte_perm_S (w[25], w[26], selector);\n      w[33] = hc_byte_perm_S (w[24], w[25], selector);\n      w[32] = hc_byte_perm_S (w[23], w[24], selector);\n      w[31] = hc_byte_perm_S (w[22], w[23], selector);\n      w[30] = hc_byte_perm_S (w[21], w[22], selector);\n      w[29] = hc_byte_perm_S (w[20], w[21], selector);\n      w[28] = hc_byte_perm_S (w[19], w[20], selector);\n      w[27] = hc_byte_perm_S (w[18], w[19], selector);\n      w[26] = hc_byte_perm_S (w[17], w[18], selector);\n      w[25] = hc_byte_perm_S (w[16], w[17], selector);\n      w[24] = hc_byte_perm_S (w[15], w[16], selector);\n      w[23] = hc_byte_perm_S (w[14], w[15], selector);\n      w[22] = hc_byte_perm_S (w[13], w[14], selector);\n      w[21] = hc_byte_perm_S (w[12], w[13], selector);\n      w[20] = hc_byte_perm_S (w[11], w[12], selector);\n      w[19] = hc_byte_perm_S (w[10], w[11], selector);\n      w[18] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[17] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[16] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[15] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[14] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[13] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[12] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[11] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[10] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[ 9] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 8] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_byte_perm_S (w[53], w[54], selector);\n      w[62] = hc_byte_perm_S (w[52], w[53], selector);\n      w[61] = hc_byte_perm_S (w[51], w[52], selector);\n      w[60] = hc_byte_perm_S (w[50], w[51], selector);\n      w[59] = hc_byte_perm_S (w[49], w[50], selector);\n      w[58] = hc_byte_perm_S (w[48], w[49], selector);\n      w[57] = hc_byte_perm_S (w[47], w[48], selector);\n      w[56] = hc_byte_perm_S (w[46], w[47], selector);\n      w[55] = hc_byte_perm_S (w[45], w[46], selector);\n      w[54] = hc_byte_perm_S (w[44], w[45], selector);\n      w[53] = hc_byte_perm_S (w[43], w[44], selector);\n      w[52] = hc_byte_perm_S (w[42], w[43], selector);\n      w[51] = hc_byte_perm_S (w[41], w[42], selector);\n      w[50] = hc_byte_perm_S (w[40], w[41], selector);\n      w[49] = hc_byte_perm_S (w[39], w[40], selector);\n      w[48] = hc_byte_perm_S (w[38], w[39], selector);\n      w[47] = hc_byte_perm_S (w[37], w[38], selector);\n      w[46] = hc_byte_perm_S (w[36], w[37], selector);\n      w[45] = hc_byte_perm_S (w[35], w[36], selector);\n      w[44] = hc_byte_perm_S (w[34], w[35], selector);\n      w[43] = hc_byte_perm_S (w[33], w[34], selector);\n      w[42] = hc_byte_perm_S (w[32], w[33], selector);\n      w[41] = hc_byte_perm_S (w[31], w[32], selector);\n      w[40] = hc_byte_perm_S (w[30], w[31], selector);\n      w[39] = hc_byte_perm_S (w[29], w[30], selector);\n      w[38] = hc_byte_perm_S (w[28], w[29], selector);\n      w[37] = hc_byte_perm_S (w[27], w[28], selector);\n      w[36] = hc_byte_perm_S (w[26], w[27], selector);\n      w[35] = hc_byte_perm_S (w[25], w[26], selector);\n      w[34] = hc_byte_perm_S (w[24], w[25], selector);\n      w[33] = hc_byte_perm_S (w[23], w[24], selector);\n      w[32] = hc_byte_perm_S (w[22], w[23], selector);\n      w[31] = hc_byte_perm_S (w[21], w[22], selector);\n      w[30] = hc_byte_perm_S (w[20], w[21], selector);\n      w[29] = hc_byte_perm_S (w[19], w[20], selector);\n      w[28] = hc_byte_perm_S (w[18], w[19], selector);\n      w[27] = hc_byte_perm_S (w[17], w[18], selector);\n      w[26] = hc_byte_perm_S (w[16], w[17], selector);\n      w[25] = hc_byte_perm_S (w[15], w[16], selector);\n      w[24] = hc_byte_perm_S (w[14], w[15], selector);\n      w[23] = hc_byte_perm_S (w[13], w[14], selector);\n      w[22] = hc_byte_perm_S (w[12], w[13], selector);\n      w[21] = hc_byte_perm_S (w[11], w[12], selector);\n      w[20] = hc_byte_perm_S (w[10], w[11], selector);\n      w[19] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[18] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[17] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[16] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[15] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[14] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[13] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[12] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[11] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[10] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[ 9] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_byte_perm_S (w[52], w[53], selector);\n      w[62] = hc_byte_perm_S (w[51], w[52], selector);\n      w[61] = hc_byte_perm_S (w[50], w[51], selector);\n      w[60] = hc_byte_perm_S (w[49], w[50], selector);\n      w[59] = hc_byte_perm_S (w[48], w[49], selector);\n      w[58] = hc_byte_perm_S (w[47], w[48], selector);\n      w[57] = hc_byte_perm_S (w[46], w[47], selector);\n      w[56] = hc_byte_perm_S (w[45], w[46], selector);\n      w[55] = hc_byte_perm_S (w[44], w[45], selector);\n      w[54] = hc_byte_perm_S (w[43], w[44], selector);\n      w[53] = hc_byte_perm_S (w[42], w[43], selector);\n      w[52] = hc_byte_perm_S (w[41], w[42], selector);\n      w[51] = hc_byte_perm_S (w[40], w[41], selector);\n      w[50] = hc_byte_perm_S (w[39], w[40], selector);\n      w[49] = hc_byte_perm_S (w[38], w[39], selector);\n      w[48] = hc_byte_perm_S (w[37], w[38], selector);\n      w[47] = hc_byte_perm_S (w[36], w[37], selector);\n      w[46] = hc_byte_perm_S (w[35], w[36], selector);\n      w[45] = hc_byte_perm_S (w[34], w[35], selector);\n      w[44] = hc_byte_perm_S (w[33], w[34], selector);\n      w[43] = hc_byte_perm_S (w[32], w[33], selector);\n      w[42] = hc_byte_perm_S (w[31], w[32], selector);\n      w[41] = hc_byte_perm_S (w[30], w[31], selector);\n      w[40] = hc_byte_perm_S (w[29], w[30], selector);\n      w[39] = hc_byte_perm_S (w[28], w[29], selector);\n      w[38] = hc_byte_perm_S (w[27], w[28], selector);\n      w[37] = hc_byte_perm_S (w[26], w[27], selector);\n      w[36] = hc_byte_perm_S (w[25], w[26], selector);\n      w[35] = hc_byte_perm_S (w[24], w[25], selector);\n      w[34] = hc_byte_perm_S (w[23], w[24], selector);\n      w[33] = hc_byte_perm_S (w[22], w[23], selector);\n      w[32] = hc_byte_perm_S (w[21], w[22], selector);\n      w[31] = hc_byte_perm_S (w[20], w[21], selector);\n      w[30] = hc_byte_perm_S (w[19], w[20], selector);\n      w[29] = hc_byte_perm_S (w[18], w[19], selector);\n      w[28] = hc_byte_perm_S (w[17], w[18], selector);\n      w[27] = hc_byte_perm_S (w[16], w[17], selector);\n      w[26] = hc_byte_perm_S (w[15], w[16], selector);\n      w[25] = hc_byte_perm_S (w[14], w[15], selector);\n      w[24] = hc_byte_perm_S (w[13], w[14], selector);\n      w[23] = hc_byte_perm_S (w[12], w[13], selector);\n      w[22] = hc_byte_perm_S (w[11], w[12], selector);\n      w[21] = hc_byte_perm_S (w[10], w[11], selector);\n      w[20] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[19] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[18] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[17] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[16] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[15] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[14] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[13] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[12] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[11] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[10] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_byte_perm_S (w[51], w[52], selector);\n      w[62] = hc_byte_perm_S (w[50], w[51], selector);\n      w[61] = hc_byte_perm_S (w[49], w[50], selector);\n      w[60] = hc_byte_perm_S (w[48], w[49], selector);\n      w[59] = hc_byte_perm_S (w[47], w[48], selector);\n      w[58] = hc_byte_perm_S (w[46], w[47], selector);\n      w[57] = hc_byte_perm_S (w[45], w[46], selector);\n      w[56] = hc_byte_perm_S (w[44], w[45], selector);\n      w[55] = hc_byte_perm_S (w[43], w[44], selector);\n      w[54] = hc_byte_perm_S (w[42], w[43], selector);\n      w[53] = hc_byte_perm_S (w[41], w[42], selector);\n      w[52] = hc_byte_perm_S (w[40], w[41], selector);\n      w[51] = hc_byte_perm_S (w[39], w[40], selector);\n      w[50] = hc_byte_perm_S (w[38], w[39], selector);\n      w[49] = hc_byte_perm_S (w[37], w[38], selector);\n      w[48] = hc_byte_perm_S (w[36], w[37], selector);\n      w[47] = hc_byte_perm_S (w[35], w[36], selector);\n      w[46] = hc_byte_perm_S (w[34], w[35], selector);\n      w[45] = hc_byte_perm_S (w[33], w[34], selector);\n      w[44] = hc_byte_perm_S (w[32], w[33], selector);\n      w[43] = hc_byte_perm_S (w[31], w[32], selector);\n      w[42] = hc_byte_perm_S (w[30], w[31], selector);\n      w[41] = hc_byte_perm_S (w[29], w[30], selector);\n      w[40] = hc_byte_perm_S (w[28], w[29], selector);\n      w[39] = hc_byte_perm_S (w[27], w[28], selector);\n      w[38] = hc_byte_perm_S (w[26], w[27], selector);\n      w[37] = hc_byte_perm_S (w[25], w[26], selector);\n      w[36] = hc_byte_perm_S (w[24], w[25], selector);\n      w[35] = hc_byte_perm_S (w[23], w[24], selector);\n      w[34] = hc_byte_perm_S (w[22], w[23], selector);\n      w[33] = hc_byte_perm_S (w[21], w[22], selector);\n      w[32] = hc_byte_perm_S (w[20], w[21], selector);\n      w[31] = hc_byte_perm_S (w[19], w[20], selector);\n      w[30] = hc_byte_perm_S (w[18], w[19], selector);\n      w[29] = hc_byte_perm_S (w[17], w[18], selector);\n      w[28] = hc_byte_perm_S (w[16], w[17], selector);\n      w[27] = hc_byte_perm_S (w[15], w[16], selector);\n      w[26] = hc_byte_perm_S (w[14], w[15], selector);\n      w[25] = hc_byte_perm_S (w[13], w[14], selector);\n      w[24] = hc_byte_perm_S (w[12], w[13], selector);\n      w[23] = hc_byte_perm_S (w[11], w[12], selector);\n      w[22] = hc_byte_perm_S (w[10], w[11], selector);\n      w[21] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[20] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[19] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[18] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[17] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[16] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[15] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[14] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[13] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[12] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[11] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_byte_perm_S (w[50], w[51], selector);\n      w[62] = hc_byte_perm_S (w[49], w[50], selector);\n      w[61] = hc_byte_perm_S (w[48], w[49], selector);\n      w[60] = hc_byte_perm_S (w[47], w[48], selector);\n      w[59] = hc_byte_perm_S (w[46], w[47], selector);\n      w[58] = hc_byte_perm_S (w[45], w[46], selector);\n      w[57] = hc_byte_perm_S (w[44], w[45], selector);\n      w[56] = hc_byte_perm_S (w[43], w[44], selector);\n      w[55] = hc_byte_perm_S (w[42], w[43], selector);\n      w[54] = hc_byte_perm_S (w[41], w[42], selector);\n      w[53] = hc_byte_perm_S (w[40], w[41], selector);\n      w[52] = hc_byte_perm_S (w[39], w[40], selector);\n      w[51] = hc_byte_perm_S (w[38], w[39], selector);\n      w[50] = hc_byte_perm_S (w[37], w[38], selector);\n      w[49] = hc_byte_perm_S (w[36], w[37], selector);\n      w[48] = hc_byte_perm_S (w[35], w[36], selector);\n      w[47] = hc_byte_perm_S (w[34], w[35], selector);\n      w[46] = hc_byte_perm_S (w[33], w[34], selector);\n      w[45] = hc_byte_perm_S (w[32], w[33], selector);\n      w[44] = hc_byte_perm_S (w[31], w[32], selector);\n      w[43] = hc_byte_perm_S (w[30], w[31], selector);\n      w[42] = hc_byte_perm_S (w[29], w[30], selector);\n      w[41] = hc_byte_perm_S (w[28], w[29], selector);\n      w[40] = hc_byte_perm_S (w[27], w[28], selector);\n      w[39] = hc_byte_perm_S (w[26], w[27], selector);\n      w[38] = hc_byte_perm_S (w[25], w[26], selector);\n      w[37] = hc_byte_perm_S (w[24], w[25], selector);\n      w[36] = hc_byte_perm_S (w[23], w[24], selector);\n      w[35] = hc_byte_perm_S (w[22], w[23], selector);\n      w[34] = hc_byte_perm_S (w[21], w[22], selector);\n      w[33] = hc_byte_perm_S (w[20], w[21], selector);\n      w[32] = hc_byte_perm_S (w[19], w[20], selector);\n      w[31] = hc_byte_perm_S (w[18], w[19], selector);\n      w[30] = hc_byte_perm_S (w[17], w[18], selector);\n      w[29] = hc_byte_perm_S (w[16], w[17], selector);\n      w[28] = hc_byte_perm_S (w[15], w[16], selector);\n      w[27] = hc_byte_perm_S (w[14], w[15], selector);\n      w[26] = hc_byte_perm_S (w[13], w[14], selector);\n      w[25] = hc_byte_perm_S (w[12], w[13], selector);\n      w[24] = hc_byte_perm_S (w[11], w[12], selector);\n      w[23] = hc_byte_perm_S (w[10], w[11], selector);\n      w[22] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[21] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[20] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[19] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[18] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[17] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[16] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[15] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[14] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[13] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[12] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_byte_perm_S (w[49], w[50], selector);\n      w[62] = hc_byte_perm_S (w[48], w[49], selector);\n      w[61] = hc_byte_perm_S (w[47], w[48], selector);\n      w[60] = hc_byte_perm_S (w[46], w[47], selector);\n      w[59] = hc_byte_perm_S (w[45], w[46], selector);\n      w[58] = hc_byte_perm_S (w[44], w[45], selector);\n      w[57] = hc_byte_perm_S (w[43], w[44], selector);\n      w[56] = hc_byte_perm_S (w[42], w[43], selector);\n      w[55] = hc_byte_perm_S (w[41], w[42], selector);\n      w[54] = hc_byte_perm_S (w[40], w[41], selector);\n      w[53] = hc_byte_perm_S (w[39], w[40], selector);\n      w[52] = hc_byte_perm_S (w[38], w[39], selector);\n      w[51] = hc_byte_perm_S (w[37], w[38], selector);\n      w[50] = hc_byte_perm_S (w[36], w[37], selector);\n      w[49] = hc_byte_perm_S (w[35], w[36], selector);\n      w[48] = hc_byte_perm_S (w[34], w[35], selector);\n      w[47] = hc_byte_perm_S (w[33], w[34], selector);\n      w[46] = hc_byte_perm_S (w[32], w[33], selector);\n      w[45] = hc_byte_perm_S (w[31], w[32], selector);\n      w[44] = hc_byte_perm_S (w[30], w[31], selector);\n      w[43] = hc_byte_perm_S (w[29], w[30], selector);\n      w[42] = hc_byte_perm_S (w[28], w[29], selector);\n      w[41] = hc_byte_perm_S (w[27], w[28], selector);\n      w[40] = hc_byte_perm_S (w[26], w[27], selector);\n      w[39] = hc_byte_perm_S (w[25], w[26], selector);\n      w[38] = hc_byte_perm_S (w[24], w[25], selector);\n      w[37] = hc_byte_perm_S (w[23], w[24], selector);\n      w[36] = hc_byte_perm_S (w[22], w[23], selector);\n      w[35] = hc_byte_perm_S (w[21], w[22], selector);\n      w[34] = hc_byte_perm_S (w[20], w[21], selector);\n      w[33] = hc_byte_perm_S (w[19], w[20], selector);\n      w[32] = hc_byte_perm_S (w[18], w[19], selector);\n      w[31] = hc_byte_perm_S (w[17], w[18], selector);\n      w[30] = hc_byte_perm_S (w[16], w[17], selector);\n      w[29] = hc_byte_perm_S (w[15], w[16], selector);\n      w[28] = hc_byte_perm_S (w[14], w[15], selector);\n      w[27] = hc_byte_perm_S (w[13], w[14], selector);\n      w[26] = hc_byte_perm_S (w[12], w[13], selector);\n      w[25] = hc_byte_perm_S (w[11], w[12], selector);\n      w[24] = hc_byte_perm_S (w[10], w[11], selector);\n      w[23] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[22] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[21] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[20] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[19] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[18] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[17] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[16] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[15] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[14] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[13] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_byte_perm_S (w[48], w[49], selector);\n      w[62] = hc_byte_perm_S (w[47], w[48], selector);\n      w[61] = hc_byte_perm_S (w[46], w[47], selector);\n      w[60] = hc_byte_perm_S (w[45], w[46], selector);\n      w[59] = hc_byte_perm_S (w[44], w[45], selector);\n      w[58] = hc_byte_perm_S (w[43], w[44], selector);\n      w[57] = hc_byte_perm_S (w[42], w[43], selector);\n      w[56] = hc_byte_perm_S (w[41], w[42], selector);\n      w[55] = hc_byte_perm_S (w[40], w[41], selector);\n      w[54] = hc_byte_perm_S (w[39], w[40], selector);\n      w[53] = hc_byte_perm_S (w[38], w[39], selector);\n      w[52] = hc_byte_perm_S (w[37], w[38], selector);\n      w[51] = hc_byte_perm_S (w[36], w[37], selector);\n      w[50] = hc_byte_perm_S (w[35], w[36], selector);\n      w[49] = hc_byte_perm_S (w[34], w[35], selector);\n      w[48] = hc_byte_perm_S (w[33], w[34], selector);\n      w[47] = hc_byte_perm_S (w[32], w[33], selector);\n      w[46] = hc_byte_perm_S (w[31], w[32], selector);\n      w[45] = hc_byte_perm_S (w[30], w[31], selector);\n      w[44] = hc_byte_perm_S (w[29], w[30], selector);\n      w[43] = hc_byte_perm_S (w[28], w[29], selector);\n      w[42] = hc_byte_perm_S (w[27], w[28], selector);\n      w[41] = hc_byte_perm_S (w[26], w[27], selector);\n      w[40] = hc_byte_perm_S (w[25], w[26], selector);\n      w[39] = hc_byte_perm_S (w[24], w[25], selector);\n      w[38] = hc_byte_perm_S (w[23], w[24], selector);\n      w[37] = hc_byte_perm_S (w[22], w[23], selector);\n      w[36] = hc_byte_perm_S (w[21], w[22], selector);\n      w[35] = hc_byte_perm_S (w[20], w[21], selector);\n      w[34] = hc_byte_perm_S (w[19], w[20], selector);\n      w[33] = hc_byte_perm_S (w[18], w[19], selector);\n      w[32] = hc_byte_perm_S (w[17], w[18], selector);\n      w[31] = hc_byte_perm_S (w[16], w[17], selector);\n      w[30] = hc_byte_perm_S (w[15], w[16], selector);\n      w[29] = hc_byte_perm_S (w[14], w[15], selector);\n      w[28] = hc_byte_perm_S (w[13], w[14], selector);\n      w[27] = hc_byte_perm_S (w[12], w[13], selector);\n      w[26] = hc_byte_perm_S (w[11], w[12], selector);\n      w[25] = hc_byte_perm_S (w[10], w[11], selector);\n      w[24] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[23] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[22] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[21] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[20] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[19] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[18] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[17] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[16] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[15] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[14] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_byte_perm_S (w[47], w[48], selector);\n      w[62] = hc_byte_perm_S (w[46], w[47], selector);\n      w[61] = hc_byte_perm_S (w[45], w[46], selector);\n      w[60] = hc_byte_perm_S (w[44], w[45], selector);\n      w[59] = hc_byte_perm_S (w[43], w[44], selector);\n      w[58] = hc_byte_perm_S (w[42], w[43], selector);\n      w[57] = hc_byte_perm_S (w[41], w[42], selector);\n      w[56] = hc_byte_perm_S (w[40], w[41], selector);\n      w[55] = hc_byte_perm_S (w[39], w[40], selector);\n      w[54] = hc_byte_perm_S (w[38], w[39], selector);\n      w[53] = hc_byte_perm_S (w[37], w[38], selector);\n      w[52] = hc_byte_perm_S (w[36], w[37], selector);\n      w[51] = hc_byte_perm_S (w[35], w[36], selector);\n      w[50] = hc_byte_perm_S (w[34], w[35], selector);\n      w[49] = hc_byte_perm_S (w[33], w[34], selector);\n      w[48] = hc_byte_perm_S (w[32], w[33], selector);\n      w[47] = hc_byte_perm_S (w[31], w[32], selector);\n      w[46] = hc_byte_perm_S (w[30], w[31], selector);\n      w[45] = hc_byte_perm_S (w[29], w[30], selector);\n      w[44] = hc_byte_perm_S (w[28], w[29], selector);\n      w[43] = hc_byte_perm_S (w[27], w[28], selector);\n      w[42] = hc_byte_perm_S (w[26], w[27], selector);\n      w[41] = hc_byte_perm_S (w[25], w[26], selector);\n      w[40] = hc_byte_perm_S (w[24], w[25], selector);\n      w[39] = hc_byte_perm_S (w[23], w[24], selector);\n      w[38] = hc_byte_perm_S (w[22], w[23], selector);\n      w[37] = hc_byte_perm_S (w[21], w[22], selector);\n      w[36] = hc_byte_perm_S (w[20], w[21], selector);\n      w[35] = hc_byte_perm_S (w[19], w[20], selector);\n      w[34] = hc_byte_perm_S (w[18], w[19], selector);\n      w[33] = hc_byte_perm_S (w[17], w[18], selector);\n      w[32] = hc_byte_perm_S (w[16], w[17], selector);\n      w[31] = hc_byte_perm_S (w[15], w[16], selector);\n      w[30] = hc_byte_perm_S (w[14], w[15], selector);\n      w[29] = hc_byte_perm_S (w[13], w[14], selector);\n      w[28] = hc_byte_perm_S (w[12], w[13], selector);\n      w[27] = hc_byte_perm_S (w[11], w[12], selector);\n      w[26] = hc_byte_perm_S (w[10], w[11], selector);\n      w[25] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[24] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[23] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[22] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[21] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[20] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[19] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[18] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[17] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[16] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[15] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_byte_perm_S (w[46], w[47], selector);\n      w[62] = hc_byte_perm_S (w[45], w[46], selector);\n      w[61] = hc_byte_perm_S (w[44], w[45], selector);\n      w[60] = hc_byte_perm_S (w[43], w[44], selector);\n      w[59] = hc_byte_perm_S (w[42], w[43], selector);\n      w[58] = hc_byte_perm_S (w[41], w[42], selector);\n      w[57] = hc_byte_perm_S (w[40], w[41], selector);\n      w[56] = hc_byte_perm_S (w[39], w[40], selector);\n      w[55] = hc_byte_perm_S (w[38], w[39], selector);\n      w[54] = hc_byte_perm_S (w[37], w[38], selector);\n      w[53] = hc_byte_perm_S (w[36], w[37], selector);\n      w[52] = hc_byte_perm_S (w[35], w[36], selector);\n      w[51] = hc_byte_perm_S (w[34], w[35], selector);\n      w[50] = hc_byte_perm_S (w[33], w[34], selector);\n      w[49] = hc_byte_perm_S (w[32], w[33], selector);\n      w[48] = hc_byte_perm_S (w[31], w[32], selector);\n      w[47] = hc_byte_perm_S (w[30], w[31], selector);\n      w[46] = hc_byte_perm_S (w[29], w[30], selector);\n      w[45] = hc_byte_perm_S (w[28], w[29], selector);\n      w[44] = hc_byte_perm_S (w[27], w[28], selector);\n      w[43] = hc_byte_perm_S (w[26], w[27], selector);\n      w[42] = hc_byte_perm_S (w[25], w[26], selector);\n      w[41] = hc_byte_perm_S (w[24], w[25], selector);\n      w[40] = hc_byte_perm_S (w[23], w[24], selector);\n      w[39] = hc_byte_perm_S (w[22], w[23], selector);\n      w[38] = hc_byte_perm_S (w[21], w[22], selector);\n      w[37] = hc_byte_perm_S (w[20], w[21], selector);\n      w[36] = hc_byte_perm_S (w[19], w[20], selector);\n      w[35] = hc_byte_perm_S (w[18], w[19], selector);\n      w[34] = hc_byte_perm_S (w[17], w[18], selector);\n      w[33] = hc_byte_perm_S (w[16], w[17], selector);\n      w[32] = hc_byte_perm_S (w[15], w[16], selector);\n      w[31] = hc_byte_perm_S (w[14], w[15], selector);\n      w[30] = hc_byte_perm_S (w[13], w[14], selector);\n      w[29] = hc_byte_perm_S (w[12], w[13], selector);\n      w[28] = hc_byte_perm_S (w[11], w[12], selector);\n      w[27] = hc_byte_perm_S (w[10], w[11], selector);\n      w[26] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[25] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[24] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[23] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[22] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[21] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[20] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[19] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[18] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[17] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[16] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_byte_perm_S (w[45], w[46], selector);\n      w[62] = hc_byte_perm_S (w[44], w[45], selector);\n      w[61] = hc_byte_perm_S (w[43], w[44], selector);\n      w[60] = hc_byte_perm_S (w[42], w[43], selector);\n      w[59] = hc_byte_perm_S (w[41], w[42], selector);\n      w[58] = hc_byte_perm_S (w[40], w[41], selector);\n      w[57] = hc_byte_perm_S (w[39], w[40], selector);\n      w[56] = hc_byte_perm_S (w[38], w[39], selector);\n      w[55] = hc_byte_perm_S (w[37], w[38], selector);\n      w[54] = hc_byte_perm_S (w[36], w[37], selector);\n      w[53] = hc_byte_perm_S (w[35], w[36], selector);\n      w[52] = hc_byte_perm_S (w[34], w[35], selector);\n      w[51] = hc_byte_perm_S (w[33], w[34], selector);\n      w[50] = hc_byte_perm_S (w[32], w[33], selector);\n      w[49] = hc_byte_perm_S (w[31], w[32], selector);\n      w[48] = hc_byte_perm_S (w[30], w[31], selector);\n      w[47] = hc_byte_perm_S (w[29], w[30], selector);\n      w[46] = hc_byte_perm_S (w[28], w[29], selector);\n      w[45] = hc_byte_perm_S (w[27], w[28], selector);\n      w[44] = hc_byte_perm_S (w[26], w[27], selector);\n      w[43] = hc_byte_perm_S (w[25], w[26], selector);\n      w[42] = hc_byte_perm_S (w[24], w[25], selector);\n      w[41] = hc_byte_perm_S (w[23], w[24], selector);\n      w[40] = hc_byte_perm_S (w[22], w[23], selector);\n      w[39] = hc_byte_perm_S (w[21], w[22], selector);\n      w[38] = hc_byte_perm_S (w[20], w[21], selector);\n      w[37] = hc_byte_perm_S (w[19], w[20], selector);\n      w[36] = hc_byte_perm_S (w[18], w[19], selector);\n      w[35] = hc_byte_perm_S (w[17], w[18], selector);\n      w[34] = hc_byte_perm_S (w[16], w[17], selector);\n      w[33] = hc_byte_perm_S (w[15], w[16], selector);\n      w[32] = hc_byte_perm_S (w[14], w[15], selector);\n      w[31] = hc_byte_perm_S (w[13], w[14], selector);\n      w[30] = hc_byte_perm_S (w[12], w[13], selector);\n      w[29] = hc_byte_perm_S (w[11], w[12], selector);\n      w[28] = hc_byte_perm_S (w[10], w[11], selector);\n      w[27] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[26] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[25] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[24] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[23] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[22] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[21] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[20] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[19] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[18] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[17] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_byte_perm_S (w[44], w[45], selector);\n      w[62] = hc_byte_perm_S (w[43], w[44], selector);\n      w[61] = hc_byte_perm_S (w[42], w[43], selector);\n      w[60] = hc_byte_perm_S (w[41], w[42], selector);\n      w[59] = hc_byte_perm_S (w[40], w[41], selector);\n      w[58] = hc_byte_perm_S (w[39], w[40], selector);\n      w[57] = hc_byte_perm_S (w[38], w[39], selector);\n      w[56] = hc_byte_perm_S (w[37], w[38], selector);\n      w[55] = hc_byte_perm_S (w[36], w[37], selector);\n      w[54] = hc_byte_perm_S (w[35], w[36], selector);\n      w[53] = hc_byte_perm_S (w[34], w[35], selector);\n      w[52] = hc_byte_perm_S (w[33], w[34], selector);\n      w[51] = hc_byte_perm_S (w[32], w[33], selector);\n      w[50] = hc_byte_perm_S (w[31], w[32], selector);\n      w[49] = hc_byte_perm_S (w[30], w[31], selector);\n      w[48] = hc_byte_perm_S (w[29], w[30], selector);\n      w[47] = hc_byte_perm_S (w[28], w[29], selector);\n      w[46] = hc_byte_perm_S (w[27], w[28], selector);\n      w[45] = hc_byte_perm_S (w[26], w[27], selector);\n      w[44] = hc_byte_perm_S (w[25], w[26], selector);\n      w[43] = hc_byte_perm_S (w[24], w[25], selector);\n      w[42] = hc_byte_perm_S (w[23], w[24], selector);\n      w[41] = hc_byte_perm_S (w[22], w[23], selector);\n      w[40] = hc_byte_perm_S (w[21], w[22], selector);\n      w[39] = hc_byte_perm_S (w[20], w[21], selector);\n      w[38] = hc_byte_perm_S (w[19], w[20], selector);\n      w[37] = hc_byte_perm_S (w[18], w[19], selector);\n      w[36] = hc_byte_perm_S (w[17], w[18], selector);\n      w[35] = hc_byte_perm_S (w[16], w[17], selector);\n      w[34] = hc_byte_perm_S (w[15], w[16], selector);\n      w[33] = hc_byte_perm_S (w[14], w[15], selector);\n      w[32] = hc_byte_perm_S (w[13], w[14], selector);\n      w[31] = hc_byte_perm_S (w[12], w[13], selector);\n      w[30] = hc_byte_perm_S (w[11], w[12], selector);\n      w[29] = hc_byte_perm_S (w[10], w[11], selector);\n      w[28] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[27] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[26] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[25] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[24] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[23] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[22] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[21] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[20] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[19] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[18] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_byte_perm_S (w[43], w[44], selector);\n      w[62] = hc_byte_perm_S (w[42], w[43], selector);\n      w[61] = hc_byte_perm_S (w[41], w[42], selector);\n      w[60] = hc_byte_perm_S (w[40], w[41], selector);\n      w[59] = hc_byte_perm_S (w[39], w[40], selector);\n      w[58] = hc_byte_perm_S (w[38], w[39], selector);\n      w[57] = hc_byte_perm_S (w[37], w[38], selector);\n      w[56] = hc_byte_perm_S (w[36], w[37], selector);\n      w[55] = hc_byte_perm_S (w[35], w[36], selector);\n      w[54] = hc_byte_perm_S (w[34], w[35], selector);\n      w[53] = hc_byte_perm_S (w[33], w[34], selector);\n      w[52] = hc_byte_perm_S (w[32], w[33], selector);\n      w[51] = hc_byte_perm_S (w[31], w[32], selector);\n      w[50] = hc_byte_perm_S (w[30], w[31], selector);\n      w[49] = hc_byte_perm_S (w[29], w[30], selector);\n      w[48] = hc_byte_perm_S (w[28], w[29], selector);\n      w[47] = hc_byte_perm_S (w[27], w[28], selector);\n      w[46] = hc_byte_perm_S (w[26], w[27], selector);\n      w[45] = hc_byte_perm_S (w[25], w[26], selector);\n      w[44] = hc_byte_perm_S (w[24], w[25], selector);\n      w[43] = hc_byte_perm_S (w[23], w[24], selector);\n      w[42] = hc_byte_perm_S (w[22], w[23], selector);\n      w[41] = hc_byte_perm_S (w[21], w[22], selector);\n      w[40] = hc_byte_perm_S (w[20], w[21], selector);\n      w[39] = hc_byte_perm_S (w[19], w[20], selector);\n      w[38] = hc_byte_perm_S (w[18], w[19], selector);\n      w[37] = hc_byte_perm_S (w[17], w[18], selector);\n      w[36] = hc_byte_perm_S (w[16], w[17], selector);\n      w[35] = hc_byte_perm_S (w[15], w[16], selector);\n      w[34] = hc_byte_perm_S (w[14], w[15], selector);\n      w[33] = hc_byte_perm_S (w[13], w[14], selector);\n      w[32] = hc_byte_perm_S (w[12], w[13], selector);\n      w[31] = hc_byte_perm_S (w[11], w[12], selector);\n      w[30] = hc_byte_perm_S (w[10], w[11], selector);\n      w[29] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[28] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[27] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[26] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[25] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[24] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[23] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[22] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[21] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[20] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[19] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_byte_perm_S (w[42], w[43], selector);\n      w[62] = hc_byte_perm_S (w[41], w[42], selector);\n      w[61] = hc_byte_perm_S (w[40], w[41], selector);\n      w[60] = hc_byte_perm_S (w[39], w[40], selector);\n      w[59] = hc_byte_perm_S (w[38], w[39], selector);\n      w[58] = hc_byte_perm_S (w[37], w[38], selector);\n      w[57] = hc_byte_perm_S (w[36], w[37], selector);\n      w[56] = hc_byte_perm_S (w[35], w[36], selector);\n      w[55] = hc_byte_perm_S (w[34], w[35], selector);\n      w[54] = hc_byte_perm_S (w[33], w[34], selector);\n      w[53] = hc_byte_perm_S (w[32], w[33], selector);\n      w[52] = hc_byte_perm_S (w[31], w[32], selector);\n      w[51] = hc_byte_perm_S (w[30], w[31], selector);\n      w[50] = hc_byte_perm_S (w[29], w[30], selector);\n      w[49] = hc_byte_perm_S (w[28], w[29], selector);\n      w[48] = hc_byte_perm_S (w[27], w[28], selector);\n      w[47] = hc_byte_perm_S (w[26], w[27], selector);\n      w[46] = hc_byte_perm_S (w[25], w[26], selector);\n      w[45] = hc_byte_perm_S (w[24], w[25], selector);\n      w[44] = hc_byte_perm_S (w[23], w[24], selector);\n      w[43] = hc_byte_perm_S (w[22], w[23], selector);\n      w[42] = hc_byte_perm_S (w[21], w[22], selector);\n      w[41] = hc_byte_perm_S (w[20], w[21], selector);\n      w[40] = hc_byte_perm_S (w[19], w[20], selector);\n      w[39] = hc_byte_perm_S (w[18], w[19], selector);\n      w[38] = hc_byte_perm_S (w[17], w[18], selector);\n      w[37] = hc_byte_perm_S (w[16], w[17], selector);\n      w[36] = hc_byte_perm_S (w[15], w[16], selector);\n      w[35] = hc_byte_perm_S (w[14], w[15], selector);\n      w[34] = hc_byte_perm_S (w[13], w[14], selector);\n      w[33] = hc_byte_perm_S (w[12], w[13], selector);\n      w[32] = hc_byte_perm_S (w[11], w[12], selector);\n      w[31] = hc_byte_perm_S (w[10], w[11], selector);\n      w[30] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[29] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[28] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[27] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[26] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[25] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[24] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[23] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[22] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[21] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[20] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_byte_perm_S (w[41], w[42], selector);\n      w[62] = hc_byte_perm_S (w[40], w[41], selector);\n      w[61] = hc_byte_perm_S (w[39], w[40], selector);\n      w[60] = hc_byte_perm_S (w[38], w[39], selector);\n      w[59] = hc_byte_perm_S (w[37], w[38], selector);\n      w[58] = hc_byte_perm_S (w[36], w[37], selector);\n      w[57] = hc_byte_perm_S (w[35], w[36], selector);\n      w[56] = hc_byte_perm_S (w[34], w[35], selector);\n      w[55] = hc_byte_perm_S (w[33], w[34], selector);\n      w[54] = hc_byte_perm_S (w[32], w[33], selector);\n      w[53] = hc_byte_perm_S (w[31], w[32], selector);\n      w[52] = hc_byte_perm_S (w[30], w[31], selector);\n      w[51] = hc_byte_perm_S (w[29], w[30], selector);\n      w[50] = hc_byte_perm_S (w[28], w[29], selector);\n      w[49] = hc_byte_perm_S (w[27], w[28], selector);\n      w[48] = hc_byte_perm_S (w[26], w[27], selector);\n      w[47] = hc_byte_perm_S (w[25], w[26], selector);\n      w[46] = hc_byte_perm_S (w[24], w[25], selector);\n      w[45] = hc_byte_perm_S (w[23], w[24], selector);\n      w[44] = hc_byte_perm_S (w[22], w[23], selector);\n      w[43] = hc_byte_perm_S (w[21], w[22], selector);\n      w[42] = hc_byte_perm_S (w[20], w[21], selector);\n      w[41] = hc_byte_perm_S (w[19], w[20], selector);\n      w[40] = hc_byte_perm_S (w[18], w[19], selector);\n      w[39] = hc_byte_perm_S (w[17], w[18], selector);\n      w[38] = hc_byte_perm_S (w[16], w[17], selector);\n      w[37] = hc_byte_perm_S (w[15], w[16], selector);\n      w[36] = hc_byte_perm_S (w[14], w[15], selector);\n      w[35] = hc_byte_perm_S (w[13], w[14], selector);\n      w[34] = hc_byte_perm_S (w[12], w[13], selector);\n      w[33] = hc_byte_perm_S (w[11], w[12], selector);\n      w[32] = hc_byte_perm_S (w[10], w[11], selector);\n      w[31] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[30] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[29] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[28] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[27] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[26] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[25] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[24] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[23] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[22] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[21] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_byte_perm_S (w[40], w[41], selector);\n      w[62] = hc_byte_perm_S (w[39], w[40], selector);\n      w[61] = hc_byte_perm_S (w[38], w[39], selector);\n      w[60] = hc_byte_perm_S (w[37], w[38], selector);\n      w[59] = hc_byte_perm_S (w[36], w[37], selector);\n      w[58] = hc_byte_perm_S (w[35], w[36], selector);\n      w[57] = hc_byte_perm_S (w[34], w[35], selector);\n      w[56] = hc_byte_perm_S (w[33], w[34], selector);\n      w[55] = hc_byte_perm_S (w[32], w[33], selector);\n      w[54] = hc_byte_perm_S (w[31], w[32], selector);\n      w[53] = hc_byte_perm_S (w[30], w[31], selector);\n      w[52] = hc_byte_perm_S (w[29], w[30], selector);\n      w[51] = hc_byte_perm_S (w[28], w[29], selector);\n      w[50] = hc_byte_perm_S (w[27], w[28], selector);\n      w[49] = hc_byte_perm_S (w[26], w[27], selector);\n      w[48] = hc_byte_perm_S (w[25], w[26], selector);\n      w[47] = hc_byte_perm_S (w[24], w[25], selector);\n      w[46] = hc_byte_perm_S (w[23], w[24], selector);\n      w[45] = hc_byte_perm_S (w[22], w[23], selector);\n      w[44] = hc_byte_perm_S (w[21], w[22], selector);\n      w[43] = hc_byte_perm_S (w[20], w[21], selector);\n      w[42] = hc_byte_perm_S (w[19], w[20], selector);\n      w[41] = hc_byte_perm_S (w[18], w[19], selector);\n      w[40] = hc_byte_perm_S (w[17], w[18], selector);\n      w[39] = hc_byte_perm_S (w[16], w[17], selector);\n      w[38] = hc_byte_perm_S (w[15], w[16], selector);\n      w[37] = hc_byte_perm_S (w[14], w[15], selector);\n      w[36] = hc_byte_perm_S (w[13], w[14], selector);\n      w[35] = hc_byte_perm_S (w[12], w[13], selector);\n      w[34] = hc_byte_perm_S (w[11], w[12], selector);\n      w[33] = hc_byte_perm_S (w[10], w[11], selector);\n      w[32] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[31] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[30] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[29] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[28] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[27] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[26] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[25] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[24] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[23] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[22] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_byte_perm_S (w[39], w[40], selector);\n      w[62] = hc_byte_perm_S (w[38], w[39], selector);\n      w[61] = hc_byte_perm_S (w[37], w[38], selector);\n      w[60] = hc_byte_perm_S (w[36], w[37], selector);\n      w[59] = hc_byte_perm_S (w[35], w[36], selector);\n      w[58] = hc_byte_perm_S (w[34], w[35], selector);\n      w[57] = hc_byte_perm_S (w[33], w[34], selector);\n      w[56] = hc_byte_perm_S (w[32], w[33], selector);\n      w[55] = hc_byte_perm_S (w[31], w[32], selector);\n      w[54] = hc_byte_perm_S (w[30], w[31], selector);\n      w[53] = hc_byte_perm_S (w[29], w[30], selector);\n      w[52] = hc_byte_perm_S (w[28], w[29], selector);\n      w[51] = hc_byte_perm_S (w[27], w[28], selector);\n      w[50] = hc_byte_perm_S (w[26], w[27], selector);\n      w[49] = hc_byte_perm_S (w[25], w[26], selector);\n      w[48] = hc_byte_perm_S (w[24], w[25], selector);\n      w[47] = hc_byte_perm_S (w[23], w[24], selector);\n      w[46] = hc_byte_perm_S (w[22], w[23], selector);\n      w[45] = hc_byte_perm_S (w[21], w[22], selector);\n      w[44] = hc_byte_perm_S (w[20], w[21], selector);\n      w[43] = hc_byte_perm_S (w[19], w[20], selector);\n      w[42] = hc_byte_perm_S (w[18], w[19], selector);\n      w[41] = hc_byte_perm_S (w[17], w[18], selector);\n      w[40] = hc_byte_perm_S (w[16], w[17], selector);\n      w[39] = hc_byte_perm_S (w[15], w[16], selector);\n      w[38] = hc_byte_perm_S (w[14], w[15], selector);\n      w[37] = hc_byte_perm_S (w[13], w[14], selector);\n      w[36] = hc_byte_perm_S (w[12], w[13], selector);\n      w[35] = hc_byte_perm_S (w[11], w[12], selector);\n      w[34] = hc_byte_perm_S (w[10], w[11], selector);\n      w[33] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[32] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[31] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[30] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[29] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[28] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[27] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[26] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[25] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[24] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[23] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_byte_perm_S (w[38], w[39], selector);\n      w[62] = hc_byte_perm_S (w[37], w[38], selector);\n      w[61] = hc_byte_perm_S (w[36], w[37], selector);\n      w[60] = hc_byte_perm_S (w[35], w[36], selector);\n      w[59] = hc_byte_perm_S (w[34], w[35], selector);\n      w[58] = hc_byte_perm_S (w[33], w[34], selector);\n      w[57] = hc_byte_perm_S (w[32], w[33], selector);\n      w[56] = hc_byte_perm_S (w[31], w[32], selector);\n      w[55] = hc_byte_perm_S (w[30], w[31], selector);\n      w[54] = hc_byte_perm_S (w[29], w[30], selector);\n      w[53] = hc_byte_perm_S (w[28], w[29], selector);\n      w[52] = hc_byte_perm_S (w[27], w[28], selector);\n      w[51] = hc_byte_perm_S (w[26], w[27], selector);\n      w[50] = hc_byte_perm_S (w[25], w[26], selector);\n      w[49] = hc_byte_perm_S (w[24], w[25], selector);\n      w[48] = hc_byte_perm_S (w[23], w[24], selector);\n      w[47] = hc_byte_perm_S (w[22], w[23], selector);\n      w[46] = hc_byte_perm_S (w[21], w[22], selector);\n      w[45] = hc_byte_perm_S (w[20], w[21], selector);\n      w[44] = hc_byte_perm_S (w[19], w[20], selector);\n      w[43] = hc_byte_perm_S (w[18], w[19], selector);\n      w[42] = hc_byte_perm_S (w[17], w[18], selector);\n      w[41] = hc_byte_perm_S (w[16], w[17], selector);\n      w[40] = hc_byte_perm_S (w[15], w[16], selector);\n      w[39] = hc_byte_perm_S (w[14], w[15], selector);\n      w[38] = hc_byte_perm_S (w[13], w[14], selector);\n      w[37] = hc_byte_perm_S (w[12], w[13], selector);\n      w[36] = hc_byte_perm_S (w[11], w[12], selector);\n      w[35] = hc_byte_perm_S (w[10], w[11], selector);\n      w[34] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[33] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[32] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[31] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[30] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[29] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[28] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[27] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[26] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[25] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[24] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_byte_perm_S (w[37], w[38], selector);\n      w[62] = hc_byte_perm_S (w[36], w[37], selector);\n      w[61] = hc_byte_perm_S (w[35], w[36], selector);\n      w[60] = hc_byte_perm_S (w[34], w[35], selector);\n      w[59] = hc_byte_perm_S (w[33], w[34], selector);\n      w[58] = hc_byte_perm_S (w[32], w[33], selector);\n      w[57] = hc_byte_perm_S (w[31], w[32], selector);\n      w[56] = hc_byte_perm_S (w[30], w[31], selector);\n      w[55] = hc_byte_perm_S (w[29], w[30], selector);\n      w[54] = hc_byte_perm_S (w[28], w[29], selector);\n      w[53] = hc_byte_perm_S (w[27], w[28], selector);\n      w[52] = hc_byte_perm_S (w[26], w[27], selector);\n      w[51] = hc_byte_perm_S (w[25], w[26], selector);\n      w[50] = hc_byte_perm_S (w[24], w[25], selector);\n      w[49] = hc_byte_perm_S (w[23], w[24], selector);\n      w[48] = hc_byte_perm_S (w[22], w[23], selector);\n      w[47] = hc_byte_perm_S (w[21], w[22], selector);\n      w[46] = hc_byte_perm_S (w[20], w[21], selector);\n      w[45] = hc_byte_perm_S (w[19], w[20], selector);\n      w[44] = hc_byte_perm_S (w[18], w[19], selector);\n      w[43] = hc_byte_perm_S (w[17], w[18], selector);\n      w[42] = hc_byte_perm_S (w[16], w[17], selector);\n      w[41] = hc_byte_perm_S (w[15], w[16], selector);\n      w[40] = hc_byte_perm_S (w[14], w[15], selector);\n      w[39] = hc_byte_perm_S (w[13], w[14], selector);\n      w[38] = hc_byte_perm_S (w[12], w[13], selector);\n      w[37] = hc_byte_perm_S (w[11], w[12], selector);\n      w[36] = hc_byte_perm_S (w[10], w[11], selector);\n      w[35] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[34] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[33] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[32] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[31] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[30] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[29] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[28] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[27] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[26] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[25] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_byte_perm_S (w[36], w[37], selector);\n      w[62] = hc_byte_perm_S (w[35], w[36], selector);\n      w[61] = hc_byte_perm_S (w[34], w[35], selector);\n      w[60] = hc_byte_perm_S (w[33], w[34], selector);\n      w[59] = hc_byte_perm_S (w[32], w[33], selector);\n      w[58] = hc_byte_perm_S (w[31], w[32], selector);\n      w[57] = hc_byte_perm_S (w[30], w[31], selector);\n      w[56] = hc_byte_perm_S (w[29], w[30], selector);\n      w[55] = hc_byte_perm_S (w[28], w[29], selector);\n      w[54] = hc_byte_perm_S (w[27], w[28], selector);\n      w[53] = hc_byte_perm_S (w[26], w[27], selector);\n      w[52] = hc_byte_perm_S (w[25], w[26], selector);\n      w[51] = hc_byte_perm_S (w[24], w[25], selector);\n      w[50] = hc_byte_perm_S (w[23], w[24], selector);\n      w[49] = hc_byte_perm_S (w[22], w[23], selector);\n      w[48] = hc_byte_perm_S (w[21], w[22], selector);\n      w[47] = hc_byte_perm_S (w[20], w[21], selector);\n      w[46] = hc_byte_perm_S (w[19], w[20], selector);\n      w[45] = hc_byte_perm_S (w[18], w[19], selector);\n      w[44] = hc_byte_perm_S (w[17], w[18], selector);\n      w[43] = hc_byte_perm_S (w[16], w[17], selector);\n      w[42] = hc_byte_perm_S (w[15], w[16], selector);\n      w[41] = hc_byte_perm_S (w[14], w[15], selector);\n      w[40] = hc_byte_perm_S (w[13], w[14], selector);\n      w[39] = hc_byte_perm_S (w[12], w[13], selector);\n      w[38] = hc_byte_perm_S (w[11], w[12], selector);\n      w[37] = hc_byte_perm_S (w[10], w[11], selector);\n      w[36] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[35] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[34] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[33] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[32] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[31] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[30] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[29] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[28] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[27] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[26] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_byte_perm_S (w[35], w[36], selector);\n      w[62] = hc_byte_perm_S (w[34], w[35], selector);\n      w[61] = hc_byte_perm_S (w[33], w[34], selector);\n      w[60] = hc_byte_perm_S (w[32], w[33], selector);\n      w[59] = hc_byte_perm_S (w[31], w[32], selector);\n      w[58] = hc_byte_perm_S (w[30], w[31], selector);\n      w[57] = hc_byte_perm_S (w[29], w[30], selector);\n      w[56] = hc_byte_perm_S (w[28], w[29], selector);\n      w[55] = hc_byte_perm_S (w[27], w[28], selector);\n      w[54] = hc_byte_perm_S (w[26], w[27], selector);\n      w[53] = hc_byte_perm_S (w[25], w[26], selector);\n      w[52] = hc_byte_perm_S (w[24], w[25], selector);\n      w[51] = hc_byte_perm_S (w[23], w[24], selector);\n      w[50] = hc_byte_perm_S (w[22], w[23], selector);\n      w[49] = hc_byte_perm_S (w[21], w[22], selector);\n      w[48] = hc_byte_perm_S (w[20], w[21], selector);\n      w[47] = hc_byte_perm_S (w[19], w[20], selector);\n      w[46] = hc_byte_perm_S (w[18], w[19], selector);\n      w[45] = hc_byte_perm_S (w[17], w[18], selector);\n      w[44] = hc_byte_perm_S (w[16], w[17], selector);\n      w[43] = hc_byte_perm_S (w[15], w[16], selector);\n      w[42] = hc_byte_perm_S (w[14], w[15], selector);\n      w[41] = hc_byte_perm_S (w[13], w[14], selector);\n      w[40] = hc_byte_perm_S (w[12], w[13], selector);\n      w[39] = hc_byte_perm_S (w[11], w[12], selector);\n      w[38] = hc_byte_perm_S (w[10], w[11], selector);\n      w[37] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[36] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[35] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[34] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[33] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[32] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[31] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[30] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[29] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[28] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[27] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_byte_perm_S (w[34], w[35], selector);\n      w[62] = hc_byte_perm_S (w[33], w[34], selector);\n      w[61] = hc_byte_perm_S (w[32], w[33], selector);\n      w[60] = hc_byte_perm_S (w[31], w[32], selector);\n      w[59] = hc_byte_perm_S (w[30], w[31], selector);\n      w[58] = hc_byte_perm_S (w[29], w[30], selector);\n      w[57] = hc_byte_perm_S (w[28], w[29], selector);\n      w[56] = hc_byte_perm_S (w[27], w[28], selector);\n      w[55] = hc_byte_perm_S (w[26], w[27], selector);\n      w[54] = hc_byte_perm_S (w[25], w[26], selector);\n      w[53] = hc_byte_perm_S (w[24], w[25], selector);\n      w[52] = hc_byte_perm_S (w[23], w[24], selector);\n      w[51] = hc_byte_perm_S (w[22], w[23], selector);\n      w[50] = hc_byte_perm_S (w[21], w[22], selector);\n      w[49] = hc_byte_perm_S (w[20], w[21], selector);\n      w[48] = hc_byte_perm_S (w[19], w[20], selector);\n      w[47] = hc_byte_perm_S (w[18], w[19], selector);\n      w[46] = hc_byte_perm_S (w[17], w[18], selector);\n      w[45] = hc_byte_perm_S (w[16], w[17], selector);\n      w[44] = hc_byte_perm_S (w[15], w[16], selector);\n      w[43] = hc_byte_perm_S (w[14], w[15], selector);\n      w[42] = hc_byte_perm_S (w[13], w[14], selector);\n      w[41] = hc_byte_perm_S (w[12], w[13], selector);\n      w[40] = hc_byte_perm_S (w[11], w[12], selector);\n      w[39] = hc_byte_perm_S (w[10], w[11], selector);\n      w[38] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[37] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[36] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[35] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[34] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[33] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[32] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[31] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[30] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[29] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[28] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_byte_perm_S (w[33], w[34], selector);\n      w[62] = hc_byte_perm_S (w[32], w[33], selector);\n      w[61] = hc_byte_perm_S (w[31], w[32], selector);\n      w[60] = hc_byte_perm_S (w[30], w[31], selector);\n      w[59] = hc_byte_perm_S (w[29], w[30], selector);\n      w[58] = hc_byte_perm_S (w[28], w[29], selector);\n      w[57] = hc_byte_perm_S (w[27], w[28], selector);\n      w[56] = hc_byte_perm_S (w[26], w[27], selector);\n      w[55] = hc_byte_perm_S (w[25], w[26], selector);\n      w[54] = hc_byte_perm_S (w[24], w[25], selector);\n      w[53] = hc_byte_perm_S (w[23], w[24], selector);\n      w[52] = hc_byte_perm_S (w[22], w[23], selector);\n      w[51] = hc_byte_perm_S (w[21], w[22], selector);\n      w[50] = hc_byte_perm_S (w[20], w[21], selector);\n      w[49] = hc_byte_perm_S (w[19], w[20], selector);\n      w[48] = hc_byte_perm_S (w[18], w[19], selector);\n      w[47] = hc_byte_perm_S (w[17], w[18], selector);\n      w[46] = hc_byte_perm_S (w[16], w[17], selector);\n      w[45] = hc_byte_perm_S (w[15], w[16], selector);\n      w[44] = hc_byte_perm_S (w[14], w[15], selector);\n      w[43] = hc_byte_perm_S (w[13], w[14], selector);\n      w[42] = hc_byte_perm_S (w[12], w[13], selector);\n      w[41] = hc_byte_perm_S (w[11], w[12], selector);\n      w[40] = hc_byte_perm_S (w[10], w[11], selector);\n      w[39] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[38] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[37] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[36] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[35] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[34] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[33] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[32] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[31] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[30] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[29] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_byte_perm_S (w[32], w[33], selector);\n      w[62] = hc_byte_perm_S (w[31], w[32], selector);\n      w[61] = hc_byte_perm_S (w[30], w[31], selector);\n      w[60] = hc_byte_perm_S (w[29], w[30], selector);\n      w[59] = hc_byte_perm_S (w[28], w[29], selector);\n      w[58] = hc_byte_perm_S (w[27], w[28], selector);\n      w[57] = hc_byte_perm_S (w[26], w[27], selector);\n      w[56] = hc_byte_perm_S (w[25], w[26], selector);\n      w[55] = hc_byte_perm_S (w[24], w[25], selector);\n      w[54] = hc_byte_perm_S (w[23], w[24], selector);\n      w[53] = hc_byte_perm_S (w[22], w[23], selector);\n      w[52] = hc_byte_perm_S (w[21], w[22], selector);\n      w[51] = hc_byte_perm_S (w[20], w[21], selector);\n      w[50] = hc_byte_perm_S (w[19], w[20], selector);\n      w[49] = hc_byte_perm_S (w[18], w[19], selector);\n      w[48] = hc_byte_perm_S (w[17], w[18], selector);\n      w[47] = hc_byte_perm_S (w[16], w[17], selector);\n      w[46] = hc_byte_perm_S (w[15], w[16], selector);\n      w[45] = hc_byte_perm_S (w[14], w[15], selector);\n      w[44] = hc_byte_perm_S (w[13], w[14], selector);\n      w[43] = hc_byte_perm_S (w[12], w[13], selector);\n      w[42] = hc_byte_perm_S (w[11], w[12], selector);\n      w[41] = hc_byte_perm_S (w[10], w[11], selector);\n      w[40] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[39] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[38] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[37] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[36] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[35] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[34] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[33] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[32] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[31] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[30] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_byte_perm_S (w[31], w[32], selector);\n      w[62] = hc_byte_perm_S (w[30], w[31], selector);\n      w[61] = hc_byte_perm_S (w[29], w[30], selector);\n      w[60] = hc_byte_perm_S (w[28], w[29], selector);\n      w[59] = hc_byte_perm_S (w[27], w[28], selector);\n      w[58] = hc_byte_perm_S (w[26], w[27], selector);\n      w[57] = hc_byte_perm_S (w[25], w[26], selector);\n      w[56] = hc_byte_perm_S (w[24], w[25], selector);\n      w[55] = hc_byte_perm_S (w[23], w[24], selector);\n      w[54] = hc_byte_perm_S (w[22], w[23], selector);\n      w[53] = hc_byte_perm_S (w[21], w[22], selector);\n      w[52] = hc_byte_perm_S (w[20], w[21], selector);\n      w[51] = hc_byte_perm_S (w[19], w[20], selector);\n      w[50] = hc_byte_perm_S (w[18], w[19], selector);\n      w[49] = hc_byte_perm_S (w[17], w[18], selector);\n      w[48] = hc_byte_perm_S (w[16], w[17], selector);\n      w[47] = hc_byte_perm_S (w[15], w[16], selector);\n      w[46] = hc_byte_perm_S (w[14], w[15], selector);\n      w[45] = hc_byte_perm_S (w[13], w[14], selector);\n      w[44] = hc_byte_perm_S (w[12], w[13], selector);\n      w[43] = hc_byte_perm_S (w[11], w[12], selector);\n      w[42] = hc_byte_perm_S (w[10], w[11], selector);\n      w[41] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[40] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[39] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[38] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[37] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[36] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[35] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[34] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[33] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[32] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[31] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_byte_perm_S (w[30], w[31], selector);\n      w[62] = hc_byte_perm_S (w[29], w[30], selector);\n      w[61] = hc_byte_perm_S (w[28], w[29], selector);\n      w[60] = hc_byte_perm_S (w[27], w[28], selector);\n      w[59] = hc_byte_perm_S (w[26], w[27], selector);\n      w[58] = hc_byte_perm_S (w[25], w[26], selector);\n      w[57] = hc_byte_perm_S (w[24], w[25], selector);\n      w[56] = hc_byte_perm_S (w[23], w[24], selector);\n      w[55] = hc_byte_perm_S (w[22], w[23], selector);\n      w[54] = hc_byte_perm_S (w[21], w[22], selector);\n      w[53] = hc_byte_perm_S (w[20], w[21], selector);\n      w[52] = hc_byte_perm_S (w[19], w[20], selector);\n      w[51] = hc_byte_perm_S (w[18], w[19], selector);\n      w[50] = hc_byte_perm_S (w[17], w[18], selector);\n      w[49] = hc_byte_perm_S (w[16], w[17], selector);\n      w[48] = hc_byte_perm_S (w[15], w[16], selector);\n      w[47] = hc_byte_perm_S (w[14], w[15], selector);\n      w[46] = hc_byte_perm_S (w[13], w[14], selector);\n      w[45] = hc_byte_perm_S (w[12], w[13], selector);\n      w[44] = hc_byte_perm_S (w[11], w[12], selector);\n      w[43] = hc_byte_perm_S (w[10], w[11], selector);\n      w[42] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[41] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[40] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[39] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[38] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[37] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[36] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[35] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[34] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[33] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[32] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_byte_perm_S (w[29], w[30], selector);\n      w[62] = hc_byte_perm_S (w[28], w[29], selector);\n      w[61] = hc_byte_perm_S (w[27], w[28], selector);\n      w[60] = hc_byte_perm_S (w[26], w[27], selector);\n      w[59] = hc_byte_perm_S (w[25], w[26], selector);\n      w[58] = hc_byte_perm_S (w[24], w[25], selector);\n      w[57] = hc_byte_perm_S (w[23], w[24], selector);\n      w[56] = hc_byte_perm_S (w[22], w[23], selector);\n      w[55] = hc_byte_perm_S (w[21], w[22], selector);\n      w[54] = hc_byte_perm_S (w[20], w[21], selector);\n      w[53] = hc_byte_perm_S (w[19], w[20], selector);\n      w[52] = hc_byte_perm_S (w[18], w[19], selector);\n      w[51] = hc_byte_perm_S (w[17], w[18], selector);\n      w[50] = hc_byte_perm_S (w[16], w[17], selector);\n      w[49] = hc_byte_perm_S (w[15], w[16], selector);\n      w[48] = hc_byte_perm_S (w[14], w[15], selector);\n      w[47] = hc_byte_perm_S (w[13], w[14], selector);\n      w[46] = hc_byte_perm_S (w[12], w[13], selector);\n      w[45] = hc_byte_perm_S (w[11], w[12], selector);\n      w[44] = hc_byte_perm_S (w[10], w[11], selector);\n      w[43] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[42] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[41] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[40] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[39] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[38] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[37] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[36] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[35] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[34] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[33] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_byte_perm_S (w[28], w[29], selector);\n      w[62] = hc_byte_perm_S (w[27], w[28], selector);\n      w[61] = hc_byte_perm_S (w[26], w[27], selector);\n      w[60] = hc_byte_perm_S (w[25], w[26], selector);\n      w[59] = hc_byte_perm_S (w[24], w[25], selector);\n      w[58] = hc_byte_perm_S (w[23], w[24], selector);\n      w[57] = hc_byte_perm_S (w[22], w[23], selector);\n      w[56] = hc_byte_perm_S (w[21], w[22], selector);\n      w[55] = hc_byte_perm_S (w[20], w[21], selector);\n      w[54] = hc_byte_perm_S (w[19], w[20], selector);\n      w[53] = hc_byte_perm_S (w[18], w[19], selector);\n      w[52] = hc_byte_perm_S (w[17], w[18], selector);\n      w[51] = hc_byte_perm_S (w[16], w[17], selector);\n      w[50] = hc_byte_perm_S (w[15], w[16], selector);\n      w[49] = hc_byte_perm_S (w[14], w[15], selector);\n      w[48] = hc_byte_perm_S (w[13], w[14], selector);\n      w[47] = hc_byte_perm_S (w[12], w[13], selector);\n      w[46] = hc_byte_perm_S (w[11], w[12], selector);\n      w[45] = hc_byte_perm_S (w[10], w[11], selector);\n      w[44] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[43] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[42] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[41] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[40] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[39] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[38] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[37] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[36] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[35] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[34] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_byte_perm_S (w[27], w[28], selector);\n      w[62] = hc_byte_perm_S (w[26], w[27], selector);\n      w[61] = hc_byte_perm_S (w[25], w[26], selector);\n      w[60] = hc_byte_perm_S (w[24], w[25], selector);\n      w[59] = hc_byte_perm_S (w[23], w[24], selector);\n      w[58] = hc_byte_perm_S (w[22], w[23], selector);\n      w[57] = hc_byte_perm_S (w[21], w[22], selector);\n      w[56] = hc_byte_perm_S (w[20], w[21], selector);\n      w[55] = hc_byte_perm_S (w[19], w[20], selector);\n      w[54] = hc_byte_perm_S (w[18], w[19], selector);\n      w[53] = hc_byte_perm_S (w[17], w[18], selector);\n      w[52] = hc_byte_perm_S (w[16], w[17], selector);\n      w[51] = hc_byte_perm_S (w[15], w[16], selector);\n      w[50] = hc_byte_perm_S (w[14], w[15], selector);\n      w[49] = hc_byte_perm_S (w[13], w[14], selector);\n      w[48] = hc_byte_perm_S (w[12], w[13], selector);\n      w[47] = hc_byte_perm_S (w[11], w[12], selector);\n      w[46] = hc_byte_perm_S (w[10], w[11], selector);\n      w[45] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[44] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[43] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[42] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[41] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[40] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[39] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[38] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[37] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[36] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[35] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_byte_perm_S (w[26], w[27], selector);\n      w[62] = hc_byte_perm_S (w[25], w[26], selector);\n      w[61] = hc_byte_perm_S (w[24], w[25], selector);\n      w[60] = hc_byte_perm_S (w[23], w[24], selector);\n      w[59] = hc_byte_perm_S (w[22], w[23], selector);\n      w[58] = hc_byte_perm_S (w[21], w[22], selector);\n      w[57] = hc_byte_perm_S (w[20], w[21], selector);\n      w[56] = hc_byte_perm_S (w[19], w[20], selector);\n      w[55] = hc_byte_perm_S (w[18], w[19], selector);\n      w[54] = hc_byte_perm_S (w[17], w[18], selector);\n      w[53] = hc_byte_perm_S (w[16], w[17], selector);\n      w[52] = hc_byte_perm_S (w[15], w[16], selector);\n      w[51] = hc_byte_perm_S (w[14], w[15], selector);\n      w[50] = hc_byte_perm_S (w[13], w[14], selector);\n      w[49] = hc_byte_perm_S (w[12], w[13], selector);\n      w[48] = hc_byte_perm_S (w[11], w[12], selector);\n      w[47] = hc_byte_perm_S (w[10], w[11], selector);\n      w[46] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[45] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[44] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[43] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[42] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[41] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[40] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[39] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[38] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[37] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[36] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_byte_perm_S (w[25], w[26], selector);\n      w[62] = hc_byte_perm_S (w[24], w[25], selector);\n      w[61] = hc_byte_perm_S (w[23], w[24], selector);\n      w[60] = hc_byte_perm_S (w[22], w[23], selector);\n      w[59] = hc_byte_perm_S (w[21], w[22], selector);\n      w[58] = hc_byte_perm_S (w[20], w[21], selector);\n      w[57] = hc_byte_perm_S (w[19], w[20], selector);\n      w[56] = hc_byte_perm_S (w[18], w[19], selector);\n      w[55] = hc_byte_perm_S (w[17], w[18], selector);\n      w[54] = hc_byte_perm_S (w[16], w[17], selector);\n      w[53] = hc_byte_perm_S (w[15], w[16], selector);\n      w[52] = hc_byte_perm_S (w[14], w[15], selector);\n      w[51] = hc_byte_perm_S (w[13], w[14], selector);\n      w[50] = hc_byte_perm_S (w[12], w[13], selector);\n      w[49] = hc_byte_perm_S (w[11], w[12], selector);\n      w[48] = hc_byte_perm_S (w[10], w[11], selector);\n      w[47] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[46] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[45] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[44] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[43] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[42] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[41] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[40] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[39] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[38] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[37] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_byte_perm_S (w[24], w[25], selector);\n      w[62] = hc_byte_perm_S (w[23], w[24], selector);\n      w[61] = hc_byte_perm_S (w[22], w[23], selector);\n      w[60] = hc_byte_perm_S (w[21], w[22], selector);\n      w[59] = hc_byte_perm_S (w[20], w[21], selector);\n      w[58] = hc_byte_perm_S (w[19], w[20], selector);\n      w[57] = hc_byte_perm_S (w[18], w[19], selector);\n      w[56] = hc_byte_perm_S (w[17], w[18], selector);\n      w[55] = hc_byte_perm_S (w[16], w[17], selector);\n      w[54] = hc_byte_perm_S (w[15], w[16], selector);\n      w[53] = hc_byte_perm_S (w[14], w[15], selector);\n      w[52] = hc_byte_perm_S (w[13], w[14], selector);\n      w[51] = hc_byte_perm_S (w[12], w[13], selector);\n      w[50] = hc_byte_perm_S (w[11], w[12], selector);\n      w[49] = hc_byte_perm_S (w[10], w[11], selector);\n      w[48] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[47] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[46] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[45] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[44] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[43] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[42] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[41] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[40] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[39] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[38] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_byte_perm_S (w[23], w[24], selector);\n      w[62] = hc_byte_perm_S (w[22], w[23], selector);\n      w[61] = hc_byte_perm_S (w[21], w[22], selector);\n      w[60] = hc_byte_perm_S (w[20], w[21], selector);\n      w[59] = hc_byte_perm_S (w[19], w[20], selector);\n      w[58] = hc_byte_perm_S (w[18], w[19], selector);\n      w[57] = hc_byte_perm_S (w[17], w[18], selector);\n      w[56] = hc_byte_perm_S (w[16], w[17], selector);\n      w[55] = hc_byte_perm_S (w[15], w[16], selector);\n      w[54] = hc_byte_perm_S (w[14], w[15], selector);\n      w[53] = hc_byte_perm_S (w[13], w[14], selector);\n      w[52] = hc_byte_perm_S (w[12], w[13], selector);\n      w[51] = hc_byte_perm_S (w[11], w[12], selector);\n      w[50] = hc_byte_perm_S (w[10], w[11], selector);\n      w[49] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[48] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[47] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[46] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[45] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[44] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[43] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[42] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[41] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[40] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[39] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_byte_perm_S (w[22], w[23], selector);\n      w[62] = hc_byte_perm_S (w[21], w[22], selector);\n      w[61] = hc_byte_perm_S (w[20], w[21], selector);\n      w[60] = hc_byte_perm_S (w[19], w[20], selector);\n      w[59] = hc_byte_perm_S (w[18], w[19], selector);\n      w[58] = hc_byte_perm_S (w[17], w[18], selector);\n      w[57] = hc_byte_perm_S (w[16], w[17], selector);\n      w[56] = hc_byte_perm_S (w[15], w[16], selector);\n      w[55] = hc_byte_perm_S (w[14], w[15], selector);\n      w[54] = hc_byte_perm_S (w[13], w[14], selector);\n      w[53] = hc_byte_perm_S (w[12], w[13], selector);\n      w[52] = hc_byte_perm_S (w[11], w[12], selector);\n      w[51] = hc_byte_perm_S (w[10], w[11], selector);\n      w[50] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[49] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[48] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[47] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[46] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[45] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[44] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[43] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[42] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[41] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[40] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_byte_perm_S (w[21], w[22], selector);\n      w[62] = hc_byte_perm_S (w[20], w[21], selector);\n      w[61] = hc_byte_perm_S (w[19], w[20], selector);\n      w[60] = hc_byte_perm_S (w[18], w[19], selector);\n      w[59] = hc_byte_perm_S (w[17], w[18], selector);\n      w[58] = hc_byte_perm_S (w[16], w[17], selector);\n      w[57] = hc_byte_perm_S (w[15], w[16], selector);\n      w[56] = hc_byte_perm_S (w[14], w[15], selector);\n      w[55] = hc_byte_perm_S (w[13], w[14], selector);\n      w[54] = hc_byte_perm_S (w[12], w[13], selector);\n      w[53] = hc_byte_perm_S (w[11], w[12], selector);\n      w[52] = hc_byte_perm_S (w[10], w[11], selector);\n      w[51] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[50] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[49] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[48] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[47] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[46] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[45] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[44] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[43] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[42] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[41] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_byte_perm_S (w[20], w[21], selector);\n      w[62] = hc_byte_perm_S (w[19], w[20], selector);\n      w[61] = hc_byte_perm_S (w[18], w[19], selector);\n      w[60] = hc_byte_perm_S (w[17], w[18], selector);\n      w[59] = hc_byte_perm_S (w[16], w[17], selector);\n      w[58] = hc_byte_perm_S (w[15], w[16], selector);\n      w[57] = hc_byte_perm_S (w[14], w[15], selector);\n      w[56] = hc_byte_perm_S (w[13], w[14], selector);\n      w[55] = hc_byte_perm_S (w[12], w[13], selector);\n      w[54] = hc_byte_perm_S (w[11], w[12], selector);\n      w[53] = hc_byte_perm_S (w[10], w[11], selector);\n      w[52] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[51] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[50] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[49] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[48] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[47] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[46] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[45] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[44] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[43] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[42] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_byte_perm_S (w[19], w[20], selector);\n      w[62] = hc_byte_perm_S (w[18], w[19], selector);\n      w[61] = hc_byte_perm_S (w[17], w[18], selector);\n      w[60] = hc_byte_perm_S (w[16], w[17], selector);\n      w[59] = hc_byte_perm_S (w[15], w[16], selector);\n      w[58] = hc_byte_perm_S (w[14], w[15], selector);\n      w[57] = hc_byte_perm_S (w[13], w[14], selector);\n      w[56] = hc_byte_perm_S (w[12], w[13], selector);\n      w[55] = hc_byte_perm_S (w[11], w[12], selector);\n      w[54] = hc_byte_perm_S (w[10], w[11], selector);\n      w[53] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[52] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[51] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[50] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[49] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[48] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[47] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[46] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[45] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[44] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[43] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_byte_perm_S (w[18], w[19], selector);\n      w[62] = hc_byte_perm_S (w[17], w[18], selector);\n      w[61] = hc_byte_perm_S (w[16], w[17], selector);\n      w[60] = hc_byte_perm_S (w[15], w[16], selector);\n      w[59] = hc_byte_perm_S (w[14], w[15], selector);\n      w[58] = hc_byte_perm_S (w[13], w[14], selector);\n      w[57] = hc_byte_perm_S (w[12], w[13], selector);\n      w[56] = hc_byte_perm_S (w[11], w[12], selector);\n      w[55] = hc_byte_perm_S (w[10], w[11], selector);\n      w[54] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[53] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[52] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[51] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[50] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[49] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[48] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[47] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[46] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[45] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[44] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_byte_perm_S (w[17], w[18], selector);\n      w[62] = hc_byte_perm_S (w[16], w[17], selector);\n      w[61] = hc_byte_perm_S (w[15], w[16], selector);\n      w[60] = hc_byte_perm_S (w[14], w[15], selector);\n      w[59] = hc_byte_perm_S (w[13], w[14], selector);\n      w[58] = hc_byte_perm_S (w[12], w[13], selector);\n      w[57] = hc_byte_perm_S (w[11], w[12], selector);\n      w[56] = hc_byte_perm_S (w[10], w[11], selector);\n      w[55] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[54] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[53] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[52] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[51] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[50] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[49] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[48] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[47] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[46] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[45] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_byte_perm_S (w[16], w[17], selector);\n      w[62] = hc_byte_perm_S (w[15], w[16], selector);\n      w[61] = hc_byte_perm_S (w[14], w[15], selector);\n      w[60] = hc_byte_perm_S (w[13], w[14], selector);\n      w[59] = hc_byte_perm_S (w[12], w[13], selector);\n      w[58] = hc_byte_perm_S (w[11], w[12], selector);\n      w[57] = hc_byte_perm_S (w[10], w[11], selector);\n      w[56] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[55] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[54] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[53] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[52] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[51] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[50] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[49] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[48] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[47] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[46] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_byte_perm_S (w[15], w[16], selector);\n      w[62] = hc_byte_perm_S (w[14], w[15], selector);\n      w[61] = hc_byte_perm_S (w[13], w[14], selector);\n      w[60] = hc_byte_perm_S (w[12], w[13], selector);\n      w[59] = hc_byte_perm_S (w[11], w[12], selector);\n      w[58] = hc_byte_perm_S (w[10], w[11], selector);\n      w[57] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[56] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[55] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[54] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[53] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[52] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[51] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[50] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[49] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[48] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[47] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_byte_perm_S (w[14], w[15], selector);\n      w[62] = hc_byte_perm_S (w[13], w[14], selector);\n      w[61] = hc_byte_perm_S (w[12], w[13], selector);\n      w[60] = hc_byte_perm_S (w[11], w[12], selector);\n      w[59] = hc_byte_perm_S (w[10], w[11], selector);\n      w[58] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[57] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[56] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[55] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[54] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[53] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[52] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[51] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[50] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[49] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[48] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_byte_perm_S (w[13], w[14], selector);\n      w[62] = hc_byte_perm_S (w[12], w[13], selector);\n      w[61] = hc_byte_perm_S (w[11], w[12], selector);\n      w[60] = hc_byte_perm_S (w[10], w[11], selector);\n      w[59] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[58] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[57] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[56] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[55] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[54] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[53] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[52] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[51] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[50] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[49] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_byte_perm_S (w[12], w[13], selector);\n      w[62] = hc_byte_perm_S (w[11], w[12], selector);\n      w[61] = hc_byte_perm_S (w[10], w[11], selector);\n      w[60] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[59] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[58] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[57] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[56] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[55] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[54] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[53] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[52] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[51] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[50] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_byte_perm_S (w[11], w[12], selector);\n      w[62] = hc_byte_perm_S (w[10], w[11], selector);\n      w[61] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[60] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[59] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[58] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[57] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[56] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[55] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[54] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[53] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[52] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[51] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_byte_perm_S (w[10], w[11], selector);\n      w[62] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[61] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[60] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[59] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[58] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[57] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[56] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[55] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[54] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[53] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[52] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_byte_perm_S (w[ 9], w[10], selector);\n      w[62] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[61] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[60] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[59] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[58] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[57] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[56] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[55] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[54] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[53] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_byte_perm_S (w[ 8], w[ 9], selector);\n      w[62] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[61] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[60] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[59] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[58] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[57] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[56] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[55] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[54] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_byte_perm_S (w[ 7], w[ 8], selector);\n      w[62] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[61] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[60] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[59] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[58] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[57] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[56] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[55] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_byte_perm_S (w[ 6], w[ 7], selector);\n      w[62] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[61] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[60] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[59] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[58] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[57] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[56] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_byte_perm_S (w[ 5], w[ 6], selector);\n      w[62] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[61] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[60] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[59] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[58] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[57] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_byte_perm_S (w[ 4], w[ 5], selector);\n      w[62] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[61] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[60] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[59] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[58] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_byte_perm_S (w[ 3], w[ 4], selector);\n      w[62] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[61] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[60] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[59] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_byte_perm_S (w[ 2], w[ 3], selector);\n      w[62] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[61] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[60] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_byte_perm_S (w[ 1], w[ 2], selector);\n      w[62] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[61] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_byte_perm_S (w[ 0], w[ 1], selector);\n      w[62] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_byte_perm_S (    0, w[ 0], selector);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_1x64_be_S (PRIVATE_AS u32 *w, const u32 offset)\n{\n  const int offset_switch = offset / 4;\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 0) || defined IS_GENERIC\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_bytealign_be_S (w[62], w[63], offset);\n      w[62] = hc_bytealign_be_S (w[61], w[62], offset);\n      w[61] = hc_bytealign_be_S (w[60], w[61], offset);\n      w[60] = hc_bytealign_be_S (w[59], w[60], offset);\n      w[59] = hc_bytealign_be_S (w[58], w[59], offset);\n      w[58] = hc_bytealign_be_S (w[57], w[58], offset);\n      w[57] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[56] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[55] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[54] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[53] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[52] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[51] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[50] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[49] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[48] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[47] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[46] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[45] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[44] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[43] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[42] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[41] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[40] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[39] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[38] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[37] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[36] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[35] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[34] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[33] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[32] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[31] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[30] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[29] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[28] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[27] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[26] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[25] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[24] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[23] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[22] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[21] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[20] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[19] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[18] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[17] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[16] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[15] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[14] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[13] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[12] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[11] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[10] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[ 6] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[ 5] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[ 4] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 3] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 2] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 1] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 0] = hc_bytealign_be_S (    0, w[ 0], offset);\n\n      break;\n\n    case  1:\n      w[63] = hc_bytealign_be_S (w[61], w[62], offset);\n      w[62] = hc_bytealign_be_S (w[60], w[61], offset);\n      w[61] = hc_bytealign_be_S (w[59], w[60], offset);\n      w[60] = hc_bytealign_be_S (w[58], w[59], offset);\n      w[59] = hc_bytealign_be_S (w[57], w[58], offset);\n      w[58] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[57] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[56] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[55] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[54] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[53] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[52] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[51] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[50] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[49] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[48] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[47] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[46] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[45] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[44] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[43] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[42] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[41] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[40] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[39] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[38] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[37] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[36] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[35] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[34] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[33] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[32] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[31] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[30] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[29] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[28] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[27] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[26] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[25] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[24] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[23] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[22] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[21] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[20] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[19] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[18] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[17] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[16] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[15] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[14] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[13] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[12] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[11] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[10] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[ 6] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[ 5] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 4] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 3] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 2] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 1] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_bytealign_be_S (w[60], w[61], offset);\n      w[62] = hc_bytealign_be_S (w[59], w[60], offset);\n      w[61] = hc_bytealign_be_S (w[58], w[59], offset);\n      w[60] = hc_bytealign_be_S (w[57], w[58], offset);\n      w[59] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[58] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[57] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[56] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[55] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[54] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[53] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[52] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[51] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[50] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[49] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[48] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[47] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[46] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[45] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[44] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[43] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[42] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[41] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[40] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[39] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[38] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[37] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[36] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[35] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[34] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[33] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[32] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[31] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[30] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[29] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[28] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[27] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[26] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[25] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[24] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[23] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[22] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[21] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[20] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[19] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[18] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[17] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[16] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[15] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[14] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[13] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[12] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[11] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[10] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[ 6] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 5] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 4] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 3] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 2] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_bytealign_be_S (w[59], w[60], offset);\n      w[62] = hc_bytealign_be_S (w[58], w[59], offset);\n      w[61] = hc_bytealign_be_S (w[57], w[58], offset);\n      w[60] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[59] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[58] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[57] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[56] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[55] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[54] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[53] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[52] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[51] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[50] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[49] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[48] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[47] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[46] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[45] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[44] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[43] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[42] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[41] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[40] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[39] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[38] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[37] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[36] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[35] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[34] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[33] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[32] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[31] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[30] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[29] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[28] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[27] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[26] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[25] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[24] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[23] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[22] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[21] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[20] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[19] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[18] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[17] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[16] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[15] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[14] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[13] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[12] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[11] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[10] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 6] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 5] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 4] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 3] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_bytealign_be_S (w[58], w[59], offset);\n      w[62] = hc_bytealign_be_S (w[57], w[58], offset);\n      w[61] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[60] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[59] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[58] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[57] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[56] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[55] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[54] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[53] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[52] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[51] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[50] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[49] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[48] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[47] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[46] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[45] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[44] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[43] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[42] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[41] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[40] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[39] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[38] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[37] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[36] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[35] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[34] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[33] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[32] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[31] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[30] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[29] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[28] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[27] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[26] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[25] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[24] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[23] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[22] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[21] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[20] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[19] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[18] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[17] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[16] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[15] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[14] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[13] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[12] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[11] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[10] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 6] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 5] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 4] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_bytealign_be_S (w[57], w[58], offset);\n      w[62] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[61] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[60] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[59] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[58] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[57] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[56] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[55] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[54] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[53] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[52] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[51] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[50] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[49] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[48] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[47] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[46] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[45] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[44] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[43] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[42] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[41] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[40] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[39] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[38] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[37] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[36] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[35] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[34] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[33] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[32] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[31] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[30] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[29] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[28] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[27] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[26] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[25] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[24] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[23] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[22] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[21] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[20] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[19] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[18] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[17] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[16] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[15] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[14] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[13] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[12] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[11] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[10] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 6] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 5] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_bytealign_be_S (w[56], w[57], offset);\n      w[62] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[61] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[60] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[59] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[58] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[57] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[56] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[55] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[54] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[53] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[52] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[51] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[50] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[49] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[48] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[47] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[46] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[45] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[44] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[43] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[42] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[41] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[40] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[39] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[38] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[37] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[36] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[35] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[34] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[33] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[32] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[31] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[30] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[29] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[28] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[27] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[26] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[25] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[24] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[23] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[22] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[21] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[20] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[19] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[18] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[17] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[16] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[15] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[14] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[13] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[12] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[11] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[10] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 7] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 6] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_bytealign_be_S (w[55], w[56], offset);\n      w[62] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[61] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[60] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[59] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[58] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[57] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[56] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[55] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[54] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[53] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[52] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[51] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[50] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[49] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[48] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[47] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[46] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[45] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[44] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[43] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[42] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[41] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[40] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[39] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[38] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[37] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[36] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[35] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[34] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[33] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[32] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[31] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[30] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[29] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[28] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[27] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[26] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[25] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[24] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[23] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[22] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[21] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[20] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[19] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[18] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[17] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[16] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[15] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[14] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[13] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[12] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[11] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[10] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 8] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 7] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_bytealign_be_S (w[54], w[55], offset);\n      w[62] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[61] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[60] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[59] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[58] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[57] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[56] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[55] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[54] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[53] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[52] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[51] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[50] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[49] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[48] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[47] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[46] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[45] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[44] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[43] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[42] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[41] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[40] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[39] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[38] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[37] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[36] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[35] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[34] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[33] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[32] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[31] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[30] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[29] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[28] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[27] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[26] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[25] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[24] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[23] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[22] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[21] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[20] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[19] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[18] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[17] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[16] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[15] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[14] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[13] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[12] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[11] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[10] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[ 9] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 8] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_bytealign_be_S (w[53], w[54], offset);\n      w[62] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[61] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[60] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[59] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[58] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[57] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[56] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[55] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[54] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[53] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[52] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[51] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[50] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[49] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[48] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[47] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[46] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[45] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[44] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[43] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[42] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[41] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[40] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[39] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[38] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[37] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[36] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[35] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[34] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[33] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[32] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[31] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[30] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[29] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[28] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[27] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[26] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[25] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[24] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[23] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[22] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[21] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[20] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[19] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[18] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[17] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[16] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[15] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[14] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[13] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[12] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[11] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[10] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[ 9] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_bytealign_be_S (w[52], w[53], offset);\n      w[62] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[61] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[60] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[59] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[58] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[57] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[56] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[55] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[54] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[53] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[52] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[51] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[50] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[49] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[48] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[47] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[46] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[45] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[44] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[43] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[42] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[41] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[40] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[39] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[38] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[37] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[36] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[35] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[34] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[33] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[32] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[31] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[30] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[29] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[28] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[27] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[26] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[25] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[24] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[23] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[22] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[21] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[20] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[19] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[18] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[17] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[16] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[15] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[14] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[13] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[12] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[11] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[10] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_bytealign_be_S (w[51], w[52], offset);\n      w[62] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[61] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[60] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[59] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[58] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[57] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[56] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[55] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[54] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[53] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[52] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[51] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[50] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[49] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[48] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[47] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[46] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[45] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[44] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[43] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[42] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[41] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[40] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[39] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[38] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[37] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[36] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[35] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[34] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[33] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[32] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[31] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[30] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[29] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[28] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[27] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[26] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[25] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[24] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[23] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[22] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[21] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[20] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[19] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[18] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[17] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[16] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[15] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[14] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[13] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[12] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[11] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_bytealign_be_S (w[50], w[51], offset);\n      w[62] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[61] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[60] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[59] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[58] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[57] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[56] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[55] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[54] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[53] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[52] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[51] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[50] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[49] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[48] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[47] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[46] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[45] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[44] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[43] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[42] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[41] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[40] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[39] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[38] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[37] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[36] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[35] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[34] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[33] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[32] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[31] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[30] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[29] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[28] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[27] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[26] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[25] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[24] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[23] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[22] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[21] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[20] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[19] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[18] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[17] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[16] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[15] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[14] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[13] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[12] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_bytealign_be_S (w[49], w[50], offset);\n      w[62] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[61] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[60] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[59] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[58] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[57] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[56] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[55] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[54] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[53] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[52] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[51] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[50] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[49] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[48] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[47] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[46] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[45] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[44] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[43] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[42] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[41] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[40] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[39] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[38] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[37] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[36] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[35] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[34] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[33] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[32] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[31] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[30] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[29] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[28] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[27] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[26] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[25] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[24] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[23] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[22] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[21] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[20] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[19] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[18] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[17] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[16] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[15] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[14] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[13] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_bytealign_be_S (w[48], w[49], offset);\n      w[62] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[61] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[60] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[59] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[58] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[57] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[56] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[55] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[54] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[53] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[52] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[51] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[50] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[49] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[48] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[47] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[46] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[45] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[44] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[43] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[42] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[41] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[40] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[39] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[38] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[37] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[36] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[35] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[34] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[33] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[32] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[31] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[30] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[29] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[28] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[27] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[26] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[25] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[24] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[23] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[22] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[21] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[20] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[19] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[18] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[17] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[16] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[15] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[14] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_bytealign_be_S (w[47], w[48], offset);\n      w[62] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[61] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[60] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[59] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[58] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[57] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[56] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[55] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[54] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[53] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[52] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[51] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[50] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[49] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[48] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[47] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[46] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[45] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[44] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[43] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[42] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[41] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[40] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[39] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[38] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[37] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[36] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[35] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[34] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[33] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[32] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[31] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[30] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[29] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[28] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[27] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[26] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[25] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[24] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[23] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[22] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[21] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[20] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[19] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[18] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[17] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[16] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[15] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_bytealign_be_S (w[46], w[47], offset);\n      w[62] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[61] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[60] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[59] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[58] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[57] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[56] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[55] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[54] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[53] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[52] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[51] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[50] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[49] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[48] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[47] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[46] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[45] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[44] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[43] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[42] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[41] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[40] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[39] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[38] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[37] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[36] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[35] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[34] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[33] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[32] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[31] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[30] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[29] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[28] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[27] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[26] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[25] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[24] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[23] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[22] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[21] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[20] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[19] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[18] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[17] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[16] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_bytealign_be_S (w[45], w[46], offset);\n      w[62] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[61] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[60] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[59] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[58] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[57] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[56] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[55] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[54] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[53] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[52] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[51] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[50] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[49] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[48] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[47] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[46] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[45] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[44] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[43] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[42] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[41] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[40] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[39] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[38] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[37] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[36] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[35] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[34] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[33] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[32] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[31] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[30] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[29] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[28] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[27] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[26] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[25] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[24] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[23] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[22] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[21] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[20] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[19] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[18] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[17] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_bytealign_be_S (w[44], w[45], offset);\n      w[62] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[61] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[60] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[59] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[58] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[57] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[56] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[55] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[54] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[53] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[52] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[51] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[50] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[49] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[48] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[47] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[46] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[45] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[44] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[43] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[42] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[41] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[40] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[39] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[38] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[37] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[36] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[35] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[34] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[33] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[32] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[31] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[30] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[29] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[28] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[27] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[26] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[25] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[24] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[23] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[22] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[21] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[20] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[19] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[18] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_bytealign_be_S (w[43], w[44], offset);\n      w[62] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[61] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[60] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[59] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[58] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[57] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[56] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[55] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[54] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[53] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[52] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[51] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[50] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[49] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[48] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[47] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[46] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[45] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[44] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[43] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[42] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[41] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[40] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[39] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[38] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[37] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[36] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[35] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[34] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[33] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[32] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[31] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[30] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[29] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[28] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[27] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[26] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[25] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[24] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[23] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[22] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[21] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[20] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[19] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_bytealign_be_S (w[42], w[43], offset);\n      w[62] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[61] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[60] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[59] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[58] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[57] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[56] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[55] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[54] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[53] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[52] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[51] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[50] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[49] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[48] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[47] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[46] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[45] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[44] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[43] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[42] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[41] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[40] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[39] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[38] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[37] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[36] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[35] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[34] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[33] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[32] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[31] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[30] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[29] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[28] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[27] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[26] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[25] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[24] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[23] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[22] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[21] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[20] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_bytealign_be_S (w[41], w[42], offset);\n      w[62] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[61] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[60] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[59] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[58] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[57] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[56] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[55] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[54] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[53] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[52] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[51] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[50] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[49] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[48] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[47] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[46] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[45] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[44] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[43] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[42] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[41] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[40] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[39] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[38] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[37] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[36] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[35] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[34] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[33] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[32] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[31] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[30] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[29] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[28] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[27] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[26] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[25] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[24] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[23] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[22] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[21] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_bytealign_be_S (w[40], w[41], offset);\n      w[62] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[61] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[60] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[59] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[58] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[57] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[56] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[55] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[54] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[53] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[52] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[51] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[50] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[49] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[48] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[47] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[46] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[45] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[44] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[43] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[42] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[41] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[40] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[39] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[38] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[37] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[36] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[35] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[34] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[33] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[32] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[31] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[30] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[29] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[28] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[27] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[26] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[25] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[24] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[23] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[22] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_bytealign_be_S (w[39], w[40], offset);\n      w[62] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[61] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[60] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[59] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[58] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[57] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[56] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[55] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[54] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[53] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[52] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[51] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[50] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[49] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[48] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[47] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[46] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[45] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[44] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[43] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[42] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[41] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[40] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[39] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[38] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[37] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[36] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[35] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[34] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[33] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[32] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[31] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[30] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[29] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[28] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[27] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[26] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[25] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[24] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[23] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_bytealign_be_S (w[38], w[39], offset);\n      w[62] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[61] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[60] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[59] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[58] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[57] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[56] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[55] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[54] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[53] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[52] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[51] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[50] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[49] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[48] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[47] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[46] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[45] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[44] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[43] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[42] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[41] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[40] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[39] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[38] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[37] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[36] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[35] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[34] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[33] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[32] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[31] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[30] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[29] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[28] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[27] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[26] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[25] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[24] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_bytealign_be_S (w[37], w[38], offset);\n      w[62] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[61] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[60] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[59] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[58] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[57] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[56] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[55] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[54] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[53] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[52] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[51] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[50] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[49] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[48] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[47] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[46] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[45] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[44] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[43] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[42] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[41] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[40] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[39] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[38] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[37] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[36] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[35] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[34] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[33] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[32] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[31] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[30] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[29] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[28] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[27] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[26] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[25] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_bytealign_be_S (w[36], w[37], offset);\n      w[62] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[61] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[60] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[59] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[58] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[57] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[56] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[55] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[54] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[53] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[52] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[51] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[50] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[49] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[48] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[47] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[46] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[45] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[44] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[43] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[42] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[41] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[40] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[39] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[38] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[37] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[36] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[35] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[34] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[33] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[32] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[31] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[30] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[29] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[28] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[27] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[26] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_bytealign_be_S (w[35], w[36], offset);\n      w[62] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[61] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[60] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[59] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[58] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[57] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[56] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[55] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[54] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[53] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[52] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[51] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[50] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[49] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[48] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[47] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[46] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[45] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[44] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[43] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[42] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[41] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[40] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[39] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[38] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[37] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[36] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[35] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[34] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[33] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[32] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[31] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[30] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[29] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[28] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[27] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_bytealign_be_S (w[34], w[35], offset);\n      w[62] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[61] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[60] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[59] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[58] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[57] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[56] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[55] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[54] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[53] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[52] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[51] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[50] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[49] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[48] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[47] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[46] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[45] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[44] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[43] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[42] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[41] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[40] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[39] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[38] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[37] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[36] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[35] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[34] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[33] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[32] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[31] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[30] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[29] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[28] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_bytealign_be_S (w[33], w[34], offset);\n      w[62] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[61] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[60] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[59] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[58] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[57] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[56] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[55] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[54] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[53] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[52] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[51] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[50] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[49] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[48] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[47] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[46] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[45] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[44] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[43] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[42] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[41] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[40] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[39] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[38] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[37] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[36] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[35] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[34] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[33] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[32] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[31] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[30] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[29] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_bytealign_be_S (w[32], w[33], offset);\n      w[62] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[61] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[60] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[59] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[58] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[57] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[56] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[55] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[54] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[53] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[52] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[51] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[50] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[49] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[48] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[47] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[46] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[45] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[44] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[43] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[42] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[41] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[40] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[39] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[38] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[37] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[36] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[35] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[34] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[33] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[32] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[31] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[30] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_bytealign_be_S (w[31], w[32], offset);\n      w[62] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[61] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[60] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[59] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[58] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[57] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[56] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[55] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[54] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[53] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[52] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[51] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[50] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[49] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[48] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[47] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[46] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[45] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[44] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[43] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[42] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[41] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[40] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[39] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[38] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[37] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[36] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[35] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[34] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[33] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[32] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[31] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_bytealign_be_S (w[30], w[31], offset);\n      w[62] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[61] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[60] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[59] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[58] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[57] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[56] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[55] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[54] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[53] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[52] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[51] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[50] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[49] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[48] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[47] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[46] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[45] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[44] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[43] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[42] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[41] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[40] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[39] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[38] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[37] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[36] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[35] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[34] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[33] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[32] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_bytealign_be_S (w[29], w[30], offset);\n      w[62] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[61] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[60] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[59] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[58] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[57] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[56] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[55] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[54] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[53] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[52] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[51] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[50] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[49] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[48] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[47] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[46] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[45] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[44] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[43] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[42] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[41] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[40] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[39] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[38] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[37] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[36] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[35] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[34] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[33] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_bytealign_be_S (w[28], w[29], offset);\n      w[62] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[61] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[60] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[59] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[58] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[57] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[56] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[55] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[54] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[53] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[52] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[51] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[50] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[49] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[48] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[47] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[46] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[45] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[44] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[43] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[42] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[41] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[40] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[39] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[38] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[37] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[36] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[35] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[34] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_bytealign_be_S (w[27], w[28], offset);\n      w[62] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[61] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[60] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[59] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[58] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[57] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[56] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[55] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[54] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[53] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[52] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[51] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[50] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[49] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[48] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[47] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[46] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[45] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[44] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[43] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[42] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[41] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[40] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[39] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[38] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[37] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[36] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[35] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_bytealign_be_S (w[26], w[27], offset);\n      w[62] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[61] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[60] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[59] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[58] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[57] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[56] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[55] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[54] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[53] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[52] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[51] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[50] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[49] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[48] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[47] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[46] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[45] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[44] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[43] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[42] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[41] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[40] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[39] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[38] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[37] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[36] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_bytealign_be_S (w[25], w[26], offset);\n      w[62] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[61] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[60] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[59] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[58] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[57] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[56] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[55] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[54] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[53] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[52] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[51] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[50] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[49] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[48] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[47] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[46] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[45] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[44] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[43] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[42] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[41] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[40] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[39] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[38] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[37] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_bytealign_be_S (w[24], w[25], offset);\n      w[62] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[61] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[60] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[59] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[58] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[57] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[56] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[55] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[54] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[53] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[52] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[51] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[50] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[49] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[48] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[47] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[46] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[45] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[44] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[43] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[42] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[41] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[40] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[39] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[38] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_bytealign_be_S (w[23], w[24], offset);\n      w[62] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[61] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[60] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[59] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[58] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[57] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[56] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[55] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[54] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[53] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[52] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[51] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[50] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[49] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[48] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[47] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[46] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[45] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[44] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[43] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[42] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[41] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[40] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[39] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_bytealign_be_S (w[22], w[23], offset);\n      w[62] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[61] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[60] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[59] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[58] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[57] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[56] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[55] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[54] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[53] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[52] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[51] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[50] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[49] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[48] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[47] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[46] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[45] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[44] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[43] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[42] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[41] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[40] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_bytealign_be_S (w[21], w[22], offset);\n      w[62] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[61] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[60] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[59] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[58] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[57] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[56] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[55] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[54] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[53] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[52] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[51] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[50] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[49] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[48] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[47] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[46] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[45] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[44] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[43] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[42] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[41] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_bytealign_be_S (w[20], w[21], offset);\n      w[62] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[61] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[60] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[59] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[58] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[57] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[56] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[55] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[54] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[53] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[52] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[51] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[50] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[49] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[48] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[47] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[46] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[45] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[44] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[43] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[42] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_bytealign_be_S (w[19], w[20], offset);\n      w[62] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[61] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[60] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[59] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[58] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[57] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[56] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[55] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[54] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[53] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[52] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[51] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[50] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[49] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[48] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[47] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[46] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[45] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[44] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[43] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_bytealign_be_S (w[18], w[19], offset);\n      w[62] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[61] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[60] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[59] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[58] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[57] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[56] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[55] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[54] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[53] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[52] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[51] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[50] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[49] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[48] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[47] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[46] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[45] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[44] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_bytealign_be_S (w[17], w[18], offset);\n      w[62] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[61] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[60] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[59] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[58] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[57] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[56] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[55] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[54] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[53] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[52] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[51] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[50] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[49] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[48] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[47] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[46] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[45] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_bytealign_be_S (w[16], w[17], offset);\n      w[62] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[61] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[60] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[59] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[58] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[57] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[56] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[55] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[54] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[53] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[52] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[51] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[50] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[49] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[48] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[47] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[46] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_bytealign_be_S (w[15], w[16], offset);\n      w[62] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[61] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[60] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[59] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[58] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[57] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[56] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[55] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[54] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[53] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[52] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[51] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[50] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[49] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[48] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[47] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_bytealign_be_S (w[14], w[15], offset);\n      w[62] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[61] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[60] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[59] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[58] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[57] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[56] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[55] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[54] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[53] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[52] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[51] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[50] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[49] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[48] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_bytealign_be_S (w[13], w[14], offset);\n      w[62] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[61] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[60] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[59] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[58] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[57] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[56] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[55] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[54] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[53] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[52] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[51] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[50] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[49] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_bytealign_be_S (w[12], w[13], offset);\n      w[62] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[61] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[60] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[59] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[58] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[57] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[56] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[55] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[54] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[53] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[52] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[51] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[50] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_bytealign_be_S (w[11], w[12], offset);\n      w[62] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[61] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[60] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[59] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[58] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[57] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[56] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[55] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[54] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[53] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[52] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[51] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_bytealign_be_S (w[10], w[11], offset);\n      w[62] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[61] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[60] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[59] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[58] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[57] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[56] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[55] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[54] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[53] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[52] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_bytealign_be_S (w[ 9], w[10], offset);\n      w[62] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[61] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[60] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[59] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[58] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[57] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[56] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[55] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[54] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[53] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_bytealign_be_S (w[ 8], w[ 9], offset);\n      w[62] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[61] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[60] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[59] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[58] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[57] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[56] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[55] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[54] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_bytealign_be_S (w[ 7], w[ 8], offset);\n      w[62] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[61] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[60] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[59] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[58] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[57] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[56] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[55] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_bytealign_be_S (w[ 6], w[ 7], offset);\n      w[62] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[61] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[60] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[59] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[58] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[57] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[56] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_bytealign_be_S (w[ 5], w[ 6], offset);\n      w[62] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[61] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[60] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[59] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[58] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[57] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_bytealign_be_S (w[ 4], w[ 5], offset);\n      w[62] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[61] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[60] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[59] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[58] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_bytealign_be_S (w[ 3], w[ 4], offset);\n      w[62] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[61] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[60] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[59] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_bytealign_be_S (w[ 2], w[ 3], offset);\n      w[62] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[61] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[60] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_bytealign_be_S (w[ 1], w[ 2], offset);\n      w[62] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[61] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_bytealign_be_S (w[ 0], w[ 1], offset);\n      w[62] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_bytealign_be_S (    0, w[ 0], offset);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n\n  #if ((defined IS_AMD || defined IS_HIP) && HAS_VPERM == 1) || defined IS_NV\n\n  #if defined IS_NV\n  const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;\n  #endif\n\n  #if (defined IS_AMD || defined IS_HIP)\n  const int selector = l32_from_64_S (0x0706050403020100UL >> ((offset & 3) * 8));\n  #endif\n\n  switch (offset_switch)\n  {\n    case  0:\n      w[63] = hc_byte_perm_S (w[63], w[62], selector);\n      w[62] = hc_byte_perm_S (w[62], w[61], selector);\n      w[61] = hc_byte_perm_S (w[61], w[60], selector);\n      w[60] = hc_byte_perm_S (w[60], w[59], selector);\n      w[59] = hc_byte_perm_S (w[59], w[58], selector);\n      w[58] = hc_byte_perm_S (w[58], w[57], selector);\n      w[57] = hc_byte_perm_S (w[57], w[56], selector);\n      w[56] = hc_byte_perm_S (w[56], w[55], selector);\n      w[55] = hc_byte_perm_S (w[55], w[54], selector);\n      w[54] = hc_byte_perm_S (w[54], w[53], selector);\n      w[53] = hc_byte_perm_S (w[53], w[52], selector);\n      w[52] = hc_byte_perm_S (w[52], w[51], selector);\n      w[51] = hc_byte_perm_S (w[51], w[50], selector);\n      w[50] = hc_byte_perm_S (w[50], w[49], selector);\n      w[49] = hc_byte_perm_S (w[49], w[48], selector);\n      w[48] = hc_byte_perm_S (w[48], w[47], selector);\n      w[47] = hc_byte_perm_S (w[47], w[46], selector);\n      w[46] = hc_byte_perm_S (w[46], w[45], selector);\n      w[45] = hc_byte_perm_S (w[45], w[44], selector);\n      w[44] = hc_byte_perm_S (w[44], w[43], selector);\n      w[43] = hc_byte_perm_S (w[43], w[42], selector);\n      w[42] = hc_byte_perm_S (w[42], w[41], selector);\n      w[41] = hc_byte_perm_S (w[41], w[40], selector);\n      w[40] = hc_byte_perm_S (w[40], w[39], selector);\n      w[39] = hc_byte_perm_S (w[39], w[38], selector);\n      w[38] = hc_byte_perm_S (w[38], w[37], selector);\n      w[37] = hc_byte_perm_S (w[37], w[36], selector);\n      w[36] = hc_byte_perm_S (w[36], w[35], selector);\n      w[35] = hc_byte_perm_S (w[35], w[34], selector);\n      w[34] = hc_byte_perm_S (w[34], w[33], selector);\n      w[33] = hc_byte_perm_S (w[33], w[32], selector);\n      w[32] = hc_byte_perm_S (w[32], w[31], selector);\n      w[31] = hc_byte_perm_S (w[31], w[30], selector);\n      w[30] = hc_byte_perm_S (w[30], w[29], selector);\n      w[29] = hc_byte_perm_S (w[29], w[28], selector);\n      w[28] = hc_byte_perm_S (w[28], w[27], selector);\n      w[27] = hc_byte_perm_S (w[27], w[26], selector);\n      w[26] = hc_byte_perm_S (w[26], w[25], selector);\n      w[25] = hc_byte_perm_S (w[25], w[24], selector);\n      w[24] = hc_byte_perm_S (w[24], w[23], selector);\n      w[23] = hc_byte_perm_S (w[23], w[22], selector);\n      w[22] = hc_byte_perm_S (w[22], w[21], selector);\n      w[21] = hc_byte_perm_S (w[21], w[20], selector);\n      w[20] = hc_byte_perm_S (w[20], w[19], selector);\n      w[19] = hc_byte_perm_S (w[19], w[18], selector);\n      w[18] = hc_byte_perm_S (w[18], w[17], selector);\n      w[17] = hc_byte_perm_S (w[17], w[16], selector);\n      w[16] = hc_byte_perm_S (w[16], w[15], selector);\n      w[15] = hc_byte_perm_S (w[15], w[14], selector);\n      w[14] = hc_byte_perm_S (w[14], w[13], selector);\n      w[13] = hc_byte_perm_S (w[13], w[12], selector);\n      w[12] = hc_byte_perm_S (w[12], w[11], selector);\n      w[11] = hc_byte_perm_S (w[11], w[10], selector);\n      w[10] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[ 9] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[ 8] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[ 7] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[ 6] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[ 5] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[ 4] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 3] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 2] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 1] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 0] = hc_byte_perm_S (w[ 0],     0, selector);\n\n      break;\n\n    case  1:\n      w[63] = hc_byte_perm_S (w[62], w[61], selector);\n      w[62] = hc_byte_perm_S (w[61], w[60], selector);\n      w[61] = hc_byte_perm_S (w[60], w[59], selector);\n      w[60] = hc_byte_perm_S (w[59], w[58], selector);\n      w[59] = hc_byte_perm_S (w[58], w[57], selector);\n      w[58] = hc_byte_perm_S (w[57], w[56], selector);\n      w[57] = hc_byte_perm_S (w[56], w[55], selector);\n      w[56] = hc_byte_perm_S (w[55], w[54], selector);\n      w[55] = hc_byte_perm_S (w[54], w[53], selector);\n      w[54] = hc_byte_perm_S (w[53], w[52], selector);\n      w[53] = hc_byte_perm_S (w[52], w[51], selector);\n      w[52] = hc_byte_perm_S (w[51], w[50], selector);\n      w[51] = hc_byte_perm_S (w[50], w[49], selector);\n      w[50] = hc_byte_perm_S (w[49], w[48], selector);\n      w[49] = hc_byte_perm_S (w[48], w[47], selector);\n      w[48] = hc_byte_perm_S (w[47], w[46], selector);\n      w[47] = hc_byte_perm_S (w[46], w[45], selector);\n      w[46] = hc_byte_perm_S (w[45], w[44], selector);\n      w[45] = hc_byte_perm_S (w[44], w[43], selector);\n      w[44] = hc_byte_perm_S (w[43], w[42], selector);\n      w[43] = hc_byte_perm_S (w[42], w[41], selector);\n      w[42] = hc_byte_perm_S (w[41], w[40], selector);\n      w[41] = hc_byte_perm_S (w[40], w[39], selector);\n      w[40] = hc_byte_perm_S (w[39], w[38], selector);\n      w[39] = hc_byte_perm_S (w[38], w[37], selector);\n      w[38] = hc_byte_perm_S (w[37], w[36], selector);\n      w[37] = hc_byte_perm_S (w[36], w[35], selector);\n      w[36] = hc_byte_perm_S (w[35], w[34], selector);\n      w[35] = hc_byte_perm_S (w[34], w[33], selector);\n      w[34] = hc_byte_perm_S (w[33], w[32], selector);\n      w[33] = hc_byte_perm_S (w[32], w[31], selector);\n      w[32] = hc_byte_perm_S (w[31], w[30], selector);\n      w[31] = hc_byte_perm_S (w[30], w[29], selector);\n      w[30] = hc_byte_perm_S (w[29], w[28], selector);\n      w[29] = hc_byte_perm_S (w[28], w[27], selector);\n      w[28] = hc_byte_perm_S (w[27], w[26], selector);\n      w[27] = hc_byte_perm_S (w[26], w[25], selector);\n      w[26] = hc_byte_perm_S (w[25], w[24], selector);\n      w[25] = hc_byte_perm_S (w[24], w[23], selector);\n      w[24] = hc_byte_perm_S (w[23], w[22], selector);\n      w[23] = hc_byte_perm_S (w[22], w[21], selector);\n      w[22] = hc_byte_perm_S (w[21], w[20], selector);\n      w[21] = hc_byte_perm_S (w[20], w[19], selector);\n      w[20] = hc_byte_perm_S (w[19], w[18], selector);\n      w[19] = hc_byte_perm_S (w[18], w[17], selector);\n      w[18] = hc_byte_perm_S (w[17], w[16], selector);\n      w[17] = hc_byte_perm_S (w[16], w[15], selector);\n      w[16] = hc_byte_perm_S (w[15], w[14], selector);\n      w[15] = hc_byte_perm_S (w[14], w[13], selector);\n      w[14] = hc_byte_perm_S (w[13], w[12], selector);\n      w[13] = hc_byte_perm_S (w[12], w[11], selector);\n      w[12] = hc_byte_perm_S (w[11], w[10], selector);\n      w[11] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[10] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[ 9] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[ 8] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[ 7] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[ 6] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[ 5] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 4] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 3] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 2] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 1] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 0] = 0;\n\n      break;\n\n    case  2:\n      w[63] = hc_byte_perm_S (w[61], w[60], selector);\n      w[62] = hc_byte_perm_S (w[60], w[59], selector);\n      w[61] = hc_byte_perm_S (w[59], w[58], selector);\n      w[60] = hc_byte_perm_S (w[58], w[57], selector);\n      w[59] = hc_byte_perm_S (w[57], w[56], selector);\n      w[58] = hc_byte_perm_S (w[56], w[55], selector);\n      w[57] = hc_byte_perm_S (w[55], w[54], selector);\n      w[56] = hc_byte_perm_S (w[54], w[53], selector);\n      w[55] = hc_byte_perm_S (w[53], w[52], selector);\n      w[54] = hc_byte_perm_S (w[52], w[51], selector);\n      w[53] = hc_byte_perm_S (w[51], w[50], selector);\n      w[52] = hc_byte_perm_S (w[50], w[49], selector);\n      w[51] = hc_byte_perm_S (w[49], w[48], selector);\n      w[50] = hc_byte_perm_S (w[48], w[47], selector);\n      w[49] = hc_byte_perm_S (w[47], w[46], selector);\n      w[48] = hc_byte_perm_S (w[46], w[45], selector);\n      w[47] = hc_byte_perm_S (w[45], w[44], selector);\n      w[46] = hc_byte_perm_S (w[44], w[43], selector);\n      w[45] = hc_byte_perm_S (w[43], w[42], selector);\n      w[44] = hc_byte_perm_S (w[42], w[41], selector);\n      w[43] = hc_byte_perm_S (w[41], w[40], selector);\n      w[42] = hc_byte_perm_S (w[40], w[39], selector);\n      w[41] = hc_byte_perm_S (w[39], w[38], selector);\n      w[40] = hc_byte_perm_S (w[38], w[37], selector);\n      w[39] = hc_byte_perm_S (w[37], w[36], selector);\n      w[38] = hc_byte_perm_S (w[36], w[35], selector);\n      w[37] = hc_byte_perm_S (w[35], w[34], selector);\n      w[36] = hc_byte_perm_S (w[34], w[33], selector);\n      w[35] = hc_byte_perm_S (w[33], w[32], selector);\n      w[34] = hc_byte_perm_S (w[32], w[31], selector);\n      w[33] = hc_byte_perm_S (w[31], w[30], selector);\n      w[32] = hc_byte_perm_S (w[30], w[29], selector);\n      w[31] = hc_byte_perm_S (w[29], w[28], selector);\n      w[30] = hc_byte_perm_S (w[28], w[27], selector);\n      w[29] = hc_byte_perm_S (w[27], w[26], selector);\n      w[28] = hc_byte_perm_S (w[26], w[25], selector);\n      w[27] = hc_byte_perm_S (w[25], w[24], selector);\n      w[26] = hc_byte_perm_S (w[24], w[23], selector);\n      w[25] = hc_byte_perm_S (w[23], w[22], selector);\n      w[24] = hc_byte_perm_S (w[22], w[21], selector);\n      w[23] = hc_byte_perm_S (w[21], w[20], selector);\n      w[22] = hc_byte_perm_S (w[20], w[19], selector);\n      w[21] = hc_byte_perm_S (w[19], w[18], selector);\n      w[20] = hc_byte_perm_S (w[18], w[17], selector);\n      w[19] = hc_byte_perm_S (w[17], w[16], selector);\n      w[18] = hc_byte_perm_S (w[16], w[15], selector);\n      w[17] = hc_byte_perm_S (w[15], w[14], selector);\n      w[16] = hc_byte_perm_S (w[14], w[13], selector);\n      w[15] = hc_byte_perm_S (w[13], w[12], selector);\n      w[14] = hc_byte_perm_S (w[12], w[11], selector);\n      w[13] = hc_byte_perm_S (w[11], w[10], selector);\n      w[12] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[11] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[10] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[ 9] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[ 8] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[ 7] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[ 6] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 5] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 4] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 3] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 2] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  3:\n      w[63] = hc_byte_perm_S (w[60], w[59], selector);\n      w[62] = hc_byte_perm_S (w[59], w[58], selector);\n      w[61] = hc_byte_perm_S (w[58], w[57], selector);\n      w[60] = hc_byte_perm_S (w[57], w[56], selector);\n      w[59] = hc_byte_perm_S (w[56], w[55], selector);\n      w[58] = hc_byte_perm_S (w[55], w[54], selector);\n      w[57] = hc_byte_perm_S (w[54], w[53], selector);\n      w[56] = hc_byte_perm_S (w[53], w[52], selector);\n      w[55] = hc_byte_perm_S (w[52], w[51], selector);\n      w[54] = hc_byte_perm_S (w[51], w[50], selector);\n      w[53] = hc_byte_perm_S (w[50], w[49], selector);\n      w[52] = hc_byte_perm_S (w[49], w[48], selector);\n      w[51] = hc_byte_perm_S (w[48], w[47], selector);\n      w[50] = hc_byte_perm_S (w[47], w[46], selector);\n      w[49] = hc_byte_perm_S (w[46], w[45], selector);\n      w[48] = hc_byte_perm_S (w[45], w[44], selector);\n      w[47] = hc_byte_perm_S (w[44], w[43], selector);\n      w[46] = hc_byte_perm_S (w[43], w[42], selector);\n      w[45] = hc_byte_perm_S (w[42], w[41], selector);\n      w[44] = hc_byte_perm_S (w[41], w[40], selector);\n      w[43] = hc_byte_perm_S (w[40], w[39], selector);\n      w[42] = hc_byte_perm_S (w[39], w[38], selector);\n      w[41] = hc_byte_perm_S (w[38], w[37], selector);\n      w[40] = hc_byte_perm_S (w[37], w[36], selector);\n      w[39] = hc_byte_perm_S (w[36], w[35], selector);\n      w[38] = hc_byte_perm_S (w[35], w[34], selector);\n      w[37] = hc_byte_perm_S (w[34], w[33], selector);\n      w[36] = hc_byte_perm_S (w[33], w[32], selector);\n      w[35] = hc_byte_perm_S (w[32], w[31], selector);\n      w[34] = hc_byte_perm_S (w[31], w[30], selector);\n      w[33] = hc_byte_perm_S (w[30], w[29], selector);\n      w[32] = hc_byte_perm_S (w[29], w[28], selector);\n      w[31] = hc_byte_perm_S (w[28], w[27], selector);\n      w[30] = hc_byte_perm_S (w[27], w[26], selector);\n      w[29] = hc_byte_perm_S (w[26], w[25], selector);\n      w[28] = hc_byte_perm_S (w[25], w[24], selector);\n      w[27] = hc_byte_perm_S (w[24], w[23], selector);\n      w[26] = hc_byte_perm_S (w[23], w[22], selector);\n      w[25] = hc_byte_perm_S (w[22], w[21], selector);\n      w[24] = hc_byte_perm_S (w[21], w[20], selector);\n      w[23] = hc_byte_perm_S (w[20], w[19], selector);\n      w[22] = hc_byte_perm_S (w[19], w[18], selector);\n      w[21] = hc_byte_perm_S (w[18], w[17], selector);\n      w[20] = hc_byte_perm_S (w[17], w[16], selector);\n      w[19] = hc_byte_perm_S (w[16], w[15], selector);\n      w[18] = hc_byte_perm_S (w[15], w[14], selector);\n      w[17] = hc_byte_perm_S (w[14], w[13], selector);\n      w[16] = hc_byte_perm_S (w[13], w[12], selector);\n      w[15] = hc_byte_perm_S (w[12], w[11], selector);\n      w[14] = hc_byte_perm_S (w[11], w[10], selector);\n      w[13] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[12] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[11] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[10] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[ 9] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[ 8] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[ 7] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 6] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 5] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 4] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 3] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  4:\n      w[63] = hc_byte_perm_S (w[59], w[58], selector);\n      w[62] = hc_byte_perm_S (w[58], w[57], selector);\n      w[61] = hc_byte_perm_S (w[57], w[56], selector);\n      w[60] = hc_byte_perm_S (w[56], w[55], selector);\n      w[59] = hc_byte_perm_S (w[55], w[54], selector);\n      w[58] = hc_byte_perm_S (w[54], w[53], selector);\n      w[57] = hc_byte_perm_S (w[53], w[52], selector);\n      w[56] = hc_byte_perm_S (w[52], w[51], selector);\n      w[55] = hc_byte_perm_S (w[51], w[50], selector);\n      w[54] = hc_byte_perm_S (w[50], w[49], selector);\n      w[53] = hc_byte_perm_S (w[49], w[48], selector);\n      w[52] = hc_byte_perm_S (w[48], w[47], selector);\n      w[51] = hc_byte_perm_S (w[47], w[46], selector);\n      w[50] = hc_byte_perm_S (w[46], w[45], selector);\n      w[49] = hc_byte_perm_S (w[45], w[44], selector);\n      w[48] = hc_byte_perm_S (w[44], w[43], selector);\n      w[47] = hc_byte_perm_S (w[43], w[42], selector);\n      w[46] = hc_byte_perm_S (w[42], w[41], selector);\n      w[45] = hc_byte_perm_S (w[41], w[40], selector);\n      w[44] = hc_byte_perm_S (w[40], w[39], selector);\n      w[43] = hc_byte_perm_S (w[39], w[38], selector);\n      w[42] = hc_byte_perm_S (w[38], w[37], selector);\n      w[41] = hc_byte_perm_S (w[37], w[36], selector);\n      w[40] = hc_byte_perm_S (w[36], w[35], selector);\n      w[39] = hc_byte_perm_S (w[35], w[34], selector);\n      w[38] = hc_byte_perm_S (w[34], w[33], selector);\n      w[37] = hc_byte_perm_S (w[33], w[32], selector);\n      w[36] = hc_byte_perm_S (w[32], w[31], selector);\n      w[35] = hc_byte_perm_S (w[31], w[30], selector);\n      w[34] = hc_byte_perm_S (w[30], w[29], selector);\n      w[33] = hc_byte_perm_S (w[29], w[28], selector);\n      w[32] = hc_byte_perm_S (w[28], w[27], selector);\n      w[31] = hc_byte_perm_S (w[27], w[26], selector);\n      w[30] = hc_byte_perm_S (w[26], w[25], selector);\n      w[29] = hc_byte_perm_S (w[25], w[24], selector);\n      w[28] = hc_byte_perm_S (w[24], w[23], selector);\n      w[27] = hc_byte_perm_S (w[23], w[22], selector);\n      w[26] = hc_byte_perm_S (w[22], w[21], selector);\n      w[25] = hc_byte_perm_S (w[21], w[20], selector);\n      w[24] = hc_byte_perm_S (w[20], w[19], selector);\n      w[23] = hc_byte_perm_S (w[19], w[18], selector);\n      w[22] = hc_byte_perm_S (w[18], w[17], selector);\n      w[21] = hc_byte_perm_S (w[17], w[16], selector);\n      w[20] = hc_byte_perm_S (w[16], w[15], selector);\n      w[19] = hc_byte_perm_S (w[15], w[14], selector);\n      w[18] = hc_byte_perm_S (w[14], w[13], selector);\n      w[17] = hc_byte_perm_S (w[13], w[12], selector);\n      w[16] = hc_byte_perm_S (w[12], w[11], selector);\n      w[15] = hc_byte_perm_S (w[11], w[10], selector);\n      w[14] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[13] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[12] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[11] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[10] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[ 9] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[ 8] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 7] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 6] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 5] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 4] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  5:\n      w[63] = hc_byte_perm_S (w[58], w[57], selector);\n      w[62] = hc_byte_perm_S (w[57], w[56], selector);\n      w[61] = hc_byte_perm_S (w[56], w[55], selector);\n      w[60] = hc_byte_perm_S (w[55], w[54], selector);\n      w[59] = hc_byte_perm_S (w[54], w[53], selector);\n      w[58] = hc_byte_perm_S (w[53], w[52], selector);\n      w[57] = hc_byte_perm_S (w[52], w[51], selector);\n      w[56] = hc_byte_perm_S (w[51], w[50], selector);\n      w[55] = hc_byte_perm_S (w[50], w[49], selector);\n      w[54] = hc_byte_perm_S (w[49], w[48], selector);\n      w[53] = hc_byte_perm_S (w[48], w[47], selector);\n      w[52] = hc_byte_perm_S (w[47], w[46], selector);\n      w[51] = hc_byte_perm_S (w[46], w[45], selector);\n      w[50] = hc_byte_perm_S (w[45], w[44], selector);\n      w[49] = hc_byte_perm_S (w[44], w[43], selector);\n      w[48] = hc_byte_perm_S (w[43], w[42], selector);\n      w[47] = hc_byte_perm_S (w[42], w[41], selector);\n      w[46] = hc_byte_perm_S (w[41], w[40], selector);\n      w[45] = hc_byte_perm_S (w[40], w[39], selector);\n      w[44] = hc_byte_perm_S (w[39], w[38], selector);\n      w[43] = hc_byte_perm_S (w[38], w[37], selector);\n      w[42] = hc_byte_perm_S (w[37], w[36], selector);\n      w[41] = hc_byte_perm_S (w[36], w[35], selector);\n      w[40] = hc_byte_perm_S (w[35], w[34], selector);\n      w[39] = hc_byte_perm_S (w[34], w[33], selector);\n      w[38] = hc_byte_perm_S (w[33], w[32], selector);\n      w[37] = hc_byte_perm_S (w[32], w[31], selector);\n      w[36] = hc_byte_perm_S (w[31], w[30], selector);\n      w[35] = hc_byte_perm_S (w[30], w[29], selector);\n      w[34] = hc_byte_perm_S (w[29], w[28], selector);\n      w[33] = hc_byte_perm_S (w[28], w[27], selector);\n      w[32] = hc_byte_perm_S (w[27], w[26], selector);\n      w[31] = hc_byte_perm_S (w[26], w[25], selector);\n      w[30] = hc_byte_perm_S (w[25], w[24], selector);\n      w[29] = hc_byte_perm_S (w[24], w[23], selector);\n      w[28] = hc_byte_perm_S (w[23], w[22], selector);\n      w[27] = hc_byte_perm_S (w[22], w[21], selector);\n      w[26] = hc_byte_perm_S (w[21], w[20], selector);\n      w[25] = hc_byte_perm_S (w[20], w[19], selector);\n      w[24] = hc_byte_perm_S (w[19], w[18], selector);\n      w[23] = hc_byte_perm_S (w[18], w[17], selector);\n      w[22] = hc_byte_perm_S (w[17], w[16], selector);\n      w[21] = hc_byte_perm_S (w[16], w[15], selector);\n      w[20] = hc_byte_perm_S (w[15], w[14], selector);\n      w[19] = hc_byte_perm_S (w[14], w[13], selector);\n      w[18] = hc_byte_perm_S (w[13], w[12], selector);\n      w[17] = hc_byte_perm_S (w[12], w[11], selector);\n      w[16] = hc_byte_perm_S (w[11], w[10], selector);\n      w[15] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[14] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[13] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[12] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[11] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[10] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[ 9] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 8] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 7] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 6] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 5] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  6:\n      w[63] = hc_byte_perm_S (w[57], w[56], selector);\n      w[62] = hc_byte_perm_S (w[56], w[55], selector);\n      w[61] = hc_byte_perm_S (w[55], w[54], selector);\n      w[60] = hc_byte_perm_S (w[54], w[53], selector);\n      w[59] = hc_byte_perm_S (w[53], w[52], selector);\n      w[58] = hc_byte_perm_S (w[52], w[51], selector);\n      w[57] = hc_byte_perm_S (w[51], w[50], selector);\n      w[56] = hc_byte_perm_S (w[50], w[49], selector);\n      w[55] = hc_byte_perm_S (w[49], w[48], selector);\n      w[54] = hc_byte_perm_S (w[48], w[47], selector);\n      w[53] = hc_byte_perm_S (w[47], w[46], selector);\n      w[52] = hc_byte_perm_S (w[46], w[45], selector);\n      w[51] = hc_byte_perm_S (w[45], w[44], selector);\n      w[50] = hc_byte_perm_S (w[44], w[43], selector);\n      w[49] = hc_byte_perm_S (w[43], w[42], selector);\n      w[48] = hc_byte_perm_S (w[42], w[41], selector);\n      w[47] = hc_byte_perm_S (w[41], w[40], selector);\n      w[46] = hc_byte_perm_S (w[40], w[39], selector);\n      w[45] = hc_byte_perm_S (w[39], w[38], selector);\n      w[44] = hc_byte_perm_S (w[38], w[37], selector);\n      w[43] = hc_byte_perm_S (w[37], w[36], selector);\n      w[42] = hc_byte_perm_S (w[36], w[35], selector);\n      w[41] = hc_byte_perm_S (w[35], w[34], selector);\n      w[40] = hc_byte_perm_S (w[34], w[33], selector);\n      w[39] = hc_byte_perm_S (w[33], w[32], selector);\n      w[38] = hc_byte_perm_S (w[32], w[31], selector);\n      w[37] = hc_byte_perm_S (w[31], w[30], selector);\n      w[36] = hc_byte_perm_S (w[30], w[29], selector);\n      w[35] = hc_byte_perm_S (w[29], w[28], selector);\n      w[34] = hc_byte_perm_S (w[28], w[27], selector);\n      w[33] = hc_byte_perm_S (w[27], w[26], selector);\n      w[32] = hc_byte_perm_S (w[26], w[25], selector);\n      w[31] = hc_byte_perm_S (w[25], w[24], selector);\n      w[30] = hc_byte_perm_S (w[24], w[23], selector);\n      w[29] = hc_byte_perm_S (w[23], w[22], selector);\n      w[28] = hc_byte_perm_S (w[22], w[21], selector);\n      w[27] = hc_byte_perm_S (w[21], w[20], selector);\n      w[26] = hc_byte_perm_S (w[20], w[19], selector);\n      w[25] = hc_byte_perm_S (w[19], w[18], selector);\n      w[24] = hc_byte_perm_S (w[18], w[17], selector);\n      w[23] = hc_byte_perm_S (w[17], w[16], selector);\n      w[22] = hc_byte_perm_S (w[16], w[15], selector);\n      w[21] = hc_byte_perm_S (w[15], w[14], selector);\n      w[20] = hc_byte_perm_S (w[14], w[13], selector);\n      w[19] = hc_byte_perm_S (w[13], w[12], selector);\n      w[18] = hc_byte_perm_S (w[12], w[11], selector);\n      w[17] = hc_byte_perm_S (w[11], w[10], selector);\n      w[16] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[15] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[14] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[13] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[12] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[11] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[10] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[ 9] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 8] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 7] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 6] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  7:\n      w[63] = hc_byte_perm_S (w[56], w[55], selector);\n      w[62] = hc_byte_perm_S (w[55], w[54], selector);\n      w[61] = hc_byte_perm_S (w[54], w[53], selector);\n      w[60] = hc_byte_perm_S (w[53], w[52], selector);\n      w[59] = hc_byte_perm_S (w[52], w[51], selector);\n      w[58] = hc_byte_perm_S (w[51], w[50], selector);\n      w[57] = hc_byte_perm_S (w[50], w[49], selector);\n      w[56] = hc_byte_perm_S (w[49], w[48], selector);\n      w[55] = hc_byte_perm_S (w[48], w[47], selector);\n      w[54] = hc_byte_perm_S (w[47], w[46], selector);\n      w[53] = hc_byte_perm_S (w[46], w[45], selector);\n      w[52] = hc_byte_perm_S (w[45], w[44], selector);\n      w[51] = hc_byte_perm_S (w[44], w[43], selector);\n      w[50] = hc_byte_perm_S (w[43], w[42], selector);\n      w[49] = hc_byte_perm_S (w[42], w[41], selector);\n      w[48] = hc_byte_perm_S (w[41], w[40], selector);\n      w[47] = hc_byte_perm_S (w[40], w[39], selector);\n      w[46] = hc_byte_perm_S (w[39], w[38], selector);\n      w[45] = hc_byte_perm_S (w[38], w[37], selector);\n      w[44] = hc_byte_perm_S (w[37], w[36], selector);\n      w[43] = hc_byte_perm_S (w[36], w[35], selector);\n      w[42] = hc_byte_perm_S (w[35], w[34], selector);\n      w[41] = hc_byte_perm_S (w[34], w[33], selector);\n      w[40] = hc_byte_perm_S (w[33], w[32], selector);\n      w[39] = hc_byte_perm_S (w[32], w[31], selector);\n      w[38] = hc_byte_perm_S (w[31], w[30], selector);\n      w[37] = hc_byte_perm_S (w[30], w[29], selector);\n      w[36] = hc_byte_perm_S (w[29], w[28], selector);\n      w[35] = hc_byte_perm_S (w[28], w[27], selector);\n      w[34] = hc_byte_perm_S (w[27], w[26], selector);\n      w[33] = hc_byte_perm_S (w[26], w[25], selector);\n      w[32] = hc_byte_perm_S (w[25], w[24], selector);\n      w[31] = hc_byte_perm_S (w[24], w[23], selector);\n      w[30] = hc_byte_perm_S (w[23], w[22], selector);\n      w[29] = hc_byte_perm_S (w[22], w[21], selector);\n      w[28] = hc_byte_perm_S (w[21], w[20], selector);\n      w[27] = hc_byte_perm_S (w[20], w[19], selector);\n      w[26] = hc_byte_perm_S (w[19], w[18], selector);\n      w[25] = hc_byte_perm_S (w[18], w[17], selector);\n      w[24] = hc_byte_perm_S (w[17], w[16], selector);\n      w[23] = hc_byte_perm_S (w[16], w[15], selector);\n      w[22] = hc_byte_perm_S (w[15], w[14], selector);\n      w[21] = hc_byte_perm_S (w[14], w[13], selector);\n      w[20] = hc_byte_perm_S (w[13], w[12], selector);\n      w[19] = hc_byte_perm_S (w[12], w[11], selector);\n      w[18] = hc_byte_perm_S (w[11], w[10], selector);\n      w[17] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[16] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[15] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[14] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[13] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[12] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[11] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[10] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[ 9] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 8] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 7] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  8:\n      w[63] = hc_byte_perm_S (w[55], w[54], selector);\n      w[62] = hc_byte_perm_S (w[54], w[53], selector);\n      w[61] = hc_byte_perm_S (w[53], w[52], selector);\n      w[60] = hc_byte_perm_S (w[52], w[51], selector);\n      w[59] = hc_byte_perm_S (w[51], w[50], selector);\n      w[58] = hc_byte_perm_S (w[50], w[49], selector);\n      w[57] = hc_byte_perm_S (w[49], w[48], selector);\n      w[56] = hc_byte_perm_S (w[48], w[47], selector);\n      w[55] = hc_byte_perm_S (w[47], w[46], selector);\n      w[54] = hc_byte_perm_S (w[46], w[45], selector);\n      w[53] = hc_byte_perm_S (w[45], w[44], selector);\n      w[52] = hc_byte_perm_S (w[44], w[43], selector);\n      w[51] = hc_byte_perm_S (w[43], w[42], selector);\n      w[50] = hc_byte_perm_S (w[42], w[41], selector);\n      w[49] = hc_byte_perm_S (w[41], w[40], selector);\n      w[48] = hc_byte_perm_S (w[40], w[39], selector);\n      w[47] = hc_byte_perm_S (w[39], w[38], selector);\n      w[46] = hc_byte_perm_S (w[38], w[37], selector);\n      w[45] = hc_byte_perm_S (w[37], w[36], selector);\n      w[44] = hc_byte_perm_S (w[36], w[35], selector);\n      w[43] = hc_byte_perm_S (w[35], w[34], selector);\n      w[42] = hc_byte_perm_S (w[34], w[33], selector);\n      w[41] = hc_byte_perm_S (w[33], w[32], selector);\n      w[40] = hc_byte_perm_S (w[32], w[31], selector);\n      w[39] = hc_byte_perm_S (w[31], w[30], selector);\n      w[38] = hc_byte_perm_S (w[30], w[29], selector);\n      w[37] = hc_byte_perm_S (w[29], w[28], selector);\n      w[36] = hc_byte_perm_S (w[28], w[27], selector);\n      w[35] = hc_byte_perm_S (w[27], w[26], selector);\n      w[34] = hc_byte_perm_S (w[26], w[25], selector);\n      w[33] = hc_byte_perm_S (w[25], w[24], selector);\n      w[32] = hc_byte_perm_S (w[24], w[23], selector);\n      w[31] = hc_byte_perm_S (w[23], w[22], selector);\n      w[30] = hc_byte_perm_S (w[22], w[21], selector);\n      w[29] = hc_byte_perm_S (w[21], w[20], selector);\n      w[28] = hc_byte_perm_S (w[20], w[19], selector);\n      w[27] = hc_byte_perm_S (w[19], w[18], selector);\n      w[26] = hc_byte_perm_S (w[18], w[17], selector);\n      w[25] = hc_byte_perm_S (w[17], w[16], selector);\n      w[24] = hc_byte_perm_S (w[16], w[15], selector);\n      w[23] = hc_byte_perm_S (w[15], w[14], selector);\n      w[22] = hc_byte_perm_S (w[14], w[13], selector);\n      w[21] = hc_byte_perm_S (w[13], w[12], selector);\n      w[20] = hc_byte_perm_S (w[12], w[11], selector);\n      w[19] = hc_byte_perm_S (w[11], w[10], selector);\n      w[18] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[17] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[16] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[15] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[14] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[13] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[12] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[11] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[10] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[ 9] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 8] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case  9:\n      w[63] = hc_byte_perm_S (w[54], w[53], selector);\n      w[62] = hc_byte_perm_S (w[53], w[52], selector);\n      w[61] = hc_byte_perm_S (w[52], w[51], selector);\n      w[60] = hc_byte_perm_S (w[51], w[50], selector);\n      w[59] = hc_byte_perm_S (w[50], w[49], selector);\n      w[58] = hc_byte_perm_S (w[49], w[48], selector);\n      w[57] = hc_byte_perm_S (w[48], w[47], selector);\n      w[56] = hc_byte_perm_S (w[47], w[46], selector);\n      w[55] = hc_byte_perm_S (w[46], w[45], selector);\n      w[54] = hc_byte_perm_S (w[45], w[44], selector);\n      w[53] = hc_byte_perm_S (w[44], w[43], selector);\n      w[52] = hc_byte_perm_S (w[43], w[42], selector);\n      w[51] = hc_byte_perm_S (w[42], w[41], selector);\n      w[50] = hc_byte_perm_S (w[41], w[40], selector);\n      w[49] = hc_byte_perm_S (w[40], w[39], selector);\n      w[48] = hc_byte_perm_S (w[39], w[38], selector);\n      w[47] = hc_byte_perm_S (w[38], w[37], selector);\n      w[46] = hc_byte_perm_S (w[37], w[36], selector);\n      w[45] = hc_byte_perm_S (w[36], w[35], selector);\n      w[44] = hc_byte_perm_S (w[35], w[34], selector);\n      w[43] = hc_byte_perm_S (w[34], w[33], selector);\n      w[42] = hc_byte_perm_S (w[33], w[32], selector);\n      w[41] = hc_byte_perm_S (w[32], w[31], selector);\n      w[40] = hc_byte_perm_S (w[31], w[30], selector);\n      w[39] = hc_byte_perm_S (w[30], w[29], selector);\n      w[38] = hc_byte_perm_S (w[29], w[28], selector);\n      w[37] = hc_byte_perm_S (w[28], w[27], selector);\n      w[36] = hc_byte_perm_S (w[27], w[26], selector);\n      w[35] = hc_byte_perm_S (w[26], w[25], selector);\n      w[34] = hc_byte_perm_S (w[25], w[24], selector);\n      w[33] = hc_byte_perm_S (w[24], w[23], selector);\n      w[32] = hc_byte_perm_S (w[23], w[22], selector);\n      w[31] = hc_byte_perm_S (w[22], w[21], selector);\n      w[30] = hc_byte_perm_S (w[21], w[20], selector);\n      w[29] = hc_byte_perm_S (w[20], w[19], selector);\n      w[28] = hc_byte_perm_S (w[19], w[18], selector);\n      w[27] = hc_byte_perm_S (w[18], w[17], selector);\n      w[26] = hc_byte_perm_S (w[17], w[16], selector);\n      w[25] = hc_byte_perm_S (w[16], w[15], selector);\n      w[24] = hc_byte_perm_S (w[15], w[14], selector);\n      w[23] = hc_byte_perm_S (w[14], w[13], selector);\n      w[22] = hc_byte_perm_S (w[13], w[12], selector);\n      w[21] = hc_byte_perm_S (w[12], w[11], selector);\n      w[20] = hc_byte_perm_S (w[11], w[10], selector);\n      w[19] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[18] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[17] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[16] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[15] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[14] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[13] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[12] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[11] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[10] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[ 9] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 10:\n      w[63] = hc_byte_perm_S (w[53], w[52], selector);\n      w[62] = hc_byte_perm_S (w[52], w[51], selector);\n      w[61] = hc_byte_perm_S (w[51], w[50], selector);\n      w[60] = hc_byte_perm_S (w[50], w[49], selector);\n      w[59] = hc_byte_perm_S (w[49], w[48], selector);\n      w[58] = hc_byte_perm_S (w[48], w[47], selector);\n      w[57] = hc_byte_perm_S (w[47], w[46], selector);\n      w[56] = hc_byte_perm_S (w[46], w[45], selector);\n      w[55] = hc_byte_perm_S (w[45], w[44], selector);\n      w[54] = hc_byte_perm_S (w[44], w[43], selector);\n      w[53] = hc_byte_perm_S (w[43], w[42], selector);\n      w[52] = hc_byte_perm_S (w[42], w[41], selector);\n      w[51] = hc_byte_perm_S (w[41], w[40], selector);\n      w[50] = hc_byte_perm_S (w[40], w[39], selector);\n      w[49] = hc_byte_perm_S (w[39], w[38], selector);\n      w[48] = hc_byte_perm_S (w[38], w[37], selector);\n      w[47] = hc_byte_perm_S (w[37], w[36], selector);\n      w[46] = hc_byte_perm_S (w[36], w[35], selector);\n      w[45] = hc_byte_perm_S (w[35], w[34], selector);\n      w[44] = hc_byte_perm_S (w[34], w[33], selector);\n      w[43] = hc_byte_perm_S (w[33], w[32], selector);\n      w[42] = hc_byte_perm_S (w[32], w[31], selector);\n      w[41] = hc_byte_perm_S (w[31], w[30], selector);\n      w[40] = hc_byte_perm_S (w[30], w[29], selector);\n      w[39] = hc_byte_perm_S (w[29], w[28], selector);\n      w[38] = hc_byte_perm_S (w[28], w[27], selector);\n      w[37] = hc_byte_perm_S (w[27], w[26], selector);\n      w[36] = hc_byte_perm_S (w[26], w[25], selector);\n      w[35] = hc_byte_perm_S (w[25], w[24], selector);\n      w[34] = hc_byte_perm_S (w[24], w[23], selector);\n      w[33] = hc_byte_perm_S (w[23], w[22], selector);\n      w[32] = hc_byte_perm_S (w[22], w[21], selector);\n      w[31] = hc_byte_perm_S (w[21], w[20], selector);\n      w[30] = hc_byte_perm_S (w[20], w[19], selector);\n      w[29] = hc_byte_perm_S (w[19], w[18], selector);\n      w[28] = hc_byte_perm_S (w[18], w[17], selector);\n      w[27] = hc_byte_perm_S (w[17], w[16], selector);\n      w[26] = hc_byte_perm_S (w[16], w[15], selector);\n      w[25] = hc_byte_perm_S (w[15], w[14], selector);\n      w[24] = hc_byte_perm_S (w[14], w[13], selector);\n      w[23] = hc_byte_perm_S (w[13], w[12], selector);\n      w[22] = hc_byte_perm_S (w[12], w[11], selector);\n      w[21] = hc_byte_perm_S (w[11], w[10], selector);\n      w[20] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[19] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[18] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[17] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[16] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[15] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[14] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[13] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[12] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[11] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[10] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 11:\n      w[63] = hc_byte_perm_S (w[52], w[51], selector);\n      w[62] = hc_byte_perm_S (w[51], w[50], selector);\n      w[61] = hc_byte_perm_S (w[50], w[49], selector);\n      w[60] = hc_byte_perm_S (w[49], w[48], selector);\n      w[59] = hc_byte_perm_S (w[48], w[47], selector);\n      w[58] = hc_byte_perm_S (w[47], w[46], selector);\n      w[57] = hc_byte_perm_S (w[46], w[45], selector);\n      w[56] = hc_byte_perm_S (w[45], w[44], selector);\n      w[55] = hc_byte_perm_S (w[44], w[43], selector);\n      w[54] = hc_byte_perm_S (w[43], w[42], selector);\n      w[53] = hc_byte_perm_S (w[42], w[41], selector);\n      w[52] = hc_byte_perm_S (w[41], w[40], selector);\n      w[51] = hc_byte_perm_S (w[40], w[39], selector);\n      w[50] = hc_byte_perm_S (w[39], w[38], selector);\n      w[49] = hc_byte_perm_S (w[38], w[37], selector);\n      w[48] = hc_byte_perm_S (w[37], w[36], selector);\n      w[47] = hc_byte_perm_S (w[36], w[35], selector);\n      w[46] = hc_byte_perm_S (w[35], w[34], selector);\n      w[45] = hc_byte_perm_S (w[34], w[33], selector);\n      w[44] = hc_byte_perm_S (w[33], w[32], selector);\n      w[43] = hc_byte_perm_S (w[32], w[31], selector);\n      w[42] = hc_byte_perm_S (w[31], w[30], selector);\n      w[41] = hc_byte_perm_S (w[30], w[29], selector);\n      w[40] = hc_byte_perm_S (w[29], w[28], selector);\n      w[39] = hc_byte_perm_S (w[28], w[27], selector);\n      w[38] = hc_byte_perm_S (w[27], w[26], selector);\n      w[37] = hc_byte_perm_S (w[26], w[25], selector);\n      w[36] = hc_byte_perm_S (w[25], w[24], selector);\n      w[35] = hc_byte_perm_S (w[24], w[23], selector);\n      w[34] = hc_byte_perm_S (w[23], w[22], selector);\n      w[33] = hc_byte_perm_S (w[22], w[21], selector);\n      w[32] = hc_byte_perm_S (w[21], w[20], selector);\n      w[31] = hc_byte_perm_S (w[20], w[19], selector);\n      w[30] = hc_byte_perm_S (w[19], w[18], selector);\n      w[29] = hc_byte_perm_S (w[18], w[17], selector);\n      w[28] = hc_byte_perm_S (w[17], w[16], selector);\n      w[27] = hc_byte_perm_S (w[16], w[15], selector);\n      w[26] = hc_byte_perm_S (w[15], w[14], selector);\n      w[25] = hc_byte_perm_S (w[14], w[13], selector);\n      w[24] = hc_byte_perm_S (w[13], w[12], selector);\n      w[23] = hc_byte_perm_S (w[12], w[11], selector);\n      w[22] = hc_byte_perm_S (w[11], w[10], selector);\n      w[21] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[20] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[19] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[18] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[17] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[16] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[15] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[14] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[13] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[12] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[11] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 12:\n      w[63] = hc_byte_perm_S (w[51], w[50], selector);\n      w[62] = hc_byte_perm_S (w[50], w[49], selector);\n      w[61] = hc_byte_perm_S (w[49], w[48], selector);\n      w[60] = hc_byte_perm_S (w[48], w[47], selector);\n      w[59] = hc_byte_perm_S (w[47], w[46], selector);\n      w[58] = hc_byte_perm_S (w[46], w[45], selector);\n      w[57] = hc_byte_perm_S (w[45], w[44], selector);\n      w[56] = hc_byte_perm_S (w[44], w[43], selector);\n      w[55] = hc_byte_perm_S (w[43], w[42], selector);\n      w[54] = hc_byte_perm_S (w[42], w[41], selector);\n      w[53] = hc_byte_perm_S (w[41], w[40], selector);\n      w[52] = hc_byte_perm_S (w[40], w[39], selector);\n      w[51] = hc_byte_perm_S (w[39], w[38], selector);\n      w[50] = hc_byte_perm_S (w[38], w[37], selector);\n      w[49] = hc_byte_perm_S (w[37], w[36], selector);\n      w[48] = hc_byte_perm_S (w[36], w[35], selector);\n      w[47] = hc_byte_perm_S (w[35], w[34], selector);\n      w[46] = hc_byte_perm_S (w[34], w[33], selector);\n      w[45] = hc_byte_perm_S (w[33], w[32], selector);\n      w[44] = hc_byte_perm_S (w[32], w[31], selector);\n      w[43] = hc_byte_perm_S (w[31], w[30], selector);\n      w[42] = hc_byte_perm_S (w[30], w[29], selector);\n      w[41] = hc_byte_perm_S (w[29], w[28], selector);\n      w[40] = hc_byte_perm_S (w[28], w[27], selector);\n      w[39] = hc_byte_perm_S (w[27], w[26], selector);\n      w[38] = hc_byte_perm_S (w[26], w[25], selector);\n      w[37] = hc_byte_perm_S (w[25], w[24], selector);\n      w[36] = hc_byte_perm_S (w[24], w[23], selector);\n      w[35] = hc_byte_perm_S (w[23], w[22], selector);\n      w[34] = hc_byte_perm_S (w[22], w[21], selector);\n      w[33] = hc_byte_perm_S (w[21], w[20], selector);\n      w[32] = hc_byte_perm_S (w[20], w[19], selector);\n      w[31] = hc_byte_perm_S (w[19], w[18], selector);\n      w[30] = hc_byte_perm_S (w[18], w[17], selector);\n      w[29] = hc_byte_perm_S (w[17], w[16], selector);\n      w[28] = hc_byte_perm_S (w[16], w[15], selector);\n      w[27] = hc_byte_perm_S (w[15], w[14], selector);\n      w[26] = hc_byte_perm_S (w[14], w[13], selector);\n      w[25] = hc_byte_perm_S (w[13], w[12], selector);\n      w[24] = hc_byte_perm_S (w[12], w[11], selector);\n      w[23] = hc_byte_perm_S (w[11], w[10], selector);\n      w[22] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[21] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[20] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[19] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[18] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[17] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[16] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[15] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[14] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[13] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[12] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 13:\n      w[63] = hc_byte_perm_S (w[50], w[49], selector);\n      w[62] = hc_byte_perm_S (w[49], w[48], selector);\n      w[61] = hc_byte_perm_S (w[48], w[47], selector);\n      w[60] = hc_byte_perm_S (w[47], w[46], selector);\n      w[59] = hc_byte_perm_S (w[46], w[45], selector);\n      w[58] = hc_byte_perm_S (w[45], w[44], selector);\n      w[57] = hc_byte_perm_S (w[44], w[43], selector);\n      w[56] = hc_byte_perm_S (w[43], w[42], selector);\n      w[55] = hc_byte_perm_S (w[42], w[41], selector);\n      w[54] = hc_byte_perm_S (w[41], w[40], selector);\n      w[53] = hc_byte_perm_S (w[40], w[39], selector);\n      w[52] = hc_byte_perm_S (w[39], w[38], selector);\n      w[51] = hc_byte_perm_S (w[38], w[37], selector);\n      w[50] = hc_byte_perm_S (w[37], w[36], selector);\n      w[49] = hc_byte_perm_S (w[36], w[35], selector);\n      w[48] = hc_byte_perm_S (w[35], w[34], selector);\n      w[47] = hc_byte_perm_S (w[34], w[33], selector);\n      w[46] = hc_byte_perm_S (w[33], w[32], selector);\n      w[45] = hc_byte_perm_S (w[32], w[31], selector);\n      w[44] = hc_byte_perm_S (w[31], w[30], selector);\n      w[43] = hc_byte_perm_S (w[30], w[29], selector);\n      w[42] = hc_byte_perm_S (w[29], w[28], selector);\n      w[41] = hc_byte_perm_S (w[28], w[27], selector);\n      w[40] = hc_byte_perm_S (w[27], w[26], selector);\n      w[39] = hc_byte_perm_S (w[26], w[25], selector);\n      w[38] = hc_byte_perm_S (w[25], w[24], selector);\n      w[37] = hc_byte_perm_S (w[24], w[23], selector);\n      w[36] = hc_byte_perm_S (w[23], w[22], selector);\n      w[35] = hc_byte_perm_S (w[22], w[21], selector);\n      w[34] = hc_byte_perm_S (w[21], w[20], selector);\n      w[33] = hc_byte_perm_S (w[20], w[19], selector);\n      w[32] = hc_byte_perm_S (w[19], w[18], selector);\n      w[31] = hc_byte_perm_S (w[18], w[17], selector);\n      w[30] = hc_byte_perm_S (w[17], w[16], selector);\n      w[29] = hc_byte_perm_S (w[16], w[15], selector);\n      w[28] = hc_byte_perm_S (w[15], w[14], selector);\n      w[27] = hc_byte_perm_S (w[14], w[13], selector);\n      w[26] = hc_byte_perm_S (w[13], w[12], selector);\n      w[25] = hc_byte_perm_S (w[12], w[11], selector);\n      w[24] = hc_byte_perm_S (w[11], w[10], selector);\n      w[23] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[22] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[21] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[20] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[19] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[18] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[17] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[16] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[15] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[14] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[13] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 14:\n      w[63] = hc_byte_perm_S (w[49], w[48], selector);\n      w[62] = hc_byte_perm_S (w[48], w[47], selector);\n      w[61] = hc_byte_perm_S (w[47], w[46], selector);\n      w[60] = hc_byte_perm_S (w[46], w[45], selector);\n      w[59] = hc_byte_perm_S (w[45], w[44], selector);\n      w[58] = hc_byte_perm_S (w[44], w[43], selector);\n      w[57] = hc_byte_perm_S (w[43], w[42], selector);\n      w[56] = hc_byte_perm_S (w[42], w[41], selector);\n      w[55] = hc_byte_perm_S (w[41], w[40], selector);\n      w[54] = hc_byte_perm_S (w[40], w[39], selector);\n      w[53] = hc_byte_perm_S (w[39], w[38], selector);\n      w[52] = hc_byte_perm_S (w[38], w[37], selector);\n      w[51] = hc_byte_perm_S (w[37], w[36], selector);\n      w[50] = hc_byte_perm_S (w[36], w[35], selector);\n      w[49] = hc_byte_perm_S (w[35], w[34], selector);\n      w[48] = hc_byte_perm_S (w[34], w[33], selector);\n      w[47] = hc_byte_perm_S (w[33], w[32], selector);\n      w[46] = hc_byte_perm_S (w[32], w[31], selector);\n      w[45] = hc_byte_perm_S (w[31], w[30], selector);\n      w[44] = hc_byte_perm_S (w[30], w[29], selector);\n      w[43] = hc_byte_perm_S (w[29], w[28], selector);\n      w[42] = hc_byte_perm_S (w[28], w[27], selector);\n      w[41] = hc_byte_perm_S (w[27], w[26], selector);\n      w[40] = hc_byte_perm_S (w[26], w[25], selector);\n      w[39] = hc_byte_perm_S (w[25], w[24], selector);\n      w[38] = hc_byte_perm_S (w[24], w[23], selector);\n      w[37] = hc_byte_perm_S (w[23], w[22], selector);\n      w[36] = hc_byte_perm_S (w[22], w[21], selector);\n      w[35] = hc_byte_perm_S (w[21], w[20], selector);\n      w[34] = hc_byte_perm_S (w[20], w[19], selector);\n      w[33] = hc_byte_perm_S (w[19], w[18], selector);\n      w[32] = hc_byte_perm_S (w[18], w[17], selector);\n      w[31] = hc_byte_perm_S (w[17], w[16], selector);\n      w[30] = hc_byte_perm_S (w[16], w[15], selector);\n      w[29] = hc_byte_perm_S (w[15], w[14], selector);\n      w[28] = hc_byte_perm_S (w[14], w[13], selector);\n      w[27] = hc_byte_perm_S (w[13], w[12], selector);\n      w[26] = hc_byte_perm_S (w[12], w[11], selector);\n      w[25] = hc_byte_perm_S (w[11], w[10], selector);\n      w[24] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[23] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[22] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[21] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[20] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[19] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[18] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[17] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[16] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[15] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[14] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 15:\n      w[63] = hc_byte_perm_S (w[48], w[47], selector);\n      w[62] = hc_byte_perm_S (w[47], w[46], selector);\n      w[61] = hc_byte_perm_S (w[46], w[45], selector);\n      w[60] = hc_byte_perm_S (w[45], w[44], selector);\n      w[59] = hc_byte_perm_S (w[44], w[43], selector);\n      w[58] = hc_byte_perm_S (w[43], w[42], selector);\n      w[57] = hc_byte_perm_S (w[42], w[41], selector);\n      w[56] = hc_byte_perm_S (w[41], w[40], selector);\n      w[55] = hc_byte_perm_S (w[40], w[39], selector);\n      w[54] = hc_byte_perm_S (w[39], w[38], selector);\n      w[53] = hc_byte_perm_S (w[38], w[37], selector);\n      w[52] = hc_byte_perm_S (w[37], w[36], selector);\n      w[51] = hc_byte_perm_S (w[36], w[35], selector);\n      w[50] = hc_byte_perm_S (w[35], w[34], selector);\n      w[49] = hc_byte_perm_S (w[34], w[33], selector);\n      w[48] = hc_byte_perm_S (w[33], w[32], selector);\n      w[47] = hc_byte_perm_S (w[32], w[31], selector);\n      w[46] = hc_byte_perm_S (w[31], w[30], selector);\n      w[45] = hc_byte_perm_S (w[30], w[29], selector);\n      w[44] = hc_byte_perm_S (w[29], w[28], selector);\n      w[43] = hc_byte_perm_S (w[28], w[27], selector);\n      w[42] = hc_byte_perm_S (w[27], w[26], selector);\n      w[41] = hc_byte_perm_S (w[26], w[25], selector);\n      w[40] = hc_byte_perm_S (w[25], w[24], selector);\n      w[39] = hc_byte_perm_S (w[24], w[23], selector);\n      w[38] = hc_byte_perm_S (w[23], w[22], selector);\n      w[37] = hc_byte_perm_S (w[22], w[21], selector);\n      w[36] = hc_byte_perm_S (w[21], w[20], selector);\n      w[35] = hc_byte_perm_S (w[20], w[19], selector);\n      w[34] = hc_byte_perm_S (w[19], w[18], selector);\n      w[33] = hc_byte_perm_S (w[18], w[17], selector);\n      w[32] = hc_byte_perm_S (w[17], w[16], selector);\n      w[31] = hc_byte_perm_S (w[16], w[15], selector);\n      w[30] = hc_byte_perm_S (w[15], w[14], selector);\n      w[29] = hc_byte_perm_S (w[14], w[13], selector);\n      w[28] = hc_byte_perm_S (w[13], w[12], selector);\n      w[27] = hc_byte_perm_S (w[12], w[11], selector);\n      w[26] = hc_byte_perm_S (w[11], w[10], selector);\n      w[25] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[24] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[23] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[22] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[21] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[20] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[19] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[18] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[17] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[16] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[15] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 16:\n      w[63] = hc_byte_perm_S (w[47], w[46], selector);\n      w[62] = hc_byte_perm_S (w[46], w[45], selector);\n      w[61] = hc_byte_perm_S (w[45], w[44], selector);\n      w[60] = hc_byte_perm_S (w[44], w[43], selector);\n      w[59] = hc_byte_perm_S (w[43], w[42], selector);\n      w[58] = hc_byte_perm_S (w[42], w[41], selector);\n      w[57] = hc_byte_perm_S (w[41], w[40], selector);\n      w[56] = hc_byte_perm_S (w[40], w[39], selector);\n      w[55] = hc_byte_perm_S (w[39], w[38], selector);\n      w[54] = hc_byte_perm_S (w[38], w[37], selector);\n      w[53] = hc_byte_perm_S (w[37], w[36], selector);\n      w[52] = hc_byte_perm_S (w[36], w[35], selector);\n      w[51] = hc_byte_perm_S (w[35], w[34], selector);\n      w[50] = hc_byte_perm_S (w[34], w[33], selector);\n      w[49] = hc_byte_perm_S (w[33], w[32], selector);\n      w[48] = hc_byte_perm_S (w[32], w[31], selector);\n      w[47] = hc_byte_perm_S (w[31], w[30], selector);\n      w[46] = hc_byte_perm_S (w[30], w[29], selector);\n      w[45] = hc_byte_perm_S (w[29], w[28], selector);\n      w[44] = hc_byte_perm_S (w[28], w[27], selector);\n      w[43] = hc_byte_perm_S (w[27], w[26], selector);\n      w[42] = hc_byte_perm_S (w[26], w[25], selector);\n      w[41] = hc_byte_perm_S (w[25], w[24], selector);\n      w[40] = hc_byte_perm_S (w[24], w[23], selector);\n      w[39] = hc_byte_perm_S (w[23], w[22], selector);\n      w[38] = hc_byte_perm_S (w[22], w[21], selector);\n      w[37] = hc_byte_perm_S (w[21], w[20], selector);\n      w[36] = hc_byte_perm_S (w[20], w[19], selector);\n      w[35] = hc_byte_perm_S (w[19], w[18], selector);\n      w[34] = hc_byte_perm_S (w[18], w[17], selector);\n      w[33] = hc_byte_perm_S (w[17], w[16], selector);\n      w[32] = hc_byte_perm_S (w[16], w[15], selector);\n      w[31] = hc_byte_perm_S (w[15], w[14], selector);\n      w[30] = hc_byte_perm_S (w[14], w[13], selector);\n      w[29] = hc_byte_perm_S (w[13], w[12], selector);\n      w[28] = hc_byte_perm_S (w[12], w[11], selector);\n      w[27] = hc_byte_perm_S (w[11], w[10], selector);\n      w[26] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[25] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[24] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[23] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[22] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[21] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[20] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[19] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[18] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[17] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[16] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 17:\n      w[63] = hc_byte_perm_S (w[46], w[45], selector);\n      w[62] = hc_byte_perm_S (w[45], w[44], selector);\n      w[61] = hc_byte_perm_S (w[44], w[43], selector);\n      w[60] = hc_byte_perm_S (w[43], w[42], selector);\n      w[59] = hc_byte_perm_S (w[42], w[41], selector);\n      w[58] = hc_byte_perm_S (w[41], w[40], selector);\n      w[57] = hc_byte_perm_S (w[40], w[39], selector);\n      w[56] = hc_byte_perm_S (w[39], w[38], selector);\n      w[55] = hc_byte_perm_S (w[38], w[37], selector);\n      w[54] = hc_byte_perm_S (w[37], w[36], selector);\n      w[53] = hc_byte_perm_S (w[36], w[35], selector);\n      w[52] = hc_byte_perm_S (w[35], w[34], selector);\n      w[51] = hc_byte_perm_S (w[34], w[33], selector);\n      w[50] = hc_byte_perm_S (w[33], w[32], selector);\n      w[49] = hc_byte_perm_S (w[32], w[31], selector);\n      w[48] = hc_byte_perm_S (w[31], w[30], selector);\n      w[47] = hc_byte_perm_S (w[30], w[29], selector);\n      w[46] = hc_byte_perm_S (w[29], w[28], selector);\n      w[45] = hc_byte_perm_S (w[28], w[27], selector);\n      w[44] = hc_byte_perm_S (w[27], w[26], selector);\n      w[43] = hc_byte_perm_S (w[26], w[25], selector);\n      w[42] = hc_byte_perm_S (w[25], w[24], selector);\n      w[41] = hc_byte_perm_S (w[24], w[23], selector);\n      w[40] = hc_byte_perm_S (w[23], w[22], selector);\n      w[39] = hc_byte_perm_S (w[22], w[21], selector);\n      w[38] = hc_byte_perm_S (w[21], w[20], selector);\n      w[37] = hc_byte_perm_S (w[20], w[19], selector);\n      w[36] = hc_byte_perm_S (w[19], w[18], selector);\n      w[35] = hc_byte_perm_S (w[18], w[17], selector);\n      w[34] = hc_byte_perm_S (w[17], w[16], selector);\n      w[33] = hc_byte_perm_S (w[16], w[15], selector);\n      w[32] = hc_byte_perm_S (w[15], w[14], selector);\n      w[31] = hc_byte_perm_S (w[14], w[13], selector);\n      w[30] = hc_byte_perm_S (w[13], w[12], selector);\n      w[29] = hc_byte_perm_S (w[12], w[11], selector);\n      w[28] = hc_byte_perm_S (w[11], w[10], selector);\n      w[27] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[26] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[25] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[24] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[23] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[22] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[21] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[20] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[19] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[18] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[17] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 18:\n      w[63] = hc_byte_perm_S (w[45], w[44], selector);\n      w[62] = hc_byte_perm_S (w[44], w[43], selector);\n      w[61] = hc_byte_perm_S (w[43], w[42], selector);\n      w[60] = hc_byte_perm_S (w[42], w[41], selector);\n      w[59] = hc_byte_perm_S (w[41], w[40], selector);\n      w[58] = hc_byte_perm_S (w[40], w[39], selector);\n      w[57] = hc_byte_perm_S (w[39], w[38], selector);\n      w[56] = hc_byte_perm_S (w[38], w[37], selector);\n      w[55] = hc_byte_perm_S (w[37], w[36], selector);\n      w[54] = hc_byte_perm_S (w[36], w[35], selector);\n      w[53] = hc_byte_perm_S (w[35], w[34], selector);\n      w[52] = hc_byte_perm_S (w[34], w[33], selector);\n      w[51] = hc_byte_perm_S (w[33], w[32], selector);\n      w[50] = hc_byte_perm_S (w[32], w[31], selector);\n      w[49] = hc_byte_perm_S (w[31], w[30], selector);\n      w[48] = hc_byte_perm_S (w[30], w[29], selector);\n      w[47] = hc_byte_perm_S (w[29], w[28], selector);\n      w[46] = hc_byte_perm_S (w[28], w[27], selector);\n      w[45] = hc_byte_perm_S (w[27], w[26], selector);\n      w[44] = hc_byte_perm_S (w[26], w[25], selector);\n      w[43] = hc_byte_perm_S (w[25], w[24], selector);\n      w[42] = hc_byte_perm_S (w[24], w[23], selector);\n      w[41] = hc_byte_perm_S (w[23], w[22], selector);\n      w[40] = hc_byte_perm_S (w[22], w[21], selector);\n      w[39] = hc_byte_perm_S (w[21], w[20], selector);\n      w[38] = hc_byte_perm_S (w[20], w[19], selector);\n      w[37] = hc_byte_perm_S (w[19], w[18], selector);\n      w[36] = hc_byte_perm_S (w[18], w[17], selector);\n      w[35] = hc_byte_perm_S (w[17], w[16], selector);\n      w[34] = hc_byte_perm_S (w[16], w[15], selector);\n      w[33] = hc_byte_perm_S (w[15], w[14], selector);\n      w[32] = hc_byte_perm_S (w[14], w[13], selector);\n      w[31] = hc_byte_perm_S (w[13], w[12], selector);\n      w[30] = hc_byte_perm_S (w[12], w[11], selector);\n      w[29] = hc_byte_perm_S (w[11], w[10], selector);\n      w[28] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[27] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[26] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[25] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[24] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[23] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[22] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[21] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[20] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[19] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[18] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 19:\n      w[63] = hc_byte_perm_S (w[44], w[43], selector);\n      w[62] = hc_byte_perm_S (w[43], w[42], selector);\n      w[61] = hc_byte_perm_S (w[42], w[41], selector);\n      w[60] = hc_byte_perm_S (w[41], w[40], selector);\n      w[59] = hc_byte_perm_S (w[40], w[39], selector);\n      w[58] = hc_byte_perm_S (w[39], w[38], selector);\n      w[57] = hc_byte_perm_S (w[38], w[37], selector);\n      w[56] = hc_byte_perm_S (w[37], w[36], selector);\n      w[55] = hc_byte_perm_S (w[36], w[35], selector);\n      w[54] = hc_byte_perm_S (w[35], w[34], selector);\n      w[53] = hc_byte_perm_S (w[34], w[33], selector);\n      w[52] = hc_byte_perm_S (w[33], w[32], selector);\n      w[51] = hc_byte_perm_S (w[32], w[31], selector);\n      w[50] = hc_byte_perm_S (w[31], w[30], selector);\n      w[49] = hc_byte_perm_S (w[30], w[29], selector);\n      w[48] = hc_byte_perm_S (w[29], w[28], selector);\n      w[47] = hc_byte_perm_S (w[28], w[27], selector);\n      w[46] = hc_byte_perm_S (w[27], w[26], selector);\n      w[45] = hc_byte_perm_S (w[26], w[25], selector);\n      w[44] = hc_byte_perm_S (w[25], w[24], selector);\n      w[43] = hc_byte_perm_S (w[24], w[23], selector);\n      w[42] = hc_byte_perm_S (w[23], w[22], selector);\n      w[41] = hc_byte_perm_S (w[22], w[21], selector);\n      w[40] = hc_byte_perm_S (w[21], w[20], selector);\n      w[39] = hc_byte_perm_S (w[20], w[19], selector);\n      w[38] = hc_byte_perm_S (w[19], w[18], selector);\n      w[37] = hc_byte_perm_S (w[18], w[17], selector);\n      w[36] = hc_byte_perm_S (w[17], w[16], selector);\n      w[35] = hc_byte_perm_S (w[16], w[15], selector);\n      w[34] = hc_byte_perm_S (w[15], w[14], selector);\n      w[33] = hc_byte_perm_S (w[14], w[13], selector);\n      w[32] = hc_byte_perm_S (w[13], w[12], selector);\n      w[31] = hc_byte_perm_S (w[12], w[11], selector);\n      w[30] = hc_byte_perm_S (w[11], w[10], selector);\n      w[29] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[28] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[27] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[26] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[25] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[24] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[23] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[22] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[21] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[20] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[19] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 20:\n      w[63] = hc_byte_perm_S (w[43], w[42], selector);\n      w[62] = hc_byte_perm_S (w[42], w[41], selector);\n      w[61] = hc_byte_perm_S (w[41], w[40], selector);\n      w[60] = hc_byte_perm_S (w[40], w[39], selector);\n      w[59] = hc_byte_perm_S (w[39], w[38], selector);\n      w[58] = hc_byte_perm_S (w[38], w[37], selector);\n      w[57] = hc_byte_perm_S (w[37], w[36], selector);\n      w[56] = hc_byte_perm_S (w[36], w[35], selector);\n      w[55] = hc_byte_perm_S (w[35], w[34], selector);\n      w[54] = hc_byte_perm_S (w[34], w[33], selector);\n      w[53] = hc_byte_perm_S (w[33], w[32], selector);\n      w[52] = hc_byte_perm_S (w[32], w[31], selector);\n      w[51] = hc_byte_perm_S (w[31], w[30], selector);\n      w[50] = hc_byte_perm_S (w[30], w[29], selector);\n      w[49] = hc_byte_perm_S (w[29], w[28], selector);\n      w[48] = hc_byte_perm_S (w[28], w[27], selector);\n      w[47] = hc_byte_perm_S (w[27], w[26], selector);\n      w[46] = hc_byte_perm_S (w[26], w[25], selector);\n      w[45] = hc_byte_perm_S (w[25], w[24], selector);\n      w[44] = hc_byte_perm_S (w[24], w[23], selector);\n      w[43] = hc_byte_perm_S (w[23], w[22], selector);\n      w[42] = hc_byte_perm_S (w[22], w[21], selector);\n      w[41] = hc_byte_perm_S (w[21], w[20], selector);\n      w[40] = hc_byte_perm_S (w[20], w[19], selector);\n      w[39] = hc_byte_perm_S (w[19], w[18], selector);\n      w[38] = hc_byte_perm_S (w[18], w[17], selector);\n      w[37] = hc_byte_perm_S (w[17], w[16], selector);\n      w[36] = hc_byte_perm_S (w[16], w[15], selector);\n      w[35] = hc_byte_perm_S (w[15], w[14], selector);\n      w[34] = hc_byte_perm_S (w[14], w[13], selector);\n      w[33] = hc_byte_perm_S (w[13], w[12], selector);\n      w[32] = hc_byte_perm_S (w[12], w[11], selector);\n      w[31] = hc_byte_perm_S (w[11], w[10], selector);\n      w[30] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[29] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[28] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[27] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[26] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[25] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[24] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[23] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[22] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[21] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[20] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 21:\n      w[63] = hc_byte_perm_S (w[42], w[41], selector);\n      w[62] = hc_byte_perm_S (w[41], w[40], selector);\n      w[61] = hc_byte_perm_S (w[40], w[39], selector);\n      w[60] = hc_byte_perm_S (w[39], w[38], selector);\n      w[59] = hc_byte_perm_S (w[38], w[37], selector);\n      w[58] = hc_byte_perm_S (w[37], w[36], selector);\n      w[57] = hc_byte_perm_S (w[36], w[35], selector);\n      w[56] = hc_byte_perm_S (w[35], w[34], selector);\n      w[55] = hc_byte_perm_S (w[34], w[33], selector);\n      w[54] = hc_byte_perm_S (w[33], w[32], selector);\n      w[53] = hc_byte_perm_S (w[32], w[31], selector);\n      w[52] = hc_byte_perm_S (w[31], w[30], selector);\n      w[51] = hc_byte_perm_S (w[30], w[29], selector);\n      w[50] = hc_byte_perm_S (w[29], w[28], selector);\n      w[49] = hc_byte_perm_S (w[28], w[27], selector);\n      w[48] = hc_byte_perm_S (w[27], w[26], selector);\n      w[47] = hc_byte_perm_S (w[26], w[25], selector);\n      w[46] = hc_byte_perm_S (w[25], w[24], selector);\n      w[45] = hc_byte_perm_S (w[24], w[23], selector);\n      w[44] = hc_byte_perm_S (w[23], w[22], selector);\n      w[43] = hc_byte_perm_S (w[22], w[21], selector);\n      w[42] = hc_byte_perm_S (w[21], w[20], selector);\n      w[41] = hc_byte_perm_S (w[20], w[19], selector);\n      w[40] = hc_byte_perm_S (w[19], w[18], selector);\n      w[39] = hc_byte_perm_S (w[18], w[17], selector);\n      w[38] = hc_byte_perm_S (w[17], w[16], selector);\n      w[37] = hc_byte_perm_S (w[16], w[15], selector);\n      w[36] = hc_byte_perm_S (w[15], w[14], selector);\n      w[35] = hc_byte_perm_S (w[14], w[13], selector);\n      w[34] = hc_byte_perm_S (w[13], w[12], selector);\n      w[33] = hc_byte_perm_S (w[12], w[11], selector);\n      w[32] = hc_byte_perm_S (w[11], w[10], selector);\n      w[31] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[30] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[29] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[28] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[27] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[26] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[25] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[24] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[23] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[22] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[21] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 22:\n      w[63] = hc_byte_perm_S (w[41], w[40], selector);\n      w[62] = hc_byte_perm_S (w[40], w[39], selector);\n      w[61] = hc_byte_perm_S (w[39], w[38], selector);\n      w[60] = hc_byte_perm_S (w[38], w[37], selector);\n      w[59] = hc_byte_perm_S (w[37], w[36], selector);\n      w[58] = hc_byte_perm_S (w[36], w[35], selector);\n      w[57] = hc_byte_perm_S (w[35], w[34], selector);\n      w[56] = hc_byte_perm_S (w[34], w[33], selector);\n      w[55] = hc_byte_perm_S (w[33], w[32], selector);\n      w[54] = hc_byte_perm_S (w[32], w[31], selector);\n      w[53] = hc_byte_perm_S (w[31], w[30], selector);\n      w[52] = hc_byte_perm_S (w[30], w[29], selector);\n      w[51] = hc_byte_perm_S (w[29], w[28], selector);\n      w[50] = hc_byte_perm_S (w[28], w[27], selector);\n      w[49] = hc_byte_perm_S (w[27], w[26], selector);\n      w[48] = hc_byte_perm_S (w[26], w[25], selector);\n      w[47] = hc_byte_perm_S (w[25], w[24], selector);\n      w[46] = hc_byte_perm_S (w[24], w[23], selector);\n      w[45] = hc_byte_perm_S (w[23], w[22], selector);\n      w[44] = hc_byte_perm_S (w[22], w[21], selector);\n      w[43] = hc_byte_perm_S (w[21], w[20], selector);\n      w[42] = hc_byte_perm_S (w[20], w[19], selector);\n      w[41] = hc_byte_perm_S (w[19], w[18], selector);\n      w[40] = hc_byte_perm_S (w[18], w[17], selector);\n      w[39] = hc_byte_perm_S (w[17], w[16], selector);\n      w[38] = hc_byte_perm_S (w[16], w[15], selector);\n      w[37] = hc_byte_perm_S (w[15], w[14], selector);\n      w[36] = hc_byte_perm_S (w[14], w[13], selector);\n      w[35] = hc_byte_perm_S (w[13], w[12], selector);\n      w[34] = hc_byte_perm_S (w[12], w[11], selector);\n      w[33] = hc_byte_perm_S (w[11], w[10], selector);\n      w[32] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[31] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[30] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[29] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[28] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[27] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[26] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[25] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[24] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[23] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[22] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 23:\n      w[63] = hc_byte_perm_S (w[40], w[39], selector);\n      w[62] = hc_byte_perm_S (w[39], w[38], selector);\n      w[61] = hc_byte_perm_S (w[38], w[37], selector);\n      w[60] = hc_byte_perm_S (w[37], w[36], selector);\n      w[59] = hc_byte_perm_S (w[36], w[35], selector);\n      w[58] = hc_byte_perm_S (w[35], w[34], selector);\n      w[57] = hc_byte_perm_S (w[34], w[33], selector);\n      w[56] = hc_byte_perm_S (w[33], w[32], selector);\n      w[55] = hc_byte_perm_S (w[32], w[31], selector);\n      w[54] = hc_byte_perm_S (w[31], w[30], selector);\n      w[53] = hc_byte_perm_S (w[30], w[29], selector);\n      w[52] = hc_byte_perm_S (w[29], w[28], selector);\n      w[51] = hc_byte_perm_S (w[28], w[27], selector);\n      w[50] = hc_byte_perm_S (w[27], w[26], selector);\n      w[49] = hc_byte_perm_S (w[26], w[25], selector);\n      w[48] = hc_byte_perm_S (w[25], w[24], selector);\n      w[47] = hc_byte_perm_S (w[24], w[23], selector);\n      w[46] = hc_byte_perm_S (w[23], w[22], selector);\n      w[45] = hc_byte_perm_S (w[22], w[21], selector);\n      w[44] = hc_byte_perm_S (w[21], w[20], selector);\n      w[43] = hc_byte_perm_S (w[20], w[19], selector);\n      w[42] = hc_byte_perm_S (w[19], w[18], selector);\n      w[41] = hc_byte_perm_S (w[18], w[17], selector);\n      w[40] = hc_byte_perm_S (w[17], w[16], selector);\n      w[39] = hc_byte_perm_S (w[16], w[15], selector);\n      w[38] = hc_byte_perm_S (w[15], w[14], selector);\n      w[37] = hc_byte_perm_S (w[14], w[13], selector);\n      w[36] = hc_byte_perm_S (w[13], w[12], selector);\n      w[35] = hc_byte_perm_S (w[12], w[11], selector);\n      w[34] = hc_byte_perm_S (w[11], w[10], selector);\n      w[33] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[32] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[31] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[30] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[29] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[28] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[27] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[26] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[25] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[24] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[23] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 24:\n      w[63] = hc_byte_perm_S (w[39], w[38], selector);\n      w[62] = hc_byte_perm_S (w[38], w[37], selector);\n      w[61] = hc_byte_perm_S (w[37], w[36], selector);\n      w[60] = hc_byte_perm_S (w[36], w[35], selector);\n      w[59] = hc_byte_perm_S (w[35], w[34], selector);\n      w[58] = hc_byte_perm_S (w[34], w[33], selector);\n      w[57] = hc_byte_perm_S (w[33], w[32], selector);\n      w[56] = hc_byte_perm_S (w[32], w[31], selector);\n      w[55] = hc_byte_perm_S (w[31], w[30], selector);\n      w[54] = hc_byte_perm_S (w[30], w[29], selector);\n      w[53] = hc_byte_perm_S (w[29], w[28], selector);\n      w[52] = hc_byte_perm_S (w[28], w[27], selector);\n      w[51] = hc_byte_perm_S (w[27], w[26], selector);\n      w[50] = hc_byte_perm_S (w[26], w[25], selector);\n      w[49] = hc_byte_perm_S (w[25], w[24], selector);\n      w[48] = hc_byte_perm_S (w[24], w[23], selector);\n      w[47] = hc_byte_perm_S (w[23], w[22], selector);\n      w[46] = hc_byte_perm_S (w[22], w[21], selector);\n      w[45] = hc_byte_perm_S (w[21], w[20], selector);\n      w[44] = hc_byte_perm_S (w[20], w[19], selector);\n      w[43] = hc_byte_perm_S (w[19], w[18], selector);\n      w[42] = hc_byte_perm_S (w[18], w[17], selector);\n      w[41] = hc_byte_perm_S (w[17], w[16], selector);\n      w[40] = hc_byte_perm_S (w[16], w[15], selector);\n      w[39] = hc_byte_perm_S (w[15], w[14], selector);\n      w[38] = hc_byte_perm_S (w[14], w[13], selector);\n      w[37] = hc_byte_perm_S (w[13], w[12], selector);\n      w[36] = hc_byte_perm_S (w[12], w[11], selector);\n      w[35] = hc_byte_perm_S (w[11], w[10], selector);\n      w[34] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[33] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[32] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[31] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[30] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[29] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[28] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[27] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[26] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[25] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[24] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 25:\n      w[63] = hc_byte_perm_S (w[38], w[37], selector);\n      w[62] = hc_byte_perm_S (w[37], w[36], selector);\n      w[61] = hc_byte_perm_S (w[36], w[35], selector);\n      w[60] = hc_byte_perm_S (w[35], w[34], selector);\n      w[59] = hc_byte_perm_S (w[34], w[33], selector);\n      w[58] = hc_byte_perm_S (w[33], w[32], selector);\n      w[57] = hc_byte_perm_S (w[32], w[31], selector);\n      w[56] = hc_byte_perm_S (w[31], w[30], selector);\n      w[55] = hc_byte_perm_S (w[30], w[29], selector);\n      w[54] = hc_byte_perm_S (w[29], w[28], selector);\n      w[53] = hc_byte_perm_S (w[28], w[27], selector);\n      w[52] = hc_byte_perm_S (w[27], w[26], selector);\n      w[51] = hc_byte_perm_S (w[26], w[25], selector);\n      w[50] = hc_byte_perm_S (w[25], w[24], selector);\n      w[49] = hc_byte_perm_S (w[24], w[23], selector);\n      w[48] = hc_byte_perm_S (w[23], w[22], selector);\n      w[47] = hc_byte_perm_S (w[22], w[21], selector);\n      w[46] = hc_byte_perm_S (w[21], w[20], selector);\n      w[45] = hc_byte_perm_S (w[20], w[19], selector);\n      w[44] = hc_byte_perm_S (w[19], w[18], selector);\n      w[43] = hc_byte_perm_S (w[18], w[17], selector);\n      w[42] = hc_byte_perm_S (w[17], w[16], selector);\n      w[41] = hc_byte_perm_S (w[16], w[15], selector);\n      w[40] = hc_byte_perm_S (w[15], w[14], selector);\n      w[39] = hc_byte_perm_S (w[14], w[13], selector);\n      w[38] = hc_byte_perm_S (w[13], w[12], selector);\n      w[37] = hc_byte_perm_S (w[12], w[11], selector);\n      w[36] = hc_byte_perm_S (w[11], w[10], selector);\n      w[35] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[34] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[33] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[32] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[31] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[30] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[29] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[28] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[27] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[26] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[25] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 26:\n      w[63] = hc_byte_perm_S (w[37], w[36], selector);\n      w[62] = hc_byte_perm_S (w[36], w[35], selector);\n      w[61] = hc_byte_perm_S (w[35], w[34], selector);\n      w[60] = hc_byte_perm_S (w[34], w[33], selector);\n      w[59] = hc_byte_perm_S (w[33], w[32], selector);\n      w[58] = hc_byte_perm_S (w[32], w[31], selector);\n      w[57] = hc_byte_perm_S (w[31], w[30], selector);\n      w[56] = hc_byte_perm_S (w[30], w[29], selector);\n      w[55] = hc_byte_perm_S (w[29], w[28], selector);\n      w[54] = hc_byte_perm_S (w[28], w[27], selector);\n      w[53] = hc_byte_perm_S (w[27], w[26], selector);\n      w[52] = hc_byte_perm_S (w[26], w[25], selector);\n      w[51] = hc_byte_perm_S (w[25], w[24], selector);\n      w[50] = hc_byte_perm_S (w[24], w[23], selector);\n      w[49] = hc_byte_perm_S (w[23], w[22], selector);\n      w[48] = hc_byte_perm_S (w[22], w[21], selector);\n      w[47] = hc_byte_perm_S (w[21], w[20], selector);\n      w[46] = hc_byte_perm_S (w[20], w[19], selector);\n      w[45] = hc_byte_perm_S (w[19], w[18], selector);\n      w[44] = hc_byte_perm_S (w[18], w[17], selector);\n      w[43] = hc_byte_perm_S (w[17], w[16], selector);\n      w[42] = hc_byte_perm_S (w[16], w[15], selector);\n      w[41] = hc_byte_perm_S (w[15], w[14], selector);\n      w[40] = hc_byte_perm_S (w[14], w[13], selector);\n      w[39] = hc_byte_perm_S (w[13], w[12], selector);\n      w[38] = hc_byte_perm_S (w[12], w[11], selector);\n      w[37] = hc_byte_perm_S (w[11], w[10], selector);\n      w[36] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[35] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[34] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[33] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[32] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[31] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[30] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[29] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[28] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[27] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[26] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 27:\n      w[63] = hc_byte_perm_S (w[36], w[35], selector);\n      w[62] = hc_byte_perm_S (w[35], w[34], selector);\n      w[61] = hc_byte_perm_S (w[34], w[33], selector);\n      w[60] = hc_byte_perm_S (w[33], w[32], selector);\n      w[59] = hc_byte_perm_S (w[32], w[31], selector);\n      w[58] = hc_byte_perm_S (w[31], w[30], selector);\n      w[57] = hc_byte_perm_S (w[30], w[29], selector);\n      w[56] = hc_byte_perm_S (w[29], w[28], selector);\n      w[55] = hc_byte_perm_S (w[28], w[27], selector);\n      w[54] = hc_byte_perm_S (w[27], w[26], selector);\n      w[53] = hc_byte_perm_S (w[26], w[25], selector);\n      w[52] = hc_byte_perm_S (w[25], w[24], selector);\n      w[51] = hc_byte_perm_S (w[24], w[23], selector);\n      w[50] = hc_byte_perm_S (w[23], w[22], selector);\n      w[49] = hc_byte_perm_S (w[22], w[21], selector);\n      w[48] = hc_byte_perm_S (w[21], w[20], selector);\n      w[47] = hc_byte_perm_S (w[20], w[19], selector);\n      w[46] = hc_byte_perm_S (w[19], w[18], selector);\n      w[45] = hc_byte_perm_S (w[18], w[17], selector);\n      w[44] = hc_byte_perm_S (w[17], w[16], selector);\n      w[43] = hc_byte_perm_S (w[16], w[15], selector);\n      w[42] = hc_byte_perm_S (w[15], w[14], selector);\n      w[41] = hc_byte_perm_S (w[14], w[13], selector);\n      w[40] = hc_byte_perm_S (w[13], w[12], selector);\n      w[39] = hc_byte_perm_S (w[12], w[11], selector);\n      w[38] = hc_byte_perm_S (w[11], w[10], selector);\n      w[37] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[36] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[35] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[34] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[33] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[32] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[31] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[30] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[29] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[28] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[27] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 28:\n      w[63] = hc_byte_perm_S (w[35], w[34], selector);\n      w[62] = hc_byte_perm_S (w[34], w[33], selector);\n      w[61] = hc_byte_perm_S (w[33], w[32], selector);\n      w[60] = hc_byte_perm_S (w[32], w[31], selector);\n      w[59] = hc_byte_perm_S (w[31], w[30], selector);\n      w[58] = hc_byte_perm_S (w[30], w[29], selector);\n      w[57] = hc_byte_perm_S (w[29], w[28], selector);\n      w[56] = hc_byte_perm_S (w[28], w[27], selector);\n      w[55] = hc_byte_perm_S (w[27], w[26], selector);\n      w[54] = hc_byte_perm_S (w[26], w[25], selector);\n      w[53] = hc_byte_perm_S (w[25], w[24], selector);\n      w[52] = hc_byte_perm_S (w[24], w[23], selector);\n      w[51] = hc_byte_perm_S (w[23], w[22], selector);\n      w[50] = hc_byte_perm_S (w[22], w[21], selector);\n      w[49] = hc_byte_perm_S (w[21], w[20], selector);\n      w[48] = hc_byte_perm_S (w[20], w[19], selector);\n      w[47] = hc_byte_perm_S (w[19], w[18], selector);\n      w[46] = hc_byte_perm_S (w[18], w[17], selector);\n      w[45] = hc_byte_perm_S (w[17], w[16], selector);\n      w[44] = hc_byte_perm_S (w[16], w[15], selector);\n      w[43] = hc_byte_perm_S (w[15], w[14], selector);\n      w[42] = hc_byte_perm_S (w[14], w[13], selector);\n      w[41] = hc_byte_perm_S (w[13], w[12], selector);\n      w[40] = hc_byte_perm_S (w[12], w[11], selector);\n      w[39] = hc_byte_perm_S (w[11], w[10], selector);\n      w[38] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[37] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[36] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[35] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[34] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[33] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[32] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[31] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[30] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[29] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[28] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 29:\n      w[63] = hc_byte_perm_S (w[34], w[33], selector);\n      w[62] = hc_byte_perm_S (w[33], w[32], selector);\n      w[61] = hc_byte_perm_S (w[32], w[31], selector);\n      w[60] = hc_byte_perm_S (w[31], w[30], selector);\n      w[59] = hc_byte_perm_S (w[30], w[29], selector);\n      w[58] = hc_byte_perm_S (w[29], w[28], selector);\n      w[57] = hc_byte_perm_S (w[28], w[27], selector);\n      w[56] = hc_byte_perm_S (w[27], w[26], selector);\n      w[55] = hc_byte_perm_S (w[26], w[25], selector);\n      w[54] = hc_byte_perm_S (w[25], w[24], selector);\n      w[53] = hc_byte_perm_S (w[24], w[23], selector);\n      w[52] = hc_byte_perm_S (w[23], w[22], selector);\n      w[51] = hc_byte_perm_S (w[22], w[21], selector);\n      w[50] = hc_byte_perm_S (w[21], w[20], selector);\n      w[49] = hc_byte_perm_S (w[20], w[19], selector);\n      w[48] = hc_byte_perm_S (w[19], w[18], selector);\n      w[47] = hc_byte_perm_S (w[18], w[17], selector);\n      w[46] = hc_byte_perm_S (w[17], w[16], selector);\n      w[45] = hc_byte_perm_S (w[16], w[15], selector);\n      w[44] = hc_byte_perm_S (w[15], w[14], selector);\n      w[43] = hc_byte_perm_S (w[14], w[13], selector);\n      w[42] = hc_byte_perm_S (w[13], w[12], selector);\n      w[41] = hc_byte_perm_S (w[12], w[11], selector);\n      w[40] = hc_byte_perm_S (w[11], w[10], selector);\n      w[39] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[38] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[37] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[36] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[35] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[34] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[33] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[32] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[31] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[30] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[29] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 30:\n      w[63] = hc_byte_perm_S (w[33], w[32], selector);\n      w[62] = hc_byte_perm_S (w[32], w[31], selector);\n      w[61] = hc_byte_perm_S (w[31], w[30], selector);\n      w[60] = hc_byte_perm_S (w[30], w[29], selector);\n      w[59] = hc_byte_perm_S (w[29], w[28], selector);\n      w[58] = hc_byte_perm_S (w[28], w[27], selector);\n      w[57] = hc_byte_perm_S (w[27], w[26], selector);\n      w[56] = hc_byte_perm_S (w[26], w[25], selector);\n      w[55] = hc_byte_perm_S (w[25], w[24], selector);\n      w[54] = hc_byte_perm_S (w[24], w[23], selector);\n      w[53] = hc_byte_perm_S (w[23], w[22], selector);\n      w[52] = hc_byte_perm_S (w[22], w[21], selector);\n      w[51] = hc_byte_perm_S (w[21], w[20], selector);\n      w[50] = hc_byte_perm_S (w[20], w[19], selector);\n      w[49] = hc_byte_perm_S (w[19], w[18], selector);\n      w[48] = hc_byte_perm_S (w[18], w[17], selector);\n      w[47] = hc_byte_perm_S (w[17], w[16], selector);\n      w[46] = hc_byte_perm_S (w[16], w[15], selector);\n      w[45] = hc_byte_perm_S (w[15], w[14], selector);\n      w[44] = hc_byte_perm_S (w[14], w[13], selector);\n      w[43] = hc_byte_perm_S (w[13], w[12], selector);\n      w[42] = hc_byte_perm_S (w[12], w[11], selector);\n      w[41] = hc_byte_perm_S (w[11], w[10], selector);\n      w[40] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[39] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[38] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[37] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[36] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[35] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[34] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[33] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[32] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[31] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[30] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 31:\n      w[63] = hc_byte_perm_S (w[32], w[31], selector);\n      w[62] = hc_byte_perm_S (w[31], w[30], selector);\n      w[61] = hc_byte_perm_S (w[30], w[29], selector);\n      w[60] = hc_byte_perm_S (w[29], w[28], selector);\n      w[59] = hc_byte_perm_S (w[28], w[27], selector);\n      w[58] = hc_byte_perm_S (w[27], w[26], selector);\n      w[57] = hc_byte_perm_S (w[26], w[25], selector);\n      w[56] = hc_byte_perm_S (w[25], w[24], selector);\n      w[55] = hc_byte_perm_S (w[24], w[23], selector);\n      w[54] = hc_byte_perm_S (w[23], w[22], selector);\n      w[53] = hc_byte_perm_S (w[22], w[21], selector);\n      w[52] = hc_byte_perm_S (w[21], w[20], selector);\n      w[51] = hc_byte_perm_S (w[20], w[19], selector);\n      w[50] = hc_byte_perm_S (w[19], w[18], selector);\n      w[49] = hc_byte_perm_S (w[18], w[17], selector);\n      w[48] = hc_byte_perm_S (w[17], w[16], selector);\n      w[47] = hc_byte_perm_S (w[16], w[15], selector);\n      w[46] = hc_byte_perm_S (w[15], w[14], selector);\n      w[45] = hc_byte_perm_S (w[14], w[13], selector);\n      w[44] = hc_byte_perm_S (w[13], w[12], selector);\n      w[43] = hc_byte_perm_S (w[12], w[11], selector);\n      w[42] = hc_byte_perm_S (w[11], w[10], selector);\n      w[41] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[40] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[39] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[38] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[37] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[36] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[35] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[34] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[33] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[32] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[31] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 32:\n      w[63] = hc_byte_perm_S (w[31], w[30], selector);\n      w[62] = hc_byte_perm_S (w[30], w[29], selector);\n      w[61] = hc_byte_perm_S (w[29], w[28], selector);\n      w[60] = hc_byte_perm_S (w[28], w[27], selector);\n      w[59] = hc_byte_perm_S (w[27], w[26], selector);\n      w[58] = hc_byte_perm_S (w[26], w[25], selector);\n      w[57] = hc_byte_perm_S (w[25], w[24], selector);\n      w[56] = hc_byte_perm_S (w[24], w[23], selector);\n      w[55] = hc_byte_perm_S (w[23], w[22], selector);\n      w[54] = hc_byte_perm_S (w[22], w[21], selector);\n      w[53] = hc_byte_perm_S (w[21], w[20], selector);\n      w[52] = hc_byte_perm_S (w[20], w[19], selector);\n      w[51] = hc_byte_perm_S (w[19], w[18], selector);\n      w[50] = hc_byte_perm_S (w[18], w[17], selector);\n      w[49] = hc_byte_perm_S (w[17], w[16], selector);\n      w[48] = hc_byte_perm_S (w[16], w[15], selector);\n      w[47] = hc_byte_perm_S (w[15], w[14], selector);\n      w[46] = hc_byte_perm_S (w[14], w[13], selector);\n      w[45] = hc_byte_perm_S (w[13], w[12], selector);\n      w[44] = hc_byte_perm_S (w[12], w[11], selector);\n      w[43] = hc_byte_perm_S (w[11], w[10], selector);\n      w[42] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[41] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[40] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[39] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[38] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[37] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[36] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[35] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[34] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[33] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[32] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 33:\n      w[63] = hc_byte_perm_S (w[30], w[29], selector);\n      w[62] = hc_byte_perm_S (w[29], w[28], selector);\n      w[61] = hc_byte_perm_S (w[28], w[27], selector);\n      w[60] = hc_byte_perm_S (w[27], w[26], selector);\n      w[59] = hc_byte_perm_S (w[26], w[25], selector);\n      w[58] = hc_byte_perm_S (w[25], w[24], selector);\n      w[57] = hc_byte_perm_S (w[24], w[23], selector);\n      w[56] = hc_byte_perm_S (w[23], w[22], selector);\n      w[55] = hc_byte_perm_S (w[22], w[21], selector);\n      w[54] = hc_byte_perm_S (w[21], w[20], selector);\n      w[53] = hc_byte_perm_S (w[20], w[19], selector);\n      w[52] = hc_byte_perm_S (w[19], w[18], selector);\n      w[51] = hc_byte_perm_S (w[18], w[17], selector);\n      w[50] = hc_byte_perm_S (w[17], w[16], selector);\n      w[49] = hc_byte_perm_S (w[16], w[15], selector);\n      w[48] = hc_byte_perm_S (w[15], w[14], selector);\n      w[47] = hc_byte_perm_S (w[14], w[13], selector);\n      w[46] = hc_byte_perm_S (w[13], w[12], selector);\n      w[45] = hc_byte_perm_S (w[12], w[11], selector);\n      w[44] = hc_byte_perm_S (w[11], w[10], selector);\n      w[43] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[42] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[41] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[40] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[39] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[38] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[37] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[36] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[35] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[34] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[33] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 34:\n      w[63] = hc_byte_perm_S (w[29], w[28], selector);\n      w[62] = hc_byte_perm_S (w[28], w[27], selector);\n      w[61] = hc_byte_perm_S (w[27], w[26], selector);\n      w[60] = hc_byte_perm_S (w[26], w[25], selector);\n      w[59] = hc_byte_perm_S (w[25], w[24], selector);\n      w[58] = hc_byte_perm_S (w[24], w[23], selector);\n      w[57] = hc_byte_perm_S (w[23], w[22], selector);\n      w[56] = hc_byte_perm_S (w[22], w[21], selector);\n      w[55] = hc_byte_perm_S (w[21], w[20], selector);\n      w[54] = hc_byte_perm_S (w[20], w[19], selector);\n      w[53] = hc_byte_perm_S (w[19], w[18], selector);\n      w[52] = hc_byte_perm_S (w[18], w[17], selector);\n      w[51] = hc_byte_perm_S (w[17], w[16], selector);\n      w[50] = hc_byte_perm_S (w[16], w[15], selector);\n      w[49] = hc_byte_perm_S (w[15], w[14], selector);\n      w[48] = hc_byte_perm_S (w[14], w[13], selector);\n      w[47] = hc_byte_perm_S (w[13], w[12], selector);\n      w[46] = hc_byte_perm_S (w[12], w[11], selector);\n      w[45] = hc_byte_perm_S (w[11], w[10], selector);\n      w[44] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[43] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[42] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[41] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[40] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[39] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[38] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[37] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[36] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[35] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[34] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 35:\n      w[63] = hc_byte_perm_S (w[28], w[27], selector);\n      w[62] = hc_byte_perm_S (w[27], w[26], selector);\n      w[61] = hc_byte_perm_S (w[26], w[25], selector);\n      w[60] = hc_byte_perm_S (w[25], w[24], selector);\n      w[59] = hc_byte_perm_S (w[24], w[23], selector);\n      w[58] = hc_byte_perm_S (w[23], w[22], selector);\n      w[57] = hc_byte_perm_S (w[22], w[21], selector);\n      w[56] = hc_byte_perm_S (w[21], w[20], selector);\n      w[55] = hc_byte_perm_S (w[20], w[19], selector);\n      w[54] = hc_byte_perm_S (w[19], w[18], selector);\n      w[53] = hc_byte_perm_S (w[18], w[17], selector);\n      w[52] = hc_byte_perm_S (w[17], w[16], selector);\n      w[51] = hc_byte_perm_S (w[16], w[15], selector);\n      w[50] = hc_byte_perm_S (w[15], w[14], selector);\n      w[49] = hc_byte_perm_S (w[14], w[13], selector);\n      w[48] = hc_byte_perm_S (w[13], w[12], selector);\n      w[47] = hc_byte_perm_S (w[12], w[11], selector);\n      w[46] = hc_byte_perm_S (w[11], w[10], selector);\n      w[45] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[44] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[43] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[42] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[41] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[40] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[39] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[38] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[37] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[36] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[35] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 36:\n      w[63] = hc_byte_perm_S (w[27], w[26], selector);\n      w[62] = hc_byte_perm_S (w[26], w[25], selector);\n      w[61] = hc_byte_perm_S (w[25], w[24], selector);\n      w[60] = hc_byte_perm_S (w[24], w[23], selector);\n      w[59] = hc_byte_perm_S (w[23], w[22], selector);\n      w[58] = hc_byte_perm_S (w[22], w[21], selector);\n      w[57] = hc_byte_perm_S (w[21], w[20], selector);\n      w[56] = hc_byte_perm_S (w[20], w[19], selector);\n      w[55] = hc_byte_perm_S (w[19], w[18], selector);\n      w[54] = hc_byte_perm_S (w[18], w[17], selector);\n      w[53] = hc_byte_perm_S (w[17], w[16], selector);\n      w[52] = hc_byte_perm_S (w[16], w[15], selector);\n      w[51] = hc_byte_perm_S (w[15], w[14], selector);\n      w[50] = hc_byte_perm_S (w[14], w[13], selector);\n      w[49] = hc_byte_perm_S (w[13], w[12], selector);\n      w[48] = hc_byte_perm_S (w[12], w[11], selector);\n      w[47] = hc_byte_perm_S (w[11], w[10], selector);\n      w[46] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[45] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[44] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[43] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[42] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[41] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[40] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[39] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[38] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[37] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[36] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 37:\n      w[63] = hc_byte_perm_S (w[26], w[25], selector);\n      w[62] = hc_byte_perm_S (w[25], w[24], selector);\n      w[61] = hc_byte_perm_S (w[24], w[23], selector);\n      w[60] = hc_byte_perm_S (w[23], w[22], selector);\n      w[59] = hc_byte_perm_S (w[22], w[21], selector);\n      w[58] = hc_byte_perm_S (w[21], w[20], selector);\n      w[57] = hc_byte_perm_S (w[20], w[19], selector);\n      w[56] = hc_byte_perm_S (w[19], w[18], selector);\n      w[55] = hc_byte_perm_S (w[18], w[17], selector);\n      w[54] = hc_byte_perm_S (w[17], w[16], selector);\n      w[53] = hc_byte_perm_S (w[16], w[15], selector);\n      w[52] = hc_byte_perm_S (w[15], w[14], selector);\n      w[51] = hc_byte_perm_S (w[14], w[13], selector);\n      w[50] = hc_byte_perm_S (w[13], w[12], selector);\n      w[49] = hc_byte_perm_S (w[12], w[11], selector);\n      w[48] = hc_byte_perm_S (w[11], w[10], selector);\n      w[47] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[46] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[45] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[44] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[43] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[42] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[41] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[40] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[39] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[38] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[37] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 38:\n      w[63] = hc_byte_perm_S (w[25], w[24], selector);\n      w[62] = hc_byte_perm_S (w[24], w[23], selector);\n      w[61] = hc_byte_perm_S (w[23], w[22], selector);\n      w[60] = hc_byte_perm_S (w[22], w[21], selector);\n      w[59] = hc_byte_perm_S (w[21], w[20], selector);\n      w[58] = hc_byte_perm_S (w[20], w[19], selector);\n      w[57] = hc_byte_perm_S (w[19], w[18], selector);\n      w[56] = hc_byte_perm_S (w[18], w[17], selector);\n      w[55] = hc_byte_perm_S (w[17], w[16], selector);\n      w[54] = hc_byte_perm_S (w[16], w[15], selector);\n      w[53] = hc_byte_perm_S (w[15], w[14], selector);\n      w[52] = hc_byte_perm_S (w[14], w[13], selector);\n      w[51] = hc_byte_perm_S (w[13], w[12], selector);\n      w[50] = hc_byte_perm_S (w[12], w[11], selector);\n      w[49] = hc_byte_perm_S (w[11], w[10], selector);\n      w[48] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[47] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[46] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[45] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[44] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[43] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[42] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[41] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[40] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[39] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[38] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 39:\n      w[63] = hc_byte_perm_S (w[24], w[23], selector);\n      w[62] = hc_byte_perm_S (w[23], w[22], selector);\n      w[61] = hc_byte_perm_S (w[22], w[21], selector);\n      w[60] = hc_byte_perm_S (w[21], w[20], selector);\n      w[59] = hc_byte_perm_S (w[20], w[19], selector);\n      w[58] = hc_byte_perm_S (w[19], w[18], selector);\n      w[57] = hc_byte_perm_S (w[18], w[17], selector);\n      w[56] = hc_byte_perm_S (w[17], w[16], selector);\n      w[55] = hc_byte_perm_S (w[16], w[15], selector);\n      w[54] = hc_byte_perm_S (w[15], w[14], selector);\n      w[53] = hc_byte_perm_S (w[14], w[13], selector);\n      w[52] = hc_byte_perm_S (w[13], w[12], selector);\n      w[51] = hc_byte_perm_S (w[12], w[11], selector);\n      w[50] = hc_byte_perm_S (w[11], w[10], selector);\n      w[49] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[48] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[47] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[46] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[45] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[44] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[43] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[42] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[41] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[40] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[39] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 40:\n      w[63] = hc_byte_perm_S (w[23], w[22], selector);\n      w[62] = hc_byte_perm_S (w[22], w[21], selector);\n      w[61] = hc_byte_perm_S (w[21], w[20], selector);\n      w[60] = hc_byte_perm_S (w[20], w[19], selector);\n      w[59] = hc_byte_perm_S (w[19], w[18], selector);\n      w[58] = hc_byte_perm_S (w[18], w[17], selector);\n      w[57] = hc_byte_perm_S (w[17], w[16], selector);\n      w[56] = hc_byte_perm_S (w[16], w[15], selector);\n      w[55] = hc_byte_perm_S (w[15], w[14], selector);\n      w[54] = hc_byte_perm_S (w[14], w[13], selector);\n      w[53] = hc_byte_perm_S (w[13], w[12], selector);\n      w[52] = hc_byte_perm_S (w[12], w[11], selector);\n      w[51] = hc_byte_perm_S (w[11], w[10], selector);\n      w[50] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[49] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[48] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[47] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[46] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[45] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[44] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[43] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[42] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[41] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[40] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 41:\n      w[63] = hc_byte_perm_S (w[22], w[21], selector);\n      w[62] = hc_byte_perm_S (w[21], w[20], selector);\n      w[61] = hc_byte_perm_S (w[20], w[19], selector);\n      w[60] = hc_byte_perm_S (w[19], w[18], selector);\n      w[59] = hc_byte_perm_S (w[18], w[17], selector);\n      w[58] = hc_byte_perm_S (w[17], w[16], selector);\n      w[57] = hc_byte_perm_S (w[16], w[15], selector);\n      w[56] = hc_byte_perm_S (w[15], w[14], selector);\n      w[55] = hc_byte_perm_S (w[14], w[13], selector);\n      w[54] = hc_byte_perm_S (w[13], w[12], selector);\n      w[53] = hc_byte_perm_S (w[12], w[11], selector);\n      w[52] = hc_byte_perm_S (w[11], w[10], selector);\n      w[51] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[50] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[49] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[48] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[47] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[46] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[45] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[44] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[43] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[42] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[41] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 42:\n      w[63] = hc_byte_perm_S (w[21], w[20], selector);\n      w[62] = hc_byte_perm_S (w[20], w[19], selector);\n      w[61] = hc_byte_perm_S (w[19], w[18], selector);\n      w[60] = hc_byte_perm_S (w[18], w[17], selector);\n      w[59] = hc_byte_perm_S (w[17], w[16], selector);\n      w[58] = hc_byte_perm_S (w[16], w[15], selector);\n      w[57] = hc_byte_perm_S (w[15], w[14], selector);\n      w[56] = hc_byte_perm_S (w[14], w[13], selector);\n      w[55] = hc_byte_perm_S (w[13], w[12], selector);\n      w[54] = hc_byte_perm_S (w[12], w[11], selector);\n      w[53] = hc_byte_perm_S (w[11], w[10], selector);\n      w[52] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[51] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[50] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[49] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[48] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[47] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[46] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[45] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[44] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[43] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[42] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 43:\n      w[63] = hc_byte_perm_S (w[20], w[19], selector);\n      w[62] = hc_byte_perm_S (w[19], w[18], selector);\n      w[61] = hc_byte_perm_S (w[18], w[17], selector);\n      w[60] = hc_byte_perm_S (w[17], w[16], selector);\n      w[59] = hc_byte_perm_S (w[16], w[15], selector);\n      w[58] = hc_byte_perm_S (w[15], w[14], selector);\n      w[57] = hc_byte_perm_S (w[14], w[13], selector);\n      w[56] = hc_byte_perm_S (w[13], w[12], selector);\n      w[55] = hc_byte_perm_S (w[12], w[11], selector);\n      w[54] = hc_byte_perm_S (w[11], w[10], selector);\n      w[53] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[52] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[51] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[50] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[49] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[48] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[47] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[46] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[45] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[44] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[43] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 44:\n      w[63] = hc_byte_perm_S (w[19], w[18], selector);\n      w[62] = hc_byte_perm_S (w[18], w[17], selector);\n      w[61] = hc_byte_perm_S (w[17], w[16], selector);\n      w[60] = hc_byte_perm_S (w[16], w[15], selector);\n      w[59] = hc_byte_perm_S (w[15], w[14], selector);\n      w[58] = hc_byte_perm_S (w[14], w[13], selector);\n      w[57] = hc_byte_perm_S (w[13], w[12], selector);\n      w[56] = hc_byte_perm_S (w[12], w[11], selector);\n      w[55] = hc_byte_perm_S (w[11], w[10], selector);\n      w[54] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[53] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[52] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[51] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[50] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[49] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[48] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[47] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[46] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[45] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[44] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 45:\n      w[63] = hc_byte_perm_S (w[18], w[17], selector);\n      w[62] = hc_byte_perm_S (w[17], w[16], selector);\n      w[61] = hc_byte_perm_S (w[16], w[15], selector);\n      w[60] = hc_byte_perm_S (w[15], w[14], selector);\n      w[59] = hc_byte_perm_S (w[14], w[13], selector);\n      w[58] = hc_byte_perm_S (w[13], w[12], selector);\n      w[57] = hc_byte_perm_S (w[12], w[11], selector);\n      w[56] = hc_byte_perm_S (w[11], w[10], selector);\n      w[55] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[54] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[53] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[52] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[51] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[50] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[49] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[48] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[47] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[46] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[45] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 46:\n      w[63] = hc_byte_perm_S (w[17], w[16], selector);\n      w[62] = hc_byte_perm_S (w[16], w[15], selector);\n      w[61] = hc_byte_perm_S (w[15], w[14], selector);\n      w[60] = hc_byte_perm_S (w[14], w[13], selector);\n      w[59] = hc_byte_perm_S (w[13], w[12], selector);\n      w[58] = hc_byte_perm_S (w[12], w[11], selector);\n      w[57] = hc_byte_perm_S (w[11], w[10], selector);\n      w[56] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[55] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[54] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[53] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[52] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[51] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[50] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[49] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[48] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[47] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[46] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 47:\n      w[63] = hc_byte_perm_S (w[16], w[15], selector);\n      w[62] = hc_byte_perm_S (w[15], w[14], selector);\n      w[61] = hc_byte_perm_S (w[14], w[13], selector);\n      w[60] = hc_byte_perm_S (w[13], w[12], selector);\n      w[59] = hc_byte_perm_S (w[12], w[11], selector);\n      w[58] = hc_byte_perm_S (w[11], w[10], selector);\n      w[57] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[56] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[55] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[54] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[53] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[52] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[51] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[50] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[49] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[48] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[47] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 48:\n      w[63] = hc_byte_perm_S (w[15], w[14], selector);\n      w[62] = hc_byte_perm_S (w[14], w[13], selector);\n      w[61] = hc_byte_perm_S (w[13], w[12], selector);\n      w[60] = hc_byte_perm_S (w[12], w[11], selector);\n      w[59] = hc_byte_perm_S (w[11], w[10], selector);\n      w[58] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[57] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[56] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[55] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[54] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[53] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[52] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[51] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[50] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[49] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[48] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 49:\n      w[63] = hc_byte_perm_S (w[14], w[13], selector);\n      w[62] = hc_byte_perm_S (w[13], w[12], selector);\n      w[61] = hc_byte_perm_S (w[12], w[11], selector);\n      w[60] = hc_byte_perm_S (w[11], w[10], selector);\n      w[59] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[58] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[57] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[56] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[55] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[54] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[53] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[52] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[51] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[50] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[49] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 50:\n      w[63] = hc_byte_perm_S (w[13], w[12], selector);\n      w[62] = hc_byte_perm_S (w[12], w[11], selector);\n      w[61] = hc_byte_perm_S (w[11], w[10], selector);\n      w[60] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[59] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[58] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[57] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[56] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[55] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[54] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[53] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[52] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[51] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[50] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 51:\n      w[63] = hc_byte_perm_S (w[12], w[11], selector);\n      w[62] = hc_byte_perm_S (w[11], w[10], selector);\n      w[61] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[60] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[59] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[58] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[57] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[56] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[55] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[54] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[53] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[52] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[51] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 52:\n      w[63] = hc_byte_perm_S (w[11], w[10], selector);\n      w[62] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[61] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[60] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[59] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[58] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[57] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[56] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[55] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[54] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[53] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[52] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 53:\n      w[63] = hc_byte_perm_S (w[10], w[ 9], selector);\n      w[62] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[61] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[60] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[59] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[58] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[57] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[56] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[55] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[54] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[53] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 54:\n      w[63] = hc_byte_perm_S (w[ 9], w[ 8], selector);\n      w[62] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[61] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[60] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[59] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[58] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[57] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[56] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[55] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[54] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 55:\n      w[63] = hc_byte_perm_S (w[ 8], w[ 7], selector);\n      w[62] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[61] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[60] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[59] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[58] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[57] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[56] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[55] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 56:\n      w[63] = hc_byte_perm_S (w[ 7], w[ 6], selector);\n      w[62] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[61] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[60] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[59] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[58] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[57] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[56] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 57:\n      w[63] = hc_byte_perm_S (w[ 6], w[ 5], selector);\n      w[62] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[61] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[60] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[59] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[58] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[57] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 58:\n      w[63] = hc_byte_perm_S (w[ 5], w[ 4], selector);\n      w[62] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[61] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[60] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[59] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[58] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 59:\n      w[63] = hc_byte_perm_S (w[ 4], w[ 3], selector);\n      w[62] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[61] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[60] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[59] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 60:\n      w[63] = hc_byte_perm_S (w[ 3], w[ 2], selector);\n      w[62] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[61] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[60] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 61:\n      w[63] = hc_byte_perm_S (w[ 2], w[ 1], selector);\n      w[62] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[61] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 62:\n      w[63] = hc_byte_perm_S (w[ 1], w[ 0], selector);\n      w[62] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n\n    case 63:\n      w[63] = hc_byte_perm_S (w[ 0],     0, selector);\n      w[62] = 0;\n      w[61] = 0;\n      w[60] = 0;\n      w[59] = 0;\n      w[58] = 0;\n      w[57] = 0;\n      w[56] = 0;\n      w[55] = 0;\n      w[54] = 0;\n      w[53] = 0;\n      w[52] = 0;\n      w[51] = 0;\n      w[50] = 0;\n      w[49] = 0;\n      w[48] = 0;\n      w[47] = 0;\n      w[46] = 0;\n      w[45] = 0;\n      w[44] = 0;\n      w[43] = 0;\n      w[42] = 0;\n      w[41] = 0;\n      w[40] = 0;\n      w[39] = 0;\n      w[38] = 0;\n      w[37] = 0;\n      w[36] = 0;\n      w[35] = 0;\n      w[34] = 0;\n      w[33] = 0;\n      w[32] = 0;\n      w[31] = 0;\n      w[30] = 0;\n      w[29] = 0;\n      w[28] = 0;\n      w[27] = 0;\n      w[26] = 0;\n      w[25] = 0;\n      w[24] = 0;\n      w[23] = 0;\n      w[22] = 0;\n      w[21] = 0;\n      w[20] = 0;\n      w[19] = 0;\n      w[18] = 0;\n      w[17] = 0;\n      w[16] = 0;\n      w[15] = 0;\n      w[14] = 0;\n      w[13] = 0;\n      w[12] = 0;\n      w[11] = 0;\n      w[10] = 0;\n      w[ 9] = 0;\n      w[ 8] = 0;\n      w[ 7] = 0;\n      w[ 6] = 0;\n      w[ 5] = 0;\n      w[ 4] = 0;\n      w[ 3] = 0;\n      w[ 2] = 0;\n      w[ 1] = 0;\n      w[ 0] = 0;\n\n      break;\n  }\n  #endif\n}\n\n/**\n * vector functions on scalar types (for inner loop usage)\n */\n\n#define PACKVS2(sn,vn,e)  \\\n  sn[0] = vn[0].s##e;     \\\n  sn[1] = vn[1].s##e;\n\n#define PACKSV2(sn,vn,e)  \\\n  vn[0].s##e = sn[0];     \\\n  vn[1].s##e = sn[1];\n\n#define PACKVS24(s0,s1,v0,v1,e) \\\n  PACKVS4 (s0, v0, e);          \\\n  PACKVS4 (s1, v1, e);\n\n#define PACKSV24(s0,s1,v0,v1,e) \\\n  PACKSV4 (s0, v0, e);          \\\n  PACKSV4 (s1, v1, e);\n\n#define PACKVS4(sn,vn,e)  \\\n  sn[0] = vn[0].s##e;     \\\n  sn[1] = vn[1].s##e;     \\\n  sn[2] = vn[2].s##e;     \\\n  sn[3] = vn[3].s##e;\n\n#define PACKSV4(sn,vn,e)  \\\n  vn[0].s##e = sn[0];     \\\n  vn[1].s##e = sn[1];     \\\n  vn[2].s##e = sn[2];     \\\n  vn[3].s##e = sn[3];\n\n#define PACKVS44(s0,s1,s2,s3,v0,v1,v2,v3,e) \\\n  PACKVS4 (s0, v0, e);                      \\\n  PACKVS4 (s1, v1, e);                      \\\n  PACKVS4 (s2, v2, e);                      \\\n  PACKVS4 (s3, v3, e);\n\n#define PACKSV44(s0,s1,s2,s3,v0,v1,v2,v3,e) \\\n  PACKSV4 (s0, v0, e);                      \\\n  PACKSV4 (s1, v1, e);                      \\\n  PACKSV4 (s2, v2, e);                      \\\n  PACKSV4 (s3, v3, e);\n\n#define PACKVS84(s0,s1,s2,s3,s4,s5,s6,s7,v0,v1,v2,v3,v4,v5,v6,v7,e) \\\n  PACKVS4 (s0, v0, e);                                              \\\n  PACKVS4 (s1, v1, e);                                              \\\n  PACKVS4 (s2, v2, e);                                              \\\n  PACKVS4 (s3, v3, e);                                              \\\n  PACKVS4 (s4, v4, e);                                              \\\n  PACKVS4 (s5, v5, e);                                              \\\n  PACKVS4 (s6, v6, e);                                              \\\n  PACKVS4 (s7, v7, e);\n\n#define PACKSV84(s0,s1,s2,s3,s4,s5,s6,s7,v0,v1,v2,v3,v4,v5,v6,v7,e) \\\n  PACKSV4 (s0, v0, e);                                              \\\n  PACKSV4 (s1, v1, e);                                              \\\n  PACKSV4 (s2, v2, e);                                              \\\n  PACKSV4 (s3, v3, e);                                              \\\n  PACKSV4 (s4, v4, e);                                              \\\n  PACKSV4 (s5, v5, e);                                              \\\n  PACKSV4 (s6, v6, e);                                              \\\n  PACKSV4 (s7, v7, e);\n\nDECLSPEC void switch_buffer_by_offset_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  switch_buffer_by_offset_le_S (w0, w1, w2, w3, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n  u32 t2[4];\n  u32 t3[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 8); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s8); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 8);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 9); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.s9); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 9);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, a); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.sa); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, a);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, b); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.sb); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, b);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, c); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.sc); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, c);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, d); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.sd); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, d);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, e); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.se); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, e);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, f); switch_buffer_by_offset_le_S (t0, t1, t2, t3, offset.sf); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, f);\n\n  #endif\n}\n\nDECLSPEC void switch_buffer_by_offset_8x4_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  switch_buffer_by_offset_8x4_le_S (w0, w1, w2, w3, w4, w5, w6, w7, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n  u32 t2[4];\n  u32 t3[4];\n  u32 t4[4];\n  u32 t5[4];\n  u32 t6[4];\n  u32 t7[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  // 1\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s0);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n\n  // 2\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s1);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n\n  #elif VECT_SIZE == 4\n\n  // 1\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s0);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n\n  // 2\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s1);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n\n  // 3\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 2);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s2);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 2);\n\n  // 4\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 3);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s3);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 3);\n\n  #elif VECT_SIZE == 8\n\n  // 1\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s0);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n\n  // 2\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s1);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n\n  // 3\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 2);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s2);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 2);\n\n  // 4\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 3);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s3);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 3);\n\n  // 5\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 4);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s4);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 4);\n\n  // 6\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 5);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s5);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 5);\n\n  // 7\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 6);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s6);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 6);\n\n  // 8\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 7);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s7);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 7);\n\n  #elif VECT_SIZE == 16\n\n  // 1\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s0);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 0);\n\n  // 2\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s1);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 1);\n\n  // 3\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 2);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s2);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 2);\n\n  // 4\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 3);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s3);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 3);\n\n  // 5\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 4);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s4);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 4);\n\n  // 6\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 5);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s5);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 5);\n\n  // 7\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 6);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s6);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 6);\n\n  // 8\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 7);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s7);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 7);\n\n  // 9\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 8);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s8);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 8);\n\n  // 10\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 9);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.s9);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, 9);\n\n  // 11\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, a);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.sa);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, a);\n\n  // 12\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, b);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.sb);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, b);\n\n  // 13\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, c);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.sc);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, c);\n\n  // 14\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, d);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.sd);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, d);\n\n  // 15\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, e);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.se);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, e);\n\n  // 16\n  PACKVS84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, f);\n  switch_buffer_by_offset_8x4_le_S (t0, t1, t2, t3, t4, t5, t6, t7, offset.sf);\n  PACKSV84 (t0, t1, t2, t3, t4, t5, t6, t7, w0, w1, w2, w3, w4, w5, w6, w7, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x01_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x01_2x4_S (w0, w1, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x01_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x01_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x01_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x01_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x01_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x01_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x01_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x01_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x01_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x01_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n  PACKVS24 (t0, t1, w0, w1, 4); append_0x01_2x4_S (t0, t1, offset.s4); PACKSV24 (t0, t1, w0, w1, 4);\n  PACKVS24 (t0, t1, w0, w1, 5); append_0x01_2x4_S (t0, t1, offset.s5); PACKSV24 (t0, t1, w0, w1, 5);\n  PACKVS24 (t0, t1, w0, w1, 6); append_0x01_2x4_S (t0, t1, offset.s6); PACKSV24 (t0, t1, w0, w1, 6);\n  PACKVS24 (t0, t1, w0, w1, 7); append_0x01_2x4_S (t0, t1, offset.s7); PACKSV24 (t0, t1, w0, w1, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x01_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x01_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x01_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x01_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n  PACKVS24 (t0, t1, w0, w1, 4); append_0x01_2x4_S (t0, t1, offset.s4); PACKSV24 (t0, t1, w0, w1, 4);\n  PACKVS24 (t0, t1, w0, w1, 5); append_0x01_2x4_S (t0, t1, offset.s5); PACKSV24 (t0, t1, w0, w1, 5);\n  PACKVS24 (t0, t1, w0, w1, 6); append_0x01_2x4_S (t0, t1, offset.s6); PACKSV24 (t0, t1, w0, w1, 6);\n  PACKVS24 (t0, t1, w0, w1, 7); append_0x01_2x4_S (t0, t1, offset.s7); PACKSV24 (t0, t1, w0, w1, 7);\n  PACKVS24 (t0, t1, w0, w1, 8); append_0x01_2x4_S (t0, t1, offset.s8); PACKSV24 (t0, t1, w0, w1, 8);\n  PACKVS24 (t0, t1, w0, w1, 9); append_0x01_2x4_S (t0, t1, offset.s9); PACKSV24 (t0, t1, w0, w1, 9);\n  PACKVS24 (t0, t1, w0, w1, a); append_0x01_2x4_S (t0, t1, offset.sa); PACKSV24 (t0, t1, w0, w1, a);\n  PACKVS24 (t0, t1, w0, w1, b); append_0x01_2x4_S (t0, t1, offset.sb); PACKSV24 (t0, t1, w0, w1, b);\n  PACKVS24 (t0, t1, w0, w1, c); append_0x01_2x4_S (t0, t1, offset.sc); PACKSV24 (t0, t1, w0, w1, c);\n  PACKVS24 (t0, t1, w0, w1, d); append_0x01_2x4_S (t0, t1, offset.sd); PACKSV24 (t0, t1, w0, w1, d);\n  PACKVS24 (t0, t1, w0, w1, e); append_0x01_2x4_S (t0, t1, offset.se); PACKSV24 (t0, t1, w0, w1, e);\n  PACKVS24 (t0, t1, w0, w1, f); append_0x01_2x4_S (t0, t1, offset.sf); PACKSV24 (t0, t1, w0, w1, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x01_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x01_4x4_S (w0, w1, w2, w3, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n  u32 t2[4];\n  u32 t3[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x01_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x01_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x01_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x01_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x01_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x01_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x01_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x01_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x01_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x01_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x01_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x01_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x01_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x01_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x01_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x01_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x01_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x01_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x01_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x01_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x01_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x01_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 8); append_0x01_4x4_S (t0, t1, t2, t3, offset.s8); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 8);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 9); append_0x01_4x4_S (t0, t1, t2, t3, offset.s9); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 9);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, a); append_0x01_4x4_S (t0, t1, t2, t3, offset.sa); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, a);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, b); append_0x01_4x4_S (t0, t1, t2, t3, offset.sb); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, b);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, c); append_0x01_4x4_S (t0, t1, t2, t3, offset.sc); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, c);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, d); append_0x01_4x4_S (t0, t1, t2, t3, offset.sd); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, d);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, e); append_0x01_4x4_S (t0, t1, t2, t3, offset.se); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, e);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, f); append_0x01_4x4_S (t0, t1, t2, t3, offset.sf); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x06_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x06_2x4_S (w0, w1, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x06_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x06_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x06_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x06_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x06_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x06_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x06_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x06_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x06_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x06_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n  PACKVS24 (t0, t1, w0, w1, 4); append_0x06_2x4_S (t0, t1, offset.s4); PACKSV24 (t0, t1, w0, w1, 4);\n  PACKVS24 (t0, t1, w0, w1, 5); append_0x06_2x4_S (t0, t1, offset.s5); PACKSV24 (t0, t1, w0, w1, 5);\n  PACKVS24 (t0, t1, w0, w1, 6); append_0x06_2x4_S (t0, t1, offset.s6); PACKSV24 (t0, t1, w0, w1, 6);\n  PACKVS24 (t0, t1, w0, w1, 7); append_0x06_2x4_S (t0, t1, offset.s7); PACKSV24 (t0, t1, w0, w1, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x06_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x06_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x06_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x06_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n  PACKVS24 (t0, t1, w0, w1, 4); append_0x06_2x4_S (t0, t1, offset.s4); PACKSV24 (t0, t1, w0, w1, 4);\n  PACKVS24 (t0, t1, w0, w1, 5); append_0x06_2x4_S (t0, t1, offset.s5); PACKSV24 (t0, t1, w0, w1, 5);\n  PACKVS24 (t0, t1, w0, w1, 6); append_0x06_2x4_S (t0, t1, offset.s6); PACKSV24 (t0, t1, w0, w1, 6);\n  PACKVS24 (t0, t1, w0, w1, 7); append_0x06_2x4_S (t0, t1, offset.s7); PACKSV24 (t0, t1, w0, w1, 7);\n  PACKVS24 (t0, t1, w0, w1, 8); append_0x06_2x4_S (t0, t1, offset.s8); PACKSV24 (t0, t1, w0, w1, 8);\n  PACKVS24 (t0, t1, w0, w1, 9); append_0x06_2x4_S (t0, t1, offset.s9); PACKSV24 (t0, t1, w0, w1, 9);\n  PACKVS24 (t0, t1, w0, w1, a); append_0x06_2x4_S (t0, t1, offset.sa); PACKSV24 (t0, t1, w0, w1, a);\n  PACKVS24 (t0, t1, w0, w1, b); append_0x06_2x4_S (t0, t1, offset.sb); PACKSV24 (t0, t1, w0, w1, b);\n  PACKVS24 (t0, t1, w0, w1, c); append_0x06_2x4_S (t0, t1, offset.sc); PACKSV24 (t0, t1, w0, w1, c);\n  PACKVS24 (t0, t1, w0, w1, d); append_0x06_2x4_S (t0, t1, offset.sd); PACKSV24 (t0, t1, w0, w1, d);\n  PACKVS24 (t0, t1, w0, w1, e); append_0x06_2x4_S (t0, t1, offset.se); PACKSV24 (t0, t1, w0, w1, e);\n  PACKVS24 (t0, t1, w0, w1, f); append_0x06_2x4_S (t0, t1, offset.sf); PACKSV24 (t0, t1, w0, w1, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x80_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x80_2x4_S (w0, w1, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x80_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x80_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x80_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x80_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x80_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x80_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x80_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x80_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x80_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x80_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n  PACKVS24 (t0, t1, w0, w1, 4); append_0x80_2x4_S (t0, t1, offset.s4); PACKSV24 (t0, t1, w0, w1, 4);\n  PACKVS24 (t0, t1, w0, w1, 5); append_0x80_2x4_S (t0, t1, offset.s5); PACKSV24 (t0, t1, w0, w1, 5);\n  PACKVS24 (t0, t1, w0, w1, 6); append_0x80_2x4_S (t0, t1, offset.s6); PACKSV24 (t0, t1, w0, w1, 6);\n  PACKVS24 (t0, t1, w0, w1, 7); append_0x80_2x4_S (t0, t1, offset.s7); PACKSV24 (t0, t1, w0, w1, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS24 (t0, t1, w0, w1, 0); append_0x80_2x4_S (t0, t1, offset.s0); PACKSV24 (t0, t1, w0, w1, 0);\n  PACKVS24 (t0, t1, w0, w1, 1); append_0x80_2x4_S (t0, t1, offset.s1); PACKSV24 (t0, t1, w0, w1, 1);\n  PACKVS24 (t0, t1, w0, w1, 2); append_0x80_2x4_S (t0, t1, offset.s2); PACKSV24 (t0, t1, w0, w1, 2);\n  PACKVS24 (t0, t1, w0, w1, 3); append_0x80_2x4_S (t0, t1, offset.s3); PACKSV24 (t0, t1, w0, w1, 3);\n  PACKVS24 (t0, t1, w0, w1, 4); append_0x80_2x4_S (t0, t1, offset.s4); PACKSV24 (t0, t1, w0, w1, 4);\n  PACKVS24 (t0, t1, w0, w1, 5); append_0x80_2x4_S (t0, t1, offset.s5); PACKSV24 (t0, t1, w0, w1, 5);\n  PACKVS24 (t0, t1, w0, w1, 6); append_0x80_2x4_S (t0, t1, offset.s6); PACKSV24 (t0, t1, w0, w1, 6);\n  PACKVS24 (t0, t1, w0, w1, 7); append_0x80_2x4_S (t0, t1, offset.s7); PACKSV24 (t0, t1, w0, w1, 7);\n  PACKVS24 (t0, t1, w0, w1, 8); append_0x80_2x4_S (t0, t1, offset.s8); PACKSV24 (t0, t1, w0, w1, 8);\n  PACKVS24 (t0, t1, w0, w1, 9); append_0x80_2x4_S (t0, t1, offset.s9); PACKSV24 (t0, t1, w0, w1, 9);\n  PACKVS24 (t0, t1, w0, w1, a); append_0x80_2x4_S (t0, t1, offset.sa); PACKSV24 (t0, t1, w0, w1, a);\n  PACKVS24 (t0, t1, w0, w1, b); append_0x80_2x4_S (t0, t1, offset.sb); PACKSV24 (t0, t1, w0, w1, b);\n  PACKVS24 (t0, t1, w0, w1, c); append_0x80_2x4_S (t0, t1, offset.sc); PACKSV24 (t0, t1, w0, w1, c);\n  PACKVS24 (t0, t1, w0, w1, d); append_0x80_2x4_S (t0, t1, offset.sd); PACKSV24 (t0, t1, w0, w1, d);\n  PACKVS24 (t0, t1, w0, w1, e); append_0x80_2x4_S (t0, t1, offset.se); PACKSV24 (t0, t1, w0, w1, e);\n  PACKVS24 (t0, t1, w0, w1, f); append_0x80_2x4_S (t0, t1, offset.sf); PACKSV24 (t0, t1, w0, w1, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x80_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x80_4x4_S (w0, w1, w2, w3, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n  u32 t2[4];\n  u32 t3[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x80_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x80_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x80_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x80_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x80_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x80_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x80_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x80_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x80_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x80_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x80_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x80_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x80_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x80_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x80_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x80_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x80_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x80_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x80_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x80_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x80_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x80_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 8); append_0x80_4x4_S (t0, t1, t2, t3, offset.s8); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 8);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 9); append_0x80_4x4_S (t0, t1, t2, t3, offset.s9); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 9);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, a); append_0x80_4x4_S (t0, t1, t2, t3, offset.sa); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, a);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, b); append_0x80_4x4_S (t0, t1, t2, t3, offset.sb); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, b);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, c); append_0x80_4x4_S (t0, t1, t2, t3, offset.sc); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, c);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, d); append_0x80_4x4_S (t0, t1, t2, t3, offset.sd); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, d);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, e); append_0x80_4x4_S (t0, t1, t2, t3, offset.se); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, e);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, f); append_0x80_4x4_S (t0, t1, t2, t3, offset.sf); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x2d_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x2d_4x4_S (w0, w1, w2, w3, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n  u32 t2[4];\n  u32 t3[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 8); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s8); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 8);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 9); append_0x2d_4x4_S (t0, t1, t2, t3, offset.s9); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 9);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, a); append_0x2d_4x4_S (t0, t1, t2, t3, offset.sa); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, a);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, b); append_0x2d_4x4_S (t0, t1, t2, t3, offset.sb); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, b);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, c); append_0x2d_4x4_S (t0, t1, t2, t3, offset.sc); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, c);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, d); append_0x2d_4x4_S (t0, t1, t2, t3, offset.sd); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, d);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, e); append_0x2d_4x4_S (t0, t1, t2, t3, offset.se); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, e);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, f); append_0x2d_4x4_S (t0, t1, t2, t3, offset.sf); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, f);\n\n  #endif\n}\n\nDECLSPEC void append_0x3a_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset)\n{\n  #if VECT_SIZE == 1\n\n  append_0x3a_4x4_S (w0, w1, w2, w3, offset);\n\n  #else\n\n  u32 t0[4];\n  u32 t1[4];\n  u32 t2[4];\n  u32 t3[4];\n\n  #endif\n\n  #if   VECT_SIZE == 2\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n\n  #elif VECT_SIZE == 4\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n\n  #elif VECT_SIZE == 8\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n\n  #elif VECT_SIZE == 16\n\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 0); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s0); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 0);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 1); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s1); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 1);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 2); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s2); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 2);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 3); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s3); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 3);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 4); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s4); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 4);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 5); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s5); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 5);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 6); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s6); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 6);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 7); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s7); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 7);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 8); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s8); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 8);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, 9); append_0x3a_4x4_S (t0, t1, t2, t3, offset.s9); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, 9);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, a); append_0x3a_4x4_S (t0, t1, t2, t3, offset.sa); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, a);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, b); append_0x3a_4x4_S (t0, t1, t2, t3, offset.sb); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, b);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, c); append_0x3a_4x4_S (t0, t1, t2, t3, offset.sc); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, c);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, d); append_0x3a_4x4_S (t0, t1, t2, t3, offset.sd); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, d);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, e); append_0x3a_4x4_S (t0, t1, t2, t3, offset.se); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, e);\n  PACKVS44 (t0, t1, t2, t3, w0, w1, w2, w3, f); append_0x3a_4x4_S (t0, t1, t2, t3, offset.sf); PACKSV44 (t0, t1, t2, t3, w0, w1, w2, w3, f);\n\n  #endif\n}\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_common.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_COMMON_H\n#define INC_COMMON_H\n\n/*\n * Prototype kernel function that fits all kernel macros\n *\n * There are four variables where major differences occur:\n *\n *   -  P2: Address space of kernel_rules_t struct.\n *          If the kernel uses rules_buf, it will be stored in CONSTANT_AS.\n *          If it does not, cheaper GLOBAL_AS space is used.\n *\n *   -  P4: Innerloop word buffer:\n *          Most kernels use a bf_t structure in GLOBAL_AS address space (_BASIC).\n *          Some use u32x pointer to a vector in CONSTANT_AS address space (_VECTOR).\n *          A few use a specific bs_word_t struct (_BITSLICE).\n *\n *   -  P5: Type of the tmps structure with additional data, or void.\n *          Used with slow hash types (ATTACK_EXEC_OUTSIDE_KERNEL) only.\n *\n *   - P19: Type of the esalt_bufs structure with additional data, or void.\n */\n\n#if defined IS_CUDA || defined IS_HIP\n#define KERN_ATTR(p2,p4,p5,p6,p19)                                \\\n  MAYBE_UNUSED GLOBAL_AS       pw_t           *pws,               \\\n  MAYBE_UNUSED p2        const kernel_rule_t  *g_rules_buf,       \\\n  MAYBE_UNUSED GLOBAL_AS const pw_t           *combs_buf,         \\\n  MAYBE_UNUSED p4,                                                \\\n  MAYBE_UNUSED GLOBAL_AS p5                   *tmps,              \\\n  MAYBE_UNUSED GLOBAL_AS p6                   *hooks,             \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_a,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_b,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_c,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_d,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_a,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_b,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_c,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_d,  \\\n  MAYBE_UNUSED GLOBAL_AS       plain_t        *plains_buf,        \\\n  MAYBE_UNUSED GLOBAL_AS const digest_t       *digests_buf,       \\\n  MAYBE_UNUSED GLOBAL_AS       u32            *hashes_shown,      \\\n  MAYBE_UNUSED GLOBAL_AS const salt_t         *salt_bufs,         \\\n  MAYBE_UNUSED GLOBAL_AS const p19            *esalt_bufs,        \\\n  MAYBE_UNUSED GLOBAL_AS       u32            *d_return_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra0_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra1_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra2_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra3_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS const kernel_param_t *kernel_param\n#else\n#define KERN_ATTR(p2,p4,p5,p6,p19)                                \\\n  MAYBE_UNUSED GLOBAL_AS       pw_t           *pws,               \\\n  MAYBE_UNUSED p2        const kernel_rule_t  *rules_buf,         \\\n  MAYBE_UNUSED GLOBAL_AS const pw_t           *combs_buf,         \\\n  MAYBE_UNUSED p4,                                                \\\n  MAYBE_UNUSED GLOBAL_AS p5                   *tmps,              \\\n  MAYBE_UNUSED GLOBAL_AS p6                   *hooks,             \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_a,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_b,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_c,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s1_d,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_a,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_b,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_c,  \\\n  MAYBE_UNUSED GLOBAL_AS const u32            *bitmaps_buf_s2_d,  \\\n  MAYBE_UNUSED GLOBAL_AS       plain_t        *plains_buf,        \\\n  MAYBE_UNUSED GLOBAL_AS const digest_t       *digests_buf,       \\\n  MAYBE_UNUSED GLOBAL_AS       u32            *hashes_shown,      \\\n  MAYBE_UNUSED GLOBAL_AS const salt_t         *salt_bufs,         \\\n  MAYBE_UNUSED GLOBAL_AS const p19            *esalt_bufs,        \\\n  MAYBE_UNUSED GLOBAL_AS       u32            *d_return_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra0_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra1_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra2_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS       void           *d_extra3_buf,      \\\n  MAYBE_UNUSED GLOBAL_AS const kernel_param_t *kernel_param\n#endif\n\n/*\n * Shortcut macros for usage in the actual kernels\n *\n * Not all possible combinations are needed. E.g. all kernels that use rules\n * do not use the tmps pointer, all kernels that use a vector pointer in P4\n * do not use rules or tmps, etc.\n */\n\n#if defined IS_CUDA || defined IS_HIP\n#define _KERN_ATTR_BASIC()                 KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     void, void, void)\n#define _KERN_ATTR_BITSLICE()              KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bs_word_t *g_words_buf_s, void, void, void)\n#define _KERN_ATTR_ESALT(e)                KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     void, void, e)\n#define _KERN_ATTR_RULES()                 KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     void, void, void)\n#define _KERN_ATTR_RULES_ESALT(e)          KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     void, void, e)\n#define _KERN_ATTR_TMPS(t)                 KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     t,    void, void)\n#define _KERN_ATTR_TMPS_ESALT(t,e)         KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     t,    void, e)\n#define _KERN_ATTR_TMPS_HOOKS(t,h)         KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     t,    h,    void)\n#define _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const bf_t      *g_bfs_buf,     t,    h,    e)\n#define _KERN_ATTR_VECTOR()                KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const u32x      *g_words_buf_r, void, void, void)\n#define _KERN_ATTR_VECTOR_ESALT(e)         KERN_ATTR (GLOBAL_AS,   GLOBAL_AS   const u32x      *g_words_buf_r, void, void, e)\n#else\n#define _KERN_ATTR_BASIC()                 KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bf_t      *bfs_buf,       void, void, void)\n#define _KERN_ATTR_BITSLICE()              KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bs_word_t *words_buf_s,   void, void, void)\n#define _KERN_ATTR_ESALT(e)                KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bf_t      *bfs_buf,       void, void, e)\n#define _KERN_ATTR_RULES()                 KERN_ATTR (CONSTANT_AS, GLOBAL_AS   const bf_t      *bfs_buf,       void, void, void)\n#define _KERN_ATTR_RULES_ESALT(e)          KERN_ATTR (CONSTANT_AS, GLOBAL_AS   const bf_t      *bfs_buf,       void, void, e)\n#define _KERN_ATTR_TMPS(t)                 KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bf_t      *bfs_buf,       t,    void, void)\n#define _KERN_ATTR_TMPS_ESALT(t,e)         KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bf_t      *bfs_buf,       t,    void, e)\n#define _KERN_ATTR_TMPS_HOOKS(t,h)         KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bf_t      *bfs_buf,       t,    h,    void)\n#define _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e) KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const bf_t      *bfs_buf,       t,    h,    e)\n#define _KERN_ATTR_VECTOR()                KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const u32x      *words_buf_r,   void, void, void)\n#define _KERN_ATTR_VECTOR_ESALT(e)         KERN_ATTR (GLOBAL_AS,   CONSTANT_AS const u32x      *words_buf_r,   void, void, e)\n#endif\n\n/*\n * with Metal we have additional parameters for the 'modifiers' (gid, lid, lsize, etc...)\n * they should not be declared in the host code\n * the compiler make the magic for us :)\n */\n\n#if defined IS_METAL\n#define KERN_ATTR_MAIN_PARAMS                       \\\n  uint hc_gid [[ thread_position_in_grid ]],        \\\n  uint hc_lid [[ thread_position_in_threadgroup ]], \\\n  uint hc_lsz [[ threads_per_threadgroup ]]\n#endif // IS_METAL\n\n/*\n * TM kernel function parameters\n */\n\n#define _KERN_ATTR_TM              \\\n  GLOBAL_AS u32 *mod,              \\\n  GLOBAL_AS bs_word_t *words_buf_b\n\n/*\n * Below are the macros to be used in the declarations of the KERNEL_FQ functions (pure and optimized kernels)\n * With Metal we need to add KERN_ATTR_MAIN_PARAMS\n * With CUDA, HIP and OpenCL there are no additional parameters other than those declared in the host code\n */\n\n#if defined IS_METAL\n#define KERN_ATTR_BASIC()                      _KERN_ATTR_BASIC(), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_BITSLICE()                   _KERN_ATTR_BITSLICE(), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_ESALT(e)                     _KERN_ATTR_ESALT(e), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_RULES()                      _KERN_ATTR_RULES(), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_RULES_ESALT(e)               _KERN_ATTR_RULES_ESALT(e), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_TMPS(t)                      _KERN_ATTR_TMPS(t), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_TMPS_ESALT(t,e)              _KERN_ATTR_TMPS_ESALT(t,e), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_TMPS_HOOKS(t,h)              _KERN_ATTR_TMPS_HOOKS(t,h), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e)      _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_VECTOR()                     _KERN_ATTR_VECTOR(), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_VECTOR_ESALT(e)              _KERN_ATTR_VECTOR_ESALT(e), KERN_ATTR_MAIN_PARAMS\n#define KERN_ATTR_TM                           _KERN_ATTR_TM, KERN_ATTR_MAIN_PARAMS\n#else // CUDA, HIP and OpenCL\n#define KERN_ATTR_BASIC()                      _KERN_ATTR_BASIC()\n#define KERN_ATTR_BITSLICE()                   _KERN_ATTR_BITSLICE()\n#define KERN_ATTR_ESALT(e)                     _KERN_ATTR_ESALT(e)\n#define KERN_ATTR_RULES()                      _KERN_ATTR_RULES()\n#define KERN_ATTR_RULES_ESALT(e)               _KERN_ATTR_RULES_ESALT(e)\n#define KERN_ATTR_TMPS(t)                      _KERN_ATTR_TMPS(t)\n#define KERN_ATTR_TMPS_ESALT(t,e)              _KERN_ATTR_TMPS_ESALT(t,e)\n#define KERN_ATTR_TMPS_HOOKS(t,h)              _KERN_ATTR_TMPS_HOOKS(t,h)\n#define KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e)      _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e)\n#define KERN_ATTR_VECTOR()                     _KERN_ATTR_VECTOR()\n#define KERN_ATTR_VECTOR_ESALT(e)              _KERN_ATTR_VECTOR_ESALT(e)\n#define KERN_ATTR_TM                           _KERN_ATTR_TM\n#endif // IS_METAL\n\n/*\n * Below are the macros to be used in the declarations of the DECLSPEC functions\n * that reuse the same parameters of KERNEL_FQ functions (-a3 optimized kernels)\n * They are shared with CUDA, HIP, Metal and OpenCL runtime\n * With these we can reuse 'modifier' (gid, lid, lsz, etc...) if we got it inside KERNEL functions\n */\n\n#define KERN_ATTR_FUNC_PARAMS \\\n               const u64 gid, \\\n  MAYBE_UNUSED const u64 lid, \\\n  MAYBE_UNUSED const u64 lsz\n\n#define KERN_ATTR_FUNC_BASIC()                 _KERN_ATTR_BASIC(), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_BITSLICE()              _KERN_ATTR_BITSLICE(), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_ESALT(e)                _KERN_ATTR_ESALT(e), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_RULES()                 _KERN_ATTR_RULES(), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_RULES_ESALT(e)          _KERN_ATTR_RULES_ESALT(e), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_TMPS(t)                 _KERN_ATTR_TMPS(t), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_TMPS_ESALT(t,e)         _KERN_ATTR_TMPS_ESALT(t,e), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_TMPS_HOOKS(t,h)         _KERN_ATTR_TMPS_HOOKS(t,h), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_TMPS_HOOKS_ESALT(t,h,e) _KERN_ATTR_TMPS_HOOKS_ESALT(t,h,e), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_VECTOR()                _KERN_ATTR_VECTOR(), KERN_ATTR_FUNC_PARAMS\n#define KERN_ATTR_FUNC_VECTOR_ESALT(e)         _KERN_ATTR_VECTOR_ESALT(e), KERN_ATTR_FUNC_PARAMS\n\n// union based packing\n\nDECLSPEC u8 v8a_from_v32_S (const u32 v32);\nDECLSPEC u8 v8b_from_v32_S (const u32 v32);\nDECLSPEC u8 v8c_from_v32_S (const u32 v32);\nDECLSPEC u8 v8d_from_v32_S (const u32 v32);\n\nDECLSPEC u8 v8a_from_v64_S (const u64 v64);\nDECLSPEC u8 v8b_from_v64_S (const u64 v64);\nDECLSPEC u8 v8c_from_v64_S (const u64 v64);\nDECLSPEC u8 v8d_from_v64_S (const u64 v64);\nDECLSPEC u8 v8e_from_v64_S (const u64 v64);\nDECLSPEC u8 v8f_from_v64_S (const u64 v64);\nDECLSPEC u8 v8g_from_v64_S (const u64 v64);\nDECLSPEC u8 v8h_from_v64_S (const u64 v64);\n\nDECLSPEC u8x v8a_from_v64 (const u64x v64);\nDECLSPEC u8x v8b_from_v64 (const u64x v64);\nDECLSPEC u8x v8c_from_v64 (const u64x v64);\nDECLSPEC u8x v8d_from_v64 (const u64x v64);\nDECLSPEC u8x v8e_from_v64 (const u64x v64);\nDECLSPEC u8x v8f_from_v64 (const u64x v64);\nDECLSPEC u8x v8g_from_v64 (const u64x v64);\nDECLSPEC u8x v8h_from_v64 (const u64x v64);\n\nDECLSPEC u16 v16a_from_v32_S (const u32 v32);\nDECLSPEC u16 v16b_from_v32_S (const u32 v32);\n\nDECLSPEC u32 v32a_from_v64_S (const u64 v64);\nDECLSPEC u32 v32b_from_v64_S (const u64 v64);\n\nDECLSPEC u32 v32_from_v16ab_S (const u16 v16a, const u16 v16b);\nDECLSPEC u64 v64_from_v32ab_S (const u32 v32a, const u32 v32b);\n\n// inline asm packing\n\nDECLSPEC u32x unpack_v8a_from_v32 (const u32x v32);\nDECLSPEC u32x unpack_v8b_from_v32 (const u32x v32);\nDECLSPEC u32x unpack_v8c_from_v32 (const u32x v32);\nDECLSPEC u32x unpack_v8d_from_v32 (const u32x v32);\n\nDECLSPEC u32 unpack_v8a_from_v32_S (const u32 v32);\nDECLSPEC u32 unpack_v8b_from_v32_S (const u32 v32);\nDECLSPEC u32 unpack_v8c_from_v32_S (const u32 v32);\nDECLSPEC u32 unpack_v8d_from_v32_S (const u32 v32);\n\n// opencl intern based packing\n\nDECLSPEC u32x l32_from_64   (u64x a);\nDECLSPEC u32x h32_from_64   (u64x a);\nDECLSPEC u32  l32_from_64_S (u64  a);\nDECLSPEC u32  h32_from_64_S (u64  a);\n\nDECLSPEC u64x hl32_to_64   (const u32x a, const u32x b);\nDECLSPEC u64  hl32_to_64_S (const u32  a, const u32  b);\n\n// bit operations\n\nDECLSPEC u32x hc_rotl32   (const u32x a, const int n);\nDECLSPEC u32x hc_rotr32   (const u32x a, const int n);\nDECLSPEC u32  hc_rotl32_S (const u32  a, const int n);\nDECLSPEC u32  hc_rotr32_S (const u32  a, const int n);\nDECLSPEC u64x hc_rotl64   (const u64x a, const int n);\nDECLSPEC u64x hc_rotr64   (const u64x a, const int n);\nDECLSPEC u64  hc_rotl64_S (const u64  a, const int n);\nDECLSPEC u64  hc_rotr64_S (const u64  a, const int n);\n\nDECLSPEC u32x hc_swap32   (const u32x v);\nDECLSPEC u32  hc_swap32_S (const u32  v);\nDECLSPEC u64x hc_swap64   (const u64x v);\nDECLSPEC u64  hc_swap64_S (const u64  v);\n\n// byte operations\n\nDECLSPEC u32x hc_bytealign      (const u32x a, const u32x b, const int  c);\nDECLSPEC u32  hc_bytealign_S    (const u32  a, const u32  b, const int  c);\nDECLSPEC u32x hc_bytealign_be   (const u32x a, const u32x b, const int  c);\nDECLSPEC u32  hc_bytealign_be_S (const u32  a, const u32  b, const int  c);\nDECLSPEC u32x hc_byte_perm      (const u32x a, const u32x b, const int  c);\nDECLSPEC u32  hc_byte_perm_S    (const u32  a, const u32  b, const int  c);\n\nDECLSPEC u32x hc_add3           (const u32x a, const u32x b, const u32x c);\nDECLSPEC u32  hc_add3_S         (const u32  a, const u32  b, const u32  c);\nDECLSPEC u32x hc_bfe            (const u32x a, const u32x b, const u32x c);\nDECLSPEC u32  hc_bfe_S          (const u32  a, const u32  b, const u32  c);\nDECLSPEC u32x hc_lop_0x96       (const u32x a, const u32x b, const u32x c);\nDECLSPEC u32  hc_lop_0x96_S     (const u32  a, const u32  b, const u32  c);\n\n// legacy common code\n\nDECLSPEC int ffz (const u32 v);\n\n#ifdef KERNEL_STATIC\nDECLSPEC int hash_comp (PRIVATE_AS const u32 *d1, GLOBAL_AS const u32 *d2);\nDECLSPEC int find_hash (PRIVATE_AS const u32 *digest, const u32 digests_cnt, GLOBAL_AS const digest_t *digests_buf);\n#endif\n\nDECLSPEC int hc_enc_scan (PRIVATE_AS const u32 *buf, const int len);\nDECLSPEC int hc_enc_scan_global (GLOBAL_AS const u32 *buf, const int len);\nDECLSPEC void hc_enc_init (PRIVATE_AS hc_enc_t *hc_enc);\nDECLSPEC int hc_enc_has_next (PRIVATE_AS hc_enc_t *hc_enc, const int sz);\nDECLSPEC int hc_enc_next (PRIVATE_AS hc_enc_t *hc_enc, PRIVATE_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz);\nDECLSPEC int hc_enc_next_global (PRIVATE_AS hc_enc_t *hc_enc, GLOBAL_AS const u32 *src_buf, const int src_len, const int src_sz, PRIVATE_AS u32 *dst_buf, const int dst_sz);\n\nDECLSPEC int pkcs_padding_bs8 (PRIVATE_AS const u32 *data_buf, const int data_len);\nDECLSPEC int pkcs_padding_bs16 (PRIVATE_AS const u32 *data_buf, const int data_len);\nDECLSPEC int asn1_detect (PRIVATE_AS const u32 *buf, const int len);\nDECLSPEC u32 check_bitmap (GLOBAL_AS const u32 *bitmap, const u32 bitmap_mask, const u32 bitmap_shift, const u32 digest);\nDECLSPEC u32 check (PRIVATE_AS const u32 *digest, GLOBAL_AS const u32 *bitmap_s1_a, GLOBAL_AS const u32 *bitmap_s1_b, GLOBAL_AS const u32 *bitmap_s1_c, GLOBAL_AS const u32 *bitmap_s1_d, GLOBAL_AS const u32 *bitmap_s2_a, GLOBAL_AS const u32 *bitmap_s2_b, GLOBAL_AS const u32 *bitmap_s2_c, GLOBAL_AS const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2);\nDECLSPEC void mark_hash (GLOBAL_AS plain_t *plains_buf, GLOBAL_AS u32 *d_result, const u32 salt_pos, const u32 digests_cnt, const u32 digest_pos, const u32 hash_pos, const u64 gid, const u32 il_pos, const u32 extra1, const u32 extra2);\nDECLSPEC int hc_count_char (PRIVATE_AS const u32 *buf, const int elems, const u32 c);\nDECLSPEC float hc_get_entropy (PRIVATE_AS const u32 *buf, const int elems);\nDECLSPEC int is_valid_hex_8 (const u8 v);\nDECLSPEC int is_valid_hex_32 (const u32 v);\nDECLSPEC int is_valid_base58_8 (const u8 v);\nDECLSPEC int is_valid_base58_32 (const u32 v);\nDECLSPEC int is_valid_printable_8 (const u8 v);\nDECLSPEC int is_valid_printable_32 (const u32 v);\nDECLSPEC int hc_find_keyboard_layout_map (const u32 search, const int search_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt);\nDECLSPEC int hc_execute_keyboard_layout_mapping (PRIVATE_AS u32 *w, const int pw_len, LOCAL_AS keyboard_layout_mapping_t *s_keyboard_layout_mapping_buf, const int keyboard_layout_mapping_cnt);\nDECLSPEC int count_bits_32 (const u32 v0, const u32 v1);\n\nDECLSPEC void make_utf16be (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2);\nDECLSPEC void make_utf16beN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2);\nDECLSPEC void make_utf16beN_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2);\nDECLSPEC void make_utf16le (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2);\nDECLSPEC void make_utf16leN (PRIVATE_AS const u32x *in, PRIVATE_AS u32x *out1, PRIVATE_AS u32x *out2);\nDECLSPEC void undo_utf16be (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out);\nDECLSPEC void undo_utf16le (PRIVATE_AS const u32x *in1, PRIVATE_AS const u32x *in2, PRIVATE_AS u32x *out);\nDECLSPEC void set_mark_1x4 (PRIVATE_AS u32 *v, const u32 offset);\nDECLSPEC void append_helper_1x4 (PRIVATE_AS u32x *r, const u32 v, PRIVATE_AS const u32 *m);\nDECLSPEC void append_0x80_1x4 (PRIVATE_AS u32x *w0, const u32 offset);\nDECLSPEC void append_0x80_2x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32 offset);\nDECLSPEC void append_0x80_3x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, const u32 offset);\nDECLSPEC void append_0x80_4x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset);\nDECLSPEC void append_0x80_8x4 (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset);\nDECLSPEC void append_0x80_1x16 (PRIVATE_AS u32x *w, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_carry_le (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_carry_be (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, PRIVATE_AS u32x *c0, PRIVATE_AS u32x *c1, PRIVATE_AS u32x *c2, PRIVATE_AS u32x *c3, PRIVATE_AS u32x *c4, PRIVATE_AS u32x *c5, PRIVATE_AS u32x *c6, PRIVATE_AS u32x *c7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_1x64_le (PRIVATE_AS u32x *w, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_1x64_be (PRIVATE_AS u32x *w, const u32 offset);\nDECLSPEC void truncate_block_4x4_le_S (PRIVATE_AS u32 *w0, const u32 len);\nDECLSPEC void truncate_block_4x4_be_S (PRIVATE_AS u32 *w0, const u32 len);\nDECLSPEC void truncate_block_16x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len);\nDECLSPEC void truncate_block_16x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 len);\nDECLSPEC void set_mark_1x4_S (PRIVATE_AS u32 *v, const u32 offset);\nDECLSPEC void append_helper_1x4_S (PRIVATE_AS u32 *r, const u32 v, PRIVATE_AS const u32 *m);\nDECLSPEC void append_0x01_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset);\nDECLSPEC void append_0x06_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset);\nDECLSPEC void append_0x01_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset);\nDECLSPEC void append_0x2d_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset);\nDECLSPEC void append_0x80_1x4_S (PRIVATE_AS u32 *w0, const u32 offset);\nDECLSPEC void append_0x80_2x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, const u32 offset);\nDECLSPEC void append_0x80_3x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, const u32 offset);\nDECLSPEC void append_0x80_4x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset);\nDECLSPEC void append_0x80_8x4_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset);\nDECLSPEC void make_utf16be_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2);\nDECLSPEC void make_utf16le_S (PRIVATE_AS const u32 *in, PRIVATE_AS u32 *out1, PRIVATE_AS u32 *out2);\nDECLSPEC void undo_utf16be_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out);\nDECLSPEC void undo_utf16le_S (PRIVATE_AS const u32 *in1, PRIVATE_AS const u32 *in2, PRIVATE_AS u32 *out);\nDECLSPEC void switch_buffer_by_offset_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_carry_le_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_8x4_carry_be_S (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, PRIVATE_AS u32 *w4, PRIVATE_AS u32 *w5, PRIVATE_AS u32 *w6, PRIVATE_AS u32 *w7, PRIVATE_AS u32 *c0, PRIVATE_AS u32 *c1, PRIVATE_AS u32 *c2, PRIVATE_AS u32 *c3, PRIVATE_AS u32 *c4, PRIVATE_AS u32 *c5, PRIVATE_AS u32 *c6, PRIVATE_AS u32 *c7, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_1x64_le_S (PRIVATE_AS u32 *w, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_1x64_be_S (PRIVATE_AS u32 *w, const u32 offset);\nDECLSPEC void switch_buffer_by_offset_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset);\nDECLSPEC void switch_buffer_by_offset_8x4_le_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, PRIVATE_AS u32x *w4, PRIVATE_AS u32x *w5, PRIVATE_AS u32x *w6, PRIVATE_AS u32x *w7, const u32x offset);\nDECLSPEC void append_0x01_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset);\nDECLSPEC void append_0x01_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset);\nDECLSPEC void append_0x06_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset);\nDECLSPEC void append_0x80_2x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, const u32x offset);\nDECLSPEC void append_0x80_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset);\nDECLSPEC void append_0x2d_4x4_VV (PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const u32x offset);\n\n#endif // INC_COMMON_H\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_ecc_secp256k1.cl",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n *\n * Furthermore, since elliptic curve operations are highly researched and optimized,\n * we've consulted a lot of online resources to implement this, including several papers and\n * example code.\n *\n * Credits where credits are due: there are a lot of nice projects that explain and/or optimize\n * elliptic curve operations (especially elliptic curve multiplications by a scalar).\n *\n * We want to shout out following projects, which were quite helpful when implementing this:\n * - secp256k1 by Pieter Wuille (https://github.com/bitcoin-core/secp256k1/, MIT)\n * - secp256k1-cl by hhanh00 (https://github.com/hhanh00/secp256k1-cl/, MIT)\n * - ec_pure_c by masterzorag (https://github.com/masterzorag/ec_pure_c/)\n * - ecc-gmp by leivaburto (https://github.com/leivaburto/ecc-gmp)\n * - micro-ecc by Ken MacKay (https://github.com/kmackay/micro-ecc/, BSD)\n * - curve_example by willem (https://gist.github.com/nlitsme/c9031c7b9bf6bb009e5a)\n * - py_ecc by Vitalik Buterin (https://github.com/ethereum/py_ecc/, MIT)\n *\n *\n * Some BigNum operations are implemented similar to micro-ecc which is licensed under these terms:\n *  Copyright 2014 Ken MacKay, 2-Clause BSD License\n *\n *  Redistribution and use in source and binary forms, with or without modification, are permitted\n *  provided that the following conditions are met:\n *\n *  1. Redistributions of source code must retain the above copyright notice, this list of\n *     conditions and the following disclaimer.\n *\n *  2. Redistributions in binary form must reproduce the above copyright notice, this list of\n *     conditions and the following disclaimer in the documentation and/or other materials\n *     provided with the distribution.\n *\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\n *  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n *  POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * ATTENTION: this code is NOT meant to be used in security critical environments that are at risk\n * of side-channel or timing attacks etc, it's only purpose is to make it work fast for GPGPU\n * (OpenCL/CUDA). Some attack vectors like side-channel and timing-attacks might be possible,\n * because of some optimizations used within this code (non-constant time etc).\n */\n\n/*\n * Implementation considerations:\n * point double and point add are implemented similar to algorithms mentioned in this 2011 paper:\n * http://eprint.iacr.org/2011/338.pdf\n * (Fast and Regular Algorithms for Scalar Multiplication over Elliptic Curves by Matthieu Rivain)\n *\n * In theory we could use the Jacobian Co-Z enhancement to get rid of the larger buffer caused by\n * the z coordinates (and in this way reduce register pressure etc).\n * For the Co-Z improvement there are a lot of fast algorithms, but we might still be faster\n * with this implementation (b/c we allow non-constant time) without the Brier/Joye Montgomery-like\n * ladder. Of course, this claim would need to be verified and tested to see which one is faster\n * for our specific scenario at the end.\n *\n * We accomplish a \"little\" speedup by using scalars converted to w-NAF (non-adjacent form):\n * The general idea of w-NAF is to pre-compute some zi coefficients like below to reduce the\n * costly point additions by using a non-binary (\"signed\") number system (values other than just\n * 0 and 1, but ranging from -2^(w-1)-1 to 2^(w-1)-1). This works best with the left-to-right\n * binary algorithm such that we just add zi * P when adding point P (we pre-compute all the\n * possible zi * P values because the x/y coordinates are known before the kernel starts):\n *\n *  // Example with window size w = 2 (i.e. mod 4 => & 3):\n *  // 173 => 1 0 -1 0 -1 0 -1 0 1 = 2^8 - 2^6 - 2^4 - 2^2 + 1\n *  int e = 0b10101101;   // 173\n *  int z[8 + 1] = { 0 }; // our zi/di, we need one extra slot to make the subtraction work\n *\n *  int i = 0;\n *\n *  while (e)\n *  {\n *    if (e & 1)\n *    {\n *      // for window size w = 3 it would be:\n *      // => 2^(w-0) = 2^3 = 8\n *      // => 2^(w-1) = 2^2 = 4\n *\n *      int bit; // = 2 - (e & 3) for w = 2\n *\n *      if ((e & 3) >= 2) // e % 4 == e & 3, use (e & 7) >= 4 for w = 3\n *        bit = (e & 3) - 4; // (e & 7) - 8 for w = 3\n *      else\n *        bit = e & 3; // e & 7 for w = 3\n *\n *      z[i] = bit;\n *      e   -= bit;\n *    }\n *\n *    e >>= 1; // e / 2\n *    i++;\n *  }\n*/\n\n#include \"inc_ecc_secp256k1.h\"\n\nDECLSPEC u32 sub (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b)\n{\n  u32 c = 0; // carry/borrow\n\n  #if defined IS_NV && HAS_SUB == 1 && HAS_SUBC == 1\n  asm volatile\n  (\n    \"sub.cc.u32   %0,  %9, %17;\"\n    \"subc.cc.u32  %1, %10, %18;\"\n    \"subc.cc.u32  %2, %11, %19;\"\n    \"subc.cc.u32  %3, %12, %20;\"\n    \"subc.cc.u32  %4, %13, %21;\"\n    \"subc.cc.u32  %5, %14, %22;\"\n    \"subc.cc.u32  %6, %15, %23;\"\n    \"subc.cc.u32  %7, %16, %24;\"\n    \"subc.u32     %8,   0,   0;\"\n    : \"=r\"(r[0]), \"=r\"(r[1]), \"=r\"(r[2]), \"=r\"(r[3]), \"=r\"(r[4]), \"=r\"(r[5]), \"=r\"(r[6]), \"=r\"(r[7]),\n      \"=r\"(c)\n    :  \"r\"(a[0]),  \"r\"(a[1]),  \"r\"(a[2]),  \"r\"(a[3]),  \"r\"(a[4]),  \"r\"(a[5]),  \"r\"(a[6]),  \"r\"(a[7]),\n       \"r\"(b[0]),  \"r\"(b[1]),  \"r\"(b[2]),  \"r\"(b[3]),  \"r\"(b[4]),  \"r\"(b[5]),  \"r\"(b[6]),  \"r\"(b[7])\n  );\n  // HIP doesnt support these so we stick to OpenCL (aka IS_AMD) - is also faster without asm\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VSUB == 1 && HAS_VSUBB == 1\n  #elif 0\n  __asm__ __volatile__\n  (\n    \"V_SUB_U32   %0,  %9, %17;\"\n    \"V_SUBB_U32  %1, %10, %18;\"\n    \"V_SUBB_U32  %2, %11, %19;\"\n    \"V_SUBB_U32  %3, %12, %20;\"\n    \"V_SUBB_U32  %4, %13, %21;\"\n    \"V_SUBB_U32  %5, %14, %22;\"\n    \"V_SUBB_U32  %6, %15, %23;\"\n    \"V_SUBB_U32  %7, %16, %24;\"\n    \"V_SUBB_U32  %8,   0,   0;\"\n    : \"=v\"(r[0]), \"=v\"(r[1]), \"=v\"(r[2]), \"=v\"(r[3]), \"=v\"(r[4]), \"=v\"(r[5]), \"=v\"(r[6]), \"=v\"(r[7]),\n      \"=v\"(c)\n    :  \"v\"(a[0]),  \"v\"(a[1]),  \"v\"(a[2]),  \"v\"(a[3]),  \"v\"(a[4]),  \"v\"(a[5]),  \"v\"(a[6]),  \"v\"(a[7]),\n       \"v\"(b[0]),  \"v\"(b[1]),  \"v\"(b[2]),  \"v\"(b[3]),  \"v\"(b[4]),  \"v\"(b[5]),  \"v\"(b[6]),  \"v\"(b[7])\n  );\n  #else\n  for (u32 i = 0; i < 8; i++)\n  {\n    const u32 diff = a[i] - b[i] - c;\n\n    if (diff != a[i]) c = (diff > a[i]);\n\n    r[i] = diff;\n  }\n  #endif\n\n  return c;\n}\n\nDECLSPEC u32 add (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b)\n{\n  u32 c = 0; // carry/borrow\n\n  #if defined IS_NV && HAS_ADD == 1 && HAS_ADDC == 1\n  asm volatile\n  (\n    \"add.cc.u32   %0,  %9, %17;\"\n    \"addc.cc.u32  %1, %10, %18;\"\n    \"addc.cc.u32  %2, %11, %19;\"\n    \"addc.cc.u32  %3, %12, %20;\"\n    \"addc.cc.u32  %4, %13, %21;\"\n    \"addc.cc.u32  %5, %14, %22;\"\n    \"addc.cc.u32  %6, %15, %23;\"\n    \"addc.cc.u32  %7, %16, %24;\"\n    \"addc.u32     %8,   0,   0;\"\n    : \"=r\"(r[0]), \"=r\"(r[1]), \"=r\"(r[2]), \"=r\"(r[3]), \"=r\"(r[4]), \"=r\"(r[5]), \"=r\"(r[6]), \"=r\"(r[7]),\n      \"=r\"(c)\n    :  \"r\"(a[0]),  \"r\"(a[1]),  \"r\"(a[2]),  \"r\"(a[3]),  \"r\"(a[4]),  \"r\"(a[5]),  \"r\"(a[6]),  \"r\"(a[7]),\n       \"r\"(b[0]),  \"r\"(b[1]),  \"r\"(b[2]),  \"r\"(b[3]),  \"r\"(b[4]),  \"r\"(b[5]),  \"r\"(b[6]),  \"r\"(b[7])\n  );\n  // HIP doesnt support these so we stick to OpenCL (aka IS_AMD) - is also faster without asm\n  //#elif (defined IS_AMD || defined IS_HIP) && HAS_VSUB == 1 && HAS_VSUBB == 1\n  #elif 0\n  __asm__ __volatile__\n  (\n    \"V_ADD_U32   %0,  %9, %17;\"\n    \"V_ADDC_U32  %1, %10, %18;\"\n    \"V_ADDC_U32  %2, %11, %19;\"\n    \"V_ADDC_U32  %3, %12, %20;\"\n    \"V_ADDC_U32  %4, %13, %21;\"\n    \"V_ADDC_U32  %5, %14, %22;\"\n    \"V_ADDC_U32  %6, %15, %23;\"\n    \"V_ADDC_U32  %7, %16, %24;\"\n    \"V_ADDC_U32  %8,   0,   0;\"\n    : \"=v\"(r[0]), \"=v\"(r[1]), \"=v\"(r[2]), \"=v\"(r[3]), \"=v\"(r[4]), \"=v\"(r[5]), \"=v\"(r[6]), \"=v\"(r[7]),\n      \"=v\"(c)\n    :  \"v\"(a[0]),  \"v\"(a[1]),  \"v\"(a[2]),  \"v\"(a[3]),  \"v\"(a[4]),  \"v\"(a[5]),  \"v\"(a[6]),  \"v\"(a[7]),\n       \"v\"(b[0]),  \"v\"(b[1]),  \"v\"(b[2]),  \"v\"(b[3]),  \"v\"(b[4]),  \"v\"(b[5]),  \"v\"(b[6]),  \"v\"(b[7])\n  );\n  #else\n  for (u32 i = 0; i < 8; i++)\n  {\n    const u32 t = a[i] + b[i] + c;\n\n    if (t != a[i]) c = (t < a[i]);\n\n    r[i] = t;\n  }\n  #endif\n\n  return c;\n}\n\nDECLSPEC void sub_mod (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b)\n{\n  const u32 c = sub (r, a, b); // carry\n\n  if (c)\n  {\n    u32 t[8];\n\n    t[0] = SECP256K1_P0;\n    t[1] = SECP256K1_P1;\n    t[2] = SECP256K1_P2;\n    t[3] = SECP256K1_P3;\n    t[4] = SECP256K1_P4;\n    t[5] = SECP256K1_P5;\n    t[6] = SECP256K1_P6;\n    t[7] = SECP256K1_P7;\n\n    add (r, r, t);\n  }\n}\n\nDECLSPEC void add_mod (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b)\n{\n  const u32 c = add (r, a, b); // carry\n\n  /*\n   * Modulo operation:\n   */\n\n  // note: we could have an early exit in case of c == 1 => sub ()\n\n  u32 t[8];\n\n  t[0] = SECP256K1_P0;\n  t[1] = SECP256K1_P1;\n  t[2] = SECP256K1_P2;\n  t[3] = SECP256K1_P3;\n  t[4] = SECP256K1_P4;\n  t[5] = SECP256K1_P5;\n  t[6] = SECP256K1_P6;\n  t[7] = SECP256K1_P7;\n\n  // check if modulo operation is needed\n\n  u32 mod = 1;\n\n  if (c == 0)\n  {\n    for (int i = 7; i >= 0; i--)\n    {\n      if (r[i] < t[i])\n      {\n        mod = 0;\n\n        break; // or return ! (check if faster)\n      }\n\n      if (r[i] > t[i]) break;\n    }\n  }\n\n  if (mod == 1)\n  {\n    sub (r, r, t);\n  }\n}\n\nDECLSPEC void mod_512 (PRIVATE_AS u32 *n)\n{\n  // we need to perform a modulo operation with 512-bit % 256-bit (bignum modulo):\n  // the modulus is the secp256k1 group order\n\n  // ATTENTION: for this function the byte-order is reversed (most significant bytes\n  // at the left)\n\n  /*\n    the general modulo by shift and substract code (a = a % b):\n\n    x = b;\n\n    t = a >> 1;\n\n    while (x <= t) x <<= 1;\n\n    while (a >= b)\n    {\n      if (a >= x) a -= x;\n\n      x >>= 1;\n    }\n\n    return a; // remainder\n  */\n\n  u32 a[16];\n\n  a[ 0] = n[ 0];\n  a[ 1] = n[ 1];\n  a[ 2] = n[ 2];\n  a[ 3] = n[ 3];\n  a[ 4] = n[ 4];\n  a[ 5] = n[ 5];\n  a[ 6] = n[ 6];\n  a[ 7] = n[ 7];\n  a[ 8] = n[ 8];\n  a[ 9] = n[ 9];\n  a[10] = n[10];\n  a[11] = n[11];\n  a[12] = n[12];\n  a[13] = n[13];\n  a[14] = n[14];\n  a[15] = n[15];\n\n  u32 b[16];\n\n  b[ 0] = 0x00000000;\n  b[ 1] = 0x00000000;\n  b[ 2] = 0x00000000;\n  b[ 3] = 0x00000000;\n  b[ 4] = 0x00000000;\n  b[ 5] = 0x00000000;\n  b[ 6] = 0x00000000;\n  b[ 7] = 0x00000000;\n  b[ 8] = SECP256K1_N7;\n  b[ 9] = SECP256K1_N6;\n  b[10] = SECP256K1_N5;\n  b[11] = SECP256K1_N4;\n  b[12] = SECP256K1_N3;\n  b[13] = SECP256K1_N2;\n  b[14] = SECP256K1_N1;\n  b[15] = SECP256K1_N0;\n\n  /*\n   * Start:\n   */\n\n  // x = b (but with a fast \"shift\" trick to avoid the while loop)\n\n  u32 x[16];\n\n  x[ 0] = b[ 8]; // this is a trick: we just put the group order's most significant bit all the\n  x[ 1] = b[ 9]; // way to the top to avoid doing the initial: while (x <= t) x <<= 1\n  x[ 2] = b[10];\n  x[ 3] = b[11];\n  x[ 4] = b[12];\n  x[ 5] = b[13];\n  x[ 6] = b[14];\n  x[ 7] = b[15];\n  x[ 8] = 0x00000000;\n  x[ 9] = 0x00000000;\n  x[10] = 0x00000000;\n  x[11] = 0x00000000;\n  x[12] = 0x00000000;\n  x[13] = 0x00000000;\n  x[14] = 0x00000000;\n  x[15] = 0x00000000;\n\n  // a >= b\n\n  while (a[0] >= b[0])\n  {\n    u32 l00 = a[ 0] < b[ 0];\n    u32 l01 = a[ 1] < b[ 1];\n    u32 l02 = a[ 2] < b[ 2];\n    u32 l03 = a[ 3] < b[ 3];\n    u32 l04 = a[ 4] < b[ 4];\n    u32 l05 = a[ 5] < b[ 5];\n    u32 l06 = a[ 6] < b[ 6];\n    u32 l07 = a[ 7] < b[ 7];\n    u32 l08 = a[ 8] < b[ 8];\n    u32 l09 = a[ 9] < b[ 9];\n    u32 l10 = a[10] < b[10];\n    u32 l11 = a[11] < b[11];\n    u32 l12 = a[12] < b[12];\n    u32 l13 = a[13] < b[13];\n    u32 l14 = a[14] < b[14];\n    u32 l15 = a[15] < b[15];\n\n    u32 e00 = a[ 0] == b[ 0];\n    u32 e01 = a[ 1] == b[ 1];\n    u32 e02 = a[ 2] == b[ 2];\n    u32 e03 = a[ 3] == b[ 3];\n    u32 e04 = a[ 4] == b[ 4];\n    u32 e05 = a[ 5] == b[ 5];\n    u32 e06 = a[ 6] == b[ 6];\n    u32 e07 = a[ 7] == b[ 7];\n    u32 e08 = a[ 8] == b[ 8];\n    u32 e09 = a[ 9] == b[ 9];\n    u32 e10 = a[10] == b[10];\n    u32 e11 = a[11] == b[11];\n    u32 e12 = a[12] == b[12];\n    u32 e13 = a[13] == b[13];\n    u32 e14 = a[14] == b[14];\n\n    if (l00) break;\n    if (l01 && e00) break;\n    if (l02 && e00 && e01) break;\n    if (l03 && e00 && e01 && e02) break;\n    if (l04 && e00 && e01 && e02 && e03) break;\n    if (l05 && e00 && e01 && e02 && e03 && e04) break;\n    if (l06 && e00 && e01 && e02 && e03 && e04 && e05) break;\n    if (l07 && e00 && e01 && e02 && e03 && e04 && e05 && e06) break;\n    if (l08 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07) break;\n    if (l09 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08) break;\n    if (l10 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09) break;\n    if (l11 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10) break;\n    if (l12 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11) break;\n    if (l13 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11 && e12) break;\n    if (l14 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11 && e12 && e13) break;\n    if (l15 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11 && e12 && e13 && e14) break;\n\n    // r = x (copy it to have the original values for the subtraction)\n\n    u32 r[16];\n\n    r[ 0] = x[ 0];\n    r[ 1] = x[ 1];\n    r[ 2] = x[ 2];\n    r[ 3] = x[ 3];\n    r[ 4] = x[ 4];\n    r[ 5] = x[ 5];\n    r[ 6] = x[ 6];\n    r[ 7] = x[ 7];\n    r[ 8] = x[ 8];\n    r[ 9] = x[ 9];\n    r[10] = x[10];\n    r[11] = x[11];\n    r[12] = x[12];\n    r[13] = x[13];\n    r[14] = x[14];\n    r[15] = x[15];\n\n    // x <<= 1\n\n    x[15] = x[15] >> 1 | x[14] << 31;\n    x[14] = x[14] >> 1 | x[13] << 31;\n    x[13] = x[13] >> 1 | x[12] << 31;\n    x[12] = x[12] >> 1 | x[11] << 31;\n    x[11] = x[11] >> 1 | x[10] << 31;\n    x[10] = x[10] >> 1 | x[ 9] << 31;\n    x[ 9] = x[ 9] >> 1 | x[ 8] << 31;\n    x[ 8] = x[ 8] >> 1 | x[ 7] << 31;\n    x[ 7] = x[ 7] >> 1 | x[ 6] << 31;\n    x[ 6] = x[ 6] >> 1 | x[ 5] << 31;\n    x[ 5] = x[ 5] >> 1 | x[ 4] << 31;\n    x[ 4] = x[ 4] >> 1 | x[ 3] << 31;\n    x[ 3] = x[ 3] >> 1 | x[ 2] << 31;\n    x[ 2] = x[ 2] >> 1 | x[ 1] << 31;\n    x[ 1] = x[ 1] >> 1 | x[ 0] << 31;\n    x[ 0] = x[ 0] >> 1;\n\n    // if (a >= r) a -= r;\n\n    l00 = a[ 0] < r[ 0];\n    l01 = a[ 1] < r[ 1];\n    l02 = a[ 2] < r[ 2];\n    l03 = a[ 3] < r[ 3];\n    l04 = a[ 4] < r[ 4];\n    l05 = a[ 5] < r[ 5];\n    l06 = a[ 6] < r[ 6];\n    l07 = a[ 7] < r[ 7];\n    l08 = a[ 8] < r[ 8];\n    l09 = a[ 9] < r[ 9];\n    l10 = a[10] < r[10];\n    l11 = a[11] < r[11];\n    l12 = a[12] < r[12];\n    l13 = a[13] < r[13];\n    l14 = a[14] < r[14];\n    l15 = a[15] < r[15];\n\n    e00 = a[ 0] == r[ 0];\n    e01 = a[ 1] == r[ 1];\n    e02 = a[ 2] == r[ 2];\n    e03 = a[ 3] == r[ 3];\n    e04 = a[ 4] == r[ 4];\n    e05 = a[ 5] == r[ 5];\n    e06 = a[ 6] == r[ 6];\n    e07 = a[ 7] == r[ 7];\n    e08 = a[ 8] == r[ 8];\n    e09 = a[ 9] == r[ 9];\n    e10 = a[10] == r[10];\n    e11 = a[11] == r[11];\n    e12 = a[12] == r[12];\n    e13 = a[13] == r[13];\n    e14 = a[14] == r[14];\n\n    if (l00) continue;\n    if (l01 && e00) continue;\n    if (l02 && e00 && e01) continue;\n    if (l03 && e00 && e01 && e02) continue;\n    if (l04 && e00 && e01 && e02 && e03) continue;\n    if (l05 && e00 && e01 && e02 && e03 && e04) continue;\n    if (l06 && e00 && e01 && e02 && e03 && e04 && e05) continue;\n    if (l07 && e00 && e01 && e02 && e03 && e04 && e05 && e06) continue;\n    if (l08 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07) continue;\n    if (l09 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08) continue;\n    if (l10 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09) continue;\n    if (l11 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10) continue;\n    if (l12 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11) continue;\n    if (l13 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11 && e12) continue;\n    if (l14 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11 && e12 && e13) continue;\n    if (l15 && e00 && e01 && e02 && e03 && e04 && e05 && e06 && e07 && e08 && e09 && e10 && e11 && e12 && e13 && e14) continue;\n\n    // substract (a -= r):\n\n    if ((r[ 0] | r[ 1] | r[ 2] | r[ 3] | r[ 4] | r[ 5] | r[ 6] | r[ 7] |\n         r[ 8] | r[ 9] | r[10] | r[11] | r[12] | r[13] | r[14] | r[15]) == 0) break;\n\n    r[ 0] = a[ 0] - r[ 0];\n    r[ 1] = a[ 1] - r[ 1];\n    r[ 2] = a[ 2] - r[ 2];\n    r[ 3] = a[ 3] - r[ 3];\n    r[ 4] = a[ 4] - r[ 4];\n    r[ 5] = a[ 5] - r[ 5];\n    r[ 6] = a[ 6] - r[ 6];\n    r[ 7] = a[ 7] - r[ 7];\n    r[ 8] = a[ 8] - r[ 8];\n    r[ 9] = a[ 9] - r[ 9];\n    r[10] = a[10] - r[10];\n    r[11] = a[11] - r[11];\n    r[12] = a[12] - r[12];\n    r[13] = a[13] - r[13];\n    r[14] = a[14] - r[14];\n    r[15] = a[15] - r[15];\n\n    // take care of the \"borrow\" (we can't do it the other way around 15...1 because r[x] is changed!)\n\n    if (r[ 1] > a[ 1]) r[ 0]--;\n    if (r[ 2] > a[ 2]) r[ 1]--;\n    if (r[ 3] > a[ 3]) r[ 2]--;\n    if (r[ 4] > a[ 4]) r[ 3]--;\n    if (r[ 5] > a[ 5]) r[ 4]--;\n    if (r[ 6] > a[ 6]) r[ 5]--;\n    if (r[ 7] > a[ 7]) r[ 6]--;\n    if (r[ 8] > a[ 8]) r[ 7]--;\n    if (r[ 9] > a[ 9]) r[ 8]--;\n    if (r[10] > a[10]) r[ 9]--;\n    if (r[11] > a[11]) r[10]--;\n    if (r[12] > a[12]) r[11]--;\n    if (r[13] > a[13]) r[12]--;\n    if (r[14] > a[14]) r[13]--;\n    if (r[15] > a[15]) r[14]--;\n\n    a[ 0] = r[ 0];\n    a[ 1] = r[ 1];\n    a[ 2] = r[ 2];\n    a[ 3] = r[ 3];\n    a[ 4] = r[ 4];\n    a[ 5] = r[ 5];\n    a[ 6] = r[ 6];\n    a[ 7] = r[ 7];\n    a[ 8] = r[ 8];\n    a[ 9] = r[ 9];\n    a[10] = r[10];\n    a[11] = r[11];\n    a[12] = r[12];\n    a[13] = r[13];\n    a[14] = r[14];\n    a[15] = r[15];\n  }\n\n  n[ 0] = a[ 0];\n  n[ 1] = a[ 1];\n  n[ 2] = a[ 2];\n  n[ 3] = a[ 3];\n  n[ 4] = a[ 4];\n  n[ 5] = a[ 5];\n  n[ 6] = a[ 6];\n  n[ 7] = a[ 7];\n  n[ 8] = a[ 8];\n  n[ 9] = a[ 9];\n  n[10] = a[10];\n  n[11] = a[11];\n  n[12] = a[12];\n  n[13] = a[13];\n  n[14] = a[14];\n  n[15] = a[15];\n}\n\nDECLSPEC void mul_mod (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *a, PRIVATE_AS const u32 *b) // TODO get rid of u64 ?\n{\n  u32 t[16] = { 0 }; // we need up to double the space (2 * 8)\n\n  /*\n   * First start with the basic a * b multiplication:\n   */\n\n  u32 t0 = 0;\n  u32 t1 = 0;\n  u32 c  = 0;\n\n  for (u32 i = 0; i < 8; i++)\n  {\n    for (u32 j = 0; j <= i; j++)\n    {\n      u64 p = ((u64) a[j]) * b[i - j];\n\n      u64 d = ((u64) t1) << 32 | t0;\n\n      d += p;\n\n      t0 = (u32) d;\n      t1 = d >> 32;\n\n      c += d < p; // carry\n    }\n\n    t[i] = t0;\n\n    t0 = t1;\n    t1 = c;\n\n    c = 0;\n  }\n\n  for (u32 i = 8; i < 15; i++)\n  {\n    for (u32 j = i - 7; j < 8; j++)\n    {\n      u64 p = ((u64) a[j]) * b[i - j];\n\n      u64 d = ((u64) t1) << 32 | t0;\n\n      d += p;\n\n      t0 = (u32) d;\n      t1 = d >> 32;\n\n      c += d < p;\n    }\n\n    t[i] = t0;\n\n    t0 = t1;\n    t1 = c;\n\n    c = 0;\n  }\n\n  t[15] = t0;\n\n\n\n  /*\n   * Now do the modulo operation:\n   * (r = t % p)\n   *\n   * http://www.isys.uni-klu.ac.at/PDF/2001-0126-MT.pdf (p.354 or p.9 in that document)\n   */\n\n  u32 tmp[16] = { 0 };\n\n  // c = 0;\n\n  // Note: SECP256K1_P = 2^256 - 2^32 - 977 (0x03d1 = 977)\n  // multiply t[8]...t[15] by omega:\n\n  for (u32 i = 0, j = 8; i < 8; i++, j++)\n  {\n    u64 p = ((u64) 0x03d1) * t[j] + c;\n\n    tmp[i] = (u32) p;\n\n    c = p >> 32;\n  }\n\n  tmp[8] = c;\n\n  c = add (tmp + 1, tmp + 1, t + 8); // modifies tmp[1]...tmp[8]\n\n  tmp[9] = c;\n\n\n  // r = t + tmp\n\n  c = add (r, t, tmp);\n\n  // multiply t[0]...t[7] by omega:\n\n  u32 c2 = 0;\n\n  // memset (t, 0, sizeof (t));\n\n  for (u32 i = 0, j = 8; i < 8; i++, j++)\n  {\n    u64 p = ((u64) 0x3d1) * tmp[j] + c2;\n\n    t[i] = (u32) p;\n\n    c2 = p >> 32;\n  }\n\n  t[8] = c2;\n\n  c2 = add (t + 1, t + 1, tmp + 8); // modifies t[1]...t[8]\n\n  t[9] = c2;\n\n\n  // r = r + t\n\n  c2 = add (r, r, t);\n\n  c += c2;\n\n  t[0] = SECP256K1_P0;\n  t[1] = SECP256K1_P1;\n  t[2] = SECP256K1_P2;\n  t[3] = SECP256K1_P3;\n  t[4] = SECP256K1_P4;\n  t[5] = SECP256K1_P5;\n  t[6] = SECP256K1_P6;\n  t[7] = SECP256K1_P7;\n\n  for (u32 i = c; i > 0; i--)\n  {\n    sub (r, r, t);\n  }\n\n  for (int i = 7; i >= 0; i--)\n  {\n    if (r[i] < t[i]) break;\n\n    if (r[i] > t[i])\n    {\n      sub (r, r, t);\n\n      break;\n    }\n  }\n}\n\nDECLSPEC void sqrt_mod (PRIVATE_AS u32 *r)\n{\n  // Fermat's Little Theorem\n  // secp256k1: y^2 = x^3 + 7 % p\n  // y ^ (p - 1) = 1\n  // y ^ (p - 1) = (y^2) ^ ((p - 1) / 2) = 1 => y^2 = (y^2) ^ (((p - 1) / 2) + 1)\n  // => y = (y^2) ^ ((((p - 1) / 2) + 1) / 2)\n  // y = (y^2) ^ (((p - 1 + 2) / 2) / 2) = (y^2) ^ ((p + 1) / 4)\n\n  // y1 = (x^3 + 7) ^ ((p + 1) / 4)\n  // y2 = p - y1 (or y2 = y1 * -1 % p)\n\n  u32 s[8];\n\n  s[0] = SECP256K1_P0 + 1; //  because of (p + 1) / 4 or use add (s, s, 1)\n  s[1] = SECP256K1_P1;\n  s[2] = SECP256K1_P2;\n  s[3] = SECP256K1_P3;\n  s[4] = SECP256K1_P4;\n  s[5] = SECP256K1_P5;\n  s[6] = SECP256K1_P6;\n  s[7] = SECP256K1_P7;\n\n  u32 t[8] = { 0 };\n\n  t[0] = 1;\n\n  for (u32 i = 255; i > 1; i--) // we just skip the last 2 multiplications (=> exp / 4)\n  {\n    mul_mod (t, t, t); // r * r\n\n    u32 idx  = i >> 5;\n    u32 mask = 1 << (i & 0x1f);\n\n    if (s[idx] & mask)\n    {\n      mul_mod (t, t, r); // t * r\n    }\n  }\n\n  r[0] = t[0];\n  r[1] = t[1];\n  r[2] = t[2];\n  r[3] = t[3];\n  r[4] = t[4];\n  r[5] = t[5];\n  r[6] = t[6];\n  r[7] = t[7];\n}\n\n// (inverse (a, p) * a) % p == 1 (or think of a * a^-1 = a / a = 1)\n\nDECLSPEC void inv_mod (PRIVATE_AS u32 *a)\n{\n  // How often does this really happen? it should \"almost\" never happen (but would be safer)\n  // if ((a[0] | a[1] | a[2] | a[3] | a[4] | a[5] | a[6] | a[7]) == 0) return;\n\n  u32 t0[8];\n\n  t0[0] = a[0];\n  t0[1] = a[1];\n  t0[2] = a[2];\n  t0[3] = a[3];\n  t0[4] = a[4];\n  t0[5] = a[5];\n  t0[6] = a[6];\n  t0[7] = a[7];\n\n  u32 p[8];\n\n  p[0] = SECP256K1_P0;\n  p[1] = SECP256K1_P1;\n  p[2] = SECP256K1_P2;\n  p[3] = SECP256K1_P3;\n  p[4] = SECP256K1_P4;\n  p[5] = SECP256K1_P5;\n  p[6] = SECP256K1_P6;\n  p[7] = SECP256K1_P7;\n\n  u32 t1[8];\n\n  t1[0] = SECP256K1_P0;\n  t1[1] = SECP256K1_P1;\n  t1[2] = SECP256K1_P2;\n  t1[3] = SECP256K1_P3;\n  t1[4] = SECP256K1_P4;\n  t1[5] = SECP256K1_P5;\n  t1[6] = SECP256K1_P6;\n  t1[7] = SECP256K1_P7;\n\n  u32 t2[8] = { 0 };\n\n  t2[0] = 0x00000001;\n\n  u32 t3[8] = { 0 };\n\n  u32 b = (t0[0] != t1[0])\n        | (t0[1] != t1[1])\n        | (t0[2] != t1[2])\n        | (t0[3] != t1[3])\n        | (t0[4] != t1[4])\n        | (t0[5] != t1[5])\n        | (t0[6] != t1[6])\n        | (t0[7] != t1[7]);\n\n  while (b)\n  {\n    if ((t0[0] & 1) == 0) // even\n    {\n      t0[0] = t0[0] >> 1 | t0[1] << 31;\n      t0[1] = t0[1] >> 1 | t0[2] << 31;\n      t0[2] = t0[2] >> 1 | t0[3] << 31;\n      t0[3] = t0[3] >> 1 | t0[4] << 31;\n      t0[4] = t0[4] >> 1 | t0[5] << 31;\n      t0[5] = t0[5] >> 1 | t0[6] << 31;\n      t0[6] = t0[6] >> 1 | t0[7] << 31;\n      t0[7] = t0[7] >> 1;\n\n      u32 c = 0;\n\n      if (t2[0] & 1) c = add (t2, t2, p);\n\n      t2[0] = t2[0] >> 1 | t2[1] << 31;\n      t2[1] = t2[1] >> 1 | t2[2] << 31;\n      t2[2] = t2[2] >> 1 | t2[3] << 31;\n      t2[3] = t2[3] >> 1 | t2[4] << 31;\n      t2[4] = t2[4] >> 1 | t2[5] << 31;\n      t2[5] = t2[5] >> 1 | t2[6] << 31;\n      t2[6] = t2[6] >> 1 | t2[7] << 31;\n      t2[7] = t2[7] >> 1 | c     << 31;\n    }\n    else if ((t1[0] & 1) == 0)\n    {\n      t1[0] = t1[0] >> 1 | t1[1] << 31;\n      t1[1] = t1[1] >> 1 | t1[2] << 31;\n      t1[2] = t1[2] >> 1 | t1[3] << 31;\n      t1[3] = t1[3] >> 1 | t1[4] << 31;\n      t1[4] = t1[4] >> 1 | t1[5] << 31;\n      t1[5] = t1[5] >> 1 | t1[6] << 31;\n      t1[6] = t1[6] >> 1 | t1[7] << 31;\n      t1[7] = t1[7] >> 1;\n\n      u32 c = 0;\n\n      if (t3[0] & 1) c = add (t3, t3, p);\n\n      t3[0] = t3[0] >> 1 | t3[1] << 31;\n      t3[1] = t3[1] >> 1 | t3[2] << 31;\n      t3[2] = t3[2] >> 1 | t3[3] << 31;\n      t3[3] = t3[3] >> 1 | t3[4] << 31;\n      t3[4] = t3[4] >> 1 | t3[5] << 31;\n      t3[5] = t3[5] >> 1 | t3[6] << 31;\n      t3[6] = t3[6] >> 1 | t3[7] << 31;\n      t3[7] = t3[7] >> 1 | c     << 31;\n    }\n    else\n    {\n      u32 gt = 0;\n\n      for (int i = 7; i >= 0; i--)\n      {\n        if (t0[i] > t1[i])\n        {\n          gt = 1;\n\n          break;\n        }\n\n        if (t0[i] < t1[i]) break;\n      }\n\n      if (gt)\n      {\n        sub (t0, t0, t1);\n\n        t0[0] = t0[0] >> 1 | t0[1] << 31;\n        t0[1] = t0[1] >> 1 | t0[2] << 31;\n        t0[2] = t0[2] >> 1 | t0[3] << 31;\n        t0[3] = t0[3] >> 1 | t0[4] << 31;\n        t0[4] = t0[4] >> 1 | t0[5] << 31;\n        t0[5] = t0[5] >> 1 | t0[6] << 31;\n        t0[6] = t0[6] >> 1 | t0[7] << 31;\n        t0[7] = t0[7] >> 1;\n\n        u32 lt = 0;\n\n        for (int i = 7; i >= 0; i--)\n        {\n          if (t2[i] < t3[i])\n          {\n            lt = 1;\n\n            break;\n          }\n\n          if (t2[i] > t3[i]) break;\n        }\n\n        if (lt) add (t2, t2, p);\n\n        sub (t2, t2, t3);\n\n        u32 c = 0;\n\n        if (t2[0] & 1) c = add (t2, t2, p);\n\n        t2[0] = t2[0] >> 1 | t2[1] << 31;\n        t2[1] = t2[1] >> 1 | t2[2] << 31;\n        t2[2] = t2[2] >> 1 | t2[3] << 31;\n        t2[3] = t2[3] >> 1 | t2[4] << 31;\n        t2[4] = t2[4] >> 1 | t2[5] << 31;\n        t2[5] = t2[5] >> 1 | t2[6] << 31;\n        t2[6] = t2[6] >> 1 | t2[7] << 31;\n        t2[7] = t2[7] >> 1 | c     << 31;\n      }\n      else\n      {\n        sub (t1, t1, t0);\n\n        t1[0] = t1[0] >> 1 | t1[1] << 31;\n        t1[1] = t1[1] >> 1 | t1[2] << 31;\n        t1[2] = t1[2] >> 1 | t1[3] << 31;\n        t1[3] = t1[3] >> 1 | t1[4] << 31;\n        t1[4] = t1[4] >> 1 | t1[5] << 31;\n        t1[5] = t1[5] >> 1 | t1[6] << 31;\n        t1[6] = t1[6] >> 1 | t1[7] << 31;\n        t1[7] = t1[7] >> 1;\n\n        u32 lt = 0;\n\n        for (int i = 7; i >= 0; i--)\n        {\n          if (t3[i] < t2[i])\n          {\n            lt = 1;\n\n            break;\n          }\n\n          if (t3[i] > t2[i]) break;\n        }\n\n        if (lt) add (t3, t3, p);\n\n        sub (t3, t3, t2);\n\n        u32 c = 0;\n\n        if (t3[0] & 1) c = add (t3, t3, p);\n\n        t3[0] = t3[0] >> 1 | t3[1] << 31;\n        t3[1] = t3[1] >> 1 | t3[2] << 31;\n        t3[2] = t3[2] >> 1 | t3[3] << 31;\n        t3[3] = t3[3] >> 1 | t3[4] << 31;\n        t3[4] = t3[4] >> 1 | t3[5] << 31;\n        t3[5] = t3[5] >> 1 | t3[6] << 31;\n        t3[6] = t3[6] >> 1 | t3[7] << 31;\n        t3[7] = t3[7] >> 1 | c     << 31;\n      }\n    }\n\n    // update b:\n\n    b = (t0[0] != t1[0])\n      | (t0[1] != t1[1])\n      | (t0[2] != t1[2])\n      | (t0[3] != t1[3])\n      | (t0[4] != t1[4])\n      | (t0[5] != t1[5])\n      | (t0[6] != t1[6])\n      | (t0[7] != t1[7]);\n  }\n\n  // set result:\n\n  a[0] = t2[0];\n  a[1] = t2[1];\n  a[2] = t2[2];\n  a[3] = t2[3];\n  a[4] = t2[4];\n  a[5] = t2[5];\n  a[6] = t2[6];\n  a[7] = t2[7];\n}\n\n/*\n  // everything from the formulas below of course MOD the prime:\n\n  // we use this formula:\n\n  X = (3/2 * x^2)^2 - 2 * x * y^2\n  Y = (3/2 * x^2) * (x * y^2 - X) - y^4\n  Z = y * z\n\n  this is identical to the more frequently used form:\n\n  X = (3 * x^2)^2 - 8 * x * y^2\n  Y =  3 * x^2 * (4 * x * y^2 - X) - 8 * y^4\n  Z =  2 * y * z\n*/\n\nDECLSPEC void point_double (PRIVATE_AS u32 *x, PRIVATE_AS u32 *y, PRIVATE_AS u32 *z)\n{\n  // How often does this really happen? it should \"almost\" never happen (but would be safer)\n\n  /*\n  if ((y[0] | y[1] | y[2] | y[3] | y[4] | y[5] | y[6] | y[7]) == 0)\n  {\n    x[0] = 0;\n    x[1] = 0;\n    x[2] = 0;\n    x[3] = 0;\n    x[4] = 0;\n    x[5] = 0;\n    x[6] = 0;\n    x[7] = 0;\n\n    y[0] = 0;\n    y[1] = 0;\n    y[2] = 0;\n    y[3] = 0;\n    y[4] = 0;\n    y[5] = 0;\n    y[6] = 0;\n    y[7] = 0;\n\n    z[0] = 0;\n    z[1] = 0;\n    z[2] = 0;\n    z[3] = 0;\n    z[4] = 0;\n    z[5] = 0;\n    z[6] = 0;\n    z[7] = 0;\n\n    return;\n  }\n  */\n\n  u32 t1[8];\n\n  t1[0] = x[0];\n  t1[1] = x[1];\n  t1[2] = x[2];\n  t1[3] = x[3];\n  t1[4] = x[4];\n  t1[5] = x[5];\n  t1[6] = x[6];\n  t1[7] = x[7];\n\n  u32 t2[8];\n\n  t2[0] = y[0];\n  t2[1] = y[1];\n  t2[2] = y[2];\n  t2[3] = y[3];\n  t2[4] = y[4];\n  t2[5] = y[5];\n  t2[6] = y[6];\n  t2[7] = y[7];\n\n  u32 t3[8];\n\n  t3[0] = z[0];\n  t3[1] = z[1];\n  t3[2] = z[2];\n  t3[3] = z[3];\n  t3[4] = z[4];\n  t3[5] = z[5];\n  t3[6] = z[6];\n  t3[7] = z[7];\n\n  u32 t4[8];\n  u32 t5[8];\n  u32 t6[8];\n\n  mul_mod (t4, t1, t1); // t4 = x^2\n\n  mul_mod (t5, t2, t2); // t5 = y^2\n\n  mul_mod (t1, t1, t5); // t1 = x*y^2\n\n  mul_mod (t5, t5, t5); // t5 = t5^2 = y^4\n\n  // here the z^2 and z^4 is not needed for a = 0\n\n  mul_mod (t3, t2, t3); // t3 = x * z\n\n  add_mod (t2, t4, t4); // t2 = 2 * t4 = 2 * x^2\n  add_mod (t4, t4, t2); // t4 = 3 * t4 = 3 * x^2\n\n  // a * z^4 = 0 * 1^4 = 0\n\n  // don't discard the least significant bit it's important too!\n\n  u32 c = 0;\n\n  if (t4[0] & 1)\n  {\n    u32 t[8];\n\n    t[0] = SECP256K1_P0;\n    t[1] = SECP256K1_P1;\n    t[2] = SECP256K1_P2;\n    t[3] = SECP256K1_P3;\n    t[4] = SECP256K1_P4;\n    t[5] = SECP256K1_P5;\n    t[6] = SECP256K1_P6;\n    t[7] = SECP256K1_P7;\n\n    c = add (t4, t4, t); // t4 + SECP256K1_P\n  }\n\n  // right shift (t4 / 2):\n\n  t4[0] = t4[0] >> 1 | t4[1] << 31;\n  t4[1] = t4[1] >> 1 | t4[2] << 31;\n  t4[2] = t4[2] >> 1 | t4[3] << 31;\n  t4[3] = t4[3] >> 1 | t4[4] << 31;\n  t4[4] = t4[4] >> 1 | t4[5] << 31;\n  t4[5] = t4[5] >> 1 | t4[6] << 31;\n  t4[6] = t4[6] >> 1 | t4[7] << 31;\n  t4[7] = t4[7] >> 1 | c     << 31;\n\n  mul_mod (t6, t4, t4); // t6 = t4^2 = (3/2 * x^2)^2\n\n  add_mod (t2, t1, t1); // t2 = 2 * t1\n\n  sub_mod (t6, t6, t2); // t6 = t6 - t2\n  sub_mod (t1, t1, t6); // t1 = t1 - t6\n\n  mul_mod (t4, t4, t1); // t4 = t4 * t1\n\n  sub_mod (t1, t4, t5); // t1 = t4 - t5\n\n  // => x = t6, y = t1, z = t3:\n\n  x[0] = t6[0];\n  x[1] = t6[1];\n  x[2] = t6[2];\n  x[3] = t6[3];\n  x[4] = t6[4];\n  x[5] = t6[5];\n  x[6] = t6[6];\n  x[7] = t6[7];\n\n  y[0] = t1[0];\n  y[1] = t1[1];\n  y[2] = t1[2];\n  y[3] = t1[3];\n  y[4] = t1[4];\n  y[5] = t1[5];\n  y[6] = t1[6];\n  y[7] = t1[7];\n\n  z[0] = t3[0];\n  z[1] = t3[1];\n  z[2] = t3[2];\n  z[3] = t3[3];\n  z[4] = t3[4];\n  z[5] = t3[5];\n  z[6] = t3[6];\n  z[7] = t3[7];\n}\n\n/*\n * madd-2004-hmv:\n * (from https://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html)\n * t1 = z1^2\n * t2 = t1*z1\n * t1 = t1*x2\n * t2 = t2*y2\n * t1 = t1-x1\n * t2 = t2-y1\n * z3 = z1*t1\n * t3 = t1^2\n * t4 = t3*t1\n * t3 = t3*x1\n * t1 = 2*t3\n * x3 = t2^2\n * x3 = x3-t1\n * x3 = x3-t4\n * t3 = t3-x3\n * t3 = t3*t2\n * t4 = t4*y1\n * y3 = t3-t4\n */\n\nDECLSPEC void point_add (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS u32 *z1, PRIVATE_AS const u32 *x2, PRIVATE_AS const u32 *y2) // z2 = 1\n{\n  // How often does this really happen? it should \"almost\" never happen (but would be safer)\n\n  /*\n  if ((y2[0] | y2[1] | y2[2] | y2[3] | y2[4] | y2[5] | y2[6] | y2[7]) == 0) return;\n\n  if ((y1[0] | y1[1] | y1[2] | y1[3] | y1[4] | y1[5] | y1[6] | y1[7]) == 0)\n  {\n    x1[0] = x2[0];\n    x1[1] = x2[1];\n    x1[2] = x2[2];\n    x1[3] = x2[3];\n    x1[4] = x2[4];\n    x1[5] = x2[5];\n    x1[6] = x2[6];\n    x1[7] = x2[7];\n\n    y1[0] = y2[0];\n    y1[1] = y2[1];\n    y1[2] = y2[2];\n    y1[3] = y2[3];\n    y1[4] = y2[4];\n    y1[5] = y2[5];\n    y1[6] = y2[6];\n    y1[7] = y2[7];\n\n    z1[0] = z2[0];\n    z1[1] = z2[1];\n    z1[2] = z2[2];\n    z1[3] = z2[3];\n    z1[4] = z2[4];\n    z1[5] = z2[5];\n    z1[6] = z2[6];\n    z1[7] = z2[7];\n\n    return;\n  }\n  */\n\n  // if x1 == x2 and y2 == y2 and z2 == z2 we need to double instead?\n\n  // x1/y1/z1:\n\n  u32 t1[8];\n\n  t1[0] = x1[0];\n  t1[1] = x1[1];\n  t1[2] = x1[2];\n  t1[3] = x1[3];\n  t1[4] = x1[4];\n  t1[5] = x1[5];\n  t1[6] = x1[6];\n  t1[7] = x1[7];\n\n  u32 t2[8];\n\n  t2[0] = y1[0];\n  t2[1] = y1[1];\n  t2[2] = y1[2];\n  t2[3] = y1[3];\n  t2[4] = y1[4];\n  t2[5] = y1[5];\n  t2[6] = y1[6];\n  t2[7] = y1[7];\n\n  u32 t3[8];\n\n  t3[0] = z1[0];\n  t3[1] = z1[1];\n  t3[2] = z1[2];\n  t3[3] = z1[3];\n  t3[4] = z1[4];\n  t3[5] = z1[5];\n  t3[6] = z1[6];\n  t3[7] = z1[7];\n\n  // x2/y2:\n\n  u32 t4[8];\n\n  t4[0] = x2[0];\n  t4[1] = x2[1];\n  t4[2] = x2[2];\n  t4[3] = x2[3];\n  t4[4] = x2[4];\n  t4[5] = x2[5];\n  t4[6] = x2[6];\n  t4[7] = x2[7];\n\n  u32 t5[8];\n\n  t5[0] = y2[0];\n  t5[1] = y2[1];\n  t5[2] = y2[2];\n  t5[3] = y2[3];\n  t5[4] = y2[4];\n  t5[5] = y2[5];\n  t5[6] = y2[6];\n  t5[7] = y2[7];\n\n  u32 t6[8];\n  u32 t7[8];\n  u32 t8[8];\n  u32 t9[8];\n\n  mul_mod (t6, t3, t3); // t6 = t3^2\n\n  mul_mod (t7, t6, t3); // t7 = t6*t3\n  mul_mod (t6, t6, t4); // t6 = t6*t4\n  mul_mod (t7, t7, t5); // t7 = t7*t5\n\n  sub_mod (t6, t6, t1); // t6 = t6-t1\n  sub_mod (t7, t7, t2); // t7 = t7-t2\n\n  mul_mod (t8, t3, t6); // t8 = t3*t6\n  mul_mod (t4, t6, t6); // t4 = t6^2\n  mul_mod (t9, t4, t6); // t9 = t4*t6\n  mul_mod (t4, t4, t1); // t4 = t4*t1\n\n  // left shift (t4 * 2):\n\n  t6[7] = t4[7] << 1 | t4[6] >> 31;\n  t6[6] = t4[6] << 1 | t4[5] >> 31;\n  t6[5] = t4[5] << 1 | t4[4] >> 31;\n  t6[4] = t4[4] << 1 | t4[3] >> 31;\n  t6[3] = t4[3] << 1 | t4[2] >> 31;\n  t6[2] = t4[2] << 1 | t4[1] >> 31;\n  t6[1] = t4[1] << 1 | t4[0] >> 31;\n  t6[0] = t4[0] << 1;\n\n  // don't discard the most significant bit, it's important too!\n\n  if (t4[7] & 0x80000000)\n  {\n    // use most significant bit and perform mod P, since we have: t4 * 2 % P\n\n    u32 a[8] = { 0 };\n\n    a[1] = 1;\n    a[0] = 0x000003d1; // omega (see: mul_mod ())\n\n    add (t6, t6, a);\n  }\n\n  mul_mod (t5, t7, t7); // t5 = t7*t7\n\n  sub_mod (t5, t5, t6); // t5 = t5-t6\n  sub_mod (t5, t5, t9); // t5 = t5-t9\n  sub_mod (t4, t4, t5); // t4 = t4-t5\n\n  mul_mod (t4, t4, t7); // t4 = t4*t7\n  mul_mod (t9, t9, t2); // t9 = t9*t2\n\n  sub_mod (t9, t4, t9); // t9 = t4-t9\n\n  x1[0] = t5[0];\n  x1[1] = t5[1];\n  x1[2] = t5[2];\n  x1[3] = t5[3];\n  x1[4] = t5[4];\n  x1[5] = t5[5];\n  x1[6] = t5[6];\n  x1[7] = t5[7];\n\n  y1[0] = t9[0];\n  y1[1] = t9[1];\n  y1[2] = t9[2];\n  y1[3] = t9[3];\n  y1[4] = t9[4];\n  y1[5] = t9[5];\n  y1[6] = t9[6];\n  y1[7] = t9[7];\n\n  z1[0] = t8[0];\n  z1[1] = t8[1];\n  z1[2] = t8[2];\n  z1[3] = t8[3];\n  z1[4] = t8[4];\n  z1[5] = t8[5];\n  z1[6] = t8[6];\n  z1[7] = t8[7];\n}\n\nDECLSPEC void point_get_coords (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y)\n{\n  /*\n    pre-compute 1/-1, 3/-3, 5/-5, 7/-7 times P (x, y)\n    for wNAF with window size 4 (max/min: +/- 2^3-1): -7, -5, -3, -1, 1, 3, 5, 7\n\n    +x1 ( 0)\n    +y1 ( 8)\n    -y1 (16)\n\n    +x3 (24)\n    +y3 (32)\n    -y3 (40)\n\n    +x5 (48)\n    +y5 (56)\n    -y5 (64)\n\n    +x7 (72)\n    +y7 (80)\n    -y7 (88)\n   */\n\n  // note: we use jacobian forms with (x, y, z) for computation, but affine\n  // (or just converted to z = 1) for storage\n\n  // 1:\n\n  r->xy[ 0] = x[0];\n  r->xy[ 1] = x[1];\n  r->xy[ 2] = x[2];\n  r->xy[ 3] = x[3];\n  r->xy[ 4] = x[4];\n  r->xy[ 5] = x[5];\n  r->xy[ 6] = x[6];\n  r->xy[ 7] = x[7];\n\n  r->xy[ 8] = y[0];\n  r->xy[ 9] = y[1];\n  r->xy[10] = y[2];\n  r->xy[11] = y[3];\n  r->xy[12] = y[4];\n  r->xy[13] = y[5];\n  r->xy[14] = y[6];\n  r->xy[15] = y[7];\n\n  // -1:\n\n  u32 p[8];\n\n  p[0] = SECP256K1_P0;\n  p[1] = SECP256K1_P1;\n  p[2] = SECP256K1_P2;\n  p[3] = SECP256K1_P3;\n  p[4] = SECP256K1_P4;\n  p[5] = SECP256K1_P5;\n  p[6] = SECP256K1_P6;\n  p[7] = SECP256K1_P7;\n\n  u32 neg[8];\n\n  neg[0] = y[0];\n  neg[1] = y[1];\n  neg[2] = y[2];\n  neg[3] = y[3];\n  neg[4] = y[4];\n  neg[5] = y[5];\n  neg[6] = y[6];\n  neg[7] = y[7];\n\n  sub_mod (neg, p, neg); // -y = p - y\n\n  r->xy[16] = neg[0];\n  r->xy[17] = neg[1];\n  r->xy[18] = neg[2];\n  r->xy[19] = neg[3];\n  r->xy[20] = neg[4];\n  r->xy[21] = neg[5];\n  r->xy[22] = neg[6];\n  r->xy[23] = neg[7];\n\n\n  // copy of 1:\n\n  u32 tx[8];\n\n  tx[0] = x[0];\n  tx[1] = x[1];\n  tx[2] = x[2];\n  tx[3] = x[3];\n  tx[4] = x[4];\n  tx[5] = x[5];\n  tx[6] = x[6];\n  tx[7] = x[7];\n\n  u32 ty[8];\n\n  ty[0] = y[0];\n  ty[1] = y[1];\n  ty[2] = y[2];\n  ty[3] = y[3];\n  ty[4] = y[4];\n  ty[5] = y[5];\n  ty[6] = y[6];\n  ty[7] = y[7];\n\n  u32 rx[8];\n\n  rx[0] = x[0];\n  rx[1] = x[1];\n  rx[2] = x[2];\n  rx[3] = x[3];\n  rx[4] = x[4];\n  rx[5] = x[5];\n  rx[6] = x[6];\n  rx[7] = x[7];\n\n  u32 ry[8];\n\n  ry[0] = y[0];\n  ry[1] = y[1];\n  ry[2] = y[2];\n  ry[3] = y[3];\n  ry[4] = y[4];\n  ry[5] = y[5];\n  ry[6] = y[6];\n  ry[7] = y[7];\n\n  u32 rz[8] = { 0 };\n\n  rz[0] = 1;\n\n\n  // 3:\n\n  point_double (rx, ry, rz);          // 2\n  point_add    (rx, ry, rz, tx, ty);  // 3\n\n  // to affine:\n\n  inv_mod (rz);\n\n  mul_mod (neg, rz, rz); // neg is temporary variable (z^2)\n  mul_mod (rx,  rx, neg);\n\n  mul_mod (rz, neg, rz);\n  mul_mod (ry, ry, rz);\n\n  r->xy[24] = rx[0];\n  r->xy[25] = rx[1];\n  r->xy[26] = rx[2];\n  r->xy[27] = rx[3];\n  r->xy[28] = rx[4];\n  r->xy[29] = rx[5];\n  r->xy[30] = rx[6];\n  r->xy[31] = rx[7];\n\n  r->xy[32] = ry[0];\n  r->xy[33] = ry[1];\n  r->xy[34] = ry[2];\n  r->xy[35] = ry[3];\n  r->xy[36] = ry[4];\n  r->xy[37] = ry[5];\n  r->xy[38] = ry[6];\n  r->xy[39] = ry[7];\n\n  // -3:\n\n  neg[0] = ry[0];\n  neg[1] = ry[1];\n  neg[2] = ry[2];\n  neg[3] = ry[3];\n  neg[4] = ry[4];\n  neg[5] = ry[5];\n  neg[6] = ry[6];\n  neg[7] = ry[7];\n\n  sub_mod (neg, p, neg);\n\n  r->xy[40] = neg[0];\n  r->xy[41] = neg[1];\n  r->xy[42] = neg[2];\n  r->xy[43] = neg[3];\n  r->xy[44] = neg[4];\n  r->xy[45] = neg[5];\n  r->xy[46] = neg[6];\n  r->xy[47] = neg[7];\n\n\n  // 5:\n\n  rz[0] = 1; // actually we could take advantage of rz being 1 too (alternative point_add ()),\n  rz[1] = 0; // but it is not important because this is performed only once per \"hash\"\n  rz[2] = 0;\n  rz[3] = 0;\n  rz[4] = 0;\n  rz[5] = 0;\n  rz[6] = 0;\n  rz[7] = 0;\n\n  point_add (rx, ry, rz, tx, ty); // 4\n  point_add (rx, ry, rz, tx, ty); // 5\n\n  // to affine:\n\n  inv_mod (rz);\n\n  mul_mod (neg, rz, rz);\n  mul_mod (rx,  rx, neg);\n\n  mul_mod (rz, neg, rz);\n  mul_mod (ry, ry, rz);\n\n  r->xy[48] = rx[0];\n  r->xy[49] = rx[1];\n  r->xy[50] = rx[2];\n  r->xy[51] = rx[3];\n  r->xy[52] = rx[4];\n  r->xy[53] = rx[5];\n  r->xy[54] = rx[6];\n  r->xy[55] = rx[7];\n\n  r->xy[56] = ry[0];\n  r->xy[57] = ry[1];\n  r->xy[58] = ry[2];\n  r->xy[59] = ry[3];\n  r->xy[60] = ry[4];\n  r->xy[61] = ry[5];\n  r->xy[62] = ry[6];\n  r->xy[63] = ry[7];\n\n  // -5:\n\n  neg[0] = ry[0];\n  neg[1] = ry[1];\n  neg[2] = ry[2];\n  neg[3] = ry[3];\n  neg[4] = ry[4];\n  neg[5] = ry[5];\n  neg[6] = ry[6];\n  neg[7] = ry[7];\n\n  sub_mod (neg, p, neg);\n\n  r->xy[64] = neg[0];\n  r->xy[65] = neg[1];\n  r->xy[66] = neg[2];\n  r->xy[67] = neg[3];\n  r->xy[68] = neg[4];\n  r->xy[69] = neg[5];\n  r->xy[70] = neg[6];\n  r->xy[71] = neg[7];\n\n\n  // 7:\n\n  rz[0] = 1;\n  rz[1] = 0;\n  rz[2] = 0;\n  rz[3] = 0;\n  rz[4] = 0;\n  rz[5] = 0;\n  rz[6] = 0;\n  rz[7] = 0;\n\n  point_add (rx, ry, rz, tx, ty); // 6\n  point_add (rx, ry, rz, tx, ty); // 7\n\n  // to affine:\n\n  inv_mod (rz);\n\n  mul_mod (neg, rz, rz);\n  mul_mod (rx,  rx, neg);\n\n  mul_mod (rz, neg, rz);\n  mul_mod (ry, ry, rz);\n\n  r->xy[72] = rx[0];\n  r->xy[73] = rx[1];\n  r->xy[74] = rx[2];\n  r->xy[75] = rx[3];\n  r->xy[76] = rx[4];\n  r->xy[77] = rx[5];\n  r->xy[78] = rx[6];\n  r->xy[79] = rx[7];\n\n  r->xy[80] = ry[0];\n  r->xy[81] = ry[1];\n  r->xy[82] = ry[2];\n  r->xy[83] = ry[3];\n  r->xy[84] = ry[4];\n  r->xy[85] = ry[5];\n  r->xy[86] = ry[6];\n  r->xy[87] = ry[7];\n\n  // -7:\n\n  neg[0] = ry[0];\n  neg[1] = ry[1];\n  neg[2] = ry[2];\n  neg[3] = ry[3];\n  neg[4] = ry[4];\n  neg[5] = ry[5];\n  neg[6] = ry[6];\n  neg[7] = ry[7];\n\n  sub_mod (neg, p, neg);\n\n  r->xy[88] = neg[0];\n  r->xy[89] = neg[1];\n  r->xy[90] = neg[2];\n  r->xy[91] = neg[3];\n  r->xy[92] = neg[4];\n  r->xy[93] = neg[5];\n  r->xy[94] = neg[6];\n  r->xy[95] = neg[7];\n}\n\n/*\n * Convert the tweak/scalar k to w-NAF (window size is 4).\n * @param naf out: w-NAF form of the tweak/scalar, a pointer to an u32 array with a size of 33.\n * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8.\n * @return Returns the loop start index.\n */\nDECLSPEC int convert_to_window_naf (PRIVATE_AS u32 *naf, PRIVATE_AS const u32 *k)\n{\n  int loop_start = 0;\n\n  u32 n[9];\n\n  n[0] =    0; // we need this extra slot sometimes for the subtraction to work\n  n[1] = k[7];\n  n[2] = k[6];\n  n[3] = k[5];\n  n[4] = k[4];\n  n[5] = k[3];\n  n[6] = k[2];\n  n[7] = k[1];\n  n[8] = k[0];\n\n  for (int i = 0; i <= 256; i++)\n  {\n    if (n[8] & 1)\n    {\n      // for window size w = 4:\n      // => 2^(w-0) = 2^4 = 16 (0x10)\n      // => 2^(w-1) = 2^3 =  8 (0x08)\n\n      int diff = n[8] & 0x0f; // n % 2^w == n & (2^w - 1)\n\n      // convert diff to val according to this table:\n      //  1 -> +1 -> 1\n      //  3 -> +3 -> 3\n      //  5 -> +5 -> 5\n      //  7 -> +7 -> 7\n      //  9 -> -7 -> 8\n      // 11 -> -5 -> 6\n      // 13 -> -3 -> 4\n      // 15 -> -1 -> 2\n\n      int val = diff;\n\n      if (diff >= 0x08)\n      {\n        diff -= 0x10;\n\n        val = 0x11 - val;\n      }\n\n      naf[i >> 3] |= val << ((i & 7) << 2);\n\n      u32 t = n[8]; // t is the (temporary) old/unmodified value\n\n      n[8] -= diff;\n\n      // we need to take care of the carry/borrow:\n\n      u32 k = 8;\n\n      if (diff > 0)\n      {\n        while (n[k] > t) // overflow propagation\n        {\n          if (k == 0) break; // needed ?\n\n          k--;\n\n          t = n[k];\n\n          n[k]--;\n        }\n      }\n      else // if (diff < 0)\n      {\n        while (t > n[k]) // overflow propagation\n        {\n          if (k == 0) break;\n\n          k--;\n\n          t = n[k];\n\n          n[k]++;\n        }\n      }\n\n      // update start:\n\n      loop_start = i;\n    }\n\n    // n = n / 2:\n\n    n[8] = n[8] >> 1 | n[7] << 31;\n    n[7] = n[7] >> 1 | n[6] << 31;\n    n[6] = n[6] >> 1 | n[5] << 31;\n    n[5] = n[5] >> 1 | n[4] << 31;\n    n[4] = n[4] >> 1 | n[3] << 31;\n    n[3] = n[3] >> 1 | n[2] << 31;\n    n[2] = n[2] >> 1 | n[1] << 31;\n    n[1] = n[1] >> 1 | n[0] << 31;\n    n[0] = n[0] >> 1;\n  }\n\n  return loop_start;\n}\n\n/*\n * @param x1 out: x coordinate, a pointer to an u32 array with a size of 8.\n * @param y1 out: y coordinate, a pointer to an u32 array with a size of 8.\n * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8.\n * @param tmps in: a basepoint for the multiplication.\n * @return Returns the x coordinate with a leading parity/sign (for odd/even y), it is named a compressed coordinate.\n */\nDECLSPEC void point_mul_xy (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS const u32 *k, SECP256K1_TMPS_TYPE const secp256k1_t *tmps)\n{\n  u32 naf[SECP256K1_NAF_SIZE] = { 0 };\n\n  int loop_start = convert_to_window_naf (naf, k);\n\n  // first set:\n\n  const u32 multiplier = (naf[loop_start >> 3] >> ((loop_start & 7) << 2)) & 0x0f; // or use u8 ?\n\n  const u32 odd = multiplier & 1;\n\n  const u32 x_pos = ((multiplier - 1 + odd) >> 1) * 24;\n  const u32 y_pos = odd ? (x_pos + 8) : (x_pos + 16);\n\n\n  x1[0] = tmps->xy[x_pos + 0];\n  x1[1] = tmps->xy[x_pos + 1];\n  x1[2] = tmps->xy[x_pos + 2];\n  x1[3] = tmps->xy[x_pos + 3];\n  x1[4] = tmps->xy[x_pos + 4];\n  x1[5] = tmps->xy[x_pos + 5];\n  x1[6] = tmps->xy[x_pos + 6];\n  x1[7] = tmps->xy[x_pos + 7];\n\n  y1[0] = tmps->xy[y_pos + 0];\n  y1[1] = tmps->xy[y_pos + 1];\n  y1[2] = tmps->xy[y_pos + 2];\n  y1[3] = tmps->xy[y_pos + 3];\n  y1[4] = tmps->xy[y_pos + 4];\n  y1[5] = tmps->xy[y_pos + 5];\n  y1[6] = tmps->xy[y_pos + 6];\n  y1[7] = tmps->xy[y_pos + 7];\n\n  u32 z1[8] = { 0 };\n\n  z1[0] = 1;\n\n  /*\n   * Start:\n   */\n\n  // main loop (left-to-right binary algorithm):\n\n  for (int pos = loop_start - 1; pos >= 0; pos--) // -1 because we've set/add the point already\n  {\n    // always double:\n\n    point_double (x1, y1, z1);\n\n    // add only if needed:\n\n    const u32 multiplier = (naf[pos >> 3] >> ((pos & 7) << 2)) & 0x0f;\n\n    if (multiplier)\n    {\n      /*\n        m ->  y | y = ((m - (m & 1)) / 2) * 24\n        ----------------------------------\n        1 ->  0 | 1/2 * 24 = 0\n        2 -> 16\n        3 -> 24 | 3/2 * 24 = 24\n        4 -> 40\n        5 -> 48 | 5/2 * 24 = 2*24\n        6 -> 64\n        7 -> 72 | 7/2 * 24 = 3*24\n        8 -> 88\n       */\n\n      const u32 odd = multiplier & 1;\n\n      const u32 x_pos = ((multiplier - 1 + odd) >> 1) * 24;\n      const u32 y_pos = odd ? (x_pos + 8) : (x_pos + 16);\n\n      u32 x2[8];\n\n      x2[0] = tmps->xy[x_pos + 0];\n      x2[1] = tmps->xy[x_pos + 1];\n      x2[2] = tmps->xy[x_pos + 2];\n      x2[3] = tmps->xy[x_pos + 3];\n      x2[4] = tmps->xy[x_pos + 4];\n      x2[5] = tmps->xy[x_pos + 5];\n      x2[6] = tmps->xy[x_pos + 6];\n      x2[7] = tmps->xy[x_pos + 7];\n\n      u32 y2[8];\n\n      y2[0] = tmps->xy[y_pos + 0];\n      y2[1] = tmps->xy[y_pos + 1];\n      y2[2] = tmps->xy[y_pos + 2];\n      y2[3] = tmps->xy[y_pos + 3];\n      y2[4] = tmps->xy[y_pos + 4];\n      y2[5] = tmps->xy[y_pos + 5];\n      y2[6] = tmps->xy[y_pos + 6];\n      y2[7] = tmps->xy[y_pos + 7];\n\n      // (x1, y1, z1) + multiplier * (x, y, z) = (x1, y1, z1) + (x2, y2, z2)\n\n      point_add (x1, y1, z1, x2, y2);\n\n      // optimization (there can't be any adds after an add for w-1 times):\n      // (but it seems to be faster without this manipulation of \"pos\")\n\n      //for (u32 i = 0; i < 3; i++)\n      //{\n      //  if (pos == 0) break;\n      //  point_double (x1, y1, z1);\n      //  pos--;\n      //}\n    }\n  }\n\n\n  /*\n   * Get the corresponding affine coordinates x/y:\n   *\n   * Note:\n   * x1_affine = x1_jacobian / z1^2 = x1_jacobian * z1_inv^2\n   * y1_affine = y1_jacobian / z1^2 = y1_jacobian * z1_inv^2\n   *\n   */\n\n  inv_mod (z1);\n\n  u32 z2[8];\n\n  mul_mod (z2, z1, z1); // z1^2\n  mul_mod (x1, x1, z2); // x1_affine\n\n  mul_mod (z1, z2, z1); // z1^3\n  mul_mod (y1, y1, z1); // y1_affine\n\n  // return values are already in x1 and y1\n}\n\n/*\n * @param r out: x coordinate with leading parity/sign (for odd/even y), a pointer to an u32 array with a size of 9.\n * @param k in: tweak/scalar which should be converted, a pointer to an u32 array with a size of 8.\n * @param tmps in: a basepoint for the multiplication.\n * @return Returns the x coordinate with a leading parity/sign (for odd/even y), it is named a compressed coordinate.\n */\nDECLSPEC void point_mul (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *k, SECP256K1_TMPS_TYPE const secp256k1_t *tmps)\n{\n  u32 x[8];\n  u32 y[8];\n\n  point_mul_xy (x, y, k, tmps);\n\n  /*\n   * output:\n   */\n\n  // shift by 1 byte (8 bits) to make room and add the parity/sign (for odd/even y):\n\n  r[8] =               (x[0] << 24);\n  r[7] = (x[0] >> 8) | (x[1] << 24);\n  r[6] = (x[1] >> 8) | (x[2] << 24);\n  r[5] = (x[2] >> 8) | (x[3] << 24);\n  r[4] = (x[3] >> 8) | (x[4] << 24);\n  r[3] = (x[4] >> 8) | (x[5] << 24);\n  r[2] = (x[5] >> 8) | (x[6] << 24);\n  r[1] = (x[6] >> 8) | (x[7] << 24);\n  r[0] = (x[7] >> 8);\n\n  const u32 type = 0x02 | (y[0] & 1); // (note: 0b10 | 0b01 = 0x03)\n\n  r[0] = r[0] | type << 24; // 0x02 or 0x03\n}\n\n/*\n * Transform a x coordinate and separate parity to secp256k1_t.\n * @param r out: x and y coordinates.\n * @param x in: x coordinate which should be converted, a pointer to an u32 array with a size of 8.\n * @param first_byte in: The parity of the y coordinate, a u32.\n * @return Returns 0 if successful, returns 1 if x is greater than the basepoint.\n */\nDECLSPEC u32 transform_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *x, const u32 first_byte)\n{\n  u32 p[8];\n\n  p[0] = SECP256K1_P0;\n  p[1] = SECP256K1_P1;\n  p[2] = SECP256K1_P2;\n  p[3] = SECP256K1_P3;\n  p[4] = SECP256K1_P4;\n  p[5] = SECP256K1_P5;\n  p[6] = SECP256K1_P6;\n  p[7] = SECP256K1_P7;\n\n  // x must be smaller than p (because of y ^ 2 = x ^ 3 % p)\n\n  for (int i = 7; i >= 0; i--)\n  {\n    if (x[i] < p[i]) break;\n    if (x[i] > p[i]) return 1;\n  }\n\n\n  // get y^2 = x^3 + 7:\n\n  u32 b[8] = { 0 };\n\n  b[0] = SECP256K1_B;\n\n  u32 y[8];\n\n  mul_mod (y, x, x);\n  mul_mod (y, y, x);\n  add_mod (y, y, b);\n\n  // get y = sqrt (y^2):\n\n  sqrt_mod (y);\n\n  // check if it's of the correct parity that we want (odd/even):\n\n  if ((first_byte & 1) != (y[0] & 1))\n  {\n    // y2 = p - y1 (or y2 = y1 * -1)\n\n    sub_mod (y, p, y);\n  }\n\n  // get xy:\n\n  point_get_coords (r, x, y);\n\n  return 0;\n}\n\n/*\n * Parse a x coordinate with leading parity to secp256k1_t.\n * @param r out: x and y coordinates.\n * @param k in: x coordinate which should be converted with leading parity, a pointer to an u32 array with a size of 9.\n * @return Returns 0 if successful, returns 1 if x is greater than the basepoint or the parity has an unexpected value.\n */\nDECLSPEC u32 parse_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *k)\n{\n  // verify:\n\n  const u32 first_byte = k[0] & 0xff;\n\n  if ((first_byte != '\\x02') && (first_byte != '\\x03'))\n  {\n    return 1;\n  }\n\n  // load k into x without the first byte:\n\n  u32 x[8];\n\n  x[0] = (k[7] & 0xff00) << 16 | (k[7] & 0xff0000) | (k[7] & 0xff000000) >> 16 | (k[8] & 0xff);\n  x[1] = (k[6] & 0xff00) << 16 | (k[6] & 0xff0000) | (k[6] & 0xff000000) >> 16 | (k[7] & 0xff);\n  x[2] = (k[5] & 0xff00) << 16 | (k[5] & 0xff0000) | (k[5] & 0xff000000) >> 16 | (k[6] & 0xff);\n  x[3] = (k[4] & 0xff00) << 16 | (k[4] & 0xff0000) | (k[4] & 0xff000000) >> 16 | (k[5] & 0xff);\n  x[4] = (k[3] & 0xff00) << 16 | (k[3] & 0xff0000) | (k[3] & 0xff000000) >> 16 | (k[4] & 0xff);\n  x[5] = (k[2] & 0xff00) << 16 | (k[2] & 0xff0000) | (k[2] & 0xff000000) >> 16 | (k[3] & 0xff);\n  x[6] = (k[1] & 0xff00) << 16 | (k[1] & 0xff0000) | (k[1] & 0xff000000) >> 16 | (k[2] & 0xff);\n  x[7] = (k[0] & 0xff00) << 16 | (k[0] & 0xff0000) | (k[0] & 0xff000000) >> 16 | (k[1] & 0xff);\n\n  return transform_public (r, x, first_byte);\n}\n\n\n/*\n * Set precomputed values of the basepoint g to a secp256k1 structure.\n * @param r out: x and y coordinates. pre-computed points: (x1,y1,-y1),(x3,y3,-y3),(x5,y5,-y5),(x7,y7,-y7)\n */\nDECLSPEC void set_precomputed_basepoint_g (PRIVATE_AS secp256k1_t *r)\n{\n  // x1\n  r->xy[ 0] = SECP256K1_G_PRE_COMPUTED_00;\n  r->xy[ 1] = SECP256K1_G_PRE_COMPUTED_01;\n  r->xy[ 2] = SECP256K1_G_PRE_COMPUTED_02;\n  r->xy[ 3] = SECP256K1_G_PRE_COMPUTED_03;\n  r->xy[ 4] = SECP256K1_G_PRE_COMPUTED_04;\n  r->xy[ 5] = SECP256K1_G_PRE_COMPUTED_05;\n  r->xy[ 6] = SECP256K1_G_PRE_COMPUTED_06;\n  r->xy[ 7] = SECP256K1_G_PRE_COMPUTED_07;\n\n  // y1\n  r->xy[ 8] = SECP256K1_G_PRE_COMPUTED_08;\n  r->xy[ 9] = SECP256K1_G_PRE_COMPUTED_09;\n  r->xy[10] = SECP256K1_G_PRE_COMPUTED_10;\n  r->xy[11] = SECP256K1_G_PRE_COMPUTED_11;\n  r->xy[12] = SECP256K1_G_PRE_COMPUTED_12;\n  r->xy[13] = SECP256K1_G_PRE_COMPUTED_13;\n  r->xy[14] = SECP256K1_G_PRE_COMPUTED_14;\n  r->xy[15] = SECP256K1_G_PRE_COMPUTED_15;\n\n  // -y1\n  r->xy[16] = SECP256K1_G_PRE_COMPUTED_16;\n  r->xy[17] = SECP256K1_G_PRE_COMPUTED_17;\n  r->xy[18] = SECP256K1_G_PRE_COMPUTED_18;\n  r->xy[19] = SECP256K1_G_PRE_COMPUTED_19;\n  r->xy[20] = SECP256K1_G_PRE_COMPUTED_20;\n  r->xy[21] = SECP256K1_G_PRE_COMPUTED_21;\n  r->xy[22] = SECP256K1_G_PRE_COMPUTED_22;\n  r->xy[23] = SECP256K1_G_PRE_COMPUTED_23;\n\n  // x3\n  r->xy[24] = SECP256K1_G_PRE_COMPUTED_24;\n  r->xy[25] = SECP256K1_G_PRE_COMPUTED_25;\n  r->xy[26] = SECP256K1_G_PRE_COMPUTED_26;\n  r->xy[27] = SECP256K1_G_PRE_COMPUTED_27;\n  r->xy[28] = SECP256K1_G_PRE_COMPUTED_28;\n  r->xy[29] = SECP256K1_G_PRE_COMPUTED_29;\n  r->xy[30] = SECP256K1_G_PRE_COMPUTED_30;\n  r->xy[31] = SECP256K1_G_PRE_COMPUTED_31;\n\n  // y3\n  r->xy[32] = SECP256K1_G_PRE_COMPUTED_32;\n  r->xy[33] = SECP256K1_G_PRE_COMPUTED_33;\n  r->xy[34] = SECP256K1_G_PRE_COMPUTED_34;\n  r->xy[35] = SECP256K1_G_PRE_COMPUTED_35;\n  r->xy[36] = SECP256K1_G_PRE_COMPUTED_36;\n  r->xy[37] = SECP256K1_G_PRE_COMPUTED_37;\n  r->xy[38] = SECP256K1_G_PRE_COMPUTED_38;\n  r->xy[39] = SECP256K1_G_PRE_COMPUTED_39;\n\n  // -y3\n  r->xy[40] = SECP256K1_G_PRE_COMPUTED_40;\n  r->xy[41] = SECP256K1_G_PRE_COMPUTED_41;\n  r->xy[42] = SECP256K1_G_PRE_COMPUTED_42;\n  r->xy[43] = SECP256K1_G_PRE_COMPUTED_43;\n  r->xy[44] = SECP256K1_G_PRE_COMPUTED_44;\n  r->xy[45] = SECP256K1_G_PRE_COMPUTED_45;\n  r->xy[46] = SECP256K1_G_PRE_COMPUTED_46;\n  r->xy[47] = SECP256K1_G_PRE_COMPUTED_47;\n\n  // x5\n  r->xy[48] = SECP256K1_G_PRE_COMPUTED_48;\n  r->xy[49] = SECP256K1_G_PRE_COMPUTED_49;\n  r->xy[50] = SECP256K1_G_PRE_COMPUTED_50;\n  r->xy[51] = SECP256K1_G_PRE_COMPUTED_51;\n  r->xy[52] = SECP256K1_G_PRE_COMPUTED_52;\n  r->xy[53] = SECP256K1_G_PRE_COMPUTED_53;\n  r->xy[54] = SECP256K1_G_PRE_COMPUTED_54;\n  r->xy[55] = SECP256K1_G_PRE_COMPUTED_55;\n\n  // y5\n  r->xy[56] = SECP256K1_G_PRE_COMPUTED_56;\n  r->xy[57] = SECP256K1_G_PRE_COMPUTED_57;\n  r->xy[58] = SECP256K1_G_PRE_COMPUTED_58;\n  r->xy[59] = SECP256K1_G_PRE_COMPUTED_59;\n  r->xy[60] = SECP256K1_G_PRE_COMPUTED_60;\n  r->xy[61] = SECP256K1_G_PRE_COMPUTED_61;\n  r->xy[62] = SECP256K1_G_PRE_COMPUTED_62;\n  r->xy[63] = SECP256K1_G_PRE_COMPUTED_63;\n\n  // -y5\n  r->xy[64] = SECP256K1_G_PRE_COMPUTED_64;\n  r->xy[65] = SECP256K1_G_PRE_COMPUTED_65;\n  r->xy[66] = SECP256K1_G_PRE_COMPUTED_66;\n  r->xy[67] = SECP256K1_G_PRE_COMPUTED_67;\n  r->xy[68] = SECP256K1_G_PRE_COMPUTED_68;\n  r->xy[69] = SECP256K1_G_PRE_COMPUTED_69;\n  r->xy[70] = SECP256K1_G_PRE_COMPUTED_70;\n  r->xy[71] = SECP256K1_G_PRE_COMPUTED_71;\n\n  // x7\n  r->xy[72] = SECP256K1_G_PRE_COMPUTED_72;\n  r->xy[73] = SECP256K1_G_PRE_COMPUTED_73;\n  r->xy[74] = SECP256K1_G_PRE_COMPUTED_74;\n  r->xy[75] = SECP256K1_G_PRE_COMPUTED_75;\n  r->xy[76] = SECP256K1_G_PRE_COMPUTED_76;\n  r->xy[77] = SECP256K1_G_PRE_COMPUTED_77;\n  r->xy[78] = SECP256K1_G_PRE_COMPUTED_78;\n  r->xy[79] = SECP256K1_G_PRE_COMPUTED_79;\n\n  // y7\n  r->xy[80] = SECP256K1_G_PRE_COMPUTED_80;\n  r->xy[81] = SECP256K1_G_PRE_COMPUTED_81;\n  r->xy[82] = SECP256K1_G_PRE_COMPUTED_82;\n  r->xy[83] = SECP256K1_G_PRE_COMPUTED_83;\n  r->xy[84] = SECP256K1_G_PRE_COMPUTED_84;\n  r->xy[85] = SECP256K1_G_PRE_COMPUTED_85;\n  r->xy[86] = SECP256K1_G_PRE_COMPUTED_86;\n  r->xy[87] = SECP256K1_G_PRE_COMPUTED_87;\n\n  // -y7\n  r->xy[88] = SECP256K1_G_PRE_COMPUTED_88;\n  r->xy[89] = SECP256K1_G_PRE_COMPUTED_89;\n  r->xy[90] = SECP256K1_G_PRE_COMPUTED_90;\n  r->xy[91] = SECP256K1_G_PRE_COMPUTED_91;\n  r->xy[92] = SECP256K1_G_PRE_COMPUTED_92;\n  r->xy[93] = SECP256K1_G_PRE_COMPUTED_93;\n  r->xy[94] = SECP256K1_G_PRE_COMPUTED_94;\n  r->xy[95] = SECP256K1_G_PRE_COMPUTED_95;\n}\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_ecc_secp256k1.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_ECC_SECP256K1_H\n#define INC_ECC_SECP256K1_H\n\n// y^2 = x^3 + ax + b with a = 0 and b = 7 => y^2 = x^3 + 7:\n\n#define SECP256K1_B 7\n\n// finite field Fp\n// p = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F\n#define SECP256K1_P0 0xfffffc2f\n#define SECP256K1_P1 0xfffffffe\n#define SECP256K1_P2 0xffffffff\n#define SECP256K1_P3 0xffffffff\n#define SECP256K1_P4 0xffffffff\n#define SECP256K1_P5 0xffffffff\n#define SECP256K1_P6 0xffffffff\n#define SECP256K1_P7 0xffffffff\n\n// prime order N\n// n = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141\n#define SECP256K1_N0 0xd0364141\n#define SECP256K1_N1 0xbfd25e8c\n#define SECP256K1_N2 0xaf48a03b\n#define SECP256K1_N3 0xbaaedce6\n#define SECP256K1_N4 0xfffffffe\n#define SECP256K1_N5 0xffffffff\n#define SECP256K1_N6 0xffffffff\n#define SECP256K1_N7 0xffffffff\n\n// the base point G in compressed form for transform_public\n// G = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798\n#define SECP256K1_G_PARITY 0x00000002\n#define SECP256K1_G0 0x16f81798\n#define SECP256K1_G1 0x59f2815b\n#define SECP256K1_G2 0x2dce28d9\n#define SECP256K1_G3 0x029bfcdb\n#define SECP256K1_G4 0xce870b07\n#define SECP256K1_G5 0x55a06295\n#define SECP256K1_G6 0xf9dcbbac\n#define SECP256K1_G7 0x79be667e\n\n// the base point G in compressed form for parse_public\n// parity and reversed byte/char (8 bit) byte order\n// G = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798\n#define SECP256K1_G_STRING0 0x66be7902\n#define SECP256K1_G_STRING1 0xbbdcf97e\n#define SECP256K1_G_STRING2 0x62a055ac\n#define SECP256K1_G_STRING3 0x0b87ce95\n#define SECP256K1_G_STRING4 0xfc9b0207\n#define SECP256K1_G_STRING5 0x28ce2ddb\n#define SECP256K1_G_STRING6 0x81f259d9\n#define SECP256K1_G_STRING7 0x17f8165b\n#define SECP256K1_G_STRING8 0x00000098\n\n// pre computed values, can be verified using private keys for\n// x1 is the same as the basepoint g\n// x1 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn\n// x3 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU74sHUHy8S\n// x5 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU75s2EPgZf\n// x7 WIF: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU76rnZwVdz\n\n// x1: 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798\n// x1: 79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798\n#define SECP256K1_G_PRE_COMPUTED_00 0x16f81798\n#define SECP256K1_G_PRE_COMPUTED_01 0x59f2815b\n#define SECP256K1_G_PRE_COMPUTED_02 0x2dce28d9\n#define SECP256K1_G_PRE_COMPUTED_03 0x029bfcdb\n#define SECP256K1_G_PRE_COMPUTED_04 0xce870b07\n#define SECP256K1_G_PRE_COMPUTED_05 0x55a06295\n#define SECP256K1_G_PRE_COMPUTED_06 0xf9dcbbac\n#define SECP256K1_G_PRE_COMPUTED_07 0x79be667e\n\n// y1: 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8\n// y1: 483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8\n#define SECP256K1_G_PRE_COMPUTED_08 0xfb10d4b8\n#define SECP256K1_G_PRE_COMPUTED_09 0x9c47d08f\n#define SECP256K1_G_PRE_COMPUTED_10 0xa6855419\n#define SECP256K1_G_PRE_COMPUTED_11 0xfd17b448\n#define SECP256K1_G_PRE_COMPUTED_12 0x0e1108a8\n#define SECP256K1_G_PRE_COMPUTED_13 0x5da4fbfc\n#define SECP256K1_G_PRE_COMPUTED_14 0x26a3c465\n#define SECP256K1_G_PRE_COMPUTED_15 0x483ada77\n\n// -y1: B7C52588 D95C3B9A A25B0403 F1EEF757 02E84BB7 597AABE6 63B82F6F 04EF2777\n// -y1: B7C52588D95C3B9AA25B0403F1EEF75702E84BB7597AABE663B82F6F04EF2777\n#define SECP256K1_G_PRE_COMPUTED_16 0x04ef2777\n#define SECP256K1_G_PRE_COMPUTED_17 0x63b82f6f\n#define SECP256K1_G_PRE_COMPUTED_18 0x597aabe6\n#define SECP256K1_G_PRE_COMPUTED_19 0x02e84bb7\n#define SECP256K1_G_PRE_COMPUTED_20 0xf1eef757\n#define SECP256K1_G_PRE_COMPUTED_21 0xa25b0403\n#define SECP256K1_G_PRE_COMPUTED_22 0xd95c3b9a\n#define SECP256K1_G_PRE_COMPUTED_23 0xb7c52588\n\n// x3: F9308A01 9258C310 49344F85 F89D5229 B531C845 836F99B0 8601F113 BCE036F9\n// x3: F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9\n#define SECP256K1_G_PRE_COMPUTED_24 0xbce036f9\n#define SECP256K1_G_PRE_COMPUTED_25 0x8601f113\n#define SECP256K1_G_PRE_COMPUTED_26 0x836f99b0\n#define SECP256K1_G_PRE_COMPUTED_27 0xb531c845\n#define SECP256K1_G_PRE_COMPUTED_28 0xf89d5229\n#define SECP256K1_G_PRE_COMPUTED_29 0x49344f85\n#define SECP256K1_G_PRE_COMPUTED_30 0x9258c310\n#define SECP256K1_G_PRE_COMPUTED_31 0xf9308a01\n\n// y3: 388F7B0F 632DE814 0FE337E6 2A37F356 6500A999 34C2231B 6CB9FD75 84B8E672\n// y3: 388F7B0F632DE8140FE337E62A37F3566500A99934C2231B6CB9FD7584B8E672\n#define SECP256K1_G_PRE_COMPUTED_32 0x84b8e672\n#define SECP256K1_G_PRE_COMPUTED_33 0x6cb9fd75\n#define SECP256K1_G_PRE_COMPUTED_34 0x34c2231b\n#define SECP256K1_G_PRE_COMPUTED_35 0x6500a999\n#define SECP256K1_G_PRE_COMPUTED_36 0x2a37f356\n#define SECP256K1_G_PRE_COMPUTED_37 0x0fe337e6\n#define SECP256K1_G_PRE_COMPUTED_38 0x632de814\n#define SECP256K1_G_PRE_COMPUTED_39 0x388f7b0f\n\n// -y3: C77084F0 9CD217EB F01CC819 D5C80CA9 9AFF5666 CB3DDCE4 93460289 7B4715BD\n// -y3: C77084F09CD217EBF01CC819D5C80CA99AFF5666CB3DDCE4934602897B4715BD\n#define SECP256K1_G_PRE_COMPUTED_40 0x7b4715bd\n#define SECP256K1_G_PRE_COMPUTED_41 0x93460289\n#define SECP256K1_G_PRE_COMPUTED_42 0xcb3ddce4\n#define SECP256K1_G_PRE_COMPUTED_43 0x9aff5666\n#define SECP256K1_G_PRE_COMPUTED_44 0xd5c80ca9\n#define SECP256K1_G_PRE_COMPUTED_45 0xf01cc819\n#define SECP256K1_G_PRE_COMPUTED_46 0x9cd217eb\n#define SECP256K1_G_PRE_COMPUTED_47 0xc77084f0\n\n// x5: 2F8BDE4D 1A072093 55B4A725 0A5C5128 E88B84BD DC619AB7 CBA8D569 B240EFE4\n// x5: 2F8BDE4D1A07209355B4A7250A5C5128E88B84BDDC619AB7CBA8D569B240EFE4\n#define SECP256K1_G_PRE_COMPUTED_48 0xb240efe4\n#define SECP256K1_G_PRE_COMPUTED_49 0xcba8d569\n#define SECP256K1_G_PRE_COMPUTED_50 0xdc619ab7\n#define SECP256K1_G_PRE_COMPUTED_51 0xe88b84bd\n#define SECP256K1_G_PRE_COMPUTED_52 0x0a5c5128\n#define SECP256K1_G_PRE_COMPUTED_53 0x55b4a725\n#define SECP256K1_G_PRE_COMPUTED_54 0x1a072093\n#define SECP256K1_G_PRE_COMPUTED_55 0x2f8bde4d\n\n// y5: D8AC2226 36E5E3D6 D4DBA9DD A6C9C426 F788271B AB0D6840 DCA87D3A A6AC62D6\n// y5: D8AC222636E5E3D6D4DBA9DDA6C9C426F788271BAB0D6840DCA87D3AA6AC62D6\n#define SECP256K1_G_PRE_COMPUTED_56 0xa6ac62d6\n#define SECP256K1_G_PRE_COMPUTED_57 0xdca87d3a\n#define SECP256K1_G_PRE_COMPUTED_58 0xab0d6840\n#define SECP256K1_G_PRE_COMPUTED_59 0xf788271b\n#define SECP256K1_G_PRE_COMPUTED_60 0xa6c9c426\n#define SECP256K1_G_PRE_COMPUTED_61 0xd4dba9dd\n#define SECP256K1_G_PRE_COMPUTED_62 0x36e5e3d6\n#define SECP256K1_G_PRE_COMPUTED_63 0xd8ac2226\n\n// -y5: 2753DDD9 C91A1C29 2B245622 59363BD9 0877D8E4 54F297BF 235782C4 59539959\n// -y5: 2753DDD9C91A1C292B24562259363BD90877D8E454F297BF235782C459539959\n#define SECP256K1_G_PRE_COMPUTED_64 0x59539959\n#define SECP256K1_G_PRE_COMPUTED_65 0x235782c4\n#define SECP256K1_G_PRE_COMPUTED_66 0x54f297bf\n#define SECP256K1_G_PRE_COMPUTED_67 0x0877d8e4\n#define SECP256K1_G_PRE_COMPUTED_68 0x59363bd9\n#define SECP256K1_G_PRE_COMPUTED_69 0x2b245622\n#define SECP256K1_G_PRE_COMPUTED_70 0xc91a1c29\n#define SECP256K1_G_PRE_COMPUTED_71 0x2753ddd9\n\n// x7: 5CBDF064 6E5DB4EA A398F365 F2EA7A0E 3D419B7E 0330E39C E92BDDED CAC4F9BC\n// x7: 5CBDF0646E5DB4EAA398F365F2EA7A0E3D419B7E0330E39CE92BDDEDCAC4F9BC\n#define SECP256K1_G_PRE_COMPUTED_72 0xcac4f9bc\n#define SECP256K1_G_PRE_COMPUTED_73 0xe92bdded\n#define SECP256K1_G_PRE_COMPUTED_74 0x0330e39c\n#define SECP256K1_G_PRE_COMPUTED_75 0x3d419b7e\n#define SECP256K1_G_PRE_COMPUTED_76 0xf2ea7a0e\n#define SECP256K1_G_PRE_COMPUTED_77 0xa398f365\n#define SECP256K1_G_PRE_COMPUTED_78 0x6e5db4ea\n#define SECP256K1_G_PRE_COMPUTED_79 0x5cbdf064\n\n// y7: 6AEBCA40 BA255960 A3178D6D 861A54DB A813D0B8 13FDE7B5 A5082628 087264DA\n// y7: 6AEBCA40BA255960A3178D6D861A54DBA813D0B813FDE7B5A5082628087264DA\n#define SECP256K1_G_PRE_COMPUTED_80 0x087264da\n#define SECP256K1_G_PRE_COMPUTED_81 0xa5082628\n#define SECP256K1_G_PRE_COMPUTED_82 0x13fde7b5\n#define SECP256K1_G_PRE_COMPUTED_83 0xa813d0b8\n#define SECP256K1_G_PRE_COMPUTED_84 0x861a54db\n#define SECP256K1_G_PRE_COMPUTED_85 0xa3178d6d\n#define SECP256K1_G_PRE_COMPUTED_86 0xba255960\n#define SECP256K1_G_PRE_COMPUTED_87 0x6aebca40\n\n// -y7: 951435BF 45DAA69F 5CE87292 79E5AB24 57EC2F47 EC02184A 5AF7D9D6 F78D9755\n// -y7: 951435BF45DAA69F5CE8729279E5AB2457EC2F47EC02184A5AF7D9D6F78D9755\n#define SECP256K1_G_PRE_COMPUTED_88 0xf78d9755\n#define SECP256K1_G_PRE_COMPUTED_89 0x5af7d9d6\n#define SECP256K1_G_PRE_COMPUTED_90 0xec02184a\n#define SECP256K1_G_PRE_COMPUTED_91 0x57ec2f47\n#define SECP256K1_G_PRE_COMPUTED_92 0x79e5ab24\n#define SECP256K1_G_PRE_COMPUTED_93 0x5ce87292\n#define SECP256K1_G_PRE_COMPUTED_94 0x45daa69f\n#define SECP256K1_G_PRE_COMPUTED_95 0x951435bf\n\n#define SECP256K1_PRE_COMPUTED_XY_SIZE 96\n#define SECP256K1_NAF_SIZE 33 // 32+1, we need one extra slot\n\n#define PUBLIC_KEY_LENGTH_WITHOUT_PARITY 8\n#define PUBLIC_KEY_LENGTH_X_Y_WITHOUT_PARITY 16\n// 8+1 to make room for the parity\n#define PUBLIC_KEY_LENGTH_WITH_PARITY 9\n\n// (32*8 == 256)\n#define PRIVATE_KEY_LENGTH 8\n\n// change the type of input/tmps in your kernel (e.g. PRIVATE_AS / CONSTANT_AS):\n#ifndef SECP256K1_TMPS_TYPE\n#define SECP256K1_TMPS_TYPE GLOBAL_AS\n#endif\n\ntypedef struct secp256k1\n{\n  u32 xy[SECP256K1_PRE_COMPUTED_XY_SIZE]; // pre-computed points: (x1,y1,-y1),(x3,y3,-y3),(x5,y5,-y5),(x7,y7,-y7)\n\n} secp256k1_t;\n\n\nDECLSPEC u32  transform_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *x, const u32 first_byte);\nDECLSPEC u32  parse_public (PRIVATE_AS secp256k1_t *r, PRIVATE_AS const u32 *k);\n\nDECLSPEC void point_mul_xy (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS const u32 *k, SECP256K1_TMPS_TYPE const secp256k1_t *tmps);\nDECLSPEC void point_mul (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *k, SECP256K1_TMPS_TYPE const secp256k1_t *tmps);\n\nDECLSPEC void set_precomputed_basepoint_g (PRIVATE_AS secp256k1_t *r);\n\n#endif // INC_ECC_SECP256K1_H\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_hash_ripemd160.cl",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#include \"inc_vendor.h\"\n#include \"inc_types.h\"\n#include \"inc_platform.h\"\n#include \"inc_common.h\"\n#include \"inc_hash_ripemd160.h\"\n\n// important notes on this:\n// input buf unused bytes needs to be set to zero\n// input buf needs to be in algorithm native byte order (ripemd160 = LE, sha1 = BE, etc)\n// input buf needs to be 64 byte aligned when using ripemd160_update()\n\nDECLSPEC void ripemd160_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest)\n{\n  u32 a1 = digest[0];\n  u32 b1 = digest[1];\n  u32 c1 = digest[2];\n  u32 d1 = digest[3];\n  u32 e1 = digest[4];\n\n  RIPEMD160_STEP_S (RIPEMD160_F , a1, b1, c1, d1, e1, w0[0], RIPEMD160C00, RIPEMD160S00);\n  RIPEMD160_STEP_S (RIPEMD160_F , e1, a1, b1, c1, d1, w0[1], RIPEMD160C00, RIPEMD160S01);\n  RIPEMD160_STEP_S (RIPEMD160_F , d1, e1, a1, b1, c1, w0[2], RIPEMD160C00, RIPEMD160S02);\n  RIPEMD160_STEP_S (RIPEMD160_F , c1, d1, e1, a1, b1, w0[3], RIPEMD160C00, RIPEMD160S03);\n  RIPEMD160_STEP_S (RIPEMD160_F , b1, c1, d1, e1, a1, w1[0], RIPEMD160C00, RIPEMD160S04);\n  RIPEMD160_STEP_S (RIPEMD160_F , a1, b1, c1, d1, e1, w1[1], RIPEMD160C00, RIPEMD160S05);\n  RIPEMD160_STEP_S (RIPEMD160_F , e1, a1, b1, c1, d1, w1[2], RIPEMD160C00, RIPEMD160S06);\n  RIPEMD160_STEP_S (RIPEMD160_F , d1, e1, a1, b1, c1, w1[3], RIPEMD160C00, RIPEMD160S07);\n  RIPEMD160_STEP_S (RIPEMD160_F , c1, d1, e1, a1, b1, w2[0], RIPEMD160C00, RIPEMD160S08);\n  RIPEMD160_STEP_S (RIPEMD160_F , b1, c1, d1, e1, a1, w2[1], RIPEMD160C00, RIPEMD160S09);\n  RIPEMD160_STEP_S (RIPEMD160_F , a1, b1, c1, d1, e1, w2[2], RIPEMD160C00, RIPEMD160S0A);\n  RIPEMD160_STEP_S (RIPEMD160_F , e1, a1, b1, c1, d1, w2[3], RIPEMD160C00, RIPEMD160S0B);\n  RIPEMD160_STEP_S (RIPEMD160_F , d1, e1, a1, b1, c1, w3[0], RIPEMD160C00, RIPEMD160S0C);\n  RIPEMD160_STEP_S (RIPEMD160_F , c1, d1, e1, a1, b1, w3[1], RIPEMD160C00, RIPEMD160S0D);\n  RIPEMD160_STEP_S (RIPEMD160_F , b1, c1, d1, e1, a1, w3[2], RIPEMD160C00, RIPEMD160S0E);\n  RIPEMD160_STEP_S (RIPEMD160_F , a1, b1, c1, d1, e1, w3[3], RIPEMD160C00, RIPEMD160S0F);\n\n  RIPEMD160_STEP_S (RIPEMD160_Go, e1, a1, b1, c1, d1, w1[3], RIPEMD160C10, RIPEMD160S10);\n  RIPEMD160_STEP_S (RIPEMD160_Go, d1, e1, a1, b1, c1, w1[0], RIPEMD160C10, RIPEMD160S11);\n  RIPEMD160_STEP_S (RIPEMD160_Go, c1, d1, e1, a1, b1, w3[1], RIPEMD160C10, RIPEMD160S12);\n  RIPEMD160_STEP_S (RIPEMD160_Go, b1, c1, d1, e1, a1, w0[1], RIPEMD160C10, RIPEMD160S13);\n  RIPEMD160_STEP_S (RIPEMD160_Go, a1, b1, c1, d1, e1, w2[2], RIPEMD160C10, RIPEMD160S14);\n  RIPEMD160_STEP_S (RIPEMD160_Go, e1, a1, b1, c1, d1, w1[2], RIPEMD160C10, RIPEMD160S15);\n  RIPEMD160_STEP_S (RIPEMD160_Go, d1, e1, a1, b1, c1, w3[3], RIPEMD160C10, RIPEMD160S16);\n  RIPEMD160_STEP_S (RIPEMD160_Go, c1, d1, e1, a1, b1, w0[3], RIPEMD160C10, RIPEMD160S17);\n  RIPEMD160_STEP_S (RIPEMD160_Go, b1, c1, d1, e1, a1, w3[0], RIPEMD160C10, RIPEMD160S18);\n  RIPEMD160_STEP_S (RIPEMD160_Go, a1, b1, c1, d1, e1, w0[0], RIPEMD160C10, RIPEMD160S19);\n  RIPEMD160_STEP_S (RIPEMD160_Go, e1, a1, b1, c1, d1, w2[1], RIPEMD160C10, RIPEMD160S1A);\n  RIPEMD160_STEP_S (RIPEMD160_Go, d1, e1, a1, b1, c1, w1[1], RIPEMD160C10, RIPEMD160S1B);\n  RIPEMD160_STEP_S (RIPEMD160_Go, c1, d1, e1, a1, b1, w0[2], RIPEMD160C10, RIPEMD160S1C);\n  RIPEMD160_STEP_S (RIPEMD160_Go, b1, c1, d1, e1, a1, w3[2], RIPEMD160C10, RIPEMD160S1D);\n  RIPEMD160_STEP_S (RIPEMD160_Go, a1, b1, c1, d1, e1, w2[3], RIPEMD160C10, RIPEMD160S1E);\n  RIPEMD160_STEP_S (RIPEMD160_Go, e1, a1, b1, c1, d1, w2[0], RIPEMD160C10, RIPEMD160S1F);\n\n  RIPEMD160_STEP_S (RIPEMD160_H , d1, e1, a1, b1, c1, w0[3], RIPEMD160C20, RIPEMD160S20);\n  RIPEMD160_STEP_S (RIPEMD160_H , c1, d1, e1, a1, b1, w2[2], RIPEMD160C20, RIPEMD160S21);\n  RIPEMD160_STEP_S (RIPEMD160_H , b1, c1, d1, e1, a1, w3[2], RIPEMD160C20, RIPEMD160S22);\n  RIPEMD160_STEP_S (RIPEMD160_H , a1, b1, c1, d1, e1, w1[0], RIPEMD160C20, RIPEMD160S23);\n  RIPEMD160_STEP_S (RIPEMD160_H , e1, a1, b1, c1, d1, w2[1], RIPEMD160C20, RIPEMD160S24);\n  RIPEMD160_STEP_S (RIPEMD160_H , d1, e1, a1, b1, c1, w3[3], RIPEMD160C20, RIPEMD160S25);\n  RIPEMD160_STEP_S (RIPEMD160_H , c1, d1, e1, a1, b1, w2[0], RIPEMD160C20, RIPEMD160S26);\n  RIPEMD160_STEP_S (RIPEMD160_H , b1, c1, d1, e1, a1, w0[1], RIPEMD160C20, RIPEMD160S27);\n  RIPEMD160_STEP_S (RIPEMD160_H , a1, b1, c1, d1, e1, w0[2], RIPEMD160C20, RIPEMD160S28);\n  RIPEMD160_STEP_S (RIPEMD160_H , e1, a1, b1, c1, d1, w1[3], RIPEMD160C20, RIPEMD160S29);\n  RIPEMD160_STEP_S (RIPEMD160_H , d1, e1, a1, b1, c1, w0[0], RIPEMD160C20, RIPEMD160S2A);\n  RIPEMD160_STEP_S (RIPEMD160_H , c1, d1, e1, a1, b1, w1[2], RIPEMD160C20, RIPEMD160S2B);\n  RIPEMD160_STEP_S (RIPEMD160_H , b1, c1, d1, e1, a1, w3[1], RIPEMD160C20, RIPEMD160S2C);\n  RIPEMD160_STEP_S (RIPEMD160_H , a1, b1, c1, d1, e1, w2[3], RIPEMD160C20, RIPEMD160S2D);\n  RIPEMD160_STEP_S (RIPEMD160_H , e1, a1, b1, c1, d1, w1[1], RIPEMD160C20, RIPEMD160S2E);\n  RIPEMD160_STEP_S (RIPEMD160_H , d1, e1, a1, b1, c1, w3[0], RIPEMD160C20, RIPEMD160S2F);\n\n  RIPEMD160_STEP_S (RIPEMD160_Io, c1, d1, e1, a1, b1, w0[1], RIPEMD160C30, RIPEMD160S30);\n  RIPEMD160_STEP_S (RIPEMD160_Io, b1, c1, d1, e1, a1, w2[1], RIPEMD160C30, RIPEMD160S31);\n  RIPEMD160_STEP_S (RIPEMD160_Io, a1, b1, c1, d1, e1, w2[3], RIPEMD160C30, RIPEMD160S32);\n  RIPEMD160_STEP_S (RIPEMD160_Io, e1, a1, b1, c1, d1, w2[2], RIPEMD160C30, RIPEMD160S33);\n  RIPEMD160_STEP_S (RIPEMD160_Io, d1, e1, a1, b1, c1, w0[0], RIPEMD160C30, RIPEMD160S34);\n  RIPEMD160_STEP_S (RIPEMD160_Io, c1, d1, e1, a1, b1, w2[0], RIPEMD160C30, RIPEMD160S35);\n  RIPEMD160_STEP_S (RIPEMD160_Io, b1, c1, d1, e1, a1, w3[0], RIPEMD160C30, RIPEMD160S36);\n  RIPEMD160_STEP_S (RIPEMD160_Io, a1, b1, c1, d1, e1, w1[0], RIPEMD160C30, RIPEMD160S37);\n  RIPEMD160_STEP_S (RIPEMD160_Io, e1, a1, b1, c1, d1, w3[1], RIPEMD160C30, RIPEMD160S38);\n  RIPEMD160_STEP_S (RIPEMD160_Io, d1, e1, a1, b1, c1, w0[3], RIPEMD160C30, RIPEMD160S39);\n  RIPEMD160_STEP_S (RIPEMD160_Io, c1, d1, e1, a1, b1, w1[3], RIPEMD160C30, RIPEMD160S3A);\n  RIPEMD160_STEP_S (RIPEMD160_Io, b1, c1, d1, e1, a1, w3[3], RIPEMD160C30, RIPEMD160S3B);\n  RIPEMD160_STEP_S (RIPEMD160_Io, a1, b1, c1, d1, e1, w3[2], RIPEMD160C30, RIPEMD160S3C);\n  RIPEMD160_STEP_S (RIPEMD160_Io, e1, a1, b1, c1, d1, w1[1], RIPEMD160C30, RIPEMD160S3D);\n  RIPEMD160_STEP_S (RIPEMD160_Io, d1, e1, a1, b1, c1, w1[2], RIPEMD160C30, RIPEMD160S3E);\n  RIPEMD160_STEP_S (RIPEMD160_Io, c1, d1, e1, a1, b1, w0[2], RIPEMD160C30, RIPEMD160S3F);\n\n  RIPEMD160_STEP_S (RIPEMD160_J , b1, c1, d1, e1, a1, w1[0], RIPEMD160C40, RIPEMD160S40);\n  RIPEMD160_STEP_S (RIPEMD160_J , a1, b1, c1, d1, e1, w0[0], RIPEMD160C40, RIPEMD160S41);\n  RIPEMD160_STEP_S (RIPEMD160_J , e1, a1, b1, c1, d1, w1[1], RIPEMD160C40, RIPEMD160S42);\n  RIPEMD160_STEP_S (RIPEMD160_J , d1, e1, a1, b1, c1, w2[1], RIPEMD160C40, RIPEMD160S43);\n  RIPEMD160_STEP_S (RIPEMD160_J , c1, d1, e1, a1, b1, w1[3], RIPEMD160C40, RIPEMD160S44);\n  RIPEMD160_STEP_S (RIPEMD160_J , b1, c1, d1, e1, a1, w3[0], RIPEMD160C40, RIPEMD160S45);\n  RIPEMD160_STEP_S (RIPEMD160_J , a1, b1, c1, d1, e1, w0[2], RIPEMD160C40, RIPEMD160S46);\n  RIPEMD160_STEP_S (RIPEMD160_J , e1, a1, b1, c1, d1, w2[2], RIPEMD160C40, RIPEMD160S47);\n  RIPEMD160_STEP_S (RIPEMD160_J , d1, e1, a1, b1, c1, w3[2], RIPEMD160C40, RIPEMD160S48);\n  RIPEMD160_STEP_S (RIPEMD160_J , c1, d1, e1, a1, b1, w0[1], RIPEMD160C40, RIPEMD160S49);\n  RIPEMD160_STEP_S (RIPEMD160_J , b1, c1, d1, e1, a1, w0[3], RIPEMD160C40, RIPEMD160S4A);\n  RIPEMD160_STEP_S (RIPEMD160_J , a1, b1, c1, d1, e1, w2[0], RIPEMD160C40, RIPEMD160S4B);\n  RIPEMD160_STEP_S (RIPEMD160_J , e1, a1, b1, c1, d1, w2[3], RIPEMD160C40, RIPEMD160S4C);\n  RIPEMD160_STEP_S (RIPEMD160_J , d1, e1, a1, b1, c1, w1[2], RIPEMD160C40, RIPEMD160S4D);\n  RIPEMD160_STEP_S (RIPEMD160_J , c1, d1, e1, a1, b1, w3[3], RIPEMD160C40, RIPEMD160S4E);\n  RIPEMD160_STEP_S (RIPEMD160_J , b1, c1, d1, e1, a1, w3[1], RIPEMD160C40, RIPEMD160S4F);\n\n  u32 a2 = digest[0];\n  u32 b2 = digest[1];\n  u32 c2 = digest[2];\n  u32 d2 = digest[3];\n  u32 e2 = digest[4];\n\n  RIPEMD160_STEP_S_WORKAROUND_BUG (RIPEMD160_J , a2, b2, c2, d2, e2, w1[1], RIPEMD160C50, RIPEMD160S50);\n  RIPEMD160_STEP_S (RIPEMD160_J , e2, a2, b2, c2, d2, w3[2], RIPEMD160C50, RIPEMD160S51);\n  RIPEMD160_STEP_S (RIPEMD160_J , d2, e2, a2, b2, c2, w1[3], RIPEMD160C50, RIPEMD160S52);\n  RIPEMD160_STEP_S (RIPEMD160_J , c2, d2, e2, a2, b2, w0[0], RIPEMD160C50, RIPEMD160S53);\n  RIPEMD160_STEP_S (RIPEMD160_J , b2, c2, d2, e2, a2, w2[1], RIPEMD160C50, RIPEMD160S54);\n  RIPEMD160_STEP_S (RIPEMD160_J , a2, b2, c2, d2, e2, w0[2], RIPEMD160C50, RIPEMD160S55);\n  RIPEMD160_STEP_S (RIPEMD160_J , e2, a2, b2, c2, d2, w2[3], RIPEMD160C50, RIPEMD160S56);\n  RIPEMD160_STEP_S (RIPEMD160_J , d2, e2, a2, b2, c2, w1[0], RIPEMD160C50, RIPEMD160S57);\n  RIPEMD160_STEP_S (RIPEMD160_J , c2, d2, e2, a2, b2, w3[1], RIPEMD160C50, RIPEMD160S58);\n  RIPEMD160_STEP_S (RIPEMD160_J , b2, c2, d2, e2, a2, w1[2], RIPEMD160C50, RIPEMD160S59);\n  RIPEMD160_STEP_S (RIPEMD160_J , a2, b2, c2, d2, e2, w3[3], RIPEMD160C50, RIPEMD160S5A);\n  RIPEMD160_STEP_S (RIPEMD160_J , e2, a2, b2, c2, d2, w2[0], RIPEMD160C50, RIPEMD160S5B);\n  RIPEMD160_STEP_S (RIPEMD160_J , d2, e2, a2, b2, c2, w0[1], RIPEMD160C50, RIPEMD160S5C);\n  RIPEMD160_STEP_S (RIPEMD160_J , c2, d2, e2, a2, b2, w2[2], RIPEMD160C50, RIPEMD160S5D);\n  RIPEMD160_STEP_S (RIPEMD160_J , b2, c2, d2, e2, a2, w0[3], RIPEMD160C50, RIPEMD160S5E);\n  RIPEMD160_STEP_S (RIPEMD160_J , a2, b2, c2, d2, e2, w3[0], RIPEMD160C50, RIPEMD160S5F);\n\n  RIPEMD160_STEP_S (RIPEMD160_Io, e2, a2, b2, c2, d2, w1[2], RIPEMD160C60, RIPEMD160S60);\n  RIPEMD160_STEP_S (RIPEMD160_Io, d2, e2, a2, b2, c2, w2[3], RIPEMD160C60, RIPEMD160S61);\n  RIPEMD160_STEP_S (RIPEMD160_Io, c2, d2, e2, a2, b2, w0[3], RIPEMD160C60, RIPEMD160S62);\n  RIPEMD160_STEP_S (RIPEMD160_Io, b2, c2, d2, e2, a2, w1[3], RIPEMD160C60, RIPEMD160S63);\n  RIPEMD160_STEP_S (RIPEMD160_Io, a2, b2, c2, d2, e2, w0[0], RIPEMD160C60, RIPEMD160S64);\n  RIPEMD160_STEP_S (RIPEMD160_Io, e2, a2, b2, c2, d2, w3[1], RIPEMD160C60, RIPEMD160S65);\n  RIPEMD160_STEP_S (RIPEMD160_Io, d2, e2, a2, b2, c2, w1[1], RIPEMD160C60, RIPEMD160S66);\n  RIPEMD160_STEP_S (RIPEMD160_Io, c2, d2, e2, a2, b2, w2[2], RIPEMD160C60, RIPEMD160S67);\n  RIPEMD160_STEP_S (RIPEMD160_Io, b2, c2, d2, e2, a2, w3[2], RIPEMD160C60, RIPEMD160S68);\n  RIPEMD160_STEP_S (RIPEMD160_Io, a2, b2, c2, d2, e2, w3[3], RIPEMD160C60, RIPEMD160S69);\n  RIPEMD160_STEP_S (RIPEMD160_Io, e2, a2, b2, c2, d2, w2[0], RIPEMD160C60, RIPEMD160S6A);\n  RIPEMD160_STEP_S (RIPEMD160_Io, d2, e2, a2, b2, c2, w3[0], RIPEMD160C60, RIPEMD160S6B);\n  RIPEMD160_STEP_S (RIPEMD160_Io, c2, d2, e2, a2, b2, w1[0], RIPEMD160C60, RIPEMD160S6C);\n  RIPEMD160_STEP_S (RIPEMD160_Io, b2, c2, d2, e2, a2, w2[1], RIPEMD160C60, RIPEMD160S6D);\n  RIPEMD160_STEP_S (RIPEMD160_Io, a2, b2, c2, d2, e2, w0[1], RIPEMD160C60, RIPEMD160S6E);\n  RIPEMD160_STEP_S (RIPEMD160_Io, e2, a2, b2, c2, d2, w0[2], RIPEMD160C60, RIPEMD160S6F);\n\n  RIPEMD160_STEP_S (RIPEMD160_H , d2, e2, a2, b2, c2, w3[3], RIPEMD160C70, RIPEMD160S70);\n  RIPEMD160_STEP_S (RIPEMD160_H , c2, d2, e2, a2, b2, w1[1], RIPEMD160C70, RIPEMD160S71);\n  RIPEMD160_STEP_S (RIPEMD160_H , b2, c2, d2, e2, a2, w0[1], RIPEMD160C70, RIPEMD160S72);\n  RIPEMD160_STEP_S (RIPEMD160_H , a2, b2, c2, d2, e2, w0[3], RIPEMD160C70, RIPEMD160S73);\n  RIPEMD160_STEP_S (RIPEMD160_H , e2, a2, b2, c2, d2, w1[3], RIPEMD160C70, RIPEMD160S74);\n  RIPEMD160_STEP_S (RIPEMD160_H , d2, e2, a2, b2, c2, w3[2], RIPEMD160C70, RIPEMD160S75);\n  RIPEMD160_STEP_S (RIPEMD160_H , c2, d2, e2, a2, b2, w1[2], RIPEMD160C70, RIPEMD160S76);\n  RIPEMD160_STEP_S (RIPEMD160_H , b2, c2, d2, e2, a2, w2[1], RIPEMD160C70, RIPEMD160S77);\n  RIPEMD160_STEP_S (RIPEMD160_H , a2, b2, c2, d2, e2, w2[3], RIPEMD160C70, RIPEMD160S78);\n  RIPEMD160_STEP_S (RIPEMD160_H , e2, a2, b2, c2, d2, w2[0], RIPEMD160C70, RIPEMD160S79);\n  RIPEMD160_STEP_S (RIPEMD160_H , d2, e2, a2, b2, c2, w3[0], RIPEMD160C70, RIPEMD160S7A);\n  RIPEMD160_STEP_S (RIPEMD160_H , c2, d2, e2, a2, b2, w0[2], RIPEMD160C70, RIPEMD160S7B);\n  RIPEMD160_STEP_S (RIPEMD160_H , b2, c2, d2, e2, a2, w2[2], RIPEMD160C70, RIPEMD160S7C);\n  RIPEMD160_STEP_S (RIPEMD160_H , a2, b2, c2, d2, e2, w0[0], RIPEMD160C70, RIPEMD160S7D);\n  RIPEMD160_STEP_S (RIPEMD160_H , e2, a2, b2, c2, d2, w1[0], RIPEMD160C70, RIPEMD160S7E);\n  RIPEMD160_STEP_S (RIPEMD160_H , d2, e2, a2, b2, c2, w3[1], RIPEMD160C70, RIPEMD160S7F);\n\n  RIPEMD160_STEP_S (RIPEMD160_Go, c2, d2, e2, a2, b2, w2[0], RIPEMD160C80, RIPEMD160S80);\n  RIPEMD160_STEP_S (RIPEMD160_Go, b2, c2, d2, e2, a2, w1[2], RIPEMD160C80, RIPEMD160S81);\n  RIPEMD160_STEP_S (RIPEMD160_Go, a2, b2, c2, d2, e2, w1[0], RIPEMD160C80, RIPEMD160S82);\n  RIPEMD160_STEP_S (RIPEMD160_Go, e2, a2, b2, c2, d2, w0[1], RIPEMD160C80, RIPEMD160S83);\n  RIPEMD160_STEP_S (RIPEMD160_Go, d2, e2, a2, b2, c2, w0[3], RIPEMD160C80, RIPEMD160S84);\n  RIPEMD160_STEP_S (RIPEMD160_Go, c2, d2, e2, a2, b2, w2[3], RIPEMD160C80, RIPEMD160S85);\n  RIPEMD160_STEP_S (RIPEMD160_Go, b2, c2, d2, e2, a2, w3[3], RIPEMD160C80, RIPEMD160S86);\n  RIPEMD160_STEP_S (RIPEMD160_Go, a2, b2, c2, d2, e2, w0[0], RIPEMD160C80, RIPEMD160S87);\n  RIPEMD160_STEP_S (RIPEMD160_Go, e2, a2, b2, c2, d2, w1[1], RIPEMD160C80, RIPEMD160S88);\n  RIPEMD160_STEP_S (RIPEMD160_Go, d2, e2, a2, b2, c2, w3[0], RIPEMD160C80, RIPEMD160S89);\n  RIPEMD160_STEP_S (RIPEMD160_Go, c2, d2, e2, a2, b2, w0[2], RIPEMD160C80, RIPEMD160S8A);\n  RIPEMD160_STEP_S (RIPEMD160_Go, b2, c2, d2, e2, a2, w3[1], RIPEMD160C80, RIPEMD160S8B);\n  RIPEMD160_STEP_S (RIPEMD160_Go, a2, b2, c2, d2, e2, w2[1], RIPEMD160C80, RIPEMD160S8C);\n  RIPEMD160_STEP_S (RIPEMD160_Go, e2, a2, b2, c2, d2, w1[3], RIPEMD160C80, RIPEMD160S8D);\n  RIPEMD160_STEP_S (RIPEMD160_Go, d2, e2, a2, b2, c2, w2[2], RIPEMD160C80, RIPEMD160S8E);\n  RIPEMD160_STEP_S (RIPEMD160_Go, c2, d2, e2, a2, b2, w3[2], RIPEMD160C80, RIPEMD160S8F);\n\n  RIPEMD160_STEP_S (RIPEMD160_F , b2, c2, d2, e2, a2, w3[0], RIPEMD160C90, RIPEMD160S90);\n  RIPEMD160_STEP_S (RIPEMD160_F , a2, b2, c2, d2, e2, w3[3], RIPEMD160C90, RIPEMD160S91);\n  RIPEMD160_STEP_S (RIPEMD160_F , e2, a2, b2, c2, d2, w2[2], RIPEMD160C90, RIPEMD160S92);\n  RIPEMD160_STEP_S (RIPEMD160_F , d2, e2, a2, b2, c2, w1[0], RIPEMD160C90, RIPEMD160S93);\n  RIPEMD160_STEP_S (RIPEMD160_F , c2, d2, e2, a2, b2, w0[1], RIPEMD160C90, RIPEMD160S94);\n  RIPEMD160_STEP_S (RIPEMD160_F , b2, c2, d2, e2, a2, w1[1], RIPEMD160C90, RIPEMD160S95);\n  RIPEMD160_STEP_S (RIPEMD160_F , a2, b2, c2, d2, e2, w2[0], RIPEMD160C90, RIPEMD160S96);\n  RIPEMD160_STEP_S (RIPEMD160_F , e2, a2, b2, c2, d2, w1[3], RIPEMD160C90, RIPEMD160S97);\n  RIPEMD160_STEP_S (RIPEMD160_F , d2, e2, a2, b2, c2, w1[2], RIPEMD160C90, RIPEMD160S98);\n  RIPEMD160_STEP_S (RIPEMD160_F , c2, d2, e2, a2, b2, w0[2], RIPEMD160C90, RIPEMD160S99);\n  RIPEMD160_STEP_S (RIPEMD160_F , b2, c2, d2, e2, a2, w3[1], RIPEMD160C90, RIPEMD160S9A);\n  RIPEMD160_STEP_S (RIPEMD160_F , a2, b2, c2, d2, e2, w3[2], RIPEMD160C90, RIPEMD160S9B);\n  RIPEMD160_STEP_S (RIPEMD160_F , e2, a2, b2, c2, d2, w0[0], RIPEMD160C90, RIPEMD160S9C);\n  RIPEMD160_STEP_S (RIPEMD160_F , d2, e2, a2, b2, c2, w0[3], RIPEMD160C90, RIPEMD160S9D);\n  RIPEMD160_STEP_S (RIPEMD160_F , c2, d2, e2, a2, b2, w2[1], RIPEMD160C90, RIPEMD160S9E);\n  RIPEMD160_STEP_S (RIPEMD160_F , b2, c2, d2, e2, a2, w2[3], RIPEMD160C90, RIPEMD160S9F);\n\n  const u32 a = digest[1] + c1 + d2;\n  const u32 b = digest[2] + d1 + e2;\n  const u32 c = digest[3] + e1 + a2;\n  const u32 d = digest[4] + a1 + b2;\n  const u32 e = digest[0] + b1 + c2;\n\n  digest[0] = a;\n  digest[1] = b;\n  digest[2] = c;\n  digest[3] = d;\n  digest[4] = e;\n}\n\nDECLSPEC void ripemd160_init (PRIVATE_AS ripemd160_ctx_t *ctx)\n{\n  ctx->h[0] = RIPEMD160M_A;\n  ctx->h[1] = RIPEMD160M_B;\n  ctx->h[2] = RIPEMD160M_C;\n  ctx->h[3] = RIPEMD160M_D;\n  ctx->h[4] = RIPEMD160M_E;\n\n  ctx->w0[0] = 0;\n  ctx->w0[1] = 0;\n  ctx->w0[2] = 0;\n  ctx->w0[3] = 0;\n  ctx->w1[0] = 0;\n  ctx->w1[1] = 0;\n  ctx->w1[2] = 0;\n  ctx->w1[3] = 0;\n  ctx->w2[0] = 0;\n  ctx->w2[1] = 0;\n  ctx->w2[2] = 0;\n  ctx->w2[3] = 0;\n  ctx->w3[0] = 0;\n  ctx->w3[1] = 0;\n  ctx->w3[2] = 0;\n  ctx->w3[3] = 0;\n\n  ctx->len = 0;\n}\n\nDECLSPEC void ripemd160_update_64 (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len)\n{\n  if (len == 0) return;\n\n  const int pos = ctx->len & 63;\n\n  ctx->len += len;\n\n  if (pos == 0)\n  {\n    ctx->w0[0] = w0[0];\n    ctx->w0[1] = w0[1];\n    ctx->w0[2] = w0[2];\n    ctx->w0[3] = w0[3];\n    ctx->w1[0] = w1[0];\n    ctx->w1[1] = w1[1];\n    ctx->w1[2] = w1[2];\n    ctx->w1[3] = w1[3];\n    ctx->w2[0] = w2[0];\n    ctx->w2[1] = w2[1];\n    ctx->w2[2] = w2[2];\n    ctx->w2[3] = w2[3];\n    ctx->w3[0] = w3[0];\n    ctx->w3[1] = w3[1];\n    ctx->w3[2] = w3[2];\n    ctx->w3[3] = w3[3];\n\n    if (len == 64)\n    {\n      ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = 0;\n      ctx->w0[1] = 0;\n      ctx->w0[2] = 0;\n      ctx->w0[3] = 0;\n      ctx->w1[0] = 0;\n      ctx->w1[1] = 0;\n      ctx->w1[2] = 0;\n      ctx->w1[3] = 0;\n      ctx->w2[0] = 0;\n      ctx->w2[1] = 0;\n      ctx->w2[2] = 0;\n      ctx->w2[3] = 0;\n      ctx->w3[0] = 0;\n      ctx->w3[1] = 0;\n      ctx->w3[2] = 0;\n      ctx->w3[3] = 0;\n    }\n  }\n  else\n  {\n    if ((pos + len) < 64)\n    {\n      switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n    }\n    else\n    {\n      u32 c0[4] = { 0 };\n      u32 c1[4] = { 0 };\n      u32 c2[4] = { 0 };\n      u32 c3[4] = { 0 };\n\n      switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n\n      ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = c0[0];\n      ctx->w0[1] = c0[1];\n      ctx->w0[2] = c0[2];\n      ctx->w0[3] = c0[3];\n      ctx->w1[0] = c1[0];\n      ctx->w1[1] = c1[1];\n      ctx->w1[2] = c1[2];\n      ctx->w1[3] = c1[3];\n      ctx->w2[0] = c2[0];\n      ctx->w2[1] = c2[1];\n      ctx->w2[2] = c2[2];\n      ctx->w2[3] = c2[3];\n      ctx->w3[0] = c3[0];\n      ctx->w3[1] = c3[1];\n      ctx->w3[2] = c3[2];\n      ctx->w3[3] = c3[3];\n    }\n  }\n}\n\nDECLSPEC void ripemd160_update (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void ripemd160_update_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void ripemd160_update_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      ripemd160_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void ripemd160_update_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      enc_buf[ 0] = hc_swap32_S (enc_buf[ 0]);\n      enc_buf[ 1] = hc_swap32_S (enc_buf[ 1]);\n      enc_buf[ 2] = hc_swap32_S (enc_buf[ 2]);\n      enc_buf[ 3] = hc_swap32_S (enc_buf[ 3]);\n      enc_buf[ 4] = hc_swap32_S (enc_buf[ 4]);\n      enc_buf[ 5] = hc_swap32_S (enc_buf[ 5]);\n      enc_buf[ 6] = hc_swap32_S (enc_buf[ 6]);\n      enc_buf[ 7] = hc_swap32_S (enc_buf[ 7]);\n      enc_buf[ 8] = hc_swap32_S (enc_buf[ 8]);\n      enc_buf[ 9] = hc_swap32_S (enc_buf[ 9]);\n      enc_buf[10] = hc_swap32_S (enc_buf[10]);\n      enc_buf[11] = hc_swap32_S (enc_buf[11]);\n      enc_buf[12] = hc_swap32_S (enc_buf[12]);\n      enc_buf[13] = hc_swap32_S (enc_buf[13]);\n      enc_buf[14] = hc_swap32_S (enc_buf[14]);\n      enc_buf[15] = hc_swap32_S (enc_buf[15]);\n\n      ripemd160_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void ripemd160_update_global (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void ripemd160_update_global_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void ripemd160_update_global_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan_global (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next_global (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      ripemd160_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void ripemd160_update_global_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan_global (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next_global (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      enc_buf[ 0] = hc_swap32_S (enc_buf[ 0]);\n      enc_buf[ 1] = hc_swap32_S (enc_buf[ 1]);\n      enc_buf[ 2] = hc_swap32_S (enc_buf[ 2]);\n      enc_buf[ 3] = hc_swap32_S (enc_buf[ 3]);\n      enc_buf[ 4] = hc_swap32_S (enc_buf[ 4]);\n      enc_buf[ 5] = hc_swap32_S (enc_buf[ 5]);\n      enc_buf[ 6] = hc_swap32_S (enc_buf[ 6]);\n      enc_buf[ 7] = hc_swap32_S (enc_buf[ 7]);\n      enc_buf[ 8] = hc_swap32_S (enc_buf[ 8]);\n      enc_buf[ 9] = hc_swap32_S (enc_buf[ 9]);\n      enc_buf[10] = hc_swap32_S (enc_buf[10]);\n      enc_buf[11] = hc_swap32_S (enc_buf[11]);\n      enc_buf[12] = hc_swap32_S (enc_buf[12]);\n      enc_buf[13] = hc_swap32_S (enc_buf[13]);\n      enc_buf[14] = hc_swap32_S (enc_buf[14]);\n      enc_buf[15] = hc_swap32_S (enc_buf[15]);\n\n      ripemd160_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    ripemd160_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void ripemd160_final (PRIVATE_AS ripemd160_ctx_t *ctx)\n{\n  const int pos = ctx->len & 63;\n\n  append_0x80_4x4_S (ctx->w0, ctx->w1, ctx->w2, ctx->w3, pos);\n\n  if (pos >= 56)\n  {\n    ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n    ctx->w0[0] = 0;\n    ctx->w0[1] = 0;\n    ctx->w0[2] = 0;\n    ctx->w0[3] = 0;\n    ctx->w1[0] = 0;\n    ctx->w1[1] = 0;\n    ctx->w1[2] = 0;\n    ctx->w1[3] = 0;\n    ctx->w2[0] = 0;\n    ctx->w2[1] = 0;\n    ctx->w2[2] = 0;\n    ctx->w2[3] = 0;\n    ctx->w3[0] = 0;\n    ctx->w3[1] = 0;\n    ctx->w3[2] = 0;\n    ctx->w3[3] = 0;\n  }\n\n  ctx->w3[2] = ctx->len * 8;\n  ctx->w3[3] = 0;\n\n  ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n}\n\n// ripemd160_hmac\n\nDECLSPEC void ripemd160_hmac_init_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3)\n{\n  u32 a0[4];\n  u32 a1[4];\n  u32 a2[4];\n  u32 a3[4];\n\n  // ipad\n\n  a0[0] = w0[0] ^ 0x36363636;\n  a0[1] = w0[1] ^ 0x36363636;\n  a0[2] = w0[2] ^ 0x36363636;\n  a0[3] = w0[3] ^ 0x36363636;\n  a1[0] = w1[0] ^ 0x36363636;\n  a1[1] = w1[1] ^ 0x36363636;\n  a1[2] = w1[2] ^ 0x36363636;\n  a1[3] = w1[3] ^ 0x36363636;\n  a2[0] = w2[0] ^ 0x36363636;\n  a2[1] = w2[1] ^ 0x36363636;\n  a2[2] = w2[2] ^ 0x36363636;\n  a2[3] = w2[3] ^ 0x36363636;\n  a3[0] = w3[0] ^ 0x36363636;\n  a3[1] = w3[1] ^ 0x36363636;\n  a3[2] = w3[2] ^ 0x36363636;\n  a3[3] = w3[3] ^ 0x36363636;\n\n  ripemd160_init (&ctx->ipad);\n\n  ripemd160_update_64 (&ctx->ipad, a0, a1, a2, a3, 64);\n\n  // opad\n\n  u32 b0[4];\n  u32 b1[4];\n  u32 b2[4];\n  u32 b3[4];\n\n  b0[0] = w0[0] ^ 0x5c5c5c5c;\n  b0[1] = w0[1] ^ 0x5c5c5c5c;\n  b0[2] = w0[2] ^ 0x5c5c5c5c;\n  b0[3] = w0[3] ^ 0x5c5c5c5c;\n  b1[0] = w1[0] ^ 0x5c5c5c5c;\n  b1[1] = w1[1] ^ 0x5c5c5c5c;\n  b1[2] = w1[2] ^ 0x5c5c5c5c;\n  b1[3] = w1[3] ^ 0x5c5c5c5c;\n  b2[0] = w2[0] ^ 0x5c5c5c5c;\n  b2[1] = w2[1] ^ 0x5c5c5c5c;\n  b2[2] = w2[2] ^ 0x5c5c5c5c;\n  b2[3] = w2[3] ^ 0x5c5c5c5c;\n  b3[0] = w3[0] ^ 0x5c5c5c5c;\n  b3[1] = w3[1] ^ 0x5c5c5c5c;\n  b3[2] = w3[2] ^ 0x5c5c5c5c;\n  b3[3] = w3[3] ^ 0x5c5c5c5c;\n\n  ripemd160_init (&ctx->opad);\n\n  ripemd160_update_64 (&ctx->opad, b0, b1, b2, b3, 64);\n}\n\nDECLSPEC void ripemd160_hmac_init (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    ripemd160_ctx_t tmp;\n\n    ripemd160_init (&tmp);\n\n    ripemd160_update (&tmp, w, len);\n\n    ripemd160_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = 0;\n    w1[2] = 0;\n    w1[3] = 0;\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = w[ 0];\n    w0[1] = w[ 1];\n    w0[2] = w[ 2];\n    w0[3] = w[ 3];\n    w1[0] = w[ 4];\n    w1[1] = w[ 5];\n    w1[2] = w[ 6];\n    w1[3] = w[ 7];\n    w2[0] = w[ 8];\n    w2[1] = w[ 9];\n    w2[2] = w[10];\n    w2[3] = w[11];\n    w3[0] = w[12];\n    w3[1] = w[13];\n    w3[2] = w[14];\n    w3[3] = w[15];\n  }\n\n  ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void ripemd160_hmac_init_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    ripemd160_ctx_t tmp;\n\n    ripemd160_init (&tmp);\n\n    ripemd160_update_swap (&tmp, w, len);\n\n    ripemd160_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = 0;\n    w1[2] = 0;\n    w1[3] = 0;\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = hc_swap32_S (w[ 0]);\n    w0[1] = hc_swap32_S (w[ 1]);\n    w0[2] = hc_swap32_S (w[ 2]);\n    w0[3] = hc_swap32_S (w[ 3]);\n    w1[0] = hc_swap32_S (w[ 4]);\n    w1[1] = hc_swap32_S (w[ 5]);\n    w1[2] = hc_swap32_S (w[ 6]);\n    w1[3] = hc_swap32_S (w[ 7]);\n    w2[0] = hc_swap32_S (w[ 8]);\n    w2[1] = hc_swap32_S (w[ 9]);\n    w2[2] = hc_swap32_S (w[10]);\n    w2[3] = hc_swap32_S (w[11]);\n    w3[0] = hc_swap32_S (w[12]);\n    w3[1] = hc_swap32_S (w[13]);\n    w3[2] = hc_swap32_S (w[14]);\n    w3[3] = hc_swap32_S (w[15]);\n  }\n\n  ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void ripemd160_hmac_init_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    ripemd160_ctx_t tmp;\n\n    ripemd160_init (&tmp);\n\n    ripemd160_update_global (&tmp, w, len);\n\n    ripemd160_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = 0;\n    w1[2] = 0;\n    w1[3] = 0;\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = w[ 0];\n    w0[1] = w[ 1];\n    w0[2] = w[ 2];\n    w0[3] = w[ 3];\n    w1[0] = w[ 4];\n    w1[1] = w[ 5];\n    w1[2] = w[ 6];\n    w1[3] = w[ 7];\n    w2[0] = w[ 8];\n    w2[1] = w[ 9];\n    w2[2] = w[10];\n    w2[3] = w[11];\n    w3[0] = w[12];\n    w3[1] = w[13];\n    w3[2] = w[14];\n    w3[3] = w[15];\n  }\n\n  ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void ripemd160_hmac_init_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    ripemd160_ctx_t tmp;\n\n    ripemd160_init (&tmp);\n\n    ripemd160_update_global_swap (&tmp, w, len);\n\n    ripemd160_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = 0;\n    w1[2] = 0;\n    w1[3] = 0;\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = hc_swap32_S (w[ 0]);\n    w0[1] = hc_swap32_S (w[ 1]);\n    w0[2] = hc_swap32_S (w[ 2]);\n    w0[3] = hc_swap32_S (w[ 3]);\n    w1[0] = hc_swap32_S (w[ 4]);\n    w1[1] = hc_swap32_S (w[ 5]);\n    w1[2] = hc_swap32_S (w[ 6]);\n    w1[3] = hc_swap32_S (w[ 7]);\n    w2[0] = hc_swap32_S (w[ 8]);\n    w2[1] = hc_swap32_S (w[ 9]);\n    w2[2] = hc_swap32_S (w[10]);\n    w2[3] = hc_swap32_S (w[11]);\n    w3[0] = hc_swap32_S (w[12]);\n    w3[1] = hc_swap32_S (w[13]);\n    w3[2] = hc_swap32_S (w[14]);\n    w3[3] = hc_swap32_S (w[15]);\n  }\n\n  ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void ripemd160_hmac_update_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len)\n{\n  ripemd160_update_64 (&ctx->ipad, w0, w1, w2, w3, len);\n}\n\nDECLSPEC void ripemd160_hmac_update (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  ripemd160_update (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  ripemd160_update_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  ripemd160_update_utf16le (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  ripemd160_update_utf16le_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  ripemd160_update_global (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  ripemd160_update_global_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_global_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  ripemd160_update_global_utf16le (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_global_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  ripemd160_update_global_utf16le_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_final (PRIVATE_AS ripemd160_hmac_ctx_t *ctx)\n{\n  ripemd160_final (&ctx->ipad);\n\n  ctx->opad.w0[0] = ctx->ipad.h[0];\n  ctx->opad.w0[1] = ctx->ipad.h[1];\n  ctx->opad.w0[2] = ctx->ipad.h[2];\n  ctx->opad.w0[3] = ctx->ipad.h[3];\n  ctx->opad.w1[0] = ctx->ipad.h[4];\n  ctx->opad.w1[1] = 0;\n  ctx->opad.w1[2] = 0;\n  ctx->opad.w1[3] = 0;\n  ctx->opad.w2[0] = 0;\n  ctx->opad.w2[1] = 0;\n  ctx->opad.w2[2] = 0;\n  ctx->opad.w2[3] = 0;\n  ctx->opad.w3[0] = 0;\n  ctx->opad.w3[1] = 0;\n  ctx->opad.w3[2] = 0;\n  ctx->opad.w3[3] = 0;\n\n  ctx->opad.len += 20;\n\n  ripemd160_final (&ctx->opad);\n}\n\n// while input buf can be a vector datatype, the length of the different elements can not\n\nDECLSPEC void ripemd160_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest)\n{\n  u32x a1 = digest[0];\n  u32x b1 = digest[1];\n  u32x c1 = digest[2];\n  u32x d1 = digest[3];\n  u32x e1 = digest[4];\n\n  RIPEMD160_STEP (RIPEMD160_F , a1, b1, c1, d1, e1, w0[0], RIPEMD160C00, RIPEMD160S00);\n  RIPEMD160_STEP (RIPEMD160_F , e1, a1, b1, c1, d1, w0[1], RIPEMD160C00, RIPEMD160S01);\n  RIPEMD160_STEP (RIPEMD160_F , d1, e1, a1, b1, c1, w0[2], RIPEMD160C00, RIPEMD160S02);\n  RIPEMD160_STEP (RIPEMD160_F , c1, d1, e1, a1, b1, w0[3], RIPEMD160C00, RIPEMD160S03);\n  RIPEMD160_STEP (RIPEMD160_F , b1, c1, d1, e1, a1, w1[0], RIPEMD160C00, RIPEMD160S04);\n  RIPEMD160_STEP (RIPEMD160_F , a1, b1, c1, d1, e1, w1[1], RIPEMD160C00, RIPEMD160S05);\n  RIPEMD160_STEP (RIPEMD160_F , e1, a1, b1, c1, d1, w1[2], RIPEMD160C00, RIPEMD160S06);\n  RIPEMD160_STEP (RIPEMD160_F , d1, e1, a1, b1, c1, w1[3], RIPEMD160C00, RIPEMD160S07);\n  RIPEMD160_STEP (RIPEMD160_F , c1, d1, e1, a1, b1, w2[0], RIPEMD160C00, RIPEMD160S08);\n  RIPEMD160_STEP (RIPEMD160_F , b1, c1, d1, e1, a1, w2[1], RIPEMD160C00, RIPEMD160S09);\n  RIPEMD160_STEP (RIPEMD160_F , a1, b1, c1, d1, e1, w2[2], RIPEMD160C00, RIPEMD160S0A);\n  RIPEMD160_STEP (RIPEMD160_F , e1, a1, b1, c1, d1, w2[3], RIPEMD160C00, RIPEMD160S0B);\n  RIPEMD160_STEP (RIPEMD160_F , d1, e1, a1, b1, c1, w3[0], RIPEMD160C00, RIPEMD160S0C);\n  RIPEMD160_STEP (RIPEMD160_F , c1, d1, e1, a1, b1, w3[1], RIPEMD160C00, RIPEMD160S0D);\n  RIPEMD160_STEP (RIPEMD160_F , b1, c1, d1, e1, a1, w3[2], RIPEMD160C00, RIPEMD160S0E);\n  RIPEMD160_STEP (RIPEMD160_F , a1, b1, c1, d1, e1, w3[3], RIPEMD160C00, RIPEMD160S0F);\n\n  RIPEMD160_STEP (RIPEMD160_Go, e1, a1, b1, c1, d1, w1[3], RIPEMD160C10, RIPEMD160S10);\n  RIPEMD160_STEP (RIPEMD160_Go, d1, e1, a1, b1, c1, w1[0], RIPEMD160C10, RIPEMD160S11);\n  RIPEMD160_STEP (RIPEMD160_Go, c1, d1, e1, a1, b1, w3[1], RIPEMD160C10, RIPEMD160S12);\n  RIPEMD160_STEP (RIPEMD160_Go, b1, c1, d1, e1, a1, w0[1], RIPEMD160C10, RIPEMD160S13);\n  RIPEMD160_STEP (RIPEMD160_Go, a1, b1, c1, d1, e1, w2[2], RIPEMD160C10, RIPEMD160S14);\n  RIPEMD160_STEP (RIPEMD160_Go, e1, a1, b1, c1, d1, w1[2], RIPEMD160C10, RIPEMD160S15);\n  RIPEMD160_STEP (RIPEMD160_Go, d1, e1, a1, b1, c1, w3[3], RIPEMD160C10, RIPEMD160S16);\n  RIPEMD160_STEP (RIPEMD160_Go, c1, d1, e1, a1, b1, w0[3], RIPEMD160C10, RIPEMD160S17);\n  RIPEMD160_STEP (RIPEMD160_Go, b1, c1, d1, e1, a1, w3[0], RIPEMD160C10, RIPEMD160S18);\n  RIPEMD160_STEP (RIPEMD160_Go, a1, b1, c1, d1, e1, w0[0], RIPEMD160C10, RIPEMD160S19);\n  RIPEMD160_STEP (RIPEMD160_Go, e1, a1, b1, c1, d1, w2[1], RIPEMD160C10, RIPEMD160S1A);\n  RIPEMD160_STEP (RIPEMD160_Go, d1, e1, a1, b1, c1, w1[1], RIPEMD160C10, RIPEMD160S1B);\n  RIPEMD160_STEP (RIPEMD160_Go, c1, d1, e1, a1, b1, w0[2], RIPEMD160C10, RIPEMD160S1C);\n  RIPEMD160_STEP (RIPEMD160_Go, b1, c1, d1, e1, a1, w3[2], RIPEMD160C10, RIPEMD160S1D);\n  RIPEMD160_STEP (RIPEMD160_Go, a1, b1, c1, d1, e1, w2[3], RIPEMD160C10, RIPEMD160S1E);\n  RIPEMD160_STEP (RIPEMD160_Go, e1, a1, b1, c1, d1, w2[0], RIPEMD160C10, RIPEMD160S1F);\n\n  RIPEMD160_STEP (RIPEMD160_H , d1, e1, a1, b1, c1, w0[3], RIPEMD160C20, RIPEMD160S20);\n  RIPEMD160_STEP (RIPEMD160_H , c1, d1, e1, a1, b1, w2[2], RIPEMD160C20, RIPEMD160S21);\n  RIPEMD160_STEP (RIPEMD160_H , b1, c1, d1, e1, a1, w3[2], RIPEMD160C20, RIPEMD160S22);\n  RIPEMD160_STEP (RIPEMD160_H , a1, b1, c1, d1, e1, w1[0], RIPEMD160C20, RIPEMD160S23);\n  RIPEMD160_STEP (RIPEMD160_H , e1, a1, b1, c1, d1, w2[1], RIPEMD160C20, RIPEMD160S24);\n  RIPEMD160_STEP (RIPEMD160_H , d1, e1, a1, b1, c1, w3[3], RIPEMD160C20, RIPEMD160S25);\n  RIPEMD160_STEP (RIPEMD160_H , c1, d1, e1, a1, b1, w2[0], RIPEMD160C20, RIPEMD160S26);\n  RIPEMD160_STEP (RIPEMD160_H , b1, c1, d1, e1, a1, w0[1], RIPEMD160C20, RIPEMD160S27);\n  RIPEMD160_STEP (RIPEMD160_H , a1, b1, c1, d1, e1, w0[2], RIPEMD160C20, RIPEMD160S28);\n  RIPEMD160_STEP (RIPEMD160_H , e1, a1, b1, c1, d1, w1[3], RIPEMD160C20, RIPEMD160S29);\n  RIPEMD160_STEP (RIPEMD160_H , d1, e1, a1, b1, c1, w0[0], RIPEMD160C20, RIPEMD160S2A);\n  RIPEMD160_STEP (RIPEMD160_H , c1, d1, e1, a1, b1, w1[2], RIPEMD160C20, RIPEMD160S2B);\n  RIPEMD160_STEP (RIPEMD160_H , b1, c1, d1, e1, a1, w3[1], RIPEMD160C20, RIPEMD160S2C);\n  RIPEMD160_STEP (RIPEMD160_H , a1, b1, c1, d1, e1, w2[3], RIPEMD160C20, RIPEMD160S2D);\n  RIPEMD160_STEP (RIPEMD160_H , e1, a1, b1, c1, d1, w1[1], RIPEMD160C20, RIPEMD160S2E);\n  RIPEMD160_STEP (RIPEMD160_H , d1, e1, a1, b1, c1, w3[0], RIPEMD160C20, RIPEMD160S2F);\n\n  RIPEMD160_STEP (RIPEMD160_Io, c1, d1, e1, a1, b1, w0[1], RIPEMD160C30, RIPEMD160S30);\n  RIPEMD160_STEP (RIPEMD160_Io, b1, c1, d1, e1, a1, w2[1], RIPEMD160C30, RIPEMD160S31);\n  RIPEMD160_STEP (RIPEMD160_Io, a1, b1, c1, d1, e1, w2[3], RIPEMD160C30, RIPEMD160S32);\n  RIPEMD160_STEP (RIPEMD160_Io, e1, a1, b1, c1, d1, w2[2], RIPEMD160C30, RIPEMD160S33);\n  RIPEMD160_STEP (RIPEMD160_Io, d1, e1, a1, b1, c1, w0[0], RIPEMD160C30, RIPEMD160S34);\n  RIPEMD160_STEP (RIPEMD160_Io, c1, d1, e1, a1, b1, w2[0], RIPEMD160C30, RIPEMD160S35);\n  RIPEMD160_STEP (RIPEMD160_Io, b1, c1, d1, e1, a1, w3[0], RIPEMD160C30, RIPEMD160S36);\n  RIPEMD160_STEP (RIPEMD160_Io, a1, b1, c1, d1, e1, w1[0], RIPEMD160C30, RIPEMD160S37);\n  RIPEMD160_STEP (RIPEMD160_Io, e1, a1, b1, c1, d1, w3[1], RIPEMD160C30, RIPEMD160S38);\n  RIPEMD160_STEP (RIPEMD160_Io, d1, e1, a1, b1, c1, w0[3], RIPEMD160C30, RIPEMD160S39);\n  RIPEMD160_STEP (RIPEMD160_Io, c1, d1, e1, a1, b1, w1[3], RIPEMD160C30, RIPEMD160S3A);\n  RIPEMD160_STEP (RIPEMD160_Io, b1, c1, d1, e1, a1, w3[3], RIPEMD160C30, RIPEMD160S3B);\n  RIPEMD160_STEP (RIPEMD160_Io, a1, b1, c1, d1, e1, w3[2], RIPEMD160C30, RIPEMD160S3C);\n  RIPEMD160_STEP (RIPEMD160_Io, e1, a1, b1, c1, d1, w1[1], RIPEMD160C30, RIPEMD160S3D);\n  RIPEMD160_STEP (RIPEMD160_Io, d1, e1, a1, b1, c1, w1[2], RIPEMD160C30, RIPEMD160S3E);\n  RIPEMD160_STEP (RIPEMD160_Io, c1, d1, e1, a1, b1, w0[2], RIPEMD160C30, RIPEMD160S3F);\n\n  RIPEMD160_STEP (RIPEMD160_J , b1, c1, d1, e1, a1, w1[0], RIPEMD160C40, RIPEMD160S40);\n  RIPEMD160_STEP (RIPEMD160_J , a1, b1, c1, d1, e1, w0[0], RIPEMD160C40, RIPEMD160S41);\n  RIPEMD160_STEP (RIPEMD160_J , e1, a1, b1, c1, d1, w1[1], RIPEMD160C40, RIPEMD160S42);\n  RIPEMD160_STEP (RIPEMD160_J , d1, e1, a1, b1, c1, w2[1], RIPEMD160C40, RIPEMD160S43);\n  RIPEMD160_STEP (RIPEMD160_J , c1, d1, e1, a1, b1, w1[3], RIPEMD160C40, RIPEMD160S44);\n  RIPEMD160_STEP (RIPEMD160_J , b1, c1, d1, e1, a1, w3[0], RIPEMD160C40, RIPEMD160S45);\n  RIPEMD160_STEP (RIPEMD160_J , a1, b1, c1, d1, e1, w0[2], RIPEMD160C40, RIPEMD160S46);\n  RIPEMD160_STEP (RIPEMD160_J , e1, a1, b1, c1, d1, w2[2], RIPEMD160C40, RIPEMD160S47);\n  RIPEMD160_STEP (RIPEMD160_J , d1, e1, a1, b1, c1, w3[2], RIPEMD160C40, RIPEMD160S48);\n  RIPEMD160_STEP (RIPEMD160_J , c1, d1, e1, a1, b1, w0[1], RIPEMD160C40, RIPEMD160S49);\n  RIPEMD160_STEP (RIPEMD160_J , b1, c1, d1, e1, a1, w0[3], RIPEMD160C40, RIPEMD160S4A);\n  RIPEMD160_STEP (RIPEMD160_J , a1, b1, c1, d1, e1, w2[0], RIPEMD160C40, RIPEMD160S4B);\n  RIPEMD160_STEP (RIPEMD160_J , e1, a1, b1, c1, d1, w2[3], RIPEMD160C40, RIPEMD160S4C);\n  RIPEMD160_STEP (RIPEMD160_J , d1, e1, a1, b1, c1, w1[2], RIPEMD160C40, RIPEMD160S4D);\n  RIPEMD160_STEP (RIPEMD160_J , c1, d1, e1, a1, b1, w3[3], RIPEMD160C40, RIPEMD160S4E);\n  RIPEMD160_STEP (RIPEMD160_J , b1, c1, d1, e1, a1, w3[1], RIPEMD160C40, RIPEMD160S4F);\n\n  u32x a2 = digest[0];\n  u32x b2 = digest[1];\n  u32x c2 = digest[2];\n  u32x d2 = digest[3];\n  u32x e2 = digest[4];\n\n  RIPEMD160_STEP_WORKAROUND_BUG (RIPEMD160_J , a2, b2, c2, d2, e2, w1[1], RIPEMD160C50, RIPEMD160S50);\n  RIPEMD160_STEP (RIPEMD160_J , e2, a2, b2, c2, d2, w3[2], RIPEMD160C50, RIPEMD160S51);\n  RIPEMD160_STEP (RIPEMD160_J , d2, e2, a2, b2, c2, w1[3], RIPEMD160C50, RIPEMD160S52);\n  RIPEMD160_STEP (RIPEMD160_J , c2, d2, e2, a2, b2, w0[0], RIPEMD160C50, RIPEMD160S53);\n  RIPEMD160_STEP (RIPEMD160_J , b2, c2, d2, e2, a2, w2[1], RIPEMD160C50, RIPEMD160S54);\n  RIPEMD160_STEP (RIPEMD160_J , a2, b2, c2, d2, e2, w0[2], RIPEMD160C50, RIPEMD160S55);\n  RIPEMD160_STEP (RIPEMD160_J , e2, a2, b2, c2, d2, w2[3], RIPEMD160C50, RIPEMD160S56);\n  RIPEMD160_STEP (RIPEMD160_J , d2, e2, a2, b2, c2, w1[0], RIPEMD160C50, RIPEMD160S57);\n  RIPEMD160_STEP (RIPEMD160_J , c2, d2, e2, a2, b2, w3[1], RIPEMD160C50, RIPEMD160S58);\n  RIPEMD160_STEP (RIPEMD160_J , b2, c2, d2, e2, a2, w1[2], RIPEMD160C50, RIPEMD160S59);\n  RIPEMD160_STEP (RIPEMD160_J , a2, b2, c2, d2, e2, w3[3], RIPEMD160C50, RIPEMD160S5A);\n  RIPEMD160_STEP (RIPEMD160_J , e2, a2, b2, c2, d2, w2[0], RIPEMD160C50, RIPEMD160S5B);\n  RIPEMD160_STEP (RIPEMD160_J , d2, e2, a2, b2, c2, w0[1], RIPEMD160C50, RIPEMD160S5C);\n  RIPEMD160_STEP (RIPEMD160_J , c2, d2, e2, a2, b2, w2[2], RIPEMD160C50, RIPEMD160S5D);\n  RIPEMD160_STEP (RIPEMD160_J , b2, c2, d2, e2, a2, w0[3], RIPEMD160C50, RIPEMD160S5E);\n  RIPEMD160_STEP (RIPEMD160_J , a2, b2, c2, d2, e2, w3[0], RIPEMD160C50, RIPEMD160S5F);\n\n  RIPEMD160_STEP (RIPEMD160_Io, e2, a2, b2, c2, d2, w1[2], RIPEMD160C60, RIPEMD160S60);\n  RIPEMD160_STEP (RIPEMD160_Io, d2, e2, a2, b2, c2, w2[3], RIPEMD160C60, RIPEMD160S61);\n  RIPEMD160_STEP (RIPEMD160_Io, c2, d2, e2, a2, b2, w0[3], RIPEMD160C60, RIPEMD160S62);\n  RIPEMD160_STEP (RIPEMD160_Io, b2, c2, d2, e2, a2, w1[3], RIPEMD160C60, RIPEMD160S63);\n  RIPEMD160_STEP (RIPEMD160_Io, a2, b2, c2, d2, e2, w0[0], RIPEMD160C60, RIPEMD160S64);\n  RIPEMD160_STEP (RIPEMD160_Io, e2, a2, b2, c2, d2, w3[1], RIPEMD160C60, RIPEMD160S65);\n  RIPEMD160_STEP (RIPEMD160_Io, d2, e2, a2, b2, c2, w1[1], RIPEMD160C60, RIPEMD160S66);\n  RIPEMD160_STEP (RIPEMD160_Io, c2, d2, e2, a2, b2, w2[2], RIPEMD160C60, RIPEMD160S67);\n  RIPEMD160_STEP (RIPEMD160_Io, b2, c2, d2, e2, a2, w3[2], RIPEMD160C60, RIPEMD160S68);\n  RIPEMD160_STEP (RIPEMD160_Io, a2, b2, c2, d2, e2, w3[3], RIPEMD160C60, RIPEMD160S69);\n  RIPEMD160_STEP (RIPEMD160_Io, e2, a2, b2, c2, d2, w2[0], RIPEMD160C60, RIPEMD160S6A);\n  RIPEMD160_STEP (RIPEMD160_Io, d2, e2, a2, b2, c2, w3[0], RIPEMD160C60, RIPEMD160S6B);\n  RIPEMD160_STEP (RIPEMD160_Io, c2, d2, e2, a2, b2, w1[0], RIPEMD160C60, RIPEMD160S6C);\n  RIPEMD160_STEP (RIPEMD160_Io, b2, c2, d2, e2, a2, w2[1], RIPEMD160C60, RIPEMD160S6D);\n  RIPEMD160_STEP (RIPEMD160_Io, a2, b2, c2, d2, e2, w0[1], RIPEMD160C60, RIPEMD160S6E);\n  RIPEMD160_STEP (RIPEMD160_Io, e2, a2, b2, c2, d2, w0[2], RIPEMD160C60, RIPEMD160S6F);\n\n  RIPEMD160_STEP (RIPEMD160_H , d2, e2, a2, b2, c2, w3[3], RIPEMD160C70, RIPEMD160S70);\n  RIPEMD160_STEP (RIPEMD160_H , c2, d2, e2, a2, b2, w1[1], RIPEMD160C70, RIPEMD160S71);\n  RIPEMD160_STEP (RIPEMD160_H , b2, c2, d2, e2, a2, w0[1], RIPEMD160C70, RIPEMD160S72);\n  RIPEMD160_STEP (RIPEMD160_H , a2, b2, c2, d2, e2, w0[3], RIPEMD160C70, RIPEMD160S73);\n  RIPEMD160_STEP (RIPEMD160_H , e2, a2, b2, c2, d2, w1[3], RIPEMD160C70, RIPEMD160S74);\n  RIPEMD160_STEP (RIPEMD160_H , d2, e2, a2, b2, c2, w3[2], RIPEMD160C70, RIPEMD160S75);\n  RIPEMD160_STEP (RIPEMD160_H , c2, d2, e2, a2, b2, w1[2], RIPEMD160C70, RIPEMD160S76);\n  RIPEMD160_STEP (RIPEMD160_H , b2, c2, d2, e2, a2, w2[1], RIPEMD160C70, RIPEMD160S77);\n  RIPEMD160_STEP (RIPEMD160_H , a2, b2, c2, d2, e2, w2[3], RIPEMD160C70, RIPEMD160S78);\n  RIPEMD160_STEP (RIPEMD160_H , e2, a2, b2, c2, d2, w2[0], RIPEMD160C70, RIPEMD160S79);\n  RIPEMD160_STEP (RIPEMD160_H , d2, e2, a2, b2, c2, w3[0], RIPEMD160C70, RIPEMD160S7A);\n  RIPEMD160_STEP (RIPEMD160_H , c2, d2, e2, a2, b2, w0[2], RIPEMD160C70, RIPEMD160S7B);\n  RIPEMD160_STEP (RIPEMD160_H , b2, c2, d2, e2, a2, w2[2], RIPEMD160C70, RIPEMD160S7C);\n  RIPEMD160_STEP (RIPEMD160_H , a2, b2, c2, d2, e2, w0[0], RIPEMD160C70, RIPEMD160S7D);\n  RIPEMD160_STEP (RIPEMD160_H , e2, a2, b2, c2, d2, w1[0], RIPEMD160C70, RIPEMD160S7E);\n  RIPEMD160_STEP (RIPEMD160_H , d2, e2, a2, b2, c2, w3[1], RIPEMD160C70, RIPEMD160S7F);\n\n  RIPEMD160_STEP (RIPEMD160_Go, c2, d2, e2, a2, b2, w2[0], RIPEMD160C80, RIPEMD160S80);\n  RIPEMD160_STEP (RIPEMD160_Go, b2, c2, d2, e2, a2, w1[2], RIPEMD160C80, RIPEMD160S81);\n  RIPEMD160_STEP (RIPEMD160_Go, a2, b2, c2, d2, e2, w1[0], RIPEMD160C80, RIPEMD160S82);\n  RIPEMD160_STEP (RIPEMD160_Go, e2, a2, b2, c2, d2, w0[1], RIPEMD160C80, RIPEMD160S83);\n  RIPEMD160_STEP (RIPEMD160_Go, d2, e2, a2, b2, c2, w0[3], RIPEMD160C80, RIPEMD160S84);\n  RIPEMD160_STEP (RIPEMD160_Go, c2, d2, e2, a2, b2, w2[3], RIPEMD160C80, RIPEMD160S85);\n  RIPEMD160_STEP (RIPEMD160_Go, b2, c2, d2, e2, a2, w3[3], RIPEMD160C80, RIPEMD160S86);\n  RIPEMD160_STEP (RIPEMD160_Go, a2, b2, c2, d2, e2, w0[0], RIPEMD160C80, RIPEMD160S87);\n  RIPEMD160_STEP (RIPEMD160_Go, e2, a2, b2, c2, d2, w1[1], RIPEMD160C80, RIPEMD160S88);\n  RIPEMD160_STEP (RIPEMD160_Go, d2, e2, a2, b2, c2, w3[0], RIPEMD160C80, RIPEMD160S89);\n  RIPEMD160_STEP (RIPEMD160_Go, c2, d2, e2, a2, b2, w0[2], RIPEMD160C80, RIPEMD160S8A);\n  RIPEMD160_STEP (RIPEMD160_Go, b2, c2, d2, e2, a2, w3[1], RIPEMD160C80, RIPEMD160S8B);\n  RIPEMD160_STEP (RIPEMD160_Go, a2, b2, c2, d2, e2, w2[1], RIPEMD160C80, RIPEMD160S8C);\n  RIPEMD160_STEP (RIPEMD160_Go, e2, a2, b2, c2, d2, w1[3], RIPEMD160C80, RIPEMD160S8D);\n  RIPEMD160_STEP (RIPEMD160_Go, d2, e2, a2, b2, c2, w2[2], RIPEMD160C80, RIPEMD160S8E);\n  RIPEMD160_STEP (RIPEMD160_Go, c2, d2, e2, a2, b2, w3[2], RIPEMD160C80, RIPEMD160S8F);\n\n  RIPEMD160_STEP (RIPEMD160_F , b2, c2, d2, e2, a2, w3[0], RIPEMD160C90, RIPEMD160S90);\n  RIPEMD160_STEP (RIPEMD160_F , a2, b2, c2, d2, e2, w3[3], RIPEMD160C90, RIPEMD160S91);\n  RIPEMD160_STEP (RIPEMD160_F , e2, a2, b2, c2, d2, w2[2], RIPEMD160C90, RIPEMD160S92);\n  RIPEMD160_STEP (RIPEMD160_F , d2, e2, a2, b2, c2, w1[0], RIPEMD160C90, RIPEMD160S93);\n  RIPEMD160_STEP (RIPEMD160_F , c2, d2, e2, a2, b2, w0[1], RIPEMD160C90, RIPEMD160S94);\n  RIPEMD160_STEP (RIPEMD160_F , b2, c2, d2, e2, a2, w1[1], RIPEMD160C90, RIPEMD160S95);\n  RIPEMD160_STEP (RIPEMD160_F , a2, b2, c2, d2, e2, w2[0], RIPEMD160C90, RIPEMD160S96);\n  RIPEMD160_STEP (RIPEMD160_F , e2, a2, b2, c2, d2, w1[3], RIPEMD160C90, RIPEMD160S97);\n  RIPEMD160_STEP (RIPEMD160_F , d2, e2, a2, b2, c2, w1[2], RIPEMD160C90, RIPEMD160S98);\n  RIPEMD160_STEP (RIPEMD160_F , c2, d2, e2, a2, b2, w0[2], RIPEMD160C90, RIPEMD160S99);\n  RIPEMD160_STEP (RIPEMD160_F , b2, c2, d2, e2, a2, w3[1], RIPEMD160C90, RIPEMD160S9A);\n  RIPEMD160_STEP (RIPEMD160_F , a2, b2, c2, d2, e2, w3[2], RIPEMD160C90, RIPEMD160S9B);\n  RIPEMD160_STEP (RIPEMD160_F , e2, a2, b2, c2, d2, w0[0], RIPEMD160C90, RIPEMD160S9C);\n  RIPEMD160_STEP (RIPEMD160_F , d2, e2, a2, b2, c2, w0[3], RIPEMD160C90, RIPEMD160S9D);\n  RIPEMD160_STEP (RIPEMD160_F , c2, d2, e2, a2, b2, w2[1], RIPEMD160C90, RIPEMD160S9E);\n  RIPEMD160_STEP (RIPEMD160_F , b2, c2, d2, e2, a2, w2[3], RIPEMD160C90, RIPEMD160S9F);\n\n  const u32x a = digest[1] + c1 + d2;\n  const u32x b = digest[2] + d1 + e2;\n  const u32x c = digest[3] + e1 + a2;\n  const u32x d = digest[4] + a1 + b2;\n  const u32x e = digest[0] + b1 + c2;\n\n  digest[0] = a;\n  digest[1] = b;\n  digest[2] = c;\n  digest[3] = d;\n  digest[4] = e;\n}\n\nDECLSPEC void ripemd160_init_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx)\n{\n  ctx->h[0] = RIPEMD160M_A;\n  ctx->h[1] = RIPEMD160M_B;\n  ctx->h[2] = RIPEMD160M_C;\n  ctx->h[3] = RIPEMD160M_D;\n  ctx->h[4] = RIPEMD160M_E;\n\n  ctx->w0[0] = 0;\n  ctx->w0[1] = 0;\n  ctx->w0[2] = 0;\n  ctx->w0[3] = 0;\n  ctx->w1[0] = 0;\n  ctx->w1[1] = 0;\n  ctx->w1[2] = 0;\n  ctx->w1[3] = 0;\n  ctx->w2[0] = 0;\n  ctx->w2[1] = 0;\n  ctx->w2[2] = 0;\n  ctx->w2[3] = 0;\n  ctx->w3[0] = 0;\n  ctx->w3[1] = 0;\n  ctx->w3[2] = 0;\n  ctx->w3[3] = 0;\n\n  ctx->len = 0;\n}\n\nDECLSPEC void ripemd160_init_vector_from_scalar (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS ripemd160_ctx_t *ctx0)\n{\n  ctx->h[0] = ctx0->h[0];\n  ctx->h[1] = ctx0->h[1];\n  ctx->h[2] = ctx0->h[2];\n  ctx->h[3] = ctx0->h[3];\n  ctx->h[4] = ctx0->h[4];\n\n  ctx->w0[0] = ctx0->w0[0];\n  ctx->w0[1] = ctx0->w0[1];\n  ctx->w0[2] = ctx0->w0[2];\n  ctx->w0[3] = ctx0->w0[3];\n  ctx->w1[0] = ctx0->w1[0];\n  ctx->w1[1] = ctx0->w1[1];\n  ctx->w1[2] = ctx0->w1[2];\n  ctx->w1[3] = ctx0->w1[3];\n  ctx->w2[0] = ctx0->w2[0];\n  ctx->w2[1] = ctx0->w2[1];\n  ctx->w2[2] = ctx0->w2[2];\n  ctx->w2[3] = ctx0->w2[3];\n  ctx->w3[0] = ctx0->w3[0];\n  ctx->w3[1] = ctx0->w3[1];\n  ctx->w3[2] = ctx0->w3[2];\n  ctx->w3[3] = ctx0->w3[3];\n\n  ctx->len = ctx0->len;\n}\n\nDECLSPEC void ripemd160_update_vector_64 (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len)\n{\n  if (len == 0) return;\n\n  const int pos = ctx->len & 63;\n\n  ctx->len += len;\n\n  if (pos == 0)\n  {\n    ctx->w0[0] = w0[0];\n    ctx->w0[1] = w0[1];\n    ctx->w0[2] = w0[2];\n    ctx->w0[3] = w0[3];\n    ctx->w1[0] = w1[0];\n    ctx->w1[1] = w1[1];\n    ctx->w1[2] = w1[2];\n    ctx->w1[3] = w1[3];\n    ctx->w2[0] = w2[0];\n    ctx->w2[1] = w2[1];\n    ctx->w2[2] = w2[2];\n    ctx->w2[3] = w2[3];\n    ctx->w3[0] = w3[0];\n    ctx->w3[1] = w3[1];\n    ctx->w3[2] = w3[2];\n    ctx->w3[3] = w3[3];\n\n    if (len == 64)\n    {\n      ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = 0;\n      ctx->w0[1] = 0;\n      ctx->w0[2] = 0;\n      ctx->w0[3] = 0;\n      ctx->w1[0] = 0;\n      ctx->w1[1] = 0;\n      ctx->w1[2] = 0;\n      ctx->w1[3] = 0;\n      ctx->w2[0] = 0;\n      ctx->w2[1] = 0;\n      ctx->w2[2] = 0;\n      ctx->w2[3] = 0;\n      ctx->w3[0] = 0;\n      ctx->w3[1] = 0;\n      ctx->w3[2] = 0;\n      ctx->w3[3] = 0;\n    }\n  }\n  else\n  {\n    if ((pos + len) < 64)\n    {\n      switch_buffer_by_offset_le (w0, w1, w2, w3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n    }\n    else\n    {\n      u32x c0[4] = { 0 };\n      u32x c1[4] = { 0 };\n      u32x c2[4] = { 0 };\n      u32x c3[4] = { 0 };\n\n      switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n\n      ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = c0[0];\n      ctx->w0[1] = c0[1];\n      ctx->w0[2] = c0[2];\n      ctx->w0[3] = c0[3];\n      ctx->w1[0] = c1[0];\n      ctx->w1[1] = c1[1];\n      ctx->w1[2] = c1[2];\n      ctx->w1[3] = c1[3];\n      ctx->w2[0] = c2[0];\n      ctx->w2[1] = c2[1];\n      ctx->w2[2] = c2[2];\n      ctx->w2[3] = c2[3];\n      ctx->w3[0] = c3[0];\n      ctx->w3[1] = c3[1];\n      ctx->w3[2] = c3[2];\n      ctx->w3[3] = c3[3];\n    }\n  }\n}\n\nDECLSPEC void ripemd160_update_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void ripemd160_update_vector_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    w0[0] = hc_swap32 (w0[0]);\n    w0[1] = hc_swap32 (w0[1]);\n    w0[2] = hc_swap32 (w0[2]);\n    w0[3] = hc_swap32 (w0[3]);\n    w1[0] = hc_swap32 (w1[0]);\n    w1[1] = hc_swap32 (w1[1]);\n    w1[2] = hc_swap32 (w1[2]);\n    w1[3] = hc_swap32 (w1[3]);\n    w2[0] = hc_swap32 (w2[0]);\n    w2[1] = hc_swap32 (w2[1]);\n    w2[2] = hc_swap32 (w2[2]);\n    w2[3] = hc_swap32 (w2[3]);\n    w3[0] = hc_swap32 (w3[0]);\n    w3[1] = hc_swap32 (w3[1]);\n    w3[2] = hc_swap32 (w3[2]);\n    w3[3] = hc_swap32 (w3[3]);\n\n    ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  w0[0] = hc_swap32 (w0[0]);\n  w0[1] = hc_swap32 (w0[1]);\n  w0[2] = hc_swap32 (w0[2]);\n  w0[3] = hc_swap32 (w0[3]);\n  w1[0] = hc_swap32 (w1[0]);\n  w1[1] = hc_swap32 (w1[1]);\n  w1[2] = hc_swap32 (w1[2]);\n  w1[3] = hc_swap32 (w1[3]);\n  w2[0] = hc_swap32 (w2[0]);\n  w2[1] = hc_swap32 (w2[1]);\n  w2[2] = hc_swap32 (w2[2]);\n  w2[3] = hc_swap32 (w2[3]);\n  w3[0] = hc_swap32 (w3[0]);\n  w3[1] = hc_swap32 (w3[1]);\n  w3[2] = hc_swap32 (w3[2]);\n  w3[3] = hc_swap32 (w3[3]);\n\n  ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void ripemd160_update_vector_utf16le (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le (w1, w2, w3);\n    make_utf16le (w0, w0, w1);\n\n    ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le (w1, w2, w3);\n  make_utf16le (w0, w0, w1);\n\n  ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void ripemd160_update_vector_utf16le_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le (w1, w2, w3);\n    make_utf16le (w0, w0, w1);\n\n    w0[0] = hc_swap32 (w0[0]);\n    w0[1] = hc_swap32 (w0[1]);\n    w0[2] = hc_swap32 (w0[2]);\n    w0[3] = hc_swap32 (w0[3]);\n    w1[0] = hc_swap32 (w1[0]);\n    w1[1] = hc_swap32 (w1[1]);\n    w1[2] = hc_swap32 (w1[2]);\n    w1[3] = hc_swap32 (w1[3]);\n    w2[0] = hc_swap32 (w2[0]);\n    w2[1] = hc_swap32 (w2[1]);\n    w2[2] = hc_swap32 (w2[2]);\n    w2[3] = hc_swap32 (w2[3]);\n    w3[0] = hc_swap32 (w3[0]);\n    w3[1] = hc_swap32 (w3[1]);\n    w3[2] = hc_swap32 (w3[2]);\n    w3[3] = hc_swap32 (w3[3]);\n\n    ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le (w1, w2, w3);\n  make_utf16le (w0, w0, w1);\n\n  w0[0] = hc_swap32 (w0[0]);\n  w0[1] = hc_swap32 (w0[1]);\n  w0[2] = hc_swap32 (w0[2]);\n  w0[3] = hc_swap32 (w0[3]);\n  w1[0] = hc_swap32 (w1[0]);\n  w1[1] = hc_swap32 (w1[1]);\n  w1[2] = hc_swap32 (w1[2]);\n  w1[3] = hc_swap32 (w1[3]);\n  w2[0] = hc_swap32 (w2[0]);\n  w2[1] = hc_swap32 (w2[1]);\n  w2[2] = hc_swap32 (w2[2]);\n  w2[3] = hc_swap32 (w2[3]);\n  w3[0] = hc_swap32 (w3[0]);\n  w3[1] = hc_swap32 (w3[1]);\n  w3[2] = hc_swap32 (w3[2]);\n  w3[3] = hc_swap32 (w3[3]);\n\n  ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void ripemd160_final_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx)\n{\n  const int pos = ctx->len & 63;\n\n  append_0x80_4x4 (ctx->w0, ctx->w1, ctx->w2, ctx->w3, pos);\n\n  if (pos >= 56)\n  {\n    ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n    ctx->w0[0] = 0;\n    ctx->w0[1] = 0;\n    ctx->w0[2] = 0;\n    ctx->w0[3] = 0;\n    ctx->w1[0] = 0;\n    ctx->w1[1] = 0;\n    ctx->w1[2] = 0;\n    ctx->w1[3] = 0;\n    ctx->w2[0] = 0;\n    ctx->w2[1] = 0;\n    ctx->w2[2] = 0;\n    ctx->w2[3] = 0;\n    ctx->w3[0] = 0;\n    ctx->w3[1] = 0;\n    ctx->w3[2] = 0;\n    ctx->w3[3] = 0;\n  }\n\n  ctx->w3[2] = ctx->len * 8;\n  ctx->w3[3] = 0;\n\n  ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n}\n\n// HMAC + Vector\n\nDECLSPEC void ripemd160_hmac_init_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3)\n{\n  u32x a0[4];\n  u32x a1[4];\n  u32x a2[4];\n  u32x a3[4];\n\n  // ipad\n\n  a0[0] = w0[0] ^ 0x36363636;\n  a0[1] = w0[1] ^ 0x36363636;\n  a0[2] = w0[2] ^ 0x36363636;\n  a0[3] = w0[3] ^ 0x36363636;\n  a1[0] = w1[0] ^ 0x36363636;\n  a1[1] = w1[1] ^ 0x36363636;\n  a1[2] = w1[2] ^ 0x36363636;\n  a1[3] = w1[3] ^ 0x36363636;\n  a2[0] = w2[0] ^ 0x36363636;\n  a2[1] = w2[1] ^ 0x36363636;\n  a2[2] = w2[2] ^ 0x36363636;\n  a2[3] = w2[3] ^ 0x36363636;\n  a3[0] = w3[0] ^ 0x36363636;\n  a3[1] = w3[1] ^ 0x36363636;\n  a3[2] = w3[2] ^ 0x36363636;\n  a3[3] = w3[3] ^ 0x36363636;\n\n  ripemd160_init_vector (&ctx->ipad);\n\n  ripemd160_update_vector_64 (&ctx->ipad, a0, a1, a2, a3, 64);\n\n  // opad\n\n  u32x b0[4];\n  u32x b1[4];\n  u32x b2[4];\n  u32x b3[4];\n\n  b0[0] = w0[0] ^ 0x5c5c5c5c;\n  b0[1] = w0[1] ^ 0x5c5c5c5c;\n  b0[2] = w0[2] ^ 0x5c5c5c5c;\n  b0[3] = w0[3] ^ 0x5c5c5c5c;\n  b1[0] = w1[0] ^ 0x5c5c5c5c;\n  b1[1] = w1[1] ^ 0x5c5c5c5c;\n  b1[2] = w1[2] ^ 0x5c5c5c5c;\n  b1[3] = w1[3] ^ 0x5c5c5c5c;\n  b2[0] = w2[0] ^ 0x5c5c5c5c;\n  b2[1] = w2[1] ^ 0x5c5c5c5c;\n  b2[2] = w2[2] ^ 0x5c5c5c5c;\n  b2[3] = w2[3] ^ 0x5c5c5c5c;\n  b3[0] = w3[0] ^ 0x5c5c5c5c;\n  b3[1] = w3[1] ^ 0x5c5c5c5c;\n  b3[2] = w3[2] ^ 0x5c5c5c5c;\n  b3[3] = w3[3] ^ 0x5c5c5c5c;\n\n  ripemd160_init_vector (&ctx->opad);\n\n  ripemd160_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64);\n}\n\nDECLSPEC void ripemd160_hmac_init_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  if (len > 64)\n  {\n    ripemd160_ctx_vector_t tmp;\n\n    ripemd160_init_vector (&tmp);\n\n    ripemd160_update_vector (&tmp, w, len);\n\n    ripemd160_final_vector (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = 0;\n    w1[2] = 0;\n    w1[3] = 0;\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = w[ 0];\n    w0[1] = w[ 1];\n    w0[2] = w[ 2];\n    w0[3] = w[ 3];\n    w1[0] = w[ 4];\n    w1[1] = w[ 5];\n    w1[2] = w[ 6];\n    w1[3] = w[ 7];\n    w2[0] = w[ 8];\n    w2[1] = w[ 9];\n    w2[2] = w[10];\n    w2[3] = w[11];\n    w3[0] = w[12];\n    w3[1] = w[13];\n    w3[2] = w[14];\n    w3[3] = w[15];\n  }\n\n  ripemd160_hmac_init_vector_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void ripemd160_hmac_update_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len)\n{\n  ripemd160_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len);\n}\n\nDECLSPEC void ripemd160_hmac_update_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  ripemd160_update_vector (&ctx->ipad, w, len);\n}\n\nDECLSPEC void ripemd160_hmac_final_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx)\n{\n  ripemd160_final_vector (&ctx->ipad);\n\n  ctx->opad.w0[0] = ctx->ipad.h[0];\n  ctx->opad.w0[1] = ctx->ipad.h[1];\n  ctx->opad.w0[2] = ctx->ipad.h[2];\n  ctx->opad.w0[3] = ctx->ipad.h[3];\n  ctx->opad.w1[0] = ctx->ipad.h[4];\n  ctx->opad.w1[1] = 0;\n  ctx->opad.w1[2] = 0;\n  ctx->opad.w1[3] = 0;\n  ctx->opad.w2[0] = 0;\n  ctx->opad.w2[1] = 0;\n  ctx->opad.w2[2] = 0;\n  ctx->opad.w2[3] = 0;\n  ctx->opad.w3[0] = 0;\n  ctx->opad.w3[1] = 0;\n  ctx->opad.w3[2] = 0;\n  ctx->opad.w3[3] = 0;\n\n  ctx->opad.len += 20;\n\n  ripemd160_final_vector (&ctx->opad);\n}\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_hash_ripemd160.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_HASH_RIPEMD160_H\n#define INC_HASH_RIPEMD160_H\n\n#define RIPEMD160_F(x,y,z)    ((x) ^ (y) ^ (z))\n#define RIPEMD160_G(x,y,z)    ((z) ^ ((x) & ((y) ^ (z)))) /* x ? y : z */\n#define RIPEMD160_H(x,y,z)    (((x) | ~(y)) ^ (z))\n#define RIPEMD160_I(x,y,z)    ((y) ^ ((z) & ((x) ^ (y)))) /* z ? x : y */\n#define RIPEMD160_J(x,y,z)    ((x) ^ ((y) | ~(z)))\n\n#ifdef USE_BITSELECT\n#define RIPEMD160_Go(x,y,z)   (bitselect ((z), (y), (x)))\n#define RIPEMD160_Io(x,y,z)   (bitselect ((y), (x), (z)))\n#else\n#define RIPEMD160_Go(x,y,z)   (RIPEMD160_G ((x), (y), (z)))\n#define RIPEMD160_Io(x,y,z)   (RIPEMD160_I ((x), (y), (z)))\n#endif\n\n#define RIPEMD160_STEP_S(f,a,b,c,d,e,x,K,s) \\\n{                                           \\\n  a += K;                                   \\\n  a += x;                                   \\\n  a += f (b, c, d);                         \\\n  a  = hc_rotl32_S (a, s);                  \\\n  a += e;                                   \\\n  c  = hc_rotl32_S (c, 10u);                \\\n}\n\n#define RIPEMD160_STEP(f,a,b,c,d,e,x,K,s) \\\n{                                         \\\n  a += make_u32x (K);                     \\\n  a += x;                                 \\\n  a += f (b, c, d);                       \\\n  a  = hc_rotl32 (a, s);                  \\\n  a += e;                                 \\\n  c  = hc_rotl32 (c, 10u);                \\\n}\n\n#define ROTATE_LEFT_WORKAROUND_BUG(a,n) ((a << n) | (a >> (32 - n)))\n\n#define RIPEMD160_STEP_S_WORKAROUND_BUG(f,a,b,c,d,e,x,K,s)  \\\n{                                           \\\n  a += K;                                   \\\n  a += x;                                   \\\n  a += f (b, c, d);                         \\\n  a  = ROTATE_LEFT_WORKAROUND_BUG (a, s);   \\\n  a += e;                                   \\\n  c  = hc_rotl32_S (c, 10u);                \\\n}\n\n#define RIPEMD160_STEP_WORKAROUND_BUG(f,a,b,c,d,e,x,K,s)  \\\n{                                         \\\n  a += make_u32x (K);                     \\\n  a += x;                                 \\\n  a += f (b, c, d);                       \\\n  a  = ROTATE_LEFT_WORKAROUND_BUG (a, s); \\\n  a += e;                                 \\\n  c  = hc_rotl32 (c, 10u);                \\\n}\n\ntypedef struct ripemd160_ctx\n{\n  u32 h[5];\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int len;\n\n} ripemd160_ctx_t;\n\ntypedef struct ripemd160_hmac_ctx\n{\n  ripemd160_ctx_t ipad;\n  ripemd160_ctx_t opad;\n\n} ripemd160_hmac_ctx_t;\n\ntypedef struct ripemd160_ctx_vector\n{\n  u32x h[5];\n\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int  len;\n\n} ripemd160_ctx_vector_t;\n\ntypedef struct ripemd160_hmac_ctx_vector\n{\n  ripemd160_ctx_vector_t ipad;\n  ripemd160_ctx_vector_t opad;\n\n} ripemd160_hmac_ctx_vector_t;\n\nDECLSPEC void ripemd160_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest);\nDECLSPEC void ripemd160_init (PRIVATE_AS ripemd160_ctx_t *ctx);\nDECLSPEC void ripemd160_update_64 (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len);\nDECLSPEC void ripemd160_update (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_global (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_global_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_global_utf16le (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_update_global_utf16le_swap (PRIVATE_AS ripemd160_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_final (PRIVATE_AS ripemd160_ctx_t *ctx);\nDECLSPEC void ripemd160_hmac_init_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3);\nDECLSPEC void ripemd160_hmac_init (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_init_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_init_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_init_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_64 (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len);\nDECLSPEC void ripemd160_hmac_update (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_global (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_global_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_global_utf16le (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_update_global_utf16le_swap (PRIVATE_AS ripemd160_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void ripemd160_hmac_final (PRIVATE_AS ripemd160_hmac_ctx_t *ctx);\nDECLSPEC void ripemd160_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest);\nDECLSPEC void ripemd160_init_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx);\nDECLSPEC void ripemd160_init_vector_from_scalar (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS ripemd160_ctx_t *ctx0);\nDECLSPEC void ripemd160_update_vector_64 (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len);\nDECLSPEC void ripemd160_update_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void ripemd160_update_vector_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void ripemd160_update_vector_utf16le (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void ripemd160_update_vector_utf16le_swap (PRIVATE_AS ripemd160_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void ripemd160_final_vector (PRIVATE_AS ripemd160_ctx_vector_t *ctx);\nDECLSPEC void ripemd160_hmac_init_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3);\nDECLSPEC void ripemd160_hmac_init_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void ripemd160_hmac_update_vector_64 (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len);\nDECLSPEC void ripemd160_hmac_update_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void ripemd160_hmac_final_vector (PRIVATE_AS ripemd160_hmac_ctx_vector_t *ctx);\n\n#endif // INC_HASH_RIPEMD160_H\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_hash_sha256.cl",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#include \"inc_vendor.h\"\n#include \"inc_types.h\"\n#include \"inc_platform.h\"\n#include \"inc_common.h\"\n#include \"inc_hash_sha256.h\"\n\nCONSTANT_VK u32a k_sha256[64] =\n{\n  SHA256C00, SHA256C01, SHA256C02, SHA256C03,\n  SHA256C04, SHA256C05, SHA256C06, SHA256C07,\n  SHA256C08, SHA256C09, SHA256C0a, SHA256C0b,\n  SHA256C0c, SHA256C0d, SHA256C0e, SHA256C0f,\n  SHA256C10, SHA256C11, SHA256C12, SHA256C13,\n  SHA256C14, SHA256C15, SHA256C16, SHA256C17,\n  SHA256C18, SHA256C19, SHA256C1a, SHA256C1b,\n  SHA256C1c, SHA256C1d, SHA256C1e, SHA256C1f,\n  SHA256C20, SHA256C21, SHA256C22, SHA256C23,\n  SHA256C24, SHA256C25, SHA256C26, SHA256C27,\n  SHA256C28, SHA256C29, SHA256C2a, SHA256C2b,\n  SHA256C2c, SHA256C2d, SHA256C2e, SHA256C2f,\n  SHA256C30, SHA256C31, SHA256C32, SHA256C33,\n  SHA256C34, SHA256C35, SHA256C36, SHA256C37,\n  SHA256C38, SHA256C39, SHA256C3a, SHA256C3b,\n  SHA256C3c, SHA256C3d, SHA256C3e, SHA256C3f,\n};\n\n// important notes on this:\n// input buf unused bytes needs to be set to zero\n// input buf needs to be in algorithm native byte order (md5 = LE, sha256 = BE, etc)\n// input buf needs to be 64 byte aligned when using sha256_update()\n\nDECLSPEC void sha256_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest)\n{\n  u32 a = digest[0];\n  u32 b = digest[1];\n  u32 c = digest[2];\n  u32 d = digest[3];\n  u32 e = digest[4];\n  u32 f = digest[5];\n  u32 g = digest[6];\n  u32 h = digest[7];\n\n  u32 w0_t = w0[0];\n  u32 w1_t = w0[1];\n  u32 w2_t = w0[2];\n  u32 w3_t = w0[3];\n  u32 w4_t = w1[0];\n  u32 w5_t = w1[1];\n  u32 w6_t = w1[2];\n  u32 w7_t = w1[3];\n  u32 w8_t = w2[0];\n  u32 w9_t = w2[1];\n  u32 wa_t = w2[2];\n  u32 wb_t = w2[3];\n  u32 wc_t = w3[0];\n  u32 wd_t = w3[1];\n  u32 we_t = w3[2];\n  u32 wf_t = w3[3];\n\n  #define ROUND_EXPAND_S()                            \\\n  {                                                   \\\n    w0_t = SHA256_EXPAND_S (we_t, w9_t, w1_t, w0_t);  \\\n    w1_t = SHA256_EXPAND_S (wf_t, wa_t, w2_t, w1_t);  \\\n    w2_t = SHA256_EXPAND_S (w0_t, wb_t, w3_t, w2_t);  \\\n    w3_t = SHA256_EXPAND_S (w1_t, wc_t, w4_t, w3_t);  \\\n    w4_t = SHA256_EXPAND_S (w2_t, wd_t, w5_t, w4_t);  \\\n    w5_t = SHA256_EXPAND_S (w3_t, we_t, w6_t, w5_t);  \\\n    w6_t = SHA256_EXPAND_S (w4_t, wf_t, w7_t, w6_t);  \\\n    w7_t = SHA256_EXPAND_S (w5_t, w0_t, w8_t, w7_t);  \\\n    w8_t = SHA256_EXPAND_S (w6_t, w1_t, w9_t, w8_t);  \\\n    w9_t = SHA256_EXPAND_S (w7_t, w2_t, wa_t, w9_t);  \\\n    wa_t = SHA256_EXPAND_S (w8_t, w3_t, wb_t, wa_t);  \\\n    wb_t = SHA256_EXPAND_S (w9_t, w4_t, wc_t, wb_t);  \\\n    wc_t = SHA256_EXPAND_S (wa_t, w5_t, wd_t, wc_t);  \\\n    wd_t = SHA256_EXPAND_S (wb_t, w6_t, we_t, wd_t);  \\\n    we_t = SHA256_EXPAND_S (wc_t, w7_t, wf_t, we_t);  \\\n    wf_t = SHA256_EXPAND_S (wd_t, w8_t, w0_t, wf_t);  \\\n  }\n\n  #define ROUND_STEP_S(i)                                                                   \\\n  {                                                                                         \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha256[i +  0]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha256[i +  1]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha256[i +  2]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha256[i +  3]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha256[i +  4]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha256[i +  5]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha256[i +  6]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha256[i +  7]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha256[i +  8]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha256[i +  9]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha256[i + 10]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha256[i + 11]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha256[i + 12]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha256[i + 13]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, k_sha256[i + 14]); \\\n    SHA256_STEP_S (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha256[i + 15]); \\\n  }\n\n  ROUND_STEP_S (0);\n\n  #ifdef _unroll\n  #pragma unroll\n  #endif\n  for (int i = 16; i < 64; i += 16)\n  {\n    ROUND_EXPAND_S (); ROUND_STEP_S (i);\n  }\n\n  #undef ROUND_EXPAND_S\n  #undef ROUND_STEP_S\n\n  digest[0] += a;\n  digest[1] += b;\n  digest[2] += c;\n  digest[3] += d;\n  digest[4] += e;\n  digest[5] += f;\n  digest[6] += g;\n  digest[7] += h;\n}\n\nDECLSPEC void sha256_init (PRIVATE_AS sha256_ctx_t *ctx)\n{\n  ctx->h[0] = SHA256M_A;\n  ctx->h[1] = SHA256M_B;\n  ctx->h[2] = SHA256M_C;\n  ctx->h[3] = SHA256M_D;\n  ctx->h[4] = SHA256M_E;\n  ctx->h[5] = SHA256M_F;\n  ctx->h[6] = SHA256M_G;\n  ctx->h[7] = SHA256M_H;\n\n  ctx->w0[0] = 0;\n  ctx->w0[1] = 0;\n  ctx->w0[2] = 0;\n  ctx->w0[3] = 0;\n  ctx->w1[0] = 0;\n  ctx->w1[1] = 0;\n  ctx->w1[2] = 0;\n  ctx->w1[3] = 0;\n  ctx->w2[0] = 0;\n  ctx->w2[1] = 0;\n  ctx->w2[2] = 0;\n  ctx->w2[3] = 0;\n  ctx->w3[0] = 0;\n  ctx->w3[1] = 0;\n  ctx->w3[2] = 0;\n  ctx->w3[3] = 0;\n\n  ctx->len = 0;\n}\n\nDECLSPEC void sha256_update_64 (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len)\n{\n  if (len == 0) return;\n\n  const int pos = ctx->len & 63;\n\n  ctx->len += len;\n\n  if (pos == 0)\n  {\n    ctx->w0[0] = w0[0];\n    ctx->w0[1] = w0[1];\n    ctx->w0[2] = w0[2];\n    ctx->w0[3] = w0[3];\n    ctx->w1[0] = w1[0];\n    ctx->w1[1] = w1[1];\n    ctx->w1[2] = w1[2];\n    ctx->w1[3] = w1[3];\n    ctx->w2[0] = w2[0];\n    ctx->w2[1] = w2[1];\n    ctx->w2[2] = w2[2];\n    ctx->w2[3] = w2[3];\n    ctx->w3[0] = w3[0];\n    ctx->w3[1] = w3[1];\n    ctx->w3[2] = w3[2];\n    ctx->w3[3] = w3[3];\n\n    if (len == 64)\n    {\n      sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = 0;\n      ctx->w0[1] = 0;\n      ctx->w0[2] = 0;\n      ctx->w0[3] = 0;\n      ctx->w1[0] = 0;\n      ctx->w1[1] = 0;\n      ctx->w1[2] = 0;\n      ctx->w1[3] = 0;\n      ctx->w2[0] = 0;\n      ctx->w2[1] = 0;\n      ctx->w2[2] = 0;\n      ctx->w2[3] = 0;\n      ctx->w3[0] = 0;\n      ctx->w3[1] = 0;\n      ctx->w3[2] = 0;\n      ctx->w3[3] = 0;\n    }\n  }\n  else\n  {\n    if ((pos + len) < 64)\n    {\n      switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n    }\n    else\n    {\n      u32 c0[4] = { 0 };\n      u32 c1[4] = { 0 };\n      u32 c2[4] = { 0 };\n      u32 c3[4] = { 0 };\n\n      switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n\n      sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = c0[0];\n      ctx->w0[1] = c0[1];\n      ctx->w0[2] = c0[2];\n      ctx->w0[3] = c0[3];\n      ctx->w1[0] = c1[0];\n      ctx->w1[1] = c1[1];\n      ctx->w1[2] = c1[2];\n      ctx->w1[3] = c1[3];\n      ctx->w2[0] = c2[0];\n      ctx->w2[1] = c2[1];\n      ctx->w2[2] = c2[2];\n      ctx->w2[3] = c2[3];\n      ctx->w3[0] = c3[0];\n      ctx->w3[1] = c3[1];\n      ctx->w3[2] = c3[2];\n      ctx->w3[3] = c3[3];\n    }\n  }\n}\n\nDECLSPEC void sha256_update (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void sha256_update_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void sha256_update_utf16le (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      sha256_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_update_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      enc_buf[ 0] = hc_swap32_S (enc_buf[ 0]);\n      enc_buf[ 1] = hc_swap32_S (enc_buf[ 1]);\n      enc_buf[ 2] = hc_swap32_S (enc_buf[ 2]);\n      enc_buf[ 3] = hc_swap32_S (enc_buf[ 3]);\n      enc_buf[ 4] = hc_swap32_S (enc_buf[ 4]);\n      enc_buf[ 5] = hc_swap32_S (enc_buf[ 5]);\n      enc_buf[ 6] = hc_swap32_S (enc_buf[ 6]);\n      enc_buf[ 7] = hc_swap32_S (enc_buf[ 7]);\n      enc_buf[ 8] = hc_swap32_S (enc_buf[ 8]);\n      enc_buf[ 9] = hc_swap32_S (enc_buf[ 9]);\n      enc_buf[10] = hc_swap32_S (enc_buf[10]);\n      enc_buf[11] = hc_swap32_S (enc_buf[11]);\n      enc_buf[12] = hc_swap32_S (enc_buf[12]);\n      enc_buf[13] = hc_swap32_S (enc_buf[13]);\n      enc_buf[14] = hc_swap32_S (enc_buf[14]);\n      enc_buf[15] = hc_swap32_S (enc_buf[15]);\n\n      sha256_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_update_global (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void sha256_update_global_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void sha256_update_global_utf16le (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan_global (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next_global (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      sha256_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_update_global_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  if (hc_enc_scan_global (w, len))\n  {\n    hc_enc_t hc_enc;\n\n    hc_enc_init (&hc_enc);\n\n    while (hc_enc_has_next (&hc_enc, len))\n    {\n      u32 enc_buf[16] = { 0 };\n\n      const int enc_len = hc_enc_next_global (&hc_enc, w, len, 256, enc_buf, sizeof (enc_buf));\n\n      if (enc_len == -1)\n      {\n        ctx->len = -1;\n\n        return;\n      }\n\n      enc_buf[ 0] = hc_swap32_S (enc_buf[ 0]);\n      enc_buf[ 1] = hc_swap32_S (enc_buf[ 1]);\n      enc_buf[ 2] = hc_swap32_S (enc_buf[ 2]);\n      enc_buf[ 3] = hc_swap32_S (enc_buf[ 3]);\n      enc_buf[ 4] = hc_swap32_S (enc_buf[ 4]);\n      enc_buf[ 5] = hc_swap32_S (enc_buf[ 5]);\n      enc_buf[ 6] = hc_swap32_S (enc_buf[ 6]);\n      enc_buf[ 7] = hc_swap32_S (enc_buf[ 7]);\n      enc_buf[ 8] = hc_swap32_S (enc_buf[ 8]);\n      enc_buf[ 9] = hc_swap32_S (enc_buf[ 9]);\n      enc_buf[10] = hc_swap32_S (enc_buf[10]);\n      enc_buf[11] = hc_swap32_S (enc_buf[11]);\n      enc_buf[12] = hc_swap32_S (enc_buf[12]);\n      enc_buf[13] = hc_swap32_S (enc_buf[13]);\n      enc_buf[14] = hc_swap32_S (enc_buf[14]);\n      enc_buf[15] = hc_swap32_S (enc_buf[15]);\n\n      sha256_update_64 (ctx, enc_buf + 0, enc_buf + 4, enc_buf + 8, enc_buf + 12, enc_len);\n    }\n\n    return;\n  }\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le_S (w1, w2, w3);\n    make_utf16le_S (w0, w0, w1);\n\n    w0[0] = hc_swap32_S (w0[0]);\n    w0[1] = hc_swap32_S (w0[1]);\n    w0[2] = hc_swap32_S (w0[2]);\n    w0[3] = hc_swap32_S (w0[3]);\n    w1[0] = hc_swap32_S (w1[0]);\n    w1[1] = hc_swap32_S (w1[1]);\n    w1[2] = hc_swap32_S (w1[2]);\n    w1[3] = hc_swap32_S (w1[3]);\n    w2[0] = hc_swap32_S (w2[0]);\n    w2[1] = hc_swap32_S (w2[1]);\n    w2[2] = hc_swap32_S (w2[2]);\n    w2[3] = hc_swap32_S (w2[3]);\n    w3[0] = hc_swap32_S (w3[0]);\n    w3[1] = hc_swap32_S (w3[1]);\n    w3[2] = hc_swap32_S (w3[2]);\n    w3[3] = hc_swap32_S (w3[3]);\n\n    sha256_update_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le_S (w1, w2, w3);\n  make_utf16le_S (w0, w0, w1);\n\n  w0[0] = hc_swap32_S (w0[0]);\n  w0[1] = hc_swap32_S (w0[1]);\n  w0[2] = hc_swap32_S (w0[2]);\n  w0[3] = hc_swap32_S (w0[3]);\n  w1[0] = hc_swap32_S (w1[0]);\n  w1[1] = hc_swap32_S (w1[1]);\n  w1[2] = hc_swap32_S (w1[2]);\n  w1[3] = hc_swap32_S (w1[3]);\n  w2[0] = hc_swap32_S (w2[0]);\n  w2[1] = hc_swap32_S (w2[1]);\n  w2[2] = hc_swap32_S (w2[2]);\n  w2[3] = hc_swap32_S (w2[3]);\n  w3[0] = hc_swap32_S (w3[0]);\n  w3[1] = hc_swap32_S (w3[1]);\n  w3[2] = hc_swap32_S (w3[2]);\n  w3[3] = hc_swap32_S (w3[3]);\n\n  sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_final (PRIVATE_AS sha256_ctx_t *ctx)\n{\n  const int pos = ctx->len & 63;\n\n  append_0x80_4x4_S (ctx->w0, ctx->w1, ctx->w2, ctx->w3, pos ^ 3);\n\n  if (pos >= 56)\n  {\n    sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n    ctx->w0[0] = 0;\n    ctx->w0[1] = 0;\n    ctx->w0[2] = 0;\n    ctx->w0[3] = 0;\n    ctx->w1[0] = 0;\n    ctx->w1[1] = 0;\n    ctx->w1[2] = 0;\n    ctx->w1[3] = 0;\n    ctx->w2[0] = 0;\n    ctx->w2[1] = 0;\n    ctx->w2[2] = 0;\n    ctx->w2[3] = 0;\n    ctx->w3[0] = 0;\n    ctx->w3[1] = 0;\n    ctx->w3[2] = 0;\n    ctx->w3[3] = 0;\n  }\n\n  ctx->w3[2] = 0;\n  ctx->w3[3] = ctx->len * 8;\n\n  sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n}\n\n// sha256_hmac\n\nDECLSPEC void sha256_hmac_init_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3)\n{\n  u32 a0[4];\n  u32 a1[4];\n  u32 a2[4];\n  u32 a3[4];\n\n  // ipad\n\n  a0[0] = w0[0] ^ 0x36363636;\n  a0[1] = w0[1] ^ 0x36363636;\n  a0[2] = w0[2] ^ 0x36363636;\n  a0[3] = w0[3] ^ 0x36363636;\n  a1[0] = w1[0] ^ 0x36363636;\n  a1[1] = w1[1] ^ 0x36363636;\n  a1[2] = w1[2] ^ 0x36363636;\n  a1[3] = w1[3] ^ 0x36363636;\n  a2[0] = w2[0] ^ 0x36363636;\n  a2[1] = w2[1] ^ 0x36363636;\n  a2[2] = w2[2] ^ 0x36363636;\n  a2[3] = w2[3] ^ 0x36363636;\n  a3[0] = w3[0] ^ 0x36363636;\n  a3[1] = w3[1] ^ 0x36363636;\n  a3[2] = w3[2] ^ 0x36363636;\n  a3[3] = w3[3] ^ 0x36363636;\n\n  sha256_init (&ctx->ipad);\n\n  sha256_update_64 (&ctx->ipad, a0, a1, a2, a3, 64);\n\n  // opad\n\n  u32 b0[4];\n  u32 b1[4];\n  u32 b2[4];\n  u32 b3[4];\n\n  b0[0] = w0[0] ^ 0x5c5c5c5c;\n  b0[1] = w0[1] ^ 0x5c5c5c5c;\n  b0[2] = w0[2] ^ 0x5c5c5c5c;\n  b0[3] = w0[3] ^ 0x5c5c5c5c;\n  b1[0] = w1[0] ^ 0x5c5c5c5c;\n  b1[1] = w1[1] ^ 0x5c5c5c5c;\n  b1[2] = w1[2] ^ 0x5c5c5c5c;\n  b1[3] = w1[3] ^ 0x5c5c5c5c;\n  b2[0] = w2[0] ^ 0x5c5c5c5c;\n  b2[1] = w2[1] ^ 0x5c5c5c5c;\n  b2[2] = w2[2] ^ 0x5c5c5c5c;\n  b2[3] = w2[3] ^ 0x5c5c5c5c;\n  b3[0] = w3[0] ^ 0x5c5c5c5c;\n  b3[1] = w3[1] ^ 0x5c5c5c5c;\n  b3[2] = w3[2] ^ 0x5c5c5c5c;\n  b3[3] = w3[3] ^ 0x5c5c5c5c;\n\n  sha256_init (&ctx->opad);\n\n  sha256_update_64 (&ctx->opad, b0, b1, b2, b3, 64);\n}\n\nDECLSPEC void sha256_hmac_init (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    sha256_ctx_t tmp;\n\n    sha256_init (&tmp);\n\n    sha256_update (&tmp, w, len);\n\n    sha256_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = tmp.h[5];\n    w1[2] = tmp.h[6];\n    w1[3] = tmp.h[7];\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = w[ 0];\n    w0[1] = w[ 1];\n    w0[2] = w[ 2];\n    w0[3] = w[ 3];\n    w1[0] = w[ 4];\n    w1[1] = w[ 5];\n    w1[2] = w[ 6];\n    w1[3] = w[ 7];\n    w2[0] = w[ 8];\n    w2[1] = w[ 9];\n    w2[2] = w[10];\n    w2[3] = w[11];\n    w3[0] = w[12];\n    w3[1] = w[13];\n    w3[2] = w[14];\n    w3[3] = w[15];\n  }\n\n  sha256_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void sha256_hmac_init_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    sha256_ctx_t tmp;\n\n    sha256_init (&tmp);\n\n    sha256_update_swap (&tmp, w, len);\n\n    sha256_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = tmp.h[5];\n    w1[2] = tmp.h[6];\n    w1[3] = tmp.h[7];\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = hc_swap32_S (w[ 0]);\n    w0[1] = hc_swap32_S (w[ 1]);\n    w0[2] = hc_swap32_S (w[ 2]);\n    w0[3] = hc_swap32_S (w[ 3]);\n    w1[0] = hc_swap32_S (w[ 4]);\n    w1[1] = hc_swap32_S (w[ 5]);\n    w1[2] = hc_swap32_S (w[ 6]);\n    w1[3] = hc_swap32_S (w[ 7]);\n    w2[0] = hc_swap32_S (w[ 8]);\n    w2[1] = hc_swap32_S (w[ 9]);\n    w2[2] = hc_swap32_S (w[10]);\n    w2[3] = hc_swap32_S (w[11]);\n    w3[0] = hc_swap32_S (w[12]);\n    w3[1] = hc_swap32_S (w[13]);\n    w3[2] = hc_swap32_S (w[14]);\n    w3[3] = hc_swap32_S (w[15]);\n  }\n\n  sha256_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void sha256_hmac_init_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    sha256_ctx_t tmp;\n\n    sha256_init (&tmp);\n\n    sha256_update_global (&tmp, w, len);\n\n    sha256_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = tmp.h[5];\n    w1[2] = tmp.h[6];\n    w1[3] = tmp.h[7];\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = w[ 0];\n    w0[1] = w[ 1];\n    w0[2] = w[ 2];\n    w0[3] = w[ 3];\n    w1[0] = w[ 4];\n    w1[1] = w[ 5];\n    w1[2] = w[ 6];\n    w1[3] = w[ 7];\n    w2[0] = w[ 8];\n    w2[1] = w[ 9];\n    w2[2] = w[10];\n    w2[3] = w[11];\n    w3[0] = w[12];\n    w3[1] = w[13];\n    w3[2] = w[14];\n    w3[3] = w[15];\n  }\n\n  sha256_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void sha256_hmac_init_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  if (len > 64)\n  {\n    sha256_ctx_t tmp;\n\n    sha256_init (&tmp);\n\n    sha256_update_global_swap (&tmp, w, len);\n\n    sha256_final (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = tmp.h[5];\n    w1[2] = tmp.h[6];\n    w1[3] = tmp.h[7];\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = hc_swap32_S (w[ 0]);\n    w0[1] = hc_swap32_S (w[ 1]);\n    w0[2] = hc_swap32_S (w[ 2]);\n    w0[3] = hc_swap32_S (w[ 3]);\n    w1[0] = hc_swap32_S (w[ 4]);\n    w1[1] = hc_swap32_S (w[ 5]);\n    w1[2] = hc_swap32_S (w[ 6]);\n    w1[3] = hc_swap32_S (w[ 7]);\n    w2[0] = hc_swap32_S (w[ 8]);\n    w2[1] = hc_swap32_S (w[ 9]);\n    w2[2] = hc_swap32_S (w[10]);\n    w2[3] = hc_swap32_S (w[11]);\n    w3[0] = hc_swap32_S (w[12]);\n    w3[1] = hc_swap32_S (w[13]);\n    w3[2] = hc_swap32_S (w[14]);\n    w3[3] = hc_swap32_S (w[15]);\n  }\n\n  sha256_hmac_init_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void sha256_hmac_update_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len)\n{\n  sha256_update_64 (&ctx->ipad, w0, w1, w2, w3, len);\n}\n\nDECLSPEC void sha256_hmac_update (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  sha256_update (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  sha256_update_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  sha256_update_utf16le (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len)\n{\n  sha256_update_utf16le_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  sha256_update_global (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  sha256_update_global_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_global_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  sha256_update_global_utf16le (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_update_global_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len)\n{\n  sha256_update_global_utf16le_swap (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_final (PRIVATE_AS sha256_hmac_ctx_t *ctx)\n{\n  sha256_final (&ctx->ipad);\n\n  ctx->opad.w0[0] = ctx->ipad.h[0];\n  ctx->opad.w0[1] = ctx->ipad.h[1];\n  ctx->opad.w0[2] = ctx->ipad.h[2];\n  ctx->opad.w0[3] = ctx->ipad.h[3];\n  ctx->opad.w1[0] = ctx->ipad.h[4];\n  ctx->opad.w1[1] = ctx->ipad.h[5];\n  ctx->opad.w1[2] = ctx->ipad.h[6];\n  ctx->opad.w1[3] = ctx->ipad.h[7];\n  ctx->opad.w2[0] = 0;\n  ctx->opad.w2[1] = 0;\n  ctx->opad.w2[2] = 0;\n  ctx->opad.w2[3] = 0;\n  ctx->opad.w3[0] = 0;\n  ctx->opad.w3[1] = 0;\n  ctx->opad.w3[2] = 0;\n  ctx->opad.w3[3] = 0;\n\n  ctx->opad.len += 32;\n\n  sha256_final (&ctx->opad);\n}\n\n// while input buf can be a vector datatype, the length of the different elements can not\n\nDECLSPEC void sha256_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest)\n{\n  u32x a = digest[0];\n  u32x b = digest[1];\n  u32x c = digest[2];\n  u32x d = digest[3];\n  u32x e = digest[4];\n  u32x f = digest[5];\n  u32x g = digest[6];\n  u32x h = digest[7];\n\n  u32x w0_t = w0[0];\n  u32x w1_t = w0[1];\n  u32x w2_t = w0[2];\n  u32x w3_t = w0[3];\n  u32x w4_t = w1[0];\n  u32x w5_t = w1[1];\n  u32x w6_t = w1[2];\n  u32x w7_t = w1[3];\n  u32x w8_t = w2[0];\n  u32x w9_t = w2[1];\n  u32x wa_t = w2[2];\n  u32x wb_t = w2[3];\n  u32x wc_t = w3[0];\n  u32x wd_t = w3[1];\n  u32x we_t = w3[2];\n  u32x wf_t = w3[3];\n\n  #define ROUND_EXPAND()                            \\\n  {                                                 \\\n    w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t);  \\\n    w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t);  \\\n    w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t);  \\\n    w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t);  \\\n    w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t);  \\\n    w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t);  \\\n    w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t);  \\\n    w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t);  \\\n    w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t);  \\\n    w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t);  \\\n    wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t);  \\\n    wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t);  \\\n    wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t);  \\\n    wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t);  \\\n    we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t);  \\\n    wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t);  \\\n  }\n\n  #define ROUND_STEP(i)                                                                   \\\n  {                                                                                       \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha256[i +  0]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha256[i +  1]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha256[i +  2]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha256[i +  3]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha256[i +  4]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha256[i +  5]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha256[i +  6]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha256[i +  7]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha256[i +  8]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha256[i +  9]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha256[i + 10]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha256[i + 11]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha256[i + 12]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha256[i + 13]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, k_sha256[i + 14]); \\\n    SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha256[i + 15]); \\\n  }\n\n  ROUND_STEP (0);\n\n  #ifdef _unroll\n  #pragma unroll\n  #endif\n  for (int i = 16; i < 64; i += 16)\n  {\n    ROUND_EXPAND (); ROUND_STEP (i);\n  }\n\n  #undef ROUND_EXPAND\n  #undef ROUND_STEP\n\n  digest[0] += a;\n  digest[1] += b;\n  digest[2] += c;\n  digest[3] += d;\n  digest[4] += e;\n  digest[5] += f;\n  digest[6] += g;\n  digest[7] += h;\n}\n\nDECLSPEC void sha256_init_vector (PRIVATE_AS sha256_ctx_vector_t *ctx)\n{\n  ctx->h[0] = SHA256M_A;\n  ctx->h[1] = SHA256M_B;\n  ctx->h[2] = SHA256M_C;\n  ctx->h[3] = SHA256M_D;\n  ctx->h[4] = SHA256M_E;\n  ctx->h[5] = SHA256M_F;\n  ctx->h[6] = SHA256M_G;\n  ctx->h[7] = SHA256M_H;\n\n  ctx->w0[0] = 0;\n  ctx->w0[1] = 0;\n  ctx->w0[2] = 0;\n  ctx->w0[3] = 0;\n  ctx->w1[0] = 0;\n  ctx->w1[1] = 0;\n  ctx->w1[2] = 0;\n  ctx->w1[3] = 0;\n  ctx->w2[0] = 0;\n  ctx->w2[1] = 0;\n  ctx->w2[2] = 0;\n  ctx->w2[3] = 0;\n  ctx->w3[0] = 0;\n  ctx->w3[1] = 0;\n  ctx->w3[2] = 0;\n  ctx->w3[3] = 0;\n\n  ctx->len = 0;\n}\n\nDECLSPEC void sha256_init_vector_from_scalar (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS sha256_ctx_t *ctx0)\n{\n  ctx->h[0] = ctx0->h[0];\n  ctx->h[1] = ctx0->h[1];\n  ctx->h[2] = ctx0->h[2];\n  ctx->h[3] = ctx0->h[3];\n  ctx->h[4] = ctx0->h[4];\n  ctx->h[5] = ctx0->h[5];\n  ctx->h[6] = ctx0->h[6];\n  ctx->h[7] = ctx0->h[7];\n\n  ctx->w0[0] = ctx0->w0[0];\n  ctx->w0[1] = ctx0->w0[1];\n  ctx->w0[2] = ctx0->w0[2];\n  ctx->w0[3] = ctx0->w0[3];\n  ctx->w1[0] = ctx0->w1[0];\n  ctx->w1[1] = ctx0->w1[1];\n  ctx->w1[2] = ctx0->w1[2];\n  ctx->w1[3] = ctx0->w1[3];\n  ctx->w2[0] = ctx0->w2[0];\n  ctx->w2[1] = ctx0->w2[1];\n  ctx->w2[2] = ctx0->w2[2];\n  ctx->w2[3] = ctx0->w2[3];\n  ctx->w3[0] = ctx0->w3[0];\n  ctx->w3[1] = ctx0->w3[1];\n  ctx->w3[2] = ctx0->w3[2];\n  ctx->w3[3] = ctx0->w3[3];\n\n  ctx->len = ctx0->len;\n}\n\nDECLSPEC void sha256_update_vector_64 (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len)\n{\n  if (len == 0) return;\n\n  const int pos = ctx->len & 63;\n\n  ctx->len += len;\n\n  if (pos == 0)\n  {\n    ctx->w0[0] = w0[0];\n    ctx->w0[1] = w0[1];\n    ctx->w0[2] = w0[2];\n    ctx->w0[3] = w0[3];\n    ctx->w1[0] = w1[0];\n    ctx->w1[1] = w1[1];\n    ctx->w1[2] = w1[2];\n    ctx->w1[3] = w1[3];\n    ctx->w2[0] = w2[0];\n    ctx->w2[1] = w2[1];\n    ctx->w2[2] = w2[2];\n    ctx->w2[3] = w2[3];\n    ctx->w3[0] = w3[0];\n    ctx->w3[1] = w3[1];\n    ctx->w3[2] = w3[2];\n    ctx->w3[3] = w3[3];\n\n    if (len == 64)\n    {\n      sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = 0;\n      ctx->w0[1] = 0;\n      ctx->w0[2] = 0;\n      ctx->w0[3] = 0;\n      ctx->w1[0] = 0;\n      ctx->w1[1] = 0;\n      ctx->w1[2] = 0;\n      ctx->w1[3] = 0;\n      ctx->w2[0] = 0;\n      ctx->w2[1] = 0;\n      ctx->w2[2] = 0;\n      ctx->w2[3] = 0;\n      ctx->w3[0] = 0;\n      ctx->w3[1] = 0;\n      ctx->w3[2] = 0;\n      ctx->w3[3] = 0;\n    }\n  }\n  else\n  {\n    if ((pos + len) < 64)\n    {\n      switch_buffer_by_offset_be (w0, w1, w2, w3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n    }\n    else\n    {\n      u32x c0[4] = { 0 };\n      u32x c1[4] = { 0 };\n      u32x c2[4] = { 0 };\n      u32x c3[4] = { 0 };\n\n      switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos);\n\n      ctx->w0[0] |= w0[0];\n      ctx->w0[1] |= w0[1];\n      ctx->w0[2] |= w0[2];\n      ctx->w0[3] |= w0[3];\n      ctx->w1[0] |= w1[0];\n      ctx->w1[1] |= w1[1];\n      ctx->w1[2] |= w1[2];\n      ctx->w1[3] |= w1[3];\n      ctx->w2[0] |= w2[0];\n      ctx->w2[1] |= w2[1];\n      ctx->w2[2] |= w2[2];\n      ctx->w2[3] |= w2[3];\n      ctx->w3[0] |= w3[0];\n      ctx->w3[1] |= w3[1];\n      ctx->w3[2] |= w3[2];\n      ctx->w3[3] |= w3[3];\n\n      sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n      ctx->w0[0] = c0[0];\n      ctx->w0[1] = c0[1];\n      ctx->w0[2] = c0[2];\n      ctx->w0[3] = c0[3];\n      ctx->w1[0] = c1[0];\n      ctx->w1[1] = c1[1];\n      ctx->w1[2] = c1[2];\n      ctx->w1[3] = c1[3];\n      ctx->w2[0] = c2[0];\n      ctx->w2[1] = c2[1];\n      ctx->w2[2] = c2[2];\n      ctx->w2[3] = c2[3];\n      ctx->w3[0] = c3[0];\n      ctx->w3[1] = c3[1];\n      ctx->w3[2] = c3[2];\n      ctx->w3[3] = c3[3];\n    }\n  }\n}\n\nDECLSPEC void sha256_update_vector (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    sha256_update_vector_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  sha256_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void sha256_update_vector_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)\n  {\n    w0[0] = w[pos4 +  0];\n    w0[1] = w[pos4 +  1];\n    w0[2] = w[pos4 +  2];\n    w0[3] = w[pos4 +  3];\n    w1[0] = w[pos4 +  4];\n    w1[1] = w[pos4 +  5];\n    w1[2] = w[pos4 +  6];\n    w1[3] = w[pos4 +  7];\n    w2[0] = w[pos4 +  8];\n    w2[1] = w[pos4 +  9];\n    w2[2] = w[pos4 + 10];\n    w2[3] = w[pos4 + 11];\n    w3[0] = w[pos4 + 12];\n    w3[1] = w[pos4 + 13];\n    w3[2] = w[pos4 + 14];\n    w3[3] = w[pos4 + 15];\n\n    w0[0] = hc_swap32 (w0[0]);\n    w0[1] = hc_swap32 (w0[1]);\n    w0[2] = hc_swap32 (w0[2]);\n    w0[3] = hc_swap32 (w0[3]);\n    w1[0] = hc_swap32 (w1[0]);\n    w1[1] = hc_swap32 (w1[1]);\n    w1[2] = hc_swap32 (w1[2]);\n    w1[3] = hc_swap32 (w1[3]);\n    w2[0] = hc_swap32 (w2[0]);\n    w2[1] = hc_swap32 (w2[1]);\n    w2[2] = hc_swap32 (w2[2]);\n    w2[3] = hc_swap32 (w2[3]);\n    w3[0] = hc_swap32 (w3[0]);\n    w3[1] = hc_swap32 (w3[1]);\n    w3[2] = hc_swap32 (w3[2]);\n    w3[3] = hc_swap32 (w3[3]);\n\n    sha256_update_vector_64 (ctx, w0, w1, w2, w3, 64);\n  }\n\n  w0[0] = w[pos4 +  0];\n  w0[1] = w[pos4 +  1];\n  w0[2] = w[pos4 +  2];\n  w0[3] = w[pos4 +  3];\n  w1[0] = w[pos4 +  4];\n  w1[1] = w[pos4 +  5];\n  w1[2] = w[pos4 +  6];\n  w1[3] = w[pos4 +  7];\n  w2[0] = w[pos4 +  8];\n  w2[1] = w[pos4 +  9];\n  w2[2] = w[pos4 + 10];\n  w2[3] = w[pos4 + 11];\n  w3[0] = w[pos4 + 12];\n  w3[1] = w[pos4 + 13];\n  w3[2] = w[pos4 + 14];\n  w3[3] = w[pos4 + 15];\n\n  w0[0] = hc_swap32 (w0[0]);\n  w0[1] = hc_swap32 (w0[1]);\n  w0[2] = hc_swap32 (w0[2]);\n  w0[3] = hc_swap32 (w0[3]);\n  w1[0] = hc_swap32 (w1[0]);\n  w1[1] = hc_swap32 (w1[1]);\n  w1[2] = hc_swap32 (w1[2]);\n  w1[3] = hc_swap32 (w1[3]);\n  w2[0] = hc_swap32 (w2[0]);\n  w2[1] = hc_swap32 (w2[1]);\n  w2[2] = hc_swap32 (w2[2]);\n  w2[3] = hc_swap32 (w2[3]);\n  w3[0] = hc_swap32 (w3[0]);\n  w3[1] = hc_swap32 (w3[1]);\n  w3[2] = hc_swap32 (w3[2]);\n  w3[3] = hc_swap32 (w3[3]);\n\n  sha256_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1);\n}\n\nDECLSPEC void sha256_update_vector_utf16le (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le (w1, w2, w3);\n    make_utf16le (w0, w0, w1);\n\n    sha256_update_vector_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le (w1, w2, w3);\n  make_utf16le (w0, w0, w1);\n\n  sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_update_vector_utf16le_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16le (w1, w2, w3);\n    make_utf16le (w0, w0, w1);\n\n    w0[0] = hc_swap32 (w0[0]);\n    w0[1] = hc_swap32 (w0[1]);\n    w0[2] = hc_swap32 (w0[2]);\n    w0[3] = hc_swap32 (w0[3]);\n    w1[0] = hc_swap32 (w1[0]);\n    w1[1] = hc_swap32 (w1[1]);\n    w1[2] = hc_swap32 (w1[2]);\n    w1[3] = hc_swap32 (w1[3]);\n    w2[0] = hc_swap32 (w2[0]);\n    w2[1] = hc_swap32 (w2[1]);\n    w2[2] = hc_swap32 (w2[2]);\n    w2[3] = hc_swap32 (w2[3]);\n    w3[0] = hc_swap32 (w3[0]);\n    w3[1] = hc_swap32 (w3[1]);\n    w3[2] = hc_swap32 (w3[2]);\n    w3[3] = hc_swap32 (w3[3]);\n\n    sha256_update_vector_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16le (w1, w2, w3);\n  make_utf16le (w0, w0, w1);\n\n  w0[0] = hc_swap32 (w0[0]);\n  w0[1] = hc_swap32 (w0[1]);\n  w0[2] = hc_swap32 (w0[2]);\n  w0[3] = hc_swap32 (w0[3]);\n  w1[0] = hc_swap32 (w1[0]);\n  w1[1] = hc_swap32 (w1[1]);\n  w1[2] = hc_swap32 (w1[2]);\n  w1[3] = hc_swap32 (w1[3]);\n  w2[0] = hc_swap32 (w2[0]);\n  w2[1] = hc_swap32 (w2[1]);\n  w2[2] = hc_swap32 (w2[2]);\n  w2[3] = hc_swap32 (w2[3]);\n  w3[0] = hc_swap32 (w3[0]);\n  w3[1] = hc_swap32 (w3[1]);\n  w3[2] = hc_swap32 (w3[2]);\n  w3[3] = hc_swap32 (w3[3]);\n\n  sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_update_vector_utf16beN (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int pos1;\n  int pos4;\n\n  for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)\n  {\n    w0[0] = w[pos4 + 0];\n    w0[1] = w[pos4 + 1];\n    w0[2] = w[pos4 + 2];\n    w0[3] = w[pos4 + 3];\n    w1[0] = w[pos4 + 4];\n    w1[1] = w[pos4 + 5];\n    w1[2] = w[pos4 + 6];\n    w1[3] = w[pos4 + 7];\n\n    make_utf16beN (w1, w2, w3);\n    make_utf16beN (w0, w0, w1);\n\n    sha256_update_vector_64 (ctx, w0, w1, w2, w3, 32 * 2);\n  }\n\n  w0[0] = w[pos4 + 0];\n  w0[1] = w[pos4 + 1];\n  w0[2] = w[pos4 + 2];\n  w0[3] = w[pos4 + 3];\n  w1[0] = w[pos4 + 4];\n  w1[1] = w[pos4 + 5];\n  w1[2] = w[pos4 + 6];\n  w1[3] = w[pos4 + 7];\n\n  make_utf16beN (w1, w2, w3);\n  make_utf16beN (w0, w0, w1);\n\n  sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);\n}\n\nDECLSPEC void sha256_final_vector (PRIVATE_AS sha256_ctx_vector_t *ctx)\n{\n  const int pos = ctx->len & 63;\n\n  append_0x80_4x4 (ctx->w0, ctx->w1, ctx->w2, ctx->w3, pos ^ 3);\n\n  if (pos >= 56)\n  {\n    sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n\n    ctx->w0[0] = 0;\n    ctx->w0[1] = 0;\n    ctx->w0[2] = 0;\n    ctx->w0[3] = 0;\n    ctx->w1[0] = 0;\n    ctx->w1[1] = 0;\n    ctx->w1[2] = 0;\n    ctx->w1[3] = 0;\n    ctx->w2[0] = 0;\n    ctx->w2[1] = 0;\n    ctx->w2[2] = 0;\n    ctx->w2[3] = 0;\n    ctx->w3[0] = 0;\n    ctx->w3[1] = 0;\n    ctx->w3[2] = 0;\n    ctx->w3[3] = 0;\n  }\n\n  ctx->w3[2] = 0;\n  ctx->w3[3] = ctx->len * 8;\n\n  sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h);\n}\n\n// HMAC + Vector\n\nDECLSPEC void sha256_hmac_init_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3)\n{\n  u32x a0[4];\n  u32x a1[4];\n  u32x a2[4];\n  u32x a3[4];\n\n  // ipad\n\n  a0[0] = w0[0] ^ 0x36363636;\n  a0[1] = w0[1] ^ 0x36363636;\n  a0[2] = w0[2] ^ 0x36363636;\n  a0[3] = w0[3] ^ 0x36363636;\n  a1[0] = w1[0] ^ 0x36363636;\n  a1[1] = w1[1] ^ 0x36363636;\n  a1[2] = w1[2] ^ 0x36363636;\n  a1[3] = w1[3] ^ 0x36363636;\n  a2[0] = w2[0] ^ 0x36363636;\n  a2[1] = w2[1] ^ 0x36363636;\n  a2[2] = w2[2] ^ 0x36363636;\n  a2[3] = w2[3] ^ 0x36363636;\n  a3[0] = w3[0] ^ 0x36363636;\n  a3[1] = w3[1] ^ 0x36363636;\n  a3[2] = w3[2] ^ 0x36363636;\n  a3[3] = w3[3] ^ 0x36363636;\n\n  sha256_init_vector (&ctx->ipad);\n\n  sha256_update_vector_64 (&ctx->ipad, a0, a1, a2, a3, 64);\n\n  // opad\n\n  u32x b0[4];\n  u32x b1[4];\n  u32x b2[4];\n  u32x b3[4];\n\n  b0[0] = w0[0] ^ 0x5c5c5c5c;\n  b0[1] = w0[1] ^ 0x5c5c5c5c;\n  b0[2] = w0[2] ^ 0x5c5c5c5c;\n  b0[3] = w0[3] ^ 0x5c5c5c5c;\n  b1[0] = w1[0] ^ 0x5c5c5c5c;\n  b1[1] = w1[1] ^ 0x5c5c5c5c;\n  b1[2] = w1[2] ^ 0x5c5c5c5c;\n  b1[3] = w1[3] ^ 0x5c5c5c5c;\n  b2[0] = w2[0] ^ 0x5c5c5c5c;\n  b2[1] = w2[1] ^ 0x5c5c5c5c;\n  b2[2] = w2[2] ^ 0x5c5c5c5c;\n  b2[3] = w2[3] ^ 0x5c5c5c5c;\n  b3[0] = w3[0] ^ 0x5c5c5c5c;\n  b3[1] = w3[1] ^ 0x5c5c5c5c;\n  b3[2] = w3[2] ^ 0x5c5c5c5c;\n  b3[3] = w3[3] ^ 0x5c5c5c5c;\n\n  sha256_init_vector (&ctx->opad);\n\n  sha256_update_vector_64 (&ctx->opad, b0, b1, b2, b3, 64);\n}\n\nDECLSPEC void sha256_hmac_init_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  if (len > 64)\n  {\n    sha256_ctx_vector_t tmp;\n\n    sha256_init_vector (&tmp);\n\n    sha256_update_vector (&tmp, w, len);\n\n    sha256_final_vector (&tmp);\n\n    w0[0] = tmp.h[0];\n    w0[1] = tmp.h[1];\n    w0[2] = tmp.h[2];\n    w0[3] = tmp.h[3];\n    w1[0] = tmp.h[4];\n    w1[1] = tmp.h[5];\n    w1[2] = tmp.h[6];\n    w1[3] = tmp.h[7];\n    w2[0] = 0;\n    w2[1] = 0;\n    w2[2] = 0;\n    w2[3] = 0;\n    w3[0] = 0;\n    w3[1] = 0;\n    w3[2] = 0;\n    w3[3] = 0;\n  }\n  else\n  {\n    w0[0] = w[ 0];\n    w0[1] = w[ 1];\n    w0[2] = w[ 2];\n    w0[3] = w[ 3];\n    w1[0] = w[ 4];\n    w1[1] = w[ 5];\n    w1[2] = w[ 6];\n    w1[3] = w[ 7];\n    w2[0] = w[ 8];\n    w2[1] = w[ 9];\n    w2[2] = w[10];\n    w2[3] = w[11];\n    w3[0] = w[12];\n    w3[1] = w[13];\n    w3[2] = w[14];\n    w3[3] = w[15];\n  }\n\n  sha256_hmac_init_vector_64 (ctx, w0, w1, w2, w3);\n}\n\nDECLSPEC void sha256_hmac_update_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len)\n{\n  sha256_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len);\n}\n\nDECLSPEC void sha256_hmac_update_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len)\n{\n  sha256_update_vector (&ctx->ipad, w, len);\n}\n\nDECLSPEC void sha256_hmac_final_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx)\n{\n  sha256_final_vector (&ctx->ipad);\n\n  ctx->opad.w0[0] = ctx->ipad.h[0];\n  ctx->opad.w0[1] = ctx->ipad.h[1];\n  ctx->opad.w0[2] = ctx->ipad.h[2];\n  ctx->opad.w0[3] = ctx->ipad.h[3];\n  ctx->opad.w1[0] = ctx->ipad.h[4];\n  ctx->opad.w1[1] = ctx->ipad.h[5];\n  ctx->opad.w1[2] = ctx->ipad.h[6];\n  ctx->opad.w1[3] = ctx->ipad.h[7];\n  ctx->opad.w2[0] = 0;\n  ctx->opad.w2[1] = 0;\n  ctx->opad.w2[2] = 0;\n  ctx->opad.w2[3] = 0;\n  ctx->opad.w3[0] = 0;\n  ctx->opad.w3[1] = 0;\n  ctx->opad.w3[2] = 0;\n  ctx->opad.w3[3] = 0;\n\n  ctx->opad.len += 32;\n\n  sha256_final_vector (&ctx->opad);\n}\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_hash_sha256.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_HASH_SHA256_H\n#define INC_HASH_SHA256_H\n\n#define SHIFT_RIGHT_32(x,n) ((x) >> (n))\n\n#define SHA256_S0_S(x) (hc_rotl32_S ((x), 25u) ^ hc_rotl32_S ((x), 14u) ^ SHIFT_RIGHT_32 ((x),  3u))\n#define SHA256_S1_S(x) (hc_rotl32_S ((x), 15u) ^ hc_rotl32_S ((x), 13u) ^ SHIFT_RIGHT_32 ((x), 10u))\n#define SHA256_S2_S(x) (hc_rotl32_S ((x), 30u) ^ hc_rotl32_S ((x), 19u) ^ hc_rotl32_S ((x), 10u))\n#define SHA256_S3_S(x) (hc_rotl32_S ((x), 26u) ^ hc_rotl32_S ((x), 21u) ^ hc_rotl32_S ((x),  7u))\n\n#define SHA256_S0(x) (hc_rotl32 ((x), 25u) ^ hc_rotl32 ((x), 14u) ^ SHIFT_RIGHT_32 ((x),  3u))\n#define SHA256_S1(x) (hc_rotl32 ((x), 15u) ^ hc_rotl32 ((x), 13u) ^ SHIFT_RIGHT_32 ((x), 10u))\n#define SHA256_S2(x) (hc_rotl32 ((x), 30u) ^ hc_rotl32 ((x), 19u) ^ hc_rotl32 ((x), 10u))\n#define SHA256_S3(x) (hc_rotl32 ((x), 26u) ^ hc_rotl32 ((x), 21u) ^ hc_rotl32 ((x),  7u))\n\n#define SHA256_F0(x,y,z)  (((x) & (y)) | ((z) & ((x) ^ (y))))\n#define SHA256_F1(x,y,z)  ((z) ^ ((x) & ((y) ^ (z))))\n\n#ifdef USE_BITSELECT\n#define SHA256_F0o(x,y,z) (bitselect ((x), (y), ((x) ^ (z))))\n#define SHA256_F1o(x,y,z) (bitselect ((z), (y), (x)))\n#else\n#define SHA256_F0o(x,y,z) (SHA256_F0 ((x), (y), (z)))\n#define SHA256_F1o(x,y,z) (SHA256_F1 ((x), (y), (z)))\n#endif\n\n#define SHA256_STEP_S(F0,F1,a,b,c,d,e,f,g,h,x,K)  \\\n{                                                 \\\n  h = hc_add3_S (h, K, x);                        \\\n  h = hc_add3_S (h, SHA256_S3_S (e), F1 (e,f,g)); \\\n  d += h;                                         \\\n  h = hc_add3_S (h, SHA256_S2_S (a), F0 (a,b,c)); \\\n}\n\n#define SHA256_EXPAND_S(x,y,z,w) (SHA256_S1_S (x) + y + SHA256_S0_S (z) + w)\n\n#define SHA256_STEP(F0,F1,a,b,c,d,e,f,g,h,x,K)    \\\n{                                                 \\\n  h = hc_add3 (h, make_u32x (K), x);              \\\n  h = hc_add3 (h, SHA256_S3 (e), F1 (e,f,g));     \\\n  d += h;                                         \\\n  h = hc_add3 (h, SHA256_S2 (a), F0 (a,b,c));     \\\n}\n\n#define SHA256_EXPAND(x,y,z,w) (SHA256_S1 (x) + y + SHA256_S0 (z) + w)\n\ntypedef struct sha256_ctx\n{\n  u32 h[8];\n\n  u32 w0[4];\n  u32 w1[4];\n  u32 w2[4];\n  u32 w3[4];\n\n  int len;\n\n} sha256_ctx_t;\n\ntypedef struct sha256_hmac_ctx\n{\n  sha256_ctx_t ipad;\n  sha256_ctx_t opad;\n\n} sha256_hmac_ctx_t;\n\ntypedef struct sha256_ctx_vector\n{\n  u32x h[8];\n\n  u32x w0[4];\n  u32x w1[4];\n  u32x w2[4];\n  u32x w3[4];\n\n  int  len;\n\n} sha256_ctx_vector_t;\n\ntypedef struct sha256_hmac_ctx_vector\n{\n  sha256_ctx_vector_t ipad;\n  sha256_ctx_vector_t opad;\n\n} sha256_hmac_ctx_vector_t;\n\nDECLSPEC void sha256_transform (PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3, PRIVATE_AS u32 *digest);\nDECLSPEC void sha256_init (PRIVATE_AS sha256_ctx_t *ctx);\nDECLSPEC void sha256_update_64 (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len);\nDECLSPEC void sha256_update (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_utf16le (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_global (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_global_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_global_utf16le (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_update_global_utf16le_swap (PRIVATE_AS sha256_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_final (PRIVATE_AS sha256_ctx_t *ctx);\nDECLSPEC void sha256_hmac_init_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w0, PRIVATE_AS const u32 *w1, PRIVATE_AS const u32 *w2, PRIVATE_AS const u32 *w3);\nDECLSPEC void sha256_hmac_init (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_init_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_init_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_init_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_64 (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const int len);\nDECLSPEC void sha256_hmac_update (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, PRIVATE_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_global (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_global_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_global_utf16le (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_update_global_utf16le_swap (PRIVATE_AS sha256_hmac_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len);\nDECLSPEC void sha256_hmac_final (PRIVATE_AS sha256_hmac_ctx_t *ctx);\nDECLSPEC void sha256_transform_vector (PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3, PRIVATE_AS u32x *digest);\nDECLSPEC void sha256_init_vector (PRIVATE_AS sha256_ctx_vector_t *ctx);\nDECLSPEC void sha256_init_vector_from_scalar (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS sha256_ctx_t *ctx0);\nDECLSPEC void sha256_update_vector_64 (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len);\nDECLSPEC void sha256_update_vector (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_update_vector_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_update_vector_utf16le (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_update_vector_utf16le_swap (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_update_vector_utf16beN (PRIVATE_AS sha256_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_final_vector (PRIVATE_AS sha256_ctx_vector_t *ctx);\nDECLSPEC void sha256_hmac_init_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w0, PRIVATE_AS const u32x *w1, PRIVATE_AS const u32x *w2, PRIVATE_AS const u32x *w3);\nDECLSPEC void sha256_hmac_init_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_hmac_update_vector_64 (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS u32x *w0, PRIVATE_AS u32x *w1, PRIVATE_AS u32x *w2, PRIVATE_AS u32x *w3, const int len);\nDECLSPEC void sha256_hmac_update_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len);\nDECLSPEC void sha256_hmac_final_vector (PRIVATE_AS sha256_hmac_ctx_vector_t *ctx);\n\n#endif\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_platform.cl",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#include \"inc_vendor.h\"\n#include \"inc_types.h\"\n#include \"inc_platform.h\"\n\n#ifdef IS_NATIVE\n#define FIXED_THREAD_COUNT(n)\n#define SYNC_THREADS()\n#endif\n\n#ifdef IS_AMD\n\nDECLSPEC u64x rotl64 (const u64x a, const int n)\n{\n  return rotr64 (a, 64 - n);\n}\n\nDECLSPEC u64x rotr64 (const u64x a, const int n)\n{\n  #if VECT_SIZE == 1\n  return rotr64_S (a, n);\n  #else\n  return ((a >> n) | ((a << (64 - n))));\n  #endif\n}\n\nDECLSPEC u64 rotl64_S (const u64 a, const int n)\n{\n  return rotr64_S (a, 64 - n);\n}\n\nDECLSPEC u64 rotr64_S (const u64 a, const int n)\n{\n  vconv64_t in;\n\n  in.v64 = a;\n\n  const u32 a0 = in.v32.a;\n  const u32 a1 = in.v32.b;\n\n  vconv64_t out;\n\n  if (n < 32)\n  {\n    out.v32.a = amd_bitalign (a1, a0, n);\n    out.v32.b = amd_bitalign (a0, a1, n);\n  }\n  else\n  {\n    out.v32.a = amd_bitalign (a0, a1, n - 32);\n    out.v32.b = amd_bitalign (a1, a0, n - 32);\n  }\n\n  return out.v64;\n}\n\n#endif // IS_AMD\n\n#if defined IS_CUDA\n\n#if ATTACK_EXEC == 11\n\nCONSTANT_VK u32 generic_constant[8192]; // 32k\n\n#if   ATTACK_KERN == 0\n#define bfs_buf     g_bfs_buf\n#define rules_buf   ((const kernel_rule_t *) generic_constant)\n#define words_buf_s g_words_buf_s\n#define words_buf_r g_words_buf_r\n#elif ATTACK_KERN == 1\n#define bfs_buf     g_bfs_buf\n#define rules_buf   g_rules_buf\n#define words_buf_s g_words_buf_s\n#define words_buf_r g_words_buf_r\n#elif ATTACK_KERN == 3\n#define rules_buf   g_rules_buf\n#define bfs_buf     ((const bf_t *)      generic_constant)\n#define words_buf_s ((const bs_word_t *) generic_constant)\n#define words_buf_r ((const u32x *)      generic_constant)\n#endif // ATTACK_KERN\n\n#endif // ATTACK_EXEC\n\nDECLSPEC u32 hc_atomic_dec (GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n\n  return atomicSub (p, val);\n}\n\nDECLSPEC u32 hc_atomic_inc (GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n\n  return atomicAdd (p, val);\n}\n\nDECLSPEC u32 hc_atomic_or (GLOBAL_AS u32 *p, volatile const u32 val)\n{\n  return atomicOr (p, val);\n}\n\nDECLSPEC size_t get_global_id  (const u32 dimindx __attribute__((unused)))\n{\n  return (blockIdx.x * blockDim.x) + threadIdx.x;\n}\n\nDECLSPEC size_t get_local_id (const u32 dimindx __attribute__((unused)))\n{\n  return threadIdx.x;\n}\n\nDECLSPEC size_t get_local_size (const u32 dimindx __attribute__((unused)))\n{\n  // verify\n  return blockDim.x;\n}\n\nDECLSPEC u32x rotl32 (const u32x a, const int n)\n{\n  return ((a << n) | ((a >> (32 - n))));\n}\n\nDECLSPEC u32x rotr32 (const u32x a, const int n)\n{\n  return ((a >> n) | ((a << (32 - n))));\n}\n\nDECLSPEC u32 rotl32_S (const u32 a, const int n)\n{\n  return ((a << n) | ((a >> (32 - n))));\n}\n\nDECLSPEC u32 rotr32_S (const u32 a, const int n)\n{\n  return ((a >> n) | ((a << (32 - n))));\n}\n\nDECLSPEC u64x rotl64 (const u64x a, const int n)\n{\n  return ((a << n) | ((a >> (64 - n))));\n}\n\nDECLSPEC u64x rotr64 (const u64x a, const int n)\n{\n  return ((a >> n) | ((a << (64 - n))));\n}\n\nDECLSPEC u64 rotl64_S (const u64 a, const int n)\n{\n  return ((a << n) | ((a >> (64 - n))));\n}\n\nDECLSPEC u64 rotr64_S (const u64 a, const int n)\n{\n  return ((a >> n) | ((a << (64 - n))));\n}\n\n#define FIXED_THREAD_COUNT(n) __launch_bounds__((n), 0)\n#define SYNC_THREADS() __syncthreads ()\n#endif // IS_CUDA\n\n#if defined IS_HIP\n\n#if ATTACK_EXEC == 11\n\nCONSTANT_VK u32 generic_constant[8192] __attribute__((used)); // 32k\n\n#if   ATTACK_KERN == 0\n#define bfs_buf     g_bfs_buf\n#define rules_buf   ((const kernel_rule_t *) generic_constant)\n#define words_buf_s g_words_buf_s\n#define words_buf_r g_words_buf_r\n#elif ATTACK_KERN == 1\n#define bfs_buf     g_bfs_buf\n#define rules_buf   g_rules_buf\n#define words_buf_s g_words_buf_s\n#define words_buf_r g_words_buf_r\n#elif ATTACK_KERN == 3\n#define rules_buf   g_rules_buf\n#define bfs_buf     ((const bf_t *)      generic_constant)\n#define words_buf_s ((const bs_word_t *) generic_constant)\n#define words_buf_r ((const u32x *)      generic_constant)\n#endif // ATTACK_KERN\n\n#endif // ATTACK_EXEC\n\nDECLSPEC u32 hc_atomic_dec (GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n\n  return atomicSub (p, val);\n}\n\nDECLSPEC u32 hc_atomic_inc (GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n\n  return atomicAdd (p, val);\n}\n\nDECLSPEC u32 hc_atomic_or (GLOBAL_AS u32 *p, volatile const u32 val)\n{\n  return atomicOr (p, val);\n}\n\nDECLSPEC size_t get_global_id  (const u32 dimindx __attribute__((unused)))\n{\n  return (blockIdx.x * blockDim.x) + threadIdx.x;\n}\n\nDECLSPEC size_t get_local_id (const u32 dimindx __attribute__((unused)))\n{\n  return threadIdx.x;\n}\n\nDECLSPEC size_t get_local_size (const u32 dimindx __attribute__((unused)))\n{\n  // verify\n  return blockDim.x;\n}\n\nDECLSPEC u32x rotl32 (const u32x a, const int n)\n{\n  return ((a << n) | ((a >> (32 - n))));\n}\n\nDECLSPEC u32x rotr32 (const u32x a, const int n)\n{\n  return ((a >> n) | ((a << (32 - n))));\n}\n\nDECLSPEC u32 rotl32_S (const u32 a, const int n)\n{\n  return ((a << n) | ((a >> (32 - n))));\n}\n\nDECLSPEC u32 rotr32_S (const u32 a, const int n)\n{\n  return ((a >> n) | ((a << (32 - n))));\n}\n\nDECLSPEC u64x rotl64 (const u64x a, const int n)\n{\n  return rotr64 (a, 64 - n);\n}\n\nDECLSPEC u32 amd_bitalign_S (const u32 a, const u32 b, const int n)\n{\n  u32 r = 0;\n\n  __asm__ (\"V_ALIGNBIT_B32 %0, %1, %2, %3;\" : \"=v\"(r): \"v\"(a), \"v\"(b), \"I\"(n));\n\n  return r;\n}\n\nDECLSPEC u64x rotr64 (const u64x a, const int n)\n{\n  #if VECT_SIZE == 1\n  return rotr64_S (a, n);\n  #else\n  return ((a >> n) | ((a << (64 - n))));\n  #endif\n}\n\nDECLSPEC u64 rotl64_S (const u64 a, const int n)\n{\n  return rotr64_S (a, 64 - n);\n}\n\nDECLSPEC u64 rotr64_S (const u64 a, const int n)\n{\n  vconv64_t in;\n\n  in.v64 = a;\n\n  const u32 a0 = in.v32.a;\n  const u32 a1 = in.v32.b;\n\n  vconv64_t out;\n\n  if (n < 32)\n  {\n    out.v32.a = amd_bitalign_S (a1, a0, n);\n    out.v32.b = amd_bitalign_S (a0, a1, n);\n  }\n  else\n  {\n    out.v32.a = amd_bitalign_S (a0, a1, n - 32);\n    out.v32.b = amd_bitalign_S (a1, a0, n - 32);\n  }\n\n  return out.v64;\n}\n\n#define FIXED_THREAD_COUNT(n) __launch_bounds__((n), 0)\n#define SYNC_THREADS() __syncthreads ()\n#endif // IS_HIP\n\n#ifdef IS_METAL\n\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n  volatile GLOBAL_AS atomic_int *pd = (volatile GLOBAL_AS atomic_int *) p;\n\n  return atomic_fetch_sub_explicit (pd, val, memory_order_relaxed);\n}\n\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n  volatile GLOBAL_AS atomic_int *pd = (volatile GLOBAL_AS atomic_int *) p;\n\n  return atomic_fetch_add_explicit (pd, val, memory_order_relaxed);\n}\n\nDECLSPEC u32 hc_atomic_or (volatile GLOBAL_AS u32 *p, volatile const u32 val)\n{\n  volatile GLOBAL_AS atomic_int *pd = (volatile GLOBAL_AS atomic_int *) p;\n\n  return atomic_fetch_or_explicit (pd, val, memory_order_relaxed);\n}\n\n#define FIXED_THREAD_COUNT(n)\n#define SYNC_THREADS() threadgroup_barrier (mem_flags::mem_threadgroup)\n#endif // IS_METAL\n\n#ifdef IS_OPENCL\n\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n\n  return atomic_sub (p, val);\n}\n\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p)\n{\n  volatile const u32 val = 1;\n\n  return atomic_add  (p, val);\n}\n\nDECLSPEC u32 hc_atomic_or (volatile GLOBAL_AS u32 *p, volatile const u32 val)\n{\n  return atomic_or (p, val);\n}\n\n#define FIXED_THREAD_COUNT(n) __attribute__((reqd_work_group_size((n), 1, 1)))\n#define SYNC_THREADS() barrier (CLK_LOCAL_MEM_FENCE)\n#endif // IS_OPENCL\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_platform.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_PLATFORM_H\n#define INC_PLATFORM_H\n\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_or  (volatile GLOBAL_AS u32 *p, volatile const u32 val);\n\n#ifdef IS_AMD\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_or  (volatile GLOBAL_AS u32 *p, volatile const u32 val);\n\nDECLSPEC u64x rotl64   (const u64x a, const int n);\nDECLSPEC u64x rotr64   (const u64x a, const int n);\nDECLSPEC u64  rotl64_S (const u64  a, const int n);\nDECLSPEC u64  rotr64_S (const u64  a, const int n);\n#endif // IS_AMD\n\n#ifdef IS_CUDA\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_or  (volatile GLOBAL_AS u32 *p, volatile const u32 val);\n\nDECLSPEC size_t get_global_id   (const u32 dimindx __attribute__((unused)));\nDECLSPEC size_t get_local_id    (const u32 dimindx __attribute__((unused)));\nDECLSPEC size_t get_local_size  (const u32 dimindx __attribute__((unused)));\n\nDECLSPEC u32x rotl32   (const u32x a, const int n);\nDECLSPEC u32x rotr32   (const u32x a, const int n);\nDECLSPEC u32  rotl32_S (const u32  a, const int n);\nDECLSPEC u32  rotr32_S (const u32  a, const int n);\nDECLSPEC u64x rotl64   (const u64x a, const int n);\nDECLSPEC u64x rotr64   (const u64x a, const int n);\nDECLSPEC u64  rotl64_S (const u64  a, const int n);\nDECLSPEC u64  rotr64_S (const u64  a, const int n);\n\n//#define rotate(a,n) (((a) << (n)) | ((a) >> (32 - (n))))\n#define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a))))\n#endif // IS_CUDA\n\n#ifdef IS_HIP\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_or  (volatile GLOBAL_AS u32 *p, volatile const u32 val);\n\nDECLSPEC size_t get_global_id   (const u32 dimindx);\nDECLSPEC size_t get_local_id    (const u32 dimindx);\nDECLSPEC size_t get_local_size  (const u32 dimindx);\n\nDECLSPEC u32x rotl32   (const u32x a, const int n);\nDECLSPEC u32x rotr32   (const u32x a, const int n);\nDECLSPEC u32  rotl32_S (const u32  a, const int n);\nDECLSPEC u32  rotr32_S (const u32  a, const int n);\nDECLSPEC u64x rotl64   (const u64x a, const int n);\nDECLSPEC u64x rotr64   (const u64x a, const int n);\nDECLSPEC u64  rotl64_S (const u64  a, const int n);\nDECLSPEC u64  rotr64_S (const u64  a, const int n);\n\n//#define rotate(a,n) (((a) << (n)) | ((a) >> (32 - (n))))\n#define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a))))\n#endif // IS_HIP\n\n#ifdef IS_METAL\n\nDECLSPEC u32 hc_atomic_dec (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_inc (volatile GLOBAL_AS u32 *p);\nDECLSPEC u32 hc_atomic_or  (volatile GLOBAL_AS u32 *p, volatile const u32 val);\n\n#define get_global_id(param) hc_gid\n#define get_local_id(param) hc_lid\n#define get_local_size(param) hc_lsz\n\nDECLSPEC u32x rotl32   (const u32x a, const int n);\nDECLSPEC u32x rotr32   (const u32x a, const int n);\nDECLSPEC u32  rotl32_S (const u32  a, const int n);\nDECLSPEC u32  rotr32_S (const u32  a, const int n);\nDECLSPEC u64x rotl64   (const u64x a, const int n);\nDECLSPEC u64x rotr64   (const u64x a, const int n);\nDECLSPEC u64  rotl64_S (const u64  a, const int n);\nDECLSPEC u64  rotr64_S (const u64  a, const int n);\n\n#define bitselect(a,b,c) ((a) ^ ((c) & ((b) ^ (a))))\n#endif // IS_METAL\n\n#endif // INC_PLATFORM_H\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_types.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_TYPES_H\n#define INC_TYPES_H\n\n#if ATTACK_MODE == 9\n#define BITMAP_MASK         kernel_param->bitmap_mask\n#define BITMAP_SHIFT1       kernel_param->bitmap_shift1\n#define BITMAP_SHIFT2       kernel_param->bitmap_shift2\n#define SALT_POS_HOST       (kernel_param->pws_pos + gid)\n#define LOOP_POS            kernel_param->loop_pos\n#define LOOP_CNT            kernel_param->loop_cnt\n#define IL_CNT              kernel_param->il_cnt\n#define DIGESTS_CNT         1\n#define DIGESTS_OFFSET_HOST (kernel_param->pws_pos + gid)\n#define COMBS_MODE          kernel_param->combs_mode\n#define SALT_REPEAT         kernel_param->salt_repeat\n#define PWS_POS             kernel_param->pws_pos\n#define GID_CNT             kernel_param->gid_max\n#else\n#define BITMAP_MASK         kernel_param->bitmap_mask\n#define BITMAP_SHIFT1       kernel_param->bitmap_shift1\n#define BITMAP_SHIFT2       kernel_param->bitmap_shift2\n#define SALT_POS_HOST       kernel_param->salt_pos_host\n#define LOOP_POS            kernel_param->loop_pos\n#define LOOP_CNT            kernel_param->loop_cnt\n#define IL_CNT              kernel_param->il_cnt\n#define DIGESTS_CNT         kernel_param->digests_cnt\n#define DIGESTS_OFFSET_HOST kernel_param->digests_offset_host\n#define COMBS_MODE          kernel_param->combs_mode\n#define SALT_REPEAT         kernel_param->salt_repeat\n#define PWS_POS             kernel_param->pws_pos\n#define GID_CNT             kernel_param->gid_max\n#endif\n\n#ifdef IS_CUDA\n// https://docs.nvidia.com/cuda/nvrtc/index.html#integer-size\ntypedef unsigned char       uchar;\ntypedef unsigned short      ushort;\ntypedef unsigned int        uint;\ntypedef unsigned long       ulong;\ntypedef unsigned long long  ullong;\n#endif\n\n#ifdef IS_METAL\ntypedef unsigned char  uchar;\ntypedef unsigned short ushort;\ntypedef unsigned int   uint;\ntypedef unsigned long  ulong;\n#define ullong ulong\n#endif\n\n#ifdef IS_OPENCL\ntypedef ulong   ullong;\ntypedef ulong2  ullong2;\ntypedef ulong4  ullong4;\ntypedef ulong8  ullong8;\ntypedef ulong16 ullong16;\n#endif\n\n#ifdef KERNEL_STATIC\ntypedef uchar  u8;\ntypedef ushort u16;\ntypedef uint   u32;\n#ifdef IS_METAL\ntypedef ulong  u64;\n#else\ntypedef ullong u64;\n#endif\n#else\ntypedef uint8_t  u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n#endif\n\n//testwise disabled\n//typedef u8  u8a  __attribute__ ((aligned (8)));\n//typedef u16 u16a __attribute__ ((aligned (8)));\n//typedef u32 u32a __attribute__ ((aligned (8)));\n//typedef u64 u64a __attribute__ ((aligned (8)));\n\ntypedef u8  u8a;\ntypedef u16 u16a;\ntypedef u32 u32a;\ntypedef u64 u64a;\n\n#ifndef NEW_SIMD_CODE\n#undef  VECT_SIZE\n#define VECT_SIZE 1\n#endif\n\n#define CONCAT(a, b)       a##b\n#define VTYPE(type, width) CONCAT(type, width)\n\n// emulated is always VECT_SIZE = 1\n#if VECT_SIZE == 1\ntypedef u8   u8x;\ntypedef u16  u16x;\ntypedef u32  u32x;\ntypedef u64  u64x;\n\n#define make_u8x  (u8)\n#define make_u16x (u16)\n#define make_u32x (u32)\n#define make_u64x (u64)\n\n#else\n\n#if defined IS_CUDA || defined IS_HIP\n\n#ifndef __device_builtin__\n#define __device_builtin__\n#endif\n\n#ifndef __builtin_align__\n#define __builtin_align__(x)\n#endif\n\n\n#if VECT_SIZE == 2\n\nstruct __device_builtin__ __builtin_align__(2) u8x\n{\n  u8 s0;\n  u8 s1;\n\n  inline __device__  u8x (const u8 a, const u8 b) : s0(a), s1(b) { }\n  inline __device__  u8x (const u8 a)             : s0(a), s1(a) { }\n\n  inline __device__  u8x (void) : s0(0), s1(0) { }\n  inline __device__ ~u8x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(4) u16x\n{\n  u16 s0;\n  u16 s1;\n\n  inline __device__  u16x (const u16 a, const u16 b) : s0(a), s1(b) { }\n  inline __device__  u16x (const u16 a)              : s0(a), s1(a) { }\n\n  inline __device__  u16x (void) : s0(0), s1(0) { }\n  inline __device__ ~u16x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(8) u32x\n{\n  u32 s0;\n  u32 s1;\n\n  inline __device__  u32x (const u32 a, const u32 b) : s0(a), s1(b) { }\n  inline __device__  u32x (const u32 a)              : s0(a), s1(a) { }\n\n  inline __device__  u32x (void) : s0(0), s1(0) { }\n  inline __device__ ~u32x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(16) u64x\n{\n  u64 s0;\n  u64 s1;\n\n  inline __device__  u64x (const u64 a, const u64 b) : s0(a), s1(b) { }\n  inline __device__  u64x (const u64 a)              : s0(a), s1(a) { }\n\n  inline __device__  u64x (void) : s0(0), s1(0) { }\n  inline __device__ ~u64x (void) { }\n};\n\ninline __device__ bool operator != (const u32x a, const u32  b) { return ((a.s0 != b)    && (a.s1 != b));    }\ninline __device__ bool operator != (const u32x a, const u32x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1)); }\n\ninline __device__ void operator ^= (u32x &a, const u32  b) { a.s0 ^= b;    a.s1 ^= b;     }\ninline __device__ void operator ^= (u32x &a, const u32x b) { a.s0 ^= b.s0; a.s1 ^= b.s1;  }\n\ninline __device__ void operator |= (u32x &a, const u32  b) { a.s0 |= b;    a.s1 |= b;     }\ninline __device__ void operator |= (u32x &a, const u32x b) { a.s0 |= b.s0; a.s1 |= b.s1;  }\n\ninline __device__ void operator &= (u32x &a, const u32  b) { a.s0 &= b;    a.s1 &= b;     }\ninline __device__ void operator &= (u32x &a, const u32x b) { a.s0 &= b.s0; a.s1 &= b.s1;  }\n\ninline __device__ void operator += (u32x &a, const u32  b) { a.s0 += b;    a.s1 += b;     }\ninline __device__ void operator += (u32x &a, const u32x b) { a.s0 += b.s0; a.s1 += b.s1;  }\n\ninline __device__ void operator -= (u32x &a, const u32  b) { a.s0 -= b;    a.s1 -= b;     }\ninline __device__ void operator -= (u32x &a, const u32x b) { a.s0 -= b.s0; a.s1 -= b.s1;  }\n\ninline __device__ void operator *= (u32x &a, const u32  b) { a.s0 *= b;    a.s1 *= b;     }\ninline __device__ void operator *= (u32x &a, const u32x b) { a.s0 *= b.s0; a.s1 *= b.s1;  }\n\ninline __device__ void operator >>= (u32x &a, const u32  b) { a.s0 >>= b;    a.s1 >>= b;     }\ninline __device__ void operator >>= (u32x &a, const u32x b) { a.s0 >>= b.s0; a.s1 >>= b.s1;  }\n\ninline __device__ void operator <<= (u32x &a, const u32  b) { a.s0 <<= b;    a.s1 <<= b;     }\ninline __device__ void operator <<= (u32x &a, const u32x b) { a.s0 <<= b.s0; a.s1 <<= b.s1;  }\n\ninline __device__ u32x operator << (const u32x a, const u32  b) { return u32x ((a.s0 << b),    (a.s1 << b)   );  }\ninline __device__ u32x operator << (const u32x a, const u32x b) { return u32x ((a.s0 << b.s0), (a.s1 << b.s1));  }\n\ninline __device__ u32x operator >> (const u32x a, const u32  b) { return u32x ((a.s0 >> b),    (a.s1 >> b)   );  }\ninline __device__ u32x operator >> (const u32x a, const u32x b) { return u32x ((a.s0 >> b.s0), (a.s1 >> b.s1));  }\n\ninline __device__ u32x operator ^  (const u32x a, const u32  b) { return u32x ((a.s0 ^  b),    (a.s1 ^  b)   );  }\ninline __device__ u32x operator ^  (const u32x a, const u32x b) { return u32x ((a.s0 ^  b.s0), (a.s1 ^  b.s1));  }\n\ninline __device__ u32x operator |  (const u32x a, const u32  b) { return u32x ((a.s0 |  b),    (a.s1 |  b)   );  }\ninline __device__ u32x operator |  (const u32x a, const u32x b) { return u32x ((a.s0 |  b.s0), (a.s1 |  b.s1));  }\n\ninline __device__ u32x operator &  (const u32x a, const u32  b) { return u32x ((a.s0 &  b),    (a.s1 &  b)   );  }\ninline __device__ u32x operator &  (const u32x a, const u32x b) { return u32x ((a.s0 &  b.s0), (a.s1 &  b.s1));  }\n\ninline __device__ u32x operator +  (const u32x a, const u32  b) { return u32x ((a.s0 +  b),    (a.s1 +  b)   );  }\ninline __device__ u32x operator +  (const u32x a, const u32x b) { return u32x ((a.s0 +  b.s0), (a.s1 +  b.s1));  }\n\ninline __device__ u32x operator -  (const u32x a, const u32  b) { return u32x ((a.s0 -  b),    (a.s1 -  b)   );  }\ninline __device__ u32x operator -  (const u32x a, const u32x b) { return u32x ((a.s0 -  b.s0), (a.s1 -  b.s1));  }\n\ninline __device__ u32x operator *  (const u32x a, const u32  b) { return u32x ((a.s0 *  b),    (a.s1 *  b)   );  }\ninline __device__ u32x operator *  (const u32x a, const u32x b) { return u32x ((a.s0 *  b.s0), (a.s1 *  b.s1));  }\n\ninline __device__ u32x operator %  (const u32x a, const u32  b) { return u32x ((a.s0 %  b),    (a.s1 %  b)   );  }\ninline __device__ u32x operator %  (const u32x a, const u32x b) { return u32x ((a.s0 %  b.s0), (a.s1 %  b.s1));  }\n\ninline __device__ u32x operator ~  (const u32x a) { return u32x (~a.s0, ~a.s1); }\n\ninline __device__ bool operator != (const u64x a, const u64  b) { return ((a.s0 != b)    && (a.s1 != b));    }\ninline __device__ bool operator != (const u64x a, const u64x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1)); }\n\ninline __device__ void operator ^= (u64x &a, const u64  b) { a.s0 ^= b;    a.s1 ^= b;     }\ninline __device__ void operator ^= (u64x &a, const u64x b) { a.s0 ^= b.s0; a.s1 ^= b.s1;  }\n\ninline __device__ void operator |= (u64x &a, const u64  b) { a.s0 |= b;    a.s1 |= b;     }\ninline __device__ void operator |= (u64x &a, const u64x b) { a.s0 |= b.s0; a.s1 |= b.s1;  }\n\ninline __device__ void operator &= (u64x &a, const u64  b) { a.s0 &= b;    a.s1 &= b;     }\ninline __device__ void operator &= (u64x &a, const u64x b) { a.s0 &= b.s0; a.s1 &= b.s1;  }\n\ninline __device__ void operator += (u64x &a, const u64  b) { a.s0 += b;    a.s1 += b;     }\ninline __device__ void operator += (u64x &a, const u64x b) { a.s0 += b.s0; a.s1 += b.s1;  }\n\ninline __device__ void operator -= (u64x &a, const u64  b) { a.s0 -= b;    a.s1 -= b;     }\ninline __device__ void operator -= (u64x &a, const u64x b) { a.s0 -= b.s0; a.s1 -= b.s1;  }\n\ninline __device__ void operator *= (u64x &a, const u64  b) { a.s0 *= b;    a.s1 *= b;     }\ninline __device__ void operator *= (u64x &a, const u64x b) { a.s0 *= b.s0; a.s1 *= b.s1;  }\n\ninline __device__ void operator >>= (u64x &a, const u64  b) { a.s0 >>= b;    a.s1 >>= b;     }\ninline __device__ void operator >>= (u64x &a, const u64x b) { a.s0 >>= b.s0; a.s1 >>= b.s1;  }\n\ninline __device__ void operator <<= (u64x &a, const u64  b) { a.s0 <<= b;    a.s1 <<= b;     }\ninline __device__ void operator <<= (u64x &a, const u64x b) { a.s0 <<= b.s0; a.s1 <<= b.s1;  }\n\ninline __device__ u64x operator << (const u64x a, const u64  b) { return u64x ((a.s0 << b),    (a.s1 << b)   );  }\ninline __device__ u64x operator << (const u64x a, const u64x b) { return u64x ((a.s0 << b.s0), (a.s1 << b.s1));  }\n\ninline __device__ u64x operator >> (const u64x a, const u64  b) { return u64x ((a.s0 >> b),    (a.s1 >> b)   );  }\ninline __device__ u64x operator >> (const u64x a, const u64x b) { return u64x ((a.s0 >> b.s0), (a.s1 >> b.s1));  }\n\ninline __device__ u64x operator ^  (const u64x a, const u64  b) { return u64x ((a.s0 ^  b),    (a.s1 ^  b)   );  }\ninline __device__ u64x operator ^  (const u64x a, const u64x b) { return u64x ((a.s0 ^  b.s0), (a.s1 ^  b.s1));  }\n\ninline __device__ u64x operator |  (const u64x a, const u64  b) { return u64x ((a.s0 |  b),    (a.s1 |  b)   );  }\ninline __device__ u64x operator |  (const u64x a, const u64x b) { return u64x ((a.s0 |  b.s0), (a.s1 |  b.s1));  }\n\ninline __device__ u64x operator &  (const u64x a, const u64  b) { return u64x ((a.s0 &  b),    (a.s1 &  b)   );  }\ninline __device__ u64x operator &  (const u64x a, const u64x b) { return u64x ((a.s0 &  b.s0), (a.s1 &  b.s1));  }\n\ninline __device__ u64x operator +  (const u64x a, const u64  b) { return u64x ((a.s0 +  b),    (a.s1 +  b)   );  }\ninline __device__ u64x operator +  (const u64x a, const u64x b) { return u64x ((a.s0 +  b.s0), (a.s1 +  b.s1));  }\n\ninline __device__ u64x operator -  (const u64x a, const u64  b) { return u64x ((a.s0 -  b),    (a.s1 -  b)   );  }\ninline __device__ u64x operator -  (const u64x a, const u64x b) { return u64x ((a.s0 -  b.s0), (a.s1 -  b.s1));  }\n\ninline __device__ u64x operator *  (const u64x a, const u64  b) { return u64x ((a.s0 *  b),    (a.s1 *  b)   );  }\ninline __device__ u64x operator *  (const u64x a, const u64x b) { return u64x ((a.s0 *  b.s0), (a.s1 *  b.s1));  }\n\ninline __device__ u64x operator %  (const u64x a, const u64  b) { return u64x ((a.s0 %  b),    (a.s1 %  b)   );  }\ninline __device__ u64x operator %  (const u64x a, const u64x b) { return u64x ((a.s0 %  b.s0), (a.s1 %  b.s1));  }\n\ninline __device__ u64x operator ~  (const u64x a) { return u64x (~a.s0, ~a.s1); }\n\n#endif\n\n#if VECT_SIZE == 4\n\nstruct __device_builtin__ __builtin_align__(4) u8x\n{\n  u8 s0;\n  u8 s1;\n  u8 s2;\n  u8 s3;\n\n  inline __device__  u8x (const u8 a, const u8 b, const u8 c, const u8 d) : s0(a), s1(b), s2(c), s3(d) { }\n  inline __device__  u8x (const u8 a)                                     : s0(a), s1(a), s2(a), s3(a) { }\n\n  inline __device__  u8x (void) : s0(0), s1(0), s2(0), s3(0) { }\n  inline __device__ ~u8x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(8) u16x\n{\n  u16 s0;\n  u16 s1;\n  u16 s2;\n  u16 s3;\n\n  inline __device__  u16x (const u16 a, const u16 b, const u16 c, const u16 d) : s0(a), s1(b), s2(c), s3(d) { }\n  inline __device__  u16x (const u16 a)                                        : s0(a), s1(a), s2(a), s3(a) { }\n\n  inline __device__  u16x (void) : s0(0), s1(0), s2(0), s3(0) { }\n  inline __device__ ~u16x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(16) u32x\n{\n  u32 s0;\n  u32 s1;\n  u32 s2;\n  u32 s3;\n\n  inline __device__  u32x (const u32 a, const u32 b, const u32 c, const u32 d) : s0(a), s1(b), s2(c), s3(d) { }\n  inline __device__  u32x (const u32 a)                                        : s0(a), s1(a), s2(a), s3(a) { }\n\n  inline __device__  u32x (void) : s0(0), s1(0), s2(0), s3(0) { }\n  inline __device__ ~u32x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(32) u64x\n{\n  u64 s0;\n  u64 s1;\n  u64 s2;\n  u64 s3;\n\n  inline __device__  u64x (const u64 a, const u64 b, const u64 c, const u64 d) : s0(a), s1(b), s2(c), s3(d) { }\n  inline __device__  u64x (const u64 a)                                        : s0(a), s1(a), s2(a), s3(a) { }\n\n  inline __device__  u64x (void) : s0(0), s1(0), s2(0), s3(0) { }\n  inline __device__ ~u64x (void) { }\n};\n\ninline __device__ bool operator != (const u32x a, const u32  b) { return ((a.s0 != b)    && (a.s1 != b)    && (a.s2 != b)    && (a.s3 != b)   ); }\ninline __device__ bool operator != (const u32x a, const u32x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1) && (a.s2 != b.s2) && (a.s3 != b.s3)); }\n\ninline __device__ void operator ^= (u32x &a, const u32  b) { a.s0 ^= b;    a.s1 ^= b;    a.s2 ^= b;    a.s3 ^= b;     }\ninline __device__ void operator ^= (u32x &a, const u32x b) { a.s0 ^= b.s0; a.s1 ^= b.s1; a.s2 ^= b.s2; a.s3 ^= b.s3;  }\n\ninline __device__ void operator |= (u32x &a, const u32  b) { a.s0 |= b;    a.s1 |= b;    a.s2 |= b;    a.s3 |= b;     }\ninline __device__ void operator |= (u32x &a, const u32x b) { a.s0 |= b.s0; a.s1 |= b.s1; a.s2 |= b.s2; a.s3 |= b.s3;  }\n\ninline __device__ void operator &= (u32x &a, const u32  b) { a.s0 &= b;    a.s1 &= b;    a.s2 &= b;    a.s3 &= b;     }\ninline __device__ void operator &= (u32x &a, const u32x b) { a.s0 &= b.s0; a.s1 &= b.s1; a.s2 &= b.s2; a.s3 &= b.s3;  }\n\ninline __device__ void operator += (u32x &a, const u32  b) { a.s0 += b;    a.s1 += b;    a.s2 += b;    a.s3 += b;     }\ninline __device__ void operator += (u32x &a, const u32x b) { a.s0 += b.s0; a.s1 += b.s1; a.s2 += b.s2; a.s3 += b.s3;  }\n\ninline __device__ void operator -= (u32x &a, const u32  b) { a.s0 -= b;    a.s1 -= b;    a.s2 -= b;    a.s3 -= b;     }\ninline __device__ void operator -= (u32x &a, const u32x b) { a.s0 -= b.s0; a.s1 -= b.s1; a.s2 -= b.s2; a.s3 -= b.s3;  }\n\ninline __device__ void operator *= (u32x &a, const u32  b) { a.s0 *= b;    a.s1 *= b;    a.s2 *= b;    a.s3 *= b;     }\ninline __device__ void operator *= (u32x &a, const u32x b) { a.s0 *= b.s0; a.s1 *= b.s1; a.s2 *= b.s2; a.s3 *= b.s3;  }\n\ninline __device__ void operator >>= (u32x &a, const u32  b) { a.s0 >>= b;    a.s1 >>= b;    a.s2 >>= b;    a.s3 >>= b;     }\ninline __device__ void operator >>= (u32x &a, const u32x b) { a.s0 >>= b.s0; a.s1 >>= b.s1; a.s2 >>= b.s2; a.s3 >>= b.s3;  }\n\ninline __device__ void operator <<= (u32x &a, const u32  b) { a.s0 <<= b;    a.s1 <<= b;    a.s2 <<= b;    a.s3 <<= b;     }\ninline __device__ void operator <<= (u32x &a, const u32x b) { a.s0 <<= b.s0; a.s1 <<= b.s1; a.s2 <<= b.s2; a.s3 <<= b.s3;  }\n\ninline __device__ u32x operator << (const u32x a, const u32  b) { return u32x ((a.s0 << b),    (a.s1 << b)   , (a.s2 << b),    (a.s3 << b)   );  }\ninline __device__ u32x operator << (const u32x a, const u32x b) { return u32x ((a.s0 << b.s0), (a.s1 << b.s1), (a.s2 << b.s2), (a.s3 << b.s3));  }\n\ninline __device__ u32x operator >> (const u32x a, const u32  b) { return u32x ((a.s0 >> b),    (a.s1 >> b)   , (a.s2 >> b),    (a.s3 >> b)   );  }\ninline __device__ u32x operator >> (const u32x a, const u32x b) { return u32x ((a.s0 >> b.s0), (a.s1 >> b.s1), (a.s2 >> b.s2), (a.s3 >> b.s3));  }\n\ninline __device__ u32x operator ^  (const u32x a, const u32  b) { return u32x ((a.s0 ^  b),    (a.s1 ^  b)   , (a.s2 ^  b),    (a.s3 ^  b)   );  }\ninline __device__ u32x operator ^  (const u32x a, const u32x b) { return u32x ((a.s0 ^  b.s0), (a.s1 ^  b.s1), (a.s2 ^  b.s2), (a.s3 ^  b.s3));  }\n\ninline __device__ u32x operator |  (const u32x a, const u32  b) { return u32x ((a.s0 |  b),    (a.s1 |  b)   , (a.s2 |  b),    (a.s3 |  b)   );  }\ninline __device__ u32x operator |  (const u32x a, const u32x b) { return u32x ((a.s0 |  b.s0), (a.s1 |  b.s1), (a.s2 |  b.s2), (a.s3 |  b.s3));  }\n\ninline __device__ u32x operator &  (const u32x a, const u32  b) { return u32x ((a.s0 &  b),    (a.s1 &  b)   , (a.s2 &  b),    (a.s3 &  b)   );  }\ninline __device__ u32x operator &  (const u32x a, const u32x b) { return u32x ((a.s0 &  b.s0), (a.s1 &  b.s1), (a.s2 &  b.s2), (a.s3 &  b.s3));  }\n\ninline __device__ u32x operator +  (const u32x a, const u32  b) { return u32x ((a.s0 +  b),    (a.s1 +  b)   , (a.s2 +  b),    (a.s3 +  b)   );  }\ninline __device__ u32x operator +  (const u32x a, const u32x b) { return u32x ((a.s0 +  b.s0), (a.s1 +  b.s1), (a.s2 +  b.s2), (a.s3 +  b.s3));  }\n\ninline __device__ u32x operator -  (const u32x a, const u32  b) { return u32x ((a.s0 -  b),    (a.s1 -  b)   , (a.s2 -  b),    (a.s3 -  b)   );  }\ninline __device__ u32x operator -  (const u32x a, const u32x b) { return u32x ((a.s0 -  b.s0), (a.s1 -  b.s1), (a.s2 -  b.s2), (a.s3 -  b.s3));  }\n\ninline __device__ u32x operator *  (const u32x a, const u32  b) { return u32x ((a.s0 *  b),    (a.s1 *  b)   , (a.s2 *  b),    (a.s3 *  b)   );  }\ninline __device__ u32x operator *  (const u32x a, const u32x b) { return u32x ((a.s0 *  b.s0), (a.s1 *  b.s1), (a.s2 *  b.s2), (a.s3 *  b.s3));  }\n\ninline __device__ u32x operator %  (const u32x a, const u32  b) { return u32x ((a.s0 %  b),    (a.s1 %  b)   , (a.s2 %  b),    (a.s3 %  b)   );  }\ninline __device__ u32x operator %  (const u32x a, const u32x b) { return u32x ((a.s0 %  b.s0), (a.s1 %  b.s1), (a.s2 %  b.s2), (a.s3 %  b.s3));  }\n\ninline __device__ u32x operator ~  (const u32x a) { return u32x (~a.s0, ~a.s1, ~a.s2, ~a.s3); }\n\ninline __device__ bool operator != (const u64x a, const u64  b) { return ((a.s0 != b)    && (a.s1 != b)    && (a.s2 != b)    && (a.s3 != b)   ); }\ninline __device__ bool operator != (const u64x a, const u64x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1) && (a.s2 != b.s2) && (a.s3 != b.s3)); }\n\ninline __device__ void operator ^= (u64x &a, const u64  b) { a.s0 ^= b;    a.s1 ^= b;    a.s2 ^= b;    a.s3 ^= b;     }\ninline __device__ void operator ^= (u64x &a, const u64x b) { a.s0 ^= b.s0; a.s1 ^= b.s1; a.s2 ^= b.s2; a.s3 ^= b.s3;  }\n\ninline __device__ void operator |= (u64x &a, const u64  b) { a.s0 |= b;    a.s1 |= b;    a.s2 |= b;    a.s3 |= b;     }\ninline __device__ void operator |= (u64x &a, const u64x b) { a.s0 |= b.s0; a.s1 |= b.s1; a.s2 |= b.s2; a.s3 |= b.s3;  }\n\ninline __device__ void operator &= (u64x &a, const u64  b) { a.s0 &= b;    a.s1 &= b;    a.s2 &= b;    a.s3 &= b;     }\ninline __device__ void operator &= (u64x &a, const u64x b) { a.s0 &= b.s0; a.s1 &= b.s1; a.s2 &= b.s2; a.s3 &= b.s3;  }\n\ninline __device__ void operator += (u64x &a, const u64  b) { a.s0 += b;    a.s1 += b;    a.s2 += b;    a.s3 += b;     }\ninline __device__ void operator += (u64x &a, const u64x b) { a.s0 += b.s0; a.s1 += b.s1; a.s2 += b.s2; a.s3 += b.s3;  }\n\ninline __device__ void operator -= (u64x &a, const u64  b) { a.s0 -= b;    a.s1 -= b;    a.s2 -= b;    a.s3 -= b;     }\ninline __device__ void operator -= (u64x &a, const u64x b) { a.s0 -= b.s0; a.s1 -= b.s1; a.s2 -= b.s2; a.s3 -= b.s3;  }\n\ninline __device__ void operator *= (u64x &a, const u64  b) { a.s0 *= b;    a.s1 *= b;    a.s2 *= b;    a.s3 *= b;     }\ninline __device__ void operator *= (u64x &a, const u64x b) { a.s0 *= b.s0; a.s1 *= b.s1; a.s2 *= b.s2; a.s3 *= b.s3;  }\n\ninline __device__ void operator >>= (u64x &a, const u64  b) { a.s0 >>= b;    a.s1 >>= b;    a.s2 >>= b;    a.s3 >>= b;     }\ninline __device__ void operator >>= (u64x &a, const u64x b) { a.s0 >>= b.s0; a.s1 >>= b.s1; a.s2 >>= b.s2; a.s3 >>= b.s3;  }\n\ninline __device__ void operator <<= (u64x &a, const u64  b) { a.s0 <<= b;    a.s1 <<= b;    a.s2 <<= b;    a.s3 <<= b;     }\ninline __device__ void operator <<= (u64x &a, const u64x b) { a.s0 <<= b.s0; a.s1 <<= b.s1; a.s2 <<= b.s2; a.s3 <<= b.s3;  }\n\ninline __device__ u64x operator << (const u64x a, const u64  b) { return u64x ((a.s0 << b),    (a.s1 << b)   , (a.s2 << b),    (a.s3 << b)   );  }\ninline __device__ u64x operator << (const u64x a, const u64x b) { return u64x ((a.s0 << b.s0), (a.s1 << b.s1), (a.s2 << b.s2), (a.s3 << b.s3));  }\n\ninline __device__ u64x operator >> (const u64x a, const u64  b) { return u64x ((a.s0 >> b),    (a.s1 >> b)   , (a.s2 >> b),    (a.s3 >> b)   );  }\ninline __device__ u64x operator >> (const u64x a, const u64x b) { return u64x ((a.s0 >> b.s0), (a.s1 >> b.s1), (a.s2 >> b.s2), (a.s3 >> b.s3));  }\n\ninline __device__ u64x operator ^  (const u64x a, const u64  b) { return u64x ((a.s0 ^  b),    (a.s1 ^  b)   , (a.s2 ^  b),    (a.s3 ^  b)   );  }\ninline __device__ u64x operator ^  (const u64x a, const u64x b) { return u64x ((a.s0 ^  b.s0), (a.s1 ^  b.s1), (a.s2 ^  b.s2), (a.s3 ^  b.s3));  }\n\ninline __device__ u64x operator |  (const u64x a, const u64  b) { return u64x ((a.s0 |  b),    (a.s1 |  b)   , (a.s2 |  b),    (a.s3 |  b)   );  }\ninline __device__ u64x operator |  (const u64x a, const u64x b) { return u64x ((a.s0 |  b.s0), (a.s1 |  b.s1), (a.s2 |  b.s2), (a.s3 |  b.s3));  }\n\ninline __device__ u64x operator &  (const u64x a, const u64  b) { return u64x ((a.s0 &  b),    (a.s1 &  b)   , (a.s2 &  b),    (a.s3 &  b)   );  }\ninline __device__ u64x operator &  (const u64x a, const u64x b) { return u64x ((a.s0 &  b.s0), (a.s1 &  b.s1), (a.s2 &  b.s2), (a.s3 &  b.s3));  }\n\ninline __device__ u64x operator +  (const u64x a, const u64  b) { return u64x ((a.s0 +  b),    (a.s1 +  b)   , (a.s2 +  b),    (a.s3 +  b)   );  }\ninline __device__ u64x operator +  (const u64x a, const u64x b) { return u64x ((a.s0 +  b.s0), (a.s1 +  b.s1), (a.s2 +  b.s2), (a.s3 +  b.s3));  }\n\ninline __device__ u64x operator -  (const u64x a, const u64  b) { return u64x ((a.s0 -  b),    (a.s1 -  b)   , (a.s2 -  b),    (a.s3 -  b)   );  }\ninline __device__ u64x operator -  (const u64x a, const u64x b) { return u64x ((a.s0 -  b.s0), (a.s1 -  b.s1), (a.s2 -  b.s2), (a.s3 -  b.s3));  }\n\ninline __device__ u64x operator *  (const u64x a, const u64  b) { return u64x ((a.s0 *  b),    (a.s1 *  b)   , (a.s2 *  b),    (a.s3 *  b)   );  }\ninline __device__ u64x operator *  (const u64x a, const u64x b) { return u64x ((a.s0 *  b.s0), (a.s1 *  b.s1), (a.s2 *  b.s2), (a.s3 *  b.s3));  }\n\ninline __device__ u64x operator %  (const u64x a, const u32  b) { return u64x ((a.s0 %  b),    (a.s1 %  b)   , (a.s2 %  b),    (a.s3 %  b)   );  }\ninline __device__ u64x operator %  (const u64x a, const u64x b) { return u64x ((a.s0 %  b.s0), (a.s1 %  b.s1), (a.s2 %  b.s2), (a.s3 %  b.s3));  }\n\ninline __device__ u64x operator ~  (const u64x a) { return u64x (~a.s0, ~a.s1, ~a.s2, ~a.s3); }\n\n#endif\n\n#if VECT_SIZE == 8\n\nstruct __device_builtin__ __builtin_align__(8) u8x\n{\n  u8 s0;\n  u8 s1;\n  u8 s2;\n  u8 s3;\n  u8 s4;\n  u8 s5;\n  u8 s6;\n  u8 s7;\n\n  inline __device__  u8x (const u8 a, const u8 b, const u8 c, const u8 d, const u8 e, const u8 f, const u8 g, const u8 h) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h) { }\n  inline __device__  u8x (const u8 a)                                                                                     : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a) { }\n\n  inline __device__  u8x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0) { }\n  inline __device__ ~u8x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(16) u16x\n{\n  u16 s0;\n  u16 s1;\n  u16 s2;\n  u16 s3;\n  u16 s4;\n  u16 s5;\n  u16 s6;\n  u16 s7;\n\n  inline __device__  u16x (const u16 a, const u16 b, const u16 c, const u16 d, const u16 e, const u16 f, const u16 g, const u16 h) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h) { }\n  inline __device__  u16x (const u16 a)                                                                                            : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a) { }\n\n  inline __device__  u16x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0) { }\n  inline __device__ ~u16x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(32) u32x\n{\n  u32 s0;\n  u32 s1;\n  u32 s2;\n  u32 s3;\n  u32 s4;\n  u32 s5;\n  u32 s6;\n  u32 s7;\n\n  inline __device__  u32x (const u32 a, const u32 b, const u32 c, const u32 d, const u32 e, const u32 f, const u32 g, const u32 h) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h) { }\n  inline __device__  u32x (const u32 a)                                                                                            : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a) { }\n\n  inline __device__  u32x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0) { }\n  inline __device__ ~u32x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(64) u64x\n{\n  u64 s0;\n  u64 s1;\n  u64 s2;\n  u64 s3;\n  u64 s4;\n  u64 s5;\n  u64 s6;\n  u64 s7;\n\n  inline __device__  u64x (const u64 a, const u64 b, const u64 c, const u64 d, const u64 e, const u64 f, const u64 g, const u64 h) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h) { }\n  inline __device__  u64x (const u64 a)                                                                                            : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a) { }\n\n  inline __device__  u64x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0) { }\n  inline __device__ ~u64x (void) { }\n};\n\ninline __device__ bool operator != (const u32x a, const u32  b) { return ((a.s0 != b)    && (a.s1 != b)    && (a.s2 != b)    && (a.s3 != b)    && (a.s4 != b)    && (a.s5 != b)    && (a.s6 != b)    && (a.s7 != b)   ); }\ninline __device__ bool operator != (const u32x a, const u32x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1) && (a.s2 != b.s2) && (a.s3 != b.s3) && (a.s4 != b.s4) && (a.s5 != b.s5) && (a.s6 != b.s6) && (a.s7 != b.s7)); }\n\ninline __device__ void operator ^= (u32x &a, const u32  b) { a.s0 ^= b;    a.s1 ^= b;    a.s2 ^= b;    a.s3 ^= b;    a.s4 ^= b;    a.s5 ^= b;    a.s6 ^= b;    a.s7 ^= b;     }\ninline __device__ void operator ^= (u32x &a, const u32x b) { a.s0 ^= b.s0; a.s1 ^= b.s1; a.s2 ^= b.s2; a.s3 ^= b.s3; a.s4 ^= b.s4; a.s5 ^= b.s5; a.s6 ^= b.s6; a.s7 ^= b.s7;  }\n\ninline __device__ void operator |= (u32x &a, const u32  b) { a.s0 |= b;    a.s1 |= b;    a.s2 |= b;    a.s3 |= b;    a.s4 |= b;    a.s5 |= b;    a.s6 |= b;    a.s7 |= b;     }\ninline __device__ void operator |= (u32x &a, const u32x b) { a.s0 |= b.s0; a.s1 |= b.s1; a.s2 |= b.s2; a.s3 |= b.s3; a.s4 |= b.s4; a.s5 |= b.s5; a.s6 |= b.s6; a.s7 |= b.s7;  }\n\ninline __device__ void operator &= (u32x &a, const u32  b) { a.s0 &= b;    a.s1 &= b;    a.s2 &= b;    a.s3 &= b;    a.s4 &= b;    a.s5 &= b;    a.s6 &= b;    a.s7 &= b;     }\ninline __device__ void operator &= (u32x &a, const u32x b) { a.s0 &= b.s0; a.s1 &= b.s1; a.s2 &= b.s2; a.s3 &= b.s3; a.s4 &= b.s4; a.s5 &= b.s5; a.s6 &= b.s6; a.s7 &= b.s7;  }\n\ninline __device__ void operator += (u32x &a, const u32  b) { a.s0 += b;    a.s1 += b;    a.s2 += b;    a.s3 += b;    a.s4 += b;    a.s5 += b;    a.s6 += b;    a.s7 += b;     }\ninline __device__ void operator += (u32x &a, const u32x b) { a.s0 += b.s0; a.s1 += b.s1; a.s2 += b.s2; a.s3 += b.s3; a.s4 += b.s4; a.s5 += b.s5; a.s6 += b.s6; a.s7 += b.s7;  }\n\ninline __device__ void operator -= (u32x &a, const u32  b) { a.s0 -= b;    a.s1 -= b;    a.s2 -= b;    a.s3 -= b;    a.s4 -= b;    a.s5 -= b;    a.s6 -= b;    a.s7 -= b;     }\ninline __device__ void operator -= (u32x &a, const u32x b) { a.s0 -= b.s0; a.s1 -= b.s1; a.s2 -= b.s2; a.s3 -= b.s3; a.s4 -= b.s4; a.s5 -= b.s5; a.s6 -= b.s6; a.s7 -= b.s7;  }\n\ninline __device__ void operator *= (u32x &a, const u32  b) { a.s0 *= b;    a.s1 *= b;    a.s2 *= b;    a.s3 *= b;    a.s4 *= b;    a.s5 *= b;    a.s6 *= b;    a.s7 *= b;     }\ninline __device__ void operator *= (u32x &a, const u32x b) { a.s0 *= b.s0; a.s1 *= b.s1; a.s2 *= b.s2; a.s3 *= b.s3; a.s4 *= b.s4; a.s5 *= b.s5; a.s6 *= b.s6; a.s7 *= b.s7;  }\n\ninline __device__ void operator >>= (u32x &a, const u32  b) { a.s0 >>= b;    a.s1 >>= b;    a.s2 >>= b;    a.s3 >>= b;    a.s4 >>= b;    a.s5 >>= b;    a.s6 >>= b;    a.s7 >>= b;     }\ninline __device__ void operator >>= (u32x &a, const u32x b) { a.s0 >>= b.s0; a.s1 >>= b.s1; a.s2 >>= b.s2; a.s3 >>= b.s3; a.s4 >>= b.s4; a.s5 >>= b.s5; a.s6 >>= b.s6; a.s7 >>= b.s7;  }\n\ninline __device__ void operator <<= (u32x &a, const u32  b) { a.s0 <<= b;    a.s1 <<= b;    a.s2 <<= b;    a.s3 <<= b;    a.s4 <<= b;    a.s5 <<= b;    a.s6 <<= b;    a.s7 <<= b;     }\ninline __device__ void operator <<= (u32x &a, const u32x b) { a.s0 <<= b.s0; a.s1 <<= b.s1; a.s2 <<= b.s2; a.s3 <<= b.s3; a.s4 <<= b.s4; a.s5 <<= b.s5; a.s6 <<= b.s6; a.s7 <<= b.s7;  }\n\ninline __device__ u32x operator << (const u32x a, const u32  b) { return u32x ((a.s0 << b),    (a.s1 << b)   , (a.s2 << b),    (a.s3 << b)   , (a.s4 << b),    (a.s5 << b)   , (a.s6 << b),    (a.s7 << b)   );  }\ninline __device__ u32x operator << (const u32x a, const u32x b) { return u32x ((a.s0 << b.s0), (a.s1 << b.s1), (a.s2 << b.s2), (a.s3 << b.s3), (a.s4 << b.s4), (a.s5 << b.s5), (a.s6 << b.s6), (a.s7 << b.s7));  }\n\ninline __device__ u32x operator >> (const u32x a, const u32  b) { return u32x ((a.s0 >> b),    (a.s1 >> b)   , (a.s2 >> b),    (a.s3 >> b)   , (a.s4 >> b),    (a.s5 >> b)   , (a.s6 >> b),    (a.s7 >> b)   );  }\ninline __device__ u32x operator >> (const u32x a, const u32x b) { return u32x ((a.s0 >> b.s0), (a.s1 >> b.s1), (a.s2 >> b.s2), (a.s3 >> b.s3), (a.s4 >> b.s4), (a.s5 >> b.s5), (a.s6 >> b.s6), (a.s7 >> b.s7));  }\n\ninline __device__ u32x operator ^  (const u32x a, const u32  b) { return u32x ((a.s0 ^  b),    (a.s1 ^  b)   , (a.s2 ^  b),    (a.s3 ^  b)   , (a.s4 ^  b),    (a.s5 ^  b)   , (a.s6 ^  b),    (a.s7 ^  b)   );  }\ninline __device__ u32x operator ^  (const u32x a, const u32x b) { return u32x ((a.s0 ^  b.s0), (a.s1 ^  b.s1), (a.s2 ^  b.s2), (a.s3 ^  b.s3), (a.s4 ^  b.s4), (a.s5 ^  b.s5), (a.s6 ^  b.s6), (a.s7 ^  b.s7));  }\n\ninline __device__ u32x operator |  (const u32x a, const u32  b) { return u32x ((a.s0 |  b),    (a.s1 |  b)   , (a.s2 |  b),    (a.s3 |  b)   , (a.s4 |  b),    (a.s5 |  b)   , (a.s6 |  b),    (a.s7 |  b)   );  }\ninline __device__ u32x operator |  (const u32x a, const u32x b) { return u32x ((a.s0 |  b.s0), (a.s1 |  b.s1), (a.s2 |  b.s2), (a.s3 |  b.s3), (a.s4 |  b.s4), (a.s5 |  b.s5), (a.s6 |  b.s6), (a.s7 |  b.s7));  }\n\ninline __device__ u32x operator &  (const u32x a, const u32  b) { return u32x ((a.s0 &  b),    (a.s1 &  b)   , (a.s2 &  b),    (a.s3 &  b)   , (a.s4 &  b),    (a.s5 &  b)   , (a.s6 &  b),    (a.s7 &  b)   );  }\ninline __device__ u32x operator &  (const u32x a, const u32x b) { return u32x ((a.s0 &  b.s0), (a.s1 &  b.s1), (a.s2 &  b.s2), (a.s3 &  b.s3), (a.s4 &  b.s4), (a.s5 &  b.s5), (a.s6 &  b.s6), (a.s7 &  b.s7));  }\n\ninline __device__ u32x operator +  (const u32x a, const u32  b) { return u32x ((a.s0 +  b),    (a.s1 +  b)   , (a.s2 +  b),    (a.s3 +  b)   , (a.s4 +  b),    (a.s5 +  b)   , (a.s6 +  b),    (a.s7 +  b)   );  }\ninline __device__ u32x operator +  (const u32x a, const u32x b) { return u32x ((a.s0 +  b.s0), (a.s1 +  b.s1), (a.s2 +  b.s2), (a.s3 +  b.s3), (a.s4 +  b.s4), (a.s5 +  b.s5), (a.s6 +  b.s6), (a.s7 +  b.s7));  }\n\ninline __device__ u32x operator -  (const u32x a, const u32  b) { return u32x ((a.s0 -  b),    (a.s1 -  b)   , (a.s2 -  b),    (a.s3 -  b)   , (a.s4 -  b),    (a.s5 -  b)   , (a.s6 -  b),    (a.s7 -  b)   );  }\ninline __device__ u32x operator -  (const u32x a, const u32x b) { return u32x ((a.s0 -  b.s0), (a.s1 -  b.s1), (a.s2 -  b.s2), (a.s3 -  b.s3), (a.s4 -  b.s4), (a.s5 -  b.s5), (a.s6 -  b.s6), (a.s7 -  b.s7));  }\n\ninline __device__ u32x operator *  (const u32x a, const u32  b) { return u32x ((a.s0 *  b),    (a.s1 *  b)   , (a.s2 *  b),    (a.s3 *  b)   , (a.s4 *  b),    (a.s5 *  b)   , (a.s6 *  b),    (a.s7 *  b)   );  }\ninline __device__ u32x operator *  (const u32x a, const u32x b) { return u32x ((a.s0 *  b.s0), (a.s1 *  b.s1), (a.s2 *  b.s2), (a.s3 *  b.s3), (a.s4 *  b.s4), (a.s5 *  b.s5), (a.s6 *  b.s6), (a.s7 *  b.s7));  }\n\ninline __device__ u32x operator %  (const u32x a, const u32  b) { return u32x ((a.s0 %  b),    (a.s1 %  b)   , (a.s2 %  b),    (a.s3 %  b)   , (a.s4 %  b),    (a.s5 %  b)   , (a.s6 %  b),    (a.s7 %  b)   );  }\ninline __device__ u32x operator %  (const u32x a, const u32x b) { return u32x ((a.s0 %  b.s0), (a.s1 %  b.s1), (a.s2 %  b.s2), (a.s3 %  b.s3), (a.s4 %  b.s4), (a.s5 %  b.s5), (a.s6 %  b.s6), (a.s7 %  b.s7));  }\n\ninline __device__ u32x operator ~  (const u32x a) { return u32x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7); }\n\ninline __device__ bool operator != (const u64x a, const u64  b) { return ((a.s0 != b)    && (a.s1 != b)    && (a.s2 != b)    && (a.s3 != b)    && (a.s4 != b)    && (a.s5 != b)    && (a.s6 != b)    && (a.s7 != b)   ); }\ninline __device__ bool operator != (const u64x a, const u64x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1) && (a.s2 != b.s2) && (a.s3 != b.s3) && (a.s4 != b.s4) && (a.s5 != b.s5) && (a.s6 != b.s6) && (a.s7 != b.s7)); }\n\ninline __device__ void operator ^= (u64x &a, const u64  b) { a.s0 ^= b;    a.s1 ^= b;    a.s2 ^= b;    a.s3 ^= b;    a.s4 ^= b;    a.s5 ^= b;    a.s6 ^= b;    a.s7 ^= b;     }\ninline __device__ void operator ^= (u64x &a, const u64x b) { a.s0 ^= b.s0; a.s1 ^= b.s1; a.s2 ^= b.s2; a.s3 ^= b.s3; a.s4 ^= b.s4; a.s5 ^= b.s5; a.s6 ^= b.s6; a.s7 ^= b.s7;  }\n\ninline __device__ void operator |= (u64x &a, const u64  b) { a.s0 |= b;    a.s1 |= b;    a.s2 |= b;    a.s3 |= b;    a.s4 |= b;    a.s5 |= b;    a.s6 |= b;    a.s7 |= b;     }\ninline __device__ void operator |= (u64x &a, const u64x b) { a.s0 |= b.s0; a.s1 |= b.s1; a.s2 |= b.s2; a.s3 |= b.s3; a.s4 |= b.s4; a.s5 |= b.s5; a.s6 |= b.s6; a.s7 |= b.s7;  }\n\ninline __device__ void operator &= (u64x &a, const u64  b) { a.s0 &= b;    a.s1 &= b;    a.s2 &= b;    a.s3 &= b;    a.s4 &= b;    a.s5 &= b;    a.s6 &= b;    a.s7 &= b;     }\ninline __device__ void operator &= (u64x &a, const u64x b) { a.s0 &= b.s0; a.s1 &= b.s1; a.s2 &= b.s2; a.s3 &= b.s3; a.s4 &= b.s4; a.s5 &= b.s5; a.s6 &= b.s6; a.s7 &= b.s7;  }\n\ninline __device__ void operator += (u64x &a, const u64  b) { a.s0 += b;    a.s1 += b;    a.s2 += b;    a.s3 += b;    a.s4 += b;    a.s5 += b;    a.s6 += b;    a.s7 += b;     }\ninline __device__ void operator += (u64x &a, const u64x b) { a.s0 += b.s0; a.s1 += b.s1; a.s2 += b.s2; a.s3 += b.s3; a.s4 += b.s4; a.s5 += b.s5; a.s6 += b.s6; a.s7 += b.s7;  }\n\ninline __device__ void operator -= (u64x &a, const u64  b) { a.s0 -= b;    a.s1 -= b;    a.s2 -= b;    a.s3 -= b;    a.s4 -= b;    a.s5 -= b;    a.s6 -= b;    a.s7 -= b;     }\ninline __device__ void operator -= (u64x &a, const u64x b) { a.s0 -= b.s0; a.s1 -= b.s1; a.s2 -= b.s2; a.s3 -= b.s3; a.s4 -= b.s4; a.s5 -= b.s5; a.s6 -= b.s6; a.s7 -= b.s7;  }\n\ninline __device__ void operator *= (u64x &a, const u64  b) { a.s0 *= b;    a.s1 *= b;    a.s2 *= b;    a.s3 *= b;    a.s4 *= b;    a.s5 *= b;    a.s6 *= b;    a.s7 *= b;     }\ninline __device__ void operator *= (u64x &a, const u64x b) { a.s0 *= b.s0; a.s1 *= b.s1; a.s2 *= b.s2; a.s3 *= b.s3; a.s4 *= b.s4; a.s5 *= b.s5; a.s6 *= b.s6; a.s7 *= b.s7;  }\n\ninline __device__ void operator >>= (u64x &a, const u64  b) { a.s0 >>= b;    a.s1 >>= b;    a.s2 >>= b;    a.s3 >>= b;    a.s4 >>= b;    a.s5 >>= b;    a.s6 >>= b;    a.s7 >>= b;     }\ninline __device__ void operator >>= (u64x &a, const u64x b) { a.s0 >>= b.s0; a.s1 >>= b.s1; a.s2 >>= b.s2; a.s3 >>= b.s3; a.s4 >>= b.s4; a.s5 >>= b.s5; a.s6 >>= b.s6; a.s7 >>= b.s7;  }\n\ninline __device__ void operator <<= (u64x &a, const u64  b) { a.s0 <<= b;    a.s1 <<= b;    a.s2 <<= b;    a.s3 <<= b;    a.s4 <<= b;    a.s5 <<= b;    a.s6 <<= b;    a.s7 <<= b;     }\ninline __device__ void operator <<= (u64x &a, const u64x b) { a.s0 <<= b.s0; a.s1 <<= b.s1; a.s2 <<= b.s2; a.s3 <<= b.s3; a.s4 <<= b.s4; a.s5 <<= b.s5; a.s6 <<= b.s6; a.s7 <<= b.s7;  }\n\ninline __device__ u64x operator << (const u64x a, const u64  b) { return u64x ((a.s0 << b),    (a.s1 << b)   , (a.s2 << b),    (a.s3 << b)   , (a.s4 << b),    (a.s5 << b)   , (a.s6 << b),    (a.s7 << b)   );  }\ninline __device__ u64x operator << (const u64x a, const u64x b) { return u64x ((a.s0 << b.s0), (a.s1 << b.s1), (a.s2 << b.s2), (a.s3 << b.s3), (a.s4 << b.s4), (a.s5 << b.s5), (a.s6 << b.s6), (a.s7 << b.s7));  }\n\ninline __device__ u64x operator >> (const u64x a, const u64  b) { return u64x ((a.s0 >> b),    (a.s1 >> b)   , (a.s2 >> b),    (a.s3 >> b)   , (a.s4 >> b),    (a.s5 >> b)   , (a.s6 >> b),    (a.s7 >> b)   );  }\ninline __device__ u64x operator >> (const u64x a, const u64x b) { return u64x ((a.s0 >> b.s0), (a.s1 >> b.s1), (a.s2 >> b.s2), (a.s3 >> b.s3), (a.s4 >> b.s4), (a.s5 >> b.s5), (a.s6 >> b.s6), (a.s7 >> b.s7));  }\n\ninline __device__ u64x operator ^  (const u64x a, const u64  b) { return u64x ((a.s0 ^  b),    (a.s1 ^  b)   , (a.s2 ^  b),    (a.s3 ^  b)   , (a.s4 ^  b),    (a.s5 ^  b)   , (a.s6 ^  b),    (a.s7 ^  b)   );  }\ninline __device__ u64x operator ^  (const u64x a, const u64x b) { return u64x ((a.s0 ^  b.s0), (a.s1 ^  b.s1), (a.s2 ^  b.s2), (a.s3 ^  b.s3), (a.s4 ^  b.s4), (a.s5 ^  b.s5), (a.s6 ^  b.s6), (a.s7 ^  b.s7));  }\n\ninline __device__ u64x operator |  (const u64x a, const u64  b) { return u64x ((a.s0 |  b),    (a.s1 |  b)   , (a.s2 |  b),    (a.s3 |  b)   , (a.s4 |  b),    (a.s5 |  b)   , (a.s6 |  b),    (a.s7 |  b)   );  }\ninline __device__ u64x operator |  (const u64x a, const u64x b) { return u64x ((a.s0 |  b.s0), (a.s1 |  b.s1), (a.s2 |  b.s2), (a.s3 |  b.s3), (a.s4 |  b.s4), (a.s5 |  b.s5), (a.s6 |  b.s6), (a.s7 |  b.s7));  }\n\ninline __device__ u64x operator &  (const u64x a, const u64  b) { return u64x ((a.s0 &  b),    (a.s1 &  b)   , (a.s2 &  b),    (a.s3 &  b)   , (a.s4 &  b),    (a.s5 &  b)   , (a.s6 &  b),    (a.s7 &  b)   );  }\ninline __device__ u64x operator &  (const u64x a, const u64x b) { return u64x ((a.s0 &  b.s0), (a.s1 &  b.s1), (a.s2 &  b.s2), (a.s3 &  b.s3), (a.s4 &  b.s4), (a.s5 &  b.s5), (a.s6 &  b.s6), (a.s7 &  b.s7));  }\n\ninline __device__ u64x operator +  (const u64x a, const u64  b) { return u64x ((a.s0 +  b),    (a.s1 +  b)   , (a.s2 +  b),    (a.s3 +  b)   , (a.s4 +  b),    (a.s5 +  b)   , (a.s6 +  b),    (a.s7 +  b)   );  }\ninline __device__ u64x operator +  (const u64x a, const u64x b) { return u64x ((a.s0 +  b.s0), (a.s1 +  b.s1), (a.s2 +  b.s2), (a.s3 +  b.s3), (a.s4 +  b.s4), (a.s5 +  b.s5), (a.s6 +  b.s6), (a.s7 +  b.s7));  }\n\ninline __device__ u64x operator -  (const u64x a, const u64  b) { return u64x ((a.s0 -  b),    (a.s1 -  b)   , (a.s2 -  b),    (a.s3 -  b)   , (a.s4 -  b),    (a.s5 -  b)   , (a.s6 -  b),    (a.s7 -  b)   );  }\ninline __device__ u64x operator -  (const u64x a, const u64x b) { return u64x ((a.s0 -  b.s0), (a.s1 -  b.s1), (a.s2 -  b.s2), (a.s3 -  b.s3), (a.s4 -  b.s4), (a.s5 -  b.s5), (a.s6 -  b.s6), (a.s7 -  b.s7));  }\n\ninline __device__ u64x operator *  (const u64x a, const u64  b) { return u64x ((a.s0 *  b),    (a.s1 *  b)   , (a.s2 *  b),    (a.s3 *  b)   , (a.s4 *  b),    (a.s5 *  b)   , (a.s6 *  b),    (a.s7 *  b)   );  }\ninline __device__ u64x operator *  (const u64x a, const u64x b) { return u64x ((a.s0 *  b.s0), (a.s1 *  b.s1), (a.s2 *  b.s2), (a.s3 *  b.s3), (a.s4 *  b.s4), (a.s5 *  b.s5), (a.s6 *  b.s6), (a.s7 *  b.s7));  }\n\ninline __device__ u64x operator %  (const u64x a, const u64  b) { return u64x ((a.s0 %  b),    (a.s1 %  b)   , (a.s2 %  b),    (a.s3 %  b)   , (a.s4 %  b),    (a.s5 %  b)   , (a.s6 %  b),    (a.s7 %  b)   );  }\ninline __device__ u64x operator %  (const u64x a, const u64x b) { return u64x ((a.s0 %  b.s0), (a.s1 %  b.s1), (a.s2 %  b.s2), (a.s3 %  b.s3), (a.s4 %  b.s4), (a.s5 %  b.s5), (a.s6 %  b.s6), (a.s7 %  b.s7));  }\n\ninline __device__ u64x operator ~  (const u64x a) { return u64x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7); }\n\n#endif\n\n#if VECT_SIZE == 16\n\nstruct __device_builtin__ __builtin_align__(16) u8x\n{\n  u8 s0;\n  u8 s1;\n  u8 s2;\n  u8 s3;\n  u8 s4;\n  u8 s5;\n  u8 s6;\n  u8 s7;\n  u8 s8;\n  u8 s9;\n  u8 sa;\n  u8 sb;\n  u8 sc;\n  u8 sd;\n  u8 se;\n  u8 sf;\n\n  inline __device__  u8x (const u8 a, const u8 b, const u8 c, const u8 d, const u8 e, const u8 f, const u8 g, const u8 h, const u8 i, const u8 j, const u8 k, const u8 l, const u8 m, const u8 n, const u8 o, const u8 p) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h), s8(i), s9(j), sa(k), sb(l), sc(m), sd(n), se(o), sf(p) { }\n  inline __device__  u8x (const u8 a)                                                                                                                                                                                     : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a), s8(a), s9(a), sa(a), sb(a), sc(a), sd(a), se(a), sf(a) { }\n\n  inline __device__  u8x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0), s8(0), s9(0), sa(0), sb(0), sc(0), sd(0), se(0), sf(0) { }\n  inline __device__ ~u8x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(32) u16x\n{\n  u16 s0;\n  u16 s1;\n  u16 s2;\n  u16 s3;\n  u16 s4;\n  u16 s5;\n  u16 s6;\n  u16 s7;\n  u16 s8;\n  u16 s9;\n  u16 sa;\n  u16 sb;\n  u16 sc;\n  u16 sd;\n  u16 se;\n  u16 sf;\n\n  inline __device__  u16x (const u16 a, const u16 b, const u16 c, const u16 d, const u16 e, const u16 f, const u16 g, const u16 h, const u16 i, const u16 j, const u16 k, const u16 l, const u16 m, const u16 n, const u16 o, const u16 p) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h), s8(i), s9(j), sa(k), sb(l), sc(m), sd(n), se(o), sf(p) { }\n  inline __device__  u16x (const u16 a)                                                                                                                                                                                     : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a), s8(a), s9(a), sa(a), sb(a), sc(a), sd(a), se(a), sf(a) { }\n\n  inline __device__  u16x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0), s8(0), s9(0), sa(0), sb(0), sc(0), sd(0), se(0), sf(0){ }\n  inline __device__ ~u16x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(64) u32x\n{\n  u32 s0;\n  u32 s1;\n  u32 s2;\n  u32 s3;\n  u32 s4;\n  u32 s5;\n  u32 s6;\n  u32 s7;\n  u32 s8;\n  u32 s9;\n  u32 sa;\n  u32 sb;\n  u32 sc;\n  u32 sd;\n  u32 se;\n  u32 sf;\n\n  inline __device__  u32x (const u32 a, const u32 b, const u32 c, const u32 d, const u32 e, const u32 f, const u32 g, const u32 h, const u32 i, const u32 j, const u32 k, const u32 l, const u32 m, const u32 n, const u32 o, const u32 p) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h), s8(i), s9(j), sa(k), sb(l), sc(m), sd(n), se(o), sf(p) { }\n  inline __device__  u32x (const u32 a)                                                                                                                                                                                     : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a), s8(a), s9(a), sa(a), sb(a), sc(a), sd(a), se(a), sf(a) { }\n\n  inline __device__  u32x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0), s8(0), s9(0), sa(0), sb(0), sc(0), sd(0), se(0), sf(0){ }\n  inline __device__ ~u32x (void) { }\n};\n\nstruct __device_builtin__ __builtin_align__(128) u64x\n{\n  u64 s0;\n  u64 s1;\n  u64 s2;\n  u64 s3;\n  u64 s4;\n  u64 s5;\n  u64 s6;\n  u64 s7;\n  u64 s8;\n  u64 s9;\n  u64 sa;\n  u64 sb;\n  u64 sc;\n  u64 sd;\n  u64 se;\n  u64 sf;\n\n  inline __device__  u64x (const u64 a, const u64 b, const u64 c, const u64 d, const u64 e, const u64 f, const u64 g, const u64 h, const u64 i, const u64 j, const u64 k, const u64 l, const u64 m, const u64 n, const u64 o, const u64 p) : s0(a), s1(b), s2(c), s3(d), s4(e), s5(f), s6(g), s7(h), s8(i), s9(j), sa(k), sb(l), sc(m), sd(n), se(o), sf(p) { }\n  inline __device__  u64x (const u64 a)                                                                                                                                                                                     : s0(a), s1(a), s2(a), s3(a), s4(a), s5(a), s6(a), s7(a), s8(a), s9(a), sa(a), sb(a), sc(a), sd(a), se(a), sf(a) { }\n\n  inline __device__  u64x (void) : s0(0), s1(0), s2(0), s3(0), s4(0), s5(0), s6(0), s7(0), s8(0), s9(0), sa(0), sb(0), sc(0), sd(0), se(0), sf(0) { }\n  inline __device__ ~u64x (void) { }\n};\n\ninline __device__ bool operator != (const u32x a, const u32  b) { return ((a.s0 != b)    && (a.s1 != b)    && (a.s2 != b)    && (a.s3 != b)    && (a.s4 != b)    && (a.s5 != b)    && (a.s6 != b)    && (a.s7 != b)    && (a.s8 != b)    && (a.s9 != b)    && (a.sa != b)    && (a.sb != b)    && (a.sc != b)    && (a.sd != b)    && (a.se != b)    && (a.sf != b)   ); }\ninline __device__ bool operator != (const u32x a, const u32x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1) && (a.s2 != b.s2) && (a.s3 != b.s3) && (a.s4 != b.s4) && (a.s5 != b.s5) && (a.s6 != b.s6) && (a.s7 != b.s7) && (a.s8 != b.s8) && (a.s9 != b.s9) && (a.sa != b.sa) && (a.sb != b.sb) && (a.sc != b.sc) && (a.sd != b.sd) && (a.se != b.se) && (a.sf != b.sf)); }\n\ninline __device__ void operator ^= (u32x &a, const u32  b) { a.s0 ^= b;    a.s1 ^= b;    a.s2 ^= b;    a.s3 ^= b;    a.s4 ^= b;    a.s5 ^= b;    a.s6 ^= b;    a.s7 ^= b;    a.s8 ^= b;    a.s9 ^= b;    a.sa ^= b;    a.sb ^= b;    a.sc ^= b;    a.sd ^= b;    a.se ^= b;    a.sf ^= b;    }\ninline __device__ void operator ^= (u32x &a, const u32x b) { a.s0 ^= b.s0; a.s1 ^= b.s1; a.s2 ^= b.s2; a.s3 ^= b.s3; a.s4 ^= b.s4; a.s5 ^= b.s5; a.s6 ^= b.s6; a.s7 ^= b.s7; a.s8 ^= b.s8; a.s9 ^= b.s9; a.sa ^= b.sa; a.sb ^= b.sb; a.sc ^= b.sc; a.sd ^= b.sd; a.se ^= b.se; a.sf ^= b.sf; }\n\ninline __device__ void operator |= (u32x &a, const u32  b) { a.s0 |= b;    a.s1 |= b;    a.s2 |= b;    a.s3 |= b;    a.s4 |= b;    a.s5 |= b;    a.s6 |= b;    a.s7 |= b;    a.s8 |= b;    a.s9 |= b;    a.sa |= b;    a.sb |= b;    a.sc |= b;    a.sd |= b;    a.se |= b;    a.sf |= b;    }\ninline __device__ void operator |= (u32x &a, const u32x b) { a.s0 |= b.s0; a.s1 |= b.s1; a.s2 |= b.s2; a.s3 |= b.s3; a.s4 |= b.s4; a.s5 |= b.s5; a.s6 |= b.s6; a.s7 |= b.s7; a.s8 |= b.s8; a.s9 |= b.s9; a.sa |= b.sa; a.sb |= b.sb; a.sc |= b.sc; a.sd |= b.sd; a.se |= b.se; a.sf |= b.sf; }\n\ninline __device__ void operator &= (u32x &a, const u32  b) { a.s0 &= b;    a.s1 &= b;    a.s2 &= b;    a.s3 &= b;    a.s4 &= b;    a.s5 &= b;    a.s6 &= b;    a.s7 &= b;    a.s8 &= b;    a.s9 &= b;    a.sa &= b;    a.sb &= b;    a.sc &= b;    a.sd &= b;    a.se &= b;    a.sf &= b;    }\ninline __device__ void operator &= (u32x &a, const u32x b) { a.s0 &= b.s0; a.s1 &= b.s1; a.s2 &= b.s2; a.s3 &= b.s3; a.s4 &= b.s4; a.s5 &= b.s5; a.s6 &= b.s6; a.s7 &= b.s7; a.s8 &= b.s8; a.s9 &= b.s9; a.sa &= b.sa; a.sb &= b.sb; a.sc &= b.sc; a.sd &= b.sd; a.se &= b.se; a.sf &= b.sf; }\n\ninline __device__ void operator += (u32x &a, const u32  b) { a.s0 += b;    a.s1 += b;    a.s2 += b;    a.s3 += b;    a.s4 += b;    a.s5 += b;    a.s6 += b;    a.s7 += b;    a.s8 += b;    a.s9 += b;    a.sa += b;    a.sb += b;    a.sc += b;    a.sd += b;    a.se += b;    a.sf += b;    }\ninline __device__ void operator += (u32x &a, const u32x b) { a.s0 += b.s0; a.s1 += b.s1; a.s2 += b.s2; a.s3 += b.s3; a.s4 += b.s4; a.s5 += b.s5; a.s6 += b.s6; a.s7 += b.s7; a.s8 += b.s8; a.s9 += b.s9; a.sa += b.sa; a.sb += b.sb; a.sc += b.sc; a.sd += b.sd; a.se += b.se; a.sf += b.sf; }\n\ninline __device__ void operator -= (u32x &a, const u32  b) { a.s0 -= b;    a.s1 -= b;    a.s2 -= b;    a.s3 -= b;    a.s4 -= b;    a.s5 -= b;    a.s6 -= b;    a.s7 -= b;    a.s8 -= b;    a.s9 -= b;    a.sa -= b;    a.sb -= b;    a.sc -= b;    a.sd -= b;    a.se -= b;    a.sf -= b;    }\ninline __device__ void operator -= (u32x &a, const u32x b) { a.s0 -= b.s0; a.s1 -= b.s1; a.s2 -= b.s2; a.s3 -= b.s3; a.s4 -= b.s4; a.s5 -= b.s5; a.s6 -= b.s6; a.s7 -= b.s7; a.s8 -= b.s8; a.s9 -= b.s9; a.sa -= b.sa; a.sb -= b.sb; a.sc -= b.sc; a.sd -= b.sd; a.se -= b.se; a.sf -= b.sf; }\n\ninline __device__ void operator *= (u32x &a, const u32  b) { a.s0 *= b;    a.s1 *= b;    a.s2 *= b;    a.s3 *= b;    a.s4 *= b;    a.s5 *= b;    a.s6 *= b;    a.s7 *= b;    a.s8 *= b;    a.s9 *= b;    a.sa *= b;    a.sb *= b;    a.sc *= b;    a.sd *= b;    a.se *= b;    a.sf *= b;    }\ninline __device__ void operator *= (u32x &a, const u32x b) { a.s0 *= b.s0; a.s1 *= b.s1; a.s2 *= b.s2; a.s3 *= b.s3; a.s4 *= b.s4; a.s5 *= b.s5; a.s6 *= b.s6; a.s7 *= b.s7; a.s8 *= b.s8; a.s9 *= b.s9; a.sa *= b.sa; a.sb *= b.sb; a.sc *= b.sc; a.sd *= b.sd; a.se *= b.se; a.sf *= b.sf; }\n\ninline __device__ void operator >>= (u32x &a, const u32  b) { a.s0 >>= b;    a.s1 >>= b;    a.s2 >>= b;    a.s3 >>= b;    a.s4 >>= b;    a.s5 >>= b;    a.s6 >>= b;    a.s7 >>= b;    a.s8 >>= b;    a.s9 >>= b;    a.sa >>= b;    a.sb >>= b;    a.sc >>= b;    a.sd >>= b;    a.se >>= b;    a.sf >>= b;    }\ninline __device__ void operator >>= (u32x &a, const u32x b) { a.s0 >>= b.s0; a.s1 >>= b.s1; a.s2 >>= b.s2; a.s3 >>= b.s3; a.s4 >>= b.s4; a.s5 >>= b.s5; a.s6 >>= b.s6; a.s7 >>= b.s7; a.s8 >>= b.s8; a.s9 >>= b.s9; a.sa >>= b.sa; a.sb >>= b.sb; a.sc >>= b.sc; a.sd >>= b.sd; a.se >>= b.se; a.sf >>= b.sf; }\n\ninline __device__ void operator <<= (u32x &a, const u32  b) { a.s0 <<= b;    a.s1 <<= b;    a.s2 <<= b;    a.s3 <<= b;    a.s4 <<= b;    a.s5 <<= b;    a.s6 <<= b;    a.s7 <<= b;    a.s8 <<= b;    a.s9 <<= b;    a.sa <<= b;    a.sb <<= b;    a.sc <<= b;    a.sd <<= b;    a.se <<= b;    a.sf <<= b;    }\ninline __device__ void operator <<= (u32x &a, const u32x b) { a.s0 <<= b.s0; a.s1 <<= b.s1; a.s2 <<= b.s2; a.s3 <<= b.s3; a.s4 <<= b.s4; a.s5 <<= b.s5; a.s6 <<= b.s6; a.s7 <<= b.s7; a.s8 <<= b.s8; a.s9 <<= b.s9; a.sa <<= b.sa; a.sb <<= b.sb; a.sc <<= b.sc; a.sd <<= b.sd; a.se <<= b.se; a.sf <<= b.sf; }\n\ninline __device__ u32x operator << (const u32x a, const u32  b) { return u32x ((a.s0 << b),    (a.s1 << b)   , (a.s2 << b),    (a.s3 << b)   , (a.s4 << b),    (a.s5 << b)   , (a.s6 << b),    (a.s7 << b),    (a.s8 << b),    (a.s9 << b)   , (a.sa << b),    (a.sb << b)   , (a.sc << b),    (a.sd << b)   , (a.se << b),    (a.sf << b)   );  }\ninline __device__ u32x operator << (const u32x a, const u32x b) { return u32x ((a.s0 << b.s0), (a.s1 << b.s1), (a.s2 << b.s2), (a.s3 << b.s3), (a.s4 << b.s4), (a.s5 << b.s5), (a.s6 << b.s6), (a.s7 << b.s7), (a.s8 << b.s8), (a.s9 << b.s9), (a.sa << b.sa), (a.sb << b.sb), (a.sc << b.sc), (a.sd << b.sd), (a.se << b.se), (a.sf << b.sf));  }\n\ninline __device__ u32x operator >> (const u32x a, const u32  b) { return u32x ((a.s0 >> b),    (a.s1 >> b)   , (a.s2 >> b),    (a.s3 >> b)   , (a.s4 >> b),    (a.s5 >> b)   , (a.s6 >> b),    (a.s7 >> b),    (a.s8 >> b),    (a.s9 >> b)   , (a.sa >> b),    (a.sb >> b)   , (a.sc >> b),    (a.sd >> b)   , (a.se >> b),    (a.sf >> b)   );  }\ninline __device__ u32x operator >> (const u32x a, const u32x b) { return u32x ((a.s0 >> b.s0), (a.s1 >> b.s1), (a.s2 >> b.s2), (a.s3 >> b.s3), (a.s4 >> b.s4), (a.s5 >> b.s5), (a.s6 >> b.s6), (a.s7 >> b.s7), (a.s8 >> b.s8), (a.s9 >> b.s9), (a.sa >> b.sa), (a.sb >> b.sb), (a.sc >> b.sc), (a.sd >> b.sd), (a.se >> b.se), (a.sf >> b.sf));  }\n\ninline __device__ u32x operator ^  (const u32x a, const u32  b) { return u32x ((a.s0 ^  b),    (a.s1 ^  b)   , (a.s2 ^  b),    (a.s3 ^  b)   , (a.s4 ^  b),    (a.s5 ^  b)   , (a.s6 ^  b),    (a.s7 ^  b),    (a.s8 ^  b),    (a.s9 ^  b)   , (a.sa ^  b),    (a.sb ^  b)   , (a.sc ^  b),    (a.sd ^  b)   , (a.se ^  b),    (a.sf ^  b)   );  }\ninline __device__ u32x operator ^  (const u32x a, const u32x b) { return u32x ((a.s0 ^  b.s0), (a.s1 ^  b.s1), (a.s2 ^  b.s2), (a.s3 ^  b.s3), (a.s4 ^  b.s4), (a.s5 ^  b.s5), (a.s6 ^  b.s6), (a.s7 ^  b.s7), (a.s8 ^  b.s8), (a.s9 ^  b.s9), (a.sa ^  b.sa), (a.sb ^  b.sb), (a.sc ^  b.sc), (a.sd ^  b.sd), (a.se ^  b.se), (a.sf ^  b.sf));  }\n\ninline __device__ u32x operator |  (const u32x a, const u32  b) { return u32x ((a.s0 |  b),    (a.s1 |  b)   , (a.s2 |  b),    (a.s3 |  b)   , (a.s4 |  b),    (a.s5 |  b)   , (a.s6 |  b),    (a.s7 |  b),    (a.s8 |  b),    (a.s9 |  b)   , (a.sa |  b),    (a.sb |  b)   , (a.sc |  b),    (a.sd |  b)   , (a.se |  b),    (a.sf |  b)   );  }\ninline __device__ u32x operator |  (const u32x a, const u32x b) { return u32x ((a.s0 |  b.s0), (a.s1 |  b.s1), (a.s2 |  b.s2), (a.s3 |  b.s3), (a.s4 |  b.s4), (a.s5 |  b.s5), (a.s6 |  b.s6), (a.s7 |  b.s7), (a.s8 |  b.s8), (a.s9 |  b.s9), (a.sa |  b.sa), (a.sb |  b.sb), (a.sc |  b.sc), (a.sd |  b.sd), (a.se |  b.se), (a.sf |  b.sf));  }\n\ninline __device__ u32x operator &  (const u32x a, const u32  b) { return u32x ((a.s0 &  b),    (a.s1 &  b)   , (a.s2 &  b),    (a.s3 &  b)   , (a.s4 &  b),    (a.s5 &  b)   , (a.s6 &  b),    (a.s7 &  b),    (a.s8 &  b),    (a.s9 &  b)   , (a.sa &  b),    (a.sb &  b)   , (a.sc &  b),    (a.sd &  b)   , (a.se &  b),    (a.sf &  b)   );  }\ninline __device__ u32x operator &  (const u32x a, const u32x b) { return u32x ((a.s0 &  b.s0), (a.s1 &  b.s1), (a.s2 &  b.s2), (a.s3 &  b.s3), (a.s4 &  b.s4), (a.s5 &  b.s5), (a.s6 &  b.s6), (a.s7 &  b.s7), (a.s8 &  b.s8), (a.s9 &  b.s9), (a.sa &  b.sa), (a.sb &  b.sb), (a.sc &  b.sc), (a.sd &  b.sd), (a.se &  b.se), (a.sf &  b.sf));  }\n\ninline __device__ u32x operator +  (const u32x a, const u32  b) { return u32x ((a.s0 +  b),    (a.s1 +  b)   , (a.s2 +  b),    (a.s3 +  b)   , (a.s4 +  b),    (a.s5 +  b)   , (a.s6 +  b),    (a.s7 +  b),    (a.s8 +  b),    (a.s9 +  b)   , (a.sa +  b),    (a.sb +  b)   , (a.sc +  b),    (a.sd +  b)   , (a.se +  b),    (a.sf +  b)   );  }\ninline __device__ u32x operator +  (const u32x a, const u32x b) { return u32x ((a.s0 +  b.s0), (a.s1 +  b.s1), (a.s2 +  b.s2), (a.s3 +  b.s3), (a.s4 +  b.s4), (a.s5 +  b.s5), (a.s6 +  b.s6), (a.s7 +  b.s7), (a.s8 +  b.s8), (a.s9 +  b.s9), (a.sa +  b.sa), (a.sb +  b.sb), (a.sc +  b.sc), (a.sd +  b.sd), (a.se +  b.se), (a.sf +  b.sf));  }\n\ninline __device__ u32x operator -  (const u32x a, const u32  b) { return u32x ((a.s0 -  b),    (a.s1 -  b)   , (a.s2 -  b),    (a.s3 -  b)   , (a.s4 -  b),    (a.s5 -  b)   , (a.s6 -  b),    (a.s7 -  b),    (a.s8 -  b),    (a.s9 -  b)   , (a.sa -  b),    (a.sb -  b)   , (a.sc -  b),    (a.sd -  b)   , (a.se -  b),    (a.sf -  b)   );  }\ninline __device__ u32x operator -  (const u32x a, const u32x b) { return u32x ((a.s0 -  b.s0), (a.s1 -  b.s1), (a.s2 -  b.s2), (a.s3 -  b.s3), (a.s4 -  b.s4), (a.s5 -  b.s5), (a.s6 -  b.s6), (a.s7 -  b.s7), (a.s8 -  b.s8), (a.s9 -  b.s9), (a.sa -  b.sa), (a.sb -  b.sb), (a.sc -  b.sc), (a.sd -  b.sd), (a.se -  b.se), (a.sf -  b.sf));  }\n\ninline __device__ u32x operator *  (const u32x a, const u32  b) { return u32x ((a.s0 *  b),    (a.s1 *  b)   , (a.s2 *  b),    (a.s3 *  b)   , (a.s4 *  b),    (a.s5 *  b)   , (a.s6 *  b),    (a.s7 *  b),    (a.s8 *  b),    (a.s9 *  b)   , (a.sa *  b),    (a.sb *  b)   , (a.sc *  b),    (a.sd *  b)   , (a.se *  b),    (a.sf *  b)   );  }\ninline __device__ u32x operator *  (const u32x a, const u32x b) { return u32x ((a.s0 *  b.s0), (a.s1 *  b.s1), (a.s2 *  b.s2), (a.s3 *  b.s3), (a.s4 *  b.s4), (a.s5 *  b.s5), (a.s6 *  b.s6), (a.s7 *  b.s7), (a.s8 *  b.s8), (a.s9 *  b.s9), (a.sa *  b.sa), (a.sb *  b.sb), (a.sc *  b.sc), (a.sd *  b.sd), (a.se *  b.se), (a.sf *  b.sf));  }\n\ninline __device__ u32x operator %  (const u32x a, const u32  b) { return u32x ((a.s0 %  b),    (a.s1 %  b)   , (a.s2 %  b),    (a.s3 %  b)   , (a.s4 %  b),    (a.s5 %  b)   , (a.s6 %  b),    (a.s7 %  b),    (a.s8 %  b),    (a.s9 %  b)   , (a.sa %  b),    (a.sb %  b)   , (a.sc %  b),    (a.sd %  b)   , (a.se %  b),    (a.sf %  b)   );  }\ninline __device__ u32x operator %  (const u32x a, const u32x b) { return u32x ((a.s0 %  b.s0), (a.s1 %  b.s1), (a.s2 %  b.s2), (a.s3 %  b.s3), (a.s4 %  b.s4), (a.s5 %  b.s5), (a.s6 %  b.s6), (a.s7 %  b.s7), (a.s8 %  b.s8), (a.s9 %  b.s9), (a.sa %  b.sa), (a.sb %  b.sb), (a.sc %  b.sc), (a.sd %  b.sd), (a.se %  b.se), (a.sf %  b.sf));  }\n\ninline __device__ u32x operator ~  (const u32x a) { return u32x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7, ~a.s8, ~a.s9, ~a.sa, ~a.sb, ~a.sc, ~a.sd, ~a.se, ~a.sf); }\n\ninline __device__ bool operator != (const u64x a, const u64  b) { return ((a.s0 != b)    && (a.s1 != b)    && (a.s2 != b)    && (a.s3 != b)    && (a.s4 != b)    && (a.s5 != b)    && (a.s6 != b)    && (a.s7 != b)    && (a.s8 != b)    && (a.s9 != b)    && (a.sa != b)    && (a.sb != b)    && (a.sc != b)    && (a.sd != b)    && (a.se != b)    && (a.sf != b)   ); }\ninline __device__ bool operator != (const u64x a, const u64x b) { return ((a.s0 != b.s0) && (a.s1 != b.s1) && (a.s2 != b.s2) && (a.s3 != b.s3) && (a.s4 != b.s4) && (a.s5 != b.s5) && (a.s6 != b.s6) && (a.s7 != b.s7) && (a.s8 != b.s8) && (a.s9 != b.s9) && (a.sa != b.sa) && (a.sb != b.sb) && (a.sc != b.sc) && (a.sd != b.sd) && (a.se != b.se) && (a.sf != b.sf)); }\n\ninline __device__ void operator ^= (u64x &a, const u64  b) { a.s0 ^= b;    a.s1 ^= b;    a.s2 ^= b;    a.s3 ^= b;    a.s4 ^= b;    a.s5 ^= b;    a.s6 ^= b;    a.s7 ^= b;    a.s8 ^= b;    a.s9 ^= b;    a.sa ^= b;    a.sb ^= b;    a.sc ^= b;    a.sd ^= b;    a.se ^= b;    a.sf ^= b;    }\ninline __device__ void operator ^= (u64x &a, const u64x b) { a.s0 ^= b.s0; a.s1 ^= b.s1; a.s2 ^= b.s2; a.s3 ^= b.s3; a.s4 ^= b.s4; a.s5 ^= b.s5; a.s6 ^= b.s6; a.s7 ^= b.s7; a.s8 ^= b.s8; a.s9 ^= b.s9; a.sa ^= b.sa; a.sb ^= b.sb; a.sc ^= b.sc; a.sd ^= b.sd; a.se ^= b.se; a.sf ^= b.sf; }\n\ninline __device__ void operator |= (u64x &a, const u64  b) { a.s0 |= b;    a.s1 |= b;    a.s2 |= b;    a.s3 |= b;    a.s4 |= b;    a.s5 |= b;    a.s6 |= b;    a.s7 |= b;    a.s8 |= b;    a.s9 |= b;    a.sa |= b;    a.sb |= b;    a.sc |= b;    a.sd |= b;    a.se |= b;    a.sf |= b;    }\ninline __device__ void operator |= (u64x &a, const u64x b) { a.s0 |= b.s0; a.s1 |= b.s1; a.s2 |= b.s2; a.s3 |= b.s3; a.s4 |= b.s4; a.s5 |= b.s5; a.s6 |= b.s6; a.s7 |= b.s7; a.s8 |= b.s8; a.s9 |= b.s9; a.sa |= b.sa; a.sb |= b.sb; a.sc |= b.sc; a.sd |= b.sd; a.se |= b.se; a.sf |= b.sf; }\n\ninline __device__ void operator &= (u64x &a, const u64  b) { a.s0 &= b;    a.s1 &= b;    a.s2 &= b;    a.s3 &= b;    a.s4 &= b;    a.s5 &= b;    a.s6 &= b;    a.s7 &= b;    a.s8 &= b;    a.s9 &= b;    a.sa &= b;    a.sb &= b;    a.sc &= b;    a.sd &= b;    a.se &= b;    a.sf &= b;    }\ninline __device__ void operator &= (u64x &a, const u64x b) { a.s0 &= b.s0; a.s1 &= b.s1; a.s2 &= b.s2; a.s3 &= b.s3; a.s4 &= b.s4; a.s5 &= b.s5; a.s6 &= b.s6; a.s7 &= b.s7; a.s8 &= b.s8; a.s9 &= b.s9; a.sa &= b.sa; a.sb &= b.sb; a.sc &= b.sc; a.sd &= b.sd; a.se &= b.se; a.sf &= b.sf; }\n\ninline __device__ void operator += (u64x &a, const u64  b) { a.s0 += b;    a.s1 += b;    a.s2 += b;    a.s3 += b;    a.s4 += b;    a.s5 += b;    a.s6 += b;    a.s7 += b;    a.s8 += b;    a.s9 += b;    a.sa += b;    a.sb += b;    a.sc += b;    a.sd += b;    a.se += b;    a.sf += b;    }\ninline __device__ void operator += (u64x &a, const u64x b) { a.s0 += b.s0; a.s1 += b.s1; a.s2 += b.s2; a.s3 += b.s3; a.s4 += b.s4; a.s5 += b.s5; a.s6 += b.s6; a.s7 += b.s7; a.s8 += b.s8; a.s9 += b.s9; a.sa += b.sa; a.sb += b.sb; a.sc += b.sc; a.sd += b.sd; a.se += b.se; a.sf += b.sf; }\n\ninline __device__ void operator -= (u64x &a, const u64  b) { a.s0 -= b;    a.s1 -= b;    a.s2 -= b;    a.s3 -= b;    a.s4 -= b;    a.s5 -= b;    a.s6 -= b;    a.s7 -= b;    a.s8 -= b;    a.s9 -= b;    a.sa -= b;    a.sb -= b;    a.sc -= b;    a.sd -= b;    a.se -= b;    a.sf -= b;    }\ninline __device__ void operator -= (u64x &a, const u64x b) { a.s0 -= b.s0; a.s1 -= b.s1; a.s2 -= b.s2; a.s3 -= b.s3; a.s4 -= b.s4; a.s5 -= b.s5; a.s6 -= b.s6; a.s7 -= b.s7; a.s8 -= b.s8; a.s9 -= b.s9; a.sa -= b.sa; a.sb -= b.sb; a.sc -= b.sc; a.sd -= b.sd; a.se -= b.se; a.sf -= b.sf; }\n\ninline __device__ void operator *= (u64x &a, const u64  b) { a.s0 *= b;    a.s1 *= b;    a.s2 *= b;    a.s3 *= b;    a.s4 *= b;    a.s5 *= b;    a.s6 *= b;    a.s7 *= b;    a.s8 *= b;    a.s9 *= b;    a.sa *= b;    a.sb *= b;    a.sc *= b;    a.sd *= b;    a.se *= b;    a.sf *= b;    }\ninline __device__ void operator *= (u64x &a, const u64x b) { a.s0 *= b.s0; a.s1 *= b.s1; a.s2 *= b.s2; a.s3 *= b.s3; a.s4 *= b.s4; a.s5 *= b.s5; a.s6 *= b.s6; a.s7 *= b.s7; a.s8 *= b.s8; a.s9 *= b.s9; a.sa *= b.sa; a.sb *= b.sb; a.sc *= b.sc; a.sd *= b.sd; a.se *= b.se; a.sf *= b.sf; }\n\ninline __device__ void operator >>= (u64x &a, const u64  b) { a.s0 >>= b;    a.s1 >>= b;    a.s2 >>= b;    a.s3 >>= b;    a.s4 >>= b;    a.s5 >>= b;    a.s6 >>= b;    a.s7 >>= b;    a.s8 >>= b;    a.s9 >>= b;    a.sa >>= b;    a.sb >>= b;    a.sc >>= b;    a.sd >>= b;    a.se >>= b;    a.sf >>= b;    }\ninline __device__ void operator >>= (u64x &a, const u64x b) { a.s0 >>= b.s0; a.s1 >>= b.s1; a.s2 >>= b.s2; a.s3 >>= b.s3; a.s4 >>= b.s4; a.s5 >>= b.s5; a.s6 >>= b.s6; a.s7 >>= b.s7; a.s8 >>= b.s8; a.s9 >>= b.s9; a.sa >>= b.sa; a.sb >>= b.sb; a.sc >>= b.sc; a.sd >>= b.sd; a.se >>= b.se; a.sf >>= b.sf; }\n\ninline __device__ void operator <<= (u64x &a, const u64  b) { a.s0 <<= b;    a.s1 <<= b;    a.s2 <<= b;    a.s3 <<= b;    a.s4 <<= b;    a.s5 <<= b;    a.s6 <<= b;    a.s7 <<= b;    a.s8 <<= b;    a.s9 <<= b;    a.sa <<= b;    a.sb <<= b;    a.sc <<= b;    a.sd <<= b;    a.se <<= b;    a.sf <<= b;    }\ninline __device__ void operator <<= (u64x &a, const u64x b) { a.s0 <<= b.s0; a.s1 <<= b.s1; a.s2 <<= b.s2; a.s3 <<= b.s3; a.s4 <<= b.s4; a.s5 <<= b.s5; a.s6 <<= b.s6; a.s7 <<= b.s7; a.s8 <<= b.s8; a.s9 <<= b.s9; a.sa <<= b.sa; a.sb <<= b.sb; a.sc <<= b.sc; a.sd <<= b.sd; a.se <<= b.se; a.sf <<= b.sf; }\n\ninline __device__ u64x operator << (const u64x a, const u64  b) { return u64x ((a.s0 << b),    (a.s1 << b)   , (a.s2 << b),    (a.s3 << b)   , (a.s4 << b),    (a.s5 << b)   , (a.s6 << b),    (a.s7 << b),    (a.s8 << b),    (a.s9 << b)   , (a.sa << b),    (a.sb << b)   , (a.sc << b),    (a.sd << b)   , (a.se << b),    (a.sf << b)   );  }\ninline __device__ u64x operator << (const u64x a, const u64x b) { return u64x ((a.s0 << b.s0), (a.s1 << b.s1), (a.s2 << b.s2), (a.s3 << b.s3), (a.s4 << b.s4), (a.s5 << b.s5), (a.s6 << b.s6), (a.s7 << b.s7), (a.s8 << b.s8), (a.s9 << b.s9), (a.sa << b.sa), (a.sb << b.sb), (a.sc << b.sc), (a.sd << b.sd), (a.se << b.se), (a.sf << b.sf));  }\n\ninline __device__ u64x operator >> (const u64x a, const u64  b) { return u64x ((a.s0 >> b),    (a.s1 >> b)   , (a.s2 >> b),    (a.s3 >> b)   , (a.s4 >> b),    (a.s5 >> b)   , (a.s6 >> b),    (a.s7 >> b),    (a.s8 >> b),    (a.s9 >> b)   , (a.sa >> b),    (a.sb >> b)   , (a.sc >> b),    (a.sd >> b)   , (a.se >> b),    (a.sf >> b)   );  }\ninline __device__ u64x operator >> (const u64x a, const u64x b) { return u64x ((a.s0 >> b.s0), (a.s1 >> b.s1), (a.s2 >> b.s2), (a.s3 >> b.s3), (a.s4 >> b.s4), (a.s5 >> b.s5), (a.s6 >> b.s6), (a.s7 >> b.s7), (a.s8 >> b.s8), (a.s9 >> b.s9), (a.sa >> b.sa), (a.sb >> b.sb), (a.sc >> b.sc), (a.sd >> b.sd), (a.se >> b.se), (a.sf >> b.sf));  }\n\ninline __device__ u64x operator ^  (const u64x a, const u64  b) { return u64x ((a.s0 ^  b),    (a.s1 ^  b)   , (a.s2 ^  b),    (a.s3 ^  b)   , (a.s4 ^  b),    (a.s5 ^  b)   , (a.s6 ^  b),    (a.s7 ^  b),    (a.s8 ^  b),    (a.s9 ^  b)   , (a.sa ^  b),    (a.sb ^  b)   , (a.sc ^  b),    (a.sd ^  b)   , (a.se ^  b),    (a.sf ^  b)   );  }\ninline __device__ u64x operator ^  (const u64x a, const u64x b) { return u64x ((a.s0 ^  b.s0), (a.s1 ^  b.s1), (a.s2 ^  b.s2), (a.s3 ^  b.s3), (a.s4 ^  b.s4), (a.s5 ^  b.s5), (a.s6 ^  b.s6), (a.s7 ^  b.s7), (a.s8 ^  b.s8), (a.s9 ^  b.s9), (a.sa ^  b.sa), (a.sb ^  b.sb), (a.sc ^  b.sc), (a.sd ^  b.sd), (a.se ^  b.se), (a.sf ^  b.sf));  }\n\ninline __device__ u64x operator |  (const u64x a, const u64  b) { return u64x ((a.s0 |  b),    (a.s1 |  b)   , (a.s2 |  b),    (a.s3 |  b)   , (a.s4 |  b),    (a.s5 |  b)   , (a.s6 |  b),    (a.s7 |  b),    (a.s8 |  b),    (a.s9 |  b)   , (a.sa |  b),    (a.sb |  b)   , (a.sc |  b),    (a.sd |  b)   , (a.se |  b),    (a.sf |  b)   );  }\ninline __device__ u64x operator |  (const u64x a, const u64x b) { return u64x ((a.s0 |  b.s0), (a.s1 |  b.s1), (a.s2 |  b.s2), (a.s3 |  b.s3), (a.s4 |  b.s4), (a.s5 |  b.s5), (a.s6 |  b.s6), (a.s7 |  b.s7), (a.s8 |  b.s8), (a.s9 |  b.s9), (a.sa |  b.sa), (a.sb |  b.sb), (a.sc |  b.sc), (a.sd |  b.sd), (a.se |  b.se), (a.sf |  b.sf));  }\n\ninline __device__ u64x operator &  (const u64x a, const u64  b) { return u64x ((a.s0 &  b),    (a.s1 &  b)   , (a.s2 &  b),    (a.s3 &  b)   , (a.s4 &  b),    (a.s5 &  b)   , (a.s6 &  b),    (a.s7 &  b),    (a.s8 &  b),    (a.s9 &  b)   , (a.sa &  b),    (a.sb &  b)   , (a.sc &  b),    (a.sd &  b)   , (a.se &  b),    (a.sf &  b)   );  }\ninline __device__ u64x operator &  (const u64x a, const u64x b) { return u64x ((a.s0 &  b.s0), (a.s1 &  b.s1), (a.s2 &  b.s2), (a.s3 &  b.s3), (a.s4 &  b.s4), (a.s5 &  b.s5), (a.s6 &  b.s6), (a.s7 &  b.s7), (a.s8 &  b.s8), (a.s9 &  b.s9), (a.sa &  b.sa), (a.sb &  b.sb), (a.sc &  b.sc), (a.sd &  b.sd), (a.se &  b.se), (a.sf &  b.sf));  }\n\ninline __device__ u64x operator +  (const u64x a, const u64  b) { return u64x ((a.s0 +  b),    (a.s1 +  b)   , (a.s2 +  b),    (a.s3 +  b)   , (a.s4 +  b),    (a.s5 +  b)   , (a.s6 +  b),    (a.s7 +  b),    (a.s8 +  b),    (a.s9 +  b)   , (a.sa +  b),    (a.sb +  b)   , (a.sc +  b),    (a.sd +  b)   , (a.se +  b),    (a.sf +  b)   );  }\ninline __device__ u64x operator +  (const u64x a, const u64x b) { return u64x ((a.s0 +  b.s0), (a.s1 +  b.s1), (a.s2 +  b.s2), (a.s3 +  b.s3), (a.s4 +  b.s4), (a.s5 +  b.s5), (a.s6 +  b.s6), (a.s7 +  b.s7), (a.s8 +  b.s8), (a.s9 +  b.s9), (a.sa +  b.sa), (a.sb +  b.sb), (a.sc +  b.sc), (a.sd +  b.sd), (a.se +  b.se), (a.sf +  b.sf));  }\n\ninline __device__ u64x operator -  (const u64x a, const u64  b) { return u64x ((a.s0 -  b),    (a.s1 -  b)   , (a.s2 -  b),    (a.s3 -  b)   , (a.s4 -  b),    (a.s5 -  b)   , (a.s6 -  b),    (a.s7 -  b),    (a.s8 -  b),    (a.s9 -  b)   , (a.sa -  b),    (a.sb -  b)   , (a.sc -  b),    (a.sd -  b)   , (a.se -  b),    (a.sf -  b)   );  }\ninline __device__ u64x operator -  (const u64x a, const u64x b) { return u64x ((a.s0 -  b.s0), (a.s1 -  b.s1), (a.s2 -  b.s2), (a.s3 -  b.s3), (a.s4 -  b.s4), (a.s5 -  b.s5), (a.s6 -  b.s6), (a.s7 -  b.s7), (a.s8 -  b.s8), (a.s9 -  b.s9), (a.sa -  b.sa), (a.sb -  b.sb), (a.sc -  b.sc), (a.sd -  b.sd), (a.se -  b.se), (a.sf -  b.sf));  }\n\ninline __device__ u64x operator *  (const u64x a, const u64  b) { return u64x ((a.s0 *  b),    (a.s1 *  b)   , (a.s2 *  b),    (a.s3 *  b)   , (a.s4 *  b),    (a.s5 *  b)   , (a.s6 *  b),    (a.s7 *  b),    (a.s8 *  b),    (a.s9 *  b)   , (a.sa *  b),    (a.sb *  b)   , (a.sc *  b),    (a.sd *  b)   , (a.se *  b),    (a.sf *  b)   );  }\ninline __device__ u64x operator *  (const u64x a, const u64x b) { return u64x ((a.s0 *  b.s0), (a.s1 *  b.s1), (a.s2 *  b.s2), (a.s3 *  b.s3), (a.s4 *  b.s4), (a.s5 *  b.s5), (a.s6 *  b.s6), (a.s7 *  b.s7), (a.s8 *  b.s8), (a.s9 *  b.s9), (a.sa *  b.sa), (a.sb *  b.sb), (a.sc *  b.sc), (a.sd *  b.sd), (a.se *  b.se), (a.sf *  b.sf));  }\n\ninline __device__ u64x operator %  (const u64x a, const u64  b) { return u64x ((a.s0 %  b),    (a.s1 %  b)   , (a.s2 %  b),    (a.s3 %  b)   , (a.s4 %  b),    (a.s5 %  b)   , (a.s6 %  b),    (a.s7 %  b),    (a.s8 %  b),    (a.s9 %  b)   , (a.sa %  b),    (a.sb %  b)   , (a.sc %  b),    (a.sd %  b)   , (a.se %  b),    (a.sf %  b)   );  }\ninline __device__ u64x operator %  (const u64x a, const u64x b) { return u64x ((a.s0 %  b.s0), (a.s1 %  b.s1), (a.s2 %  b.s2), (a.s3 %  b.s3), (a.s4 %  b.s4), (a.s5 %  b.s5), (a.s6 %  b.s6), (a.s7 %  b.s7), (a.s8 %  b.s8), (a.s9 %  b.s9), (a.sa %  b.sa), (a.sb %  b.sb), (a.sc %  b.sc), (a.sd %  b.sd), (a.se %  b.se), (a.sf %  b.sf));  }\n\ninline __device__ u64x operator ~  (const u64x a) { return u64x (~a.s0, ~a.s1, ~a.s2, ~a.s3, ~a.s4, ~a.s5, ~a.s6, ~a.s7, ~a.s8, ~a.s9, ~a.sa, ~a.sb, ~a.sc, ~a.sd, ~a.se, ~a.sf); }\n\n#endif\n\ntypedef __device_builtin__ struct u8x  u8x;\ntypedef __device_builtin__ struct u16x u16x;\ntypedef __device_builtin__ struct u32x u32x;\ntypedef __device_builtin__ struct u64x u64x;\n\n#define make_u8x  u8x\n#define make_u16x u16x\n#define make_u32x u32x\n#define make_u64x u64x\n\n#else\ntypedef VTYPE(uchar,  VECT_SIZE) u8x;\ntypedef VTYPE(ushort, VECT_SIZE) u16x;\ntypedef VTYPE(uint,   VECT_SIZE) u32x;\ntypedef VTYPE(ullong, VECT_SIZE) u64x;\n\n#ifndef IS_METAL\n#define make_u8x  (u8x)\n#define make_u16x (u16x)\n#define make_u32x (u32x)\n#define make_u64x (u64x)\n#else\n#define make_u8x  u8x\n#define make_u16x u16x\n#define make_u32x u32x\n#define make_u64x u64x\n#endif\n\n#endif\n#endif\n\n// unions\n\ntypedef union vconv32\n{\n  u64 v32;\n\n  struct\n  {\n    u16 a;\n    u16 b;\n\n  } v16;\n\n  struct\n  {\n    u8 a;\n    u8 b;\n    u8 c;\n    u8 d;\n\n  } v8;\n\n} vconv32_t;\n\ntypedef union vconv64\n{\n  u64 v64;\n\n  struct\n  {\n    u32 a;\n    u32 b;\n\n  } v32;\n\n  struct\n  {\n    u16 a;\n    u16 b;\n    u16 c;\n    u16 d;\n\n  } v16;\n\n  struct\n  {\n    u8 a;\n    u8 b;\n    u8 c;\n    u8 d;\n    u8 e;\n    u8 f;\n    u8 g;\n    u8 h;\n\n  } v8;\n\n} vconv64_t;\n\n/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\ntypedef enum siphash_constants\n{\n  SIPHASHM_0=0x736f6d6570736575UL,\n  SIPHASHM_1=0x646f72616e646f6dUL,\n  SIPHASHM_2=0x6c7967656e657261UL,\n  SIPHASHM_3=0x7465646279746573UL\n\n} siphash_constants_t;\n\ntypedef enum bcrypt_constants\n{\n  BCRYPTM_0=0x4f727068U,\n  BCRYPTM_1=0x65616e42U,\n  BCRYPTM_2=0x65686f6cU,\n  BCRYPTM_3=0x64657253U,\n  BCRYPTM_4=0x63727944U,\n  BCRYPTM_5=0x6f756274U\n\n} bcrypt_constants_t;\n\ntypedef enum md4_constants\n{\n  MD4M_A=0x67452301U,\n  MD4M_B=0xefcdab89U,\n  MD4M_C=0x98badcfeU,\n  MD4M_D=0x10325476U,\n\n  MD4S00=3,\n  MD4S01=7,\n  MD4S02=11,\n  MD4S03=19,\n  MD4S10=3,\n  MD4S11=5,\n  MD4S12=9,\n  MD4S13=13,\n  MD4S20=3,\n  MD4S21=9,\n  MD4S22=11,\n  MD4S23=15,\n\n  MD4C00=0x00000000U,\n  MD4C01=0x5a827999U,\n  MD4C02=0x6ed9eba1U\n\n} md4_constants_t;\n\ntypedef enum md5_constants\n{\n  MD5M_A=0x67452301U,\n  MD5M_B=0xefcdab89U,\n  MD5M_C=0x98badcfeU,\n  MD5M_D=0x10325476U,\n\n  MD5S00=7,\n  MD5S01=12,\n  MD5S02=17,\n  MD5S03=22,\n  MD5S10=5,\n  MD5S11=9,\n  MD5S12=14,\n  MD5S13=20,\n  MD5S20=4,\n  MD5S21=11,\n  MD5S22=16,\n  MD5S23=23,\n  MD5S30=6,\n  MD5S31=10,\n  MD5S32=15,\n  MD5S33=21,\n\n  MD5C00=0xd76aa478U,\n  MD5C01=0xe8c7b756U,\n  MD5C02=0x242070dbU,\n  MD5C03=0xc1bdceeeU,\n  MD5C04=0xf57c0fafU,\n  MD5C05=0x4787c62aU,\n  MD5C06=0xa8304613U,\n  MD5C07=0xfd469501U,\n  MD5C08=0x698098d8U,\n  MD5C09=0x8b44f7afU,\n  MD5C0a=0xffff5bb1U,\n  MD5C0b=0x895cd7beU,\n  MD5C0c=0x6b901122U,\n  MD5C0d=0xfd987193U,\n  MD5C0e=0xa679438eU,\n  MD5C0f=0x49b40821U,\n  MD5C10=0xf61e2562U,\n  MD5C11=0xc040b340U,\n  MD5C12=0x265e5a51U,\n  MD5C13=0xe9b6c7aaU,\n  MD5C14=0xd62f105dU,\n  MD5C15=0x02441453U,\n  MD5C16=0xd8a1e681U,\n  MD5C17=0xe7d3fbc8U,\n  MD5C18=0x21e1cde6U,\n  MD5C19=0xc33707d6U,\n  MD5C1a=0xf4d50d87U,\n  MD5C1b=0x455a14edU,\n  MD5C1c=0xa9e3e905U,\n  MD5C1d=0xfcefa3f8U,\n  MD5C1e=0x676f02d9U,\n  MD5C1f=0x8d2a4c8aU,\n  MD5C20=0xfffa3942U,\n  MD5C21=0x8771f681U,\n  MD5C22=0x6d9d6122U,\n  MD5C23=0xfde5380cU,\n  MD5C24=0xa4beea44U,\n  MD5C25=0x4bdecfa9U,\n  MD5C26=0xf6bb4b60U,\n  MD5C27=0xbebfbc70U,\n  MD5C28=0x289b7ec6U,\n  MD5C29=0xeaa127faU,\n  MD5C2a=0xd4ef3085U,\n  MD5C2b=0x04881d05U,\n  MD5C2c=0xd9d4d039U,\n  MD5C2d=0xe6db99e5U,\n  MD5C2e=0x1fa27cf8U,\n  MD5C2f=0xc4ac5665U,\n  MD5C30=0xf4292244U,\n  MD5C31=0x432aff97U,\n  MD5C32=0xab9423a7U,\n  MD5C33=0xfc93a039U,\n  MD5C34=0x655b59c3U,\n  MD5C35=0x8f0ccc92U,\n  MD5C36=0xffeff47dU,\n  MD5C37=0x85845dd1U,\n  MD5C38=0x6fa87e4fU,\n  MD5C39=0xfe2ce6e0U,\n  MD5C3a=0xa3014314U,\n  MD5C3b=0x4e0811a1U,\n  MD5C3c=0xf7537e82U,\n  MD5C3d=0xbd3af235U,\n  MD5C3e=0x2ad7d2bbU,\n  MD5C3f=0xeb86d391U\n\n} md5_constants_t;\n\ntypedef enum sha1_constants\n{\n  SHA1M_A=0x67452301U,\n  SHA1M_B=0xefcdab89U,\n  SHA1M_C=0x98badcfeU,\n  SHA1M_D=0x10325476U,\n  SHA1M_E=0xc3d2e1f0U,\n\n  SHA1C00=0x5a827999U,\n  SHA1C01=0x6ed9eba1U,\n  SHA1C02=0x8f1bbcdcU,\n  SHA1C03=0xca62c1d6U\n\n} sha1_constants_t;\n\ntypedef enum sha2_32_constants\n{\n  // SHA-224 Initial Hash Values\n  SHA224M_A=0xc1059ed8U,\n  SHA224M_B=0x367cd507U,\n  SHA224M_C=0x3070dd17U,\n  SHA224M_D=0xf70e5939U,\n  SHA224M_E=0xffc00b31U,\n  SHA224M_F=0x68581511U,\n  SHA224M_G=0x64f98fa7U,\n  SHA224M_H=0xbefa4fa4U,\n\n  // SHA-224 Constants\n  SHA224C00=0x428a2f98U,\n  SHA224C01=0x71374491U,\n  SHA224C02=0xb5c0fbcfU,\n  SHA224C03=0xe9b5dba5U,\n  SHA224C04=0x3956c25bU,\n  SHA224C05=0x59f111f1U,\n  SHA224C06=0x923f82a4U,\n  SHA224C07=0xab1c5ed5U,\n  SHA224C08=0xd807aa98U,\n  SHA224C09=0x12835b01U,\n  SHA224C0a=0x243185beU,\n  SHA224C0b=0x550c7dc3U,\n  SHA224C0c=0x72be5d74U,\n  SHA224C0d=0x80deb1feU,\n  SHA224C0e=0x9bdc06a7U,\n  SHA224C0f=0xc19bf174U,\n  SHA224C10=0xe49b69c1U,\n  SHA224C11=0xefbe4786U,\n  SHA224C12=0x0fc19dc6U,\n  SHA224C13=0x240ca1ccU,\n  SHA224C14=0x2de92c6fU,\n  SHA224C15=0x4a7484aaU,\n  SHA224C16=0x5cb0a9dcU,\n  SHA224C17=0x76f988daU,\n  SHA224C18=0x983e5152U,\n  SHA224C19=0xa831c66dU,\n  SHA224C1a=0xb00327c8U,\n  SHA224C1b=0xbf597fc7U,\n  SHA224C1c=0xc6e00bf3U,\n  SHA224C1d=0xd5a79147U,\n  SHA224C1e=0x06ca6351U,\n  SHA224C1f=0x14292967U,\n  SHA224C20=0x27b70a85U,\n  SHA224C21=0x2e1b2138U,\n  SHA224C22=0x4d2c6dfcU,\n  SHA224C23=0x53380d13U,\n  SHA224C24=0x650a7354U,\n  SHA224C25=0x766a0abbU,\n  SHA224C26=0x81c2c92eU,\n  SHA224C27=0x92722c85U,\n  SHA224C28=0xa2bfe8a1U,\n  SHA224C29=0xa81a664bU,\n  SHA224C2a=0xc24b8b70U,\n  SHA224C2b=0xc76c51a3U,\n  SHA224C2c=0xd192e819U,\n  SHA224C2d=0xd6990624U,\n  SHA224C2e=0xf40e3585U,\n  SHA224C2f=0x106aa070U,\n  SHA224C30=0x19a4c116U,\n  SHA224C31=0x1e376c08U,\n  SHA224C32=0x2748774cU,\n  SHA224C33=0x34b0bcb5U,\n  SHA224C34=0x391c0cb3U,\n  SHA224C35=0x4ed8aa4aU,\n  SHA224C36=0x5b9cca4fU,\n  SHA224C37=0x682e6ff3U,\n  SHA224C38=0x748f82eeU,\n  SHA224C39=0x78a5636fU,\n  SHA224C3a=0x84c87814U,\n  SHA224C3b=0x8cc70208U,\n  SHA224C3c=0x90befffaU,\n  SHA224C3d=0xa4506cebU,\n  SHA224C3e=0xbef9a3f7U,\n  SHA224C3f=0xc67178f2U,\n\n  // SHA-256 Initial Hash Values\n  SHA256M_A=0x6a09e667U,\n  SHA256M_B=0xbb67ae85U,\n  SHA256M_C=0x3c6ef372U,\n  SHA256M_D=0xa54ff53aU,\n  SHA256M_E=0x510e527fU,\n  SHA256M_F=0x9b05688cU,\n  SHA256M_G=0x1f83d9abU,\n  SHA256M_H=0x5be0cd19U,\n\n  // SHA-256 Constants\n  SHA256C00=0x428a2f98U,\n  SHA256C01=0x71374491U,\n  SHA256C02=0xb5c0fbcfU,\n  SHA256C03=0xe9b5dba5U,\n  SHA256C04=0x3956c25bU,\n  SHA256C05=0x59f111f1U,\n  SHA256C06=0x923f82a4U,\n  SHA256C07=0xab1c5ed5U,\n  SHA256C08=0xd807aa98U,\n  SHA256C09=0x12835b01U,\n  SHA256C0a=0x243185beU,\n  SHA256C0b=0x550c7dc3U,\n  SHA256C0c=0x72be5d74U,\n  SHA256C0d=0x80deb1feU,\n  SHA256C0e=0x9bdc06a7U,\n  SHA256C0f=0xc19bf174U,\n  SHA256C10=0xe49b69c1U,\n  SHA256C11=0xefbe4786U,\n  SHA256C12=0x0fc19dc6U,\n  SHA256C13=0x240ca1ccU,\n  SHA256C14=0x2de92c6fU,\n  SHA256C15=0x4a7484aaU,\n  SHA256C16=0x5cb0a9dcU,\n  SHA256C17=0x76f988daU,\n  SHA256C18=0x983e5152U,\n  SHA256C19=0xa831c66dU,\n  SHA256C1a=0xb00327c8U,\n  SHA256C1b=0xbf597fc7U,\n  SHA256C1c=0xc6e00bf3U,\n  SHA256C1d=0xd5a79147U,\n  SHA256C1e=0x06ca6351U,\n  SHA256C1f=0x14292967U,\n  SHA256C20=0x27b70a85U,\n  SHA256C21=0x2e1b2138U,\n  SHA256C22=0x4d2c6dfcU,\n  SHA256C23=0x53380d13U,\n  SHA256C24=0x650a7354U,\n  SHA256C25=0x766a0abbU,\n  SHA256C26=0x81c2c92eU,\n  SHA256C27=0x92722c85U,\n  SHA256C28=0xa2bfe8a1U,\n  SHA256C29=0xa81a664bU,\n  SHA256C2a=0xc24b8b70U,\n  SHA256C2b=0xc76c51a3U,\n  SHA256C2c=0xd192e819U,\n  SHA256C2d=0xd6990624U,\n  SHA256C2e=0xf40e3585U,\n  SHA256C2f=0x106aa070U,\n  SHA256C30=0x19a4c116U,\n  SHA256C31=0x1e376c08U,\n  SHA256C32=0x2748774cU,\n  SHA256C33=0x34b0bcb5U,\n  SHA256C34=0x391c0cb3U,\n  SHA256C35=0x4ed8aa4aU,\n  SHA256C36=0x5b9cca4fU,\n  SHA256C37=0x682e6ff3U,\n  SHA256C38=0x748f82eeU,\n  SHA256C39=0x78a5636fU,\n  SHA256C3a=0x84c87814U,\n  SHA256C3b=0x8cc70208U,\n  SHA256C3c=0x90befffaU,\n  SHA256C3d=0xa4506cebU,\n  SHA256C3e=0xbef9a3f7U,\n  SHA256C3f=0xc67178f2U,\n\n} sha2_32_constants_t;\n\ntypedef enum sha2_64_constants\n{\n  // SHA-384 Initial Hash Values\n  SHA384M_A=0xcbbb9d5dc1059ed8UL,\n  SHA384M_B=0x629a292a367cd507UL,\n  SHA384M_C=0x9159015a3070dd17UL,\n  SHA384M_D=0x152fecd8f70e5939UL,\n  SHA384M_E=0x67332667ffc00b31UL,\n  SHA384M_F=0x8eb44a8768581511UL,\n  SHA384M_G=0xdb0c2e0d64f98fa7UL,\n  SHA384M_H=0x47b5481dbefa4fa4UL,\n\n  // SHA-512 Initial Hash Values\n  SHA512M_A=0x6a09e667f3bcc908UL,\n  SHA512M_B=0xbb67ae8584caa73bUL,\n  SHA512M_C=0x3c6ef372fe94f82bUL,\n  SHA512M_D=0xa54ff53a5f1d36f1UL,\n  SHA512M_E=0x510e527fade682d1UL,\n  SHA512M_F=0x9b05688c2b3e6c1fUL,\n  SHA512M_G=0x1f83d9abfb41bd6bUL,\n  SHA512M_H=0x5be0cd19137e2179UL,\n\n  // SHA-384/512 Constants\n  SHA512C00=0x428a2f98d728ae22UL,\n  SHA512C01=0x7137449123ef65cdUL,\n  SHA512C02=0xb5c0fbcfec4d3b2fUL,\n  SHA512C03=0xe9b5dba58189dbbcUL,\n  SHA512C04=0x3956c25bf348b538UL,\n  SHA512C05=0x59f111f1b605d019UL,\n  SHA512C06=0x923f82a4af194f9bUL,\n  SHA512C07=0xab1c5ed5da6d8118UL,\n  SHA512C08=0xd807aa98a3030242UL,\n  SHA512C09=0x12835b0145706fbeUL,\n  SHA512C0a=0x243185be4ee4b28cUL,\n  SHA512C0b=0x550c7dc3d5ffb4e2UL,\n  SHA512C0c=0x72be5d74f27b896fUL,\n  SHA512C0d=0x80deb1fe3b1696b1UL,\n  SHA512C0e=0x9bdc06a725c71235UL,\n  SHA512C0f=0xc19bf174cf692694UL,\n  SHA512C10=0xe49b69c19ef14ad2UL,\n  SHA512C11=0xefbe4786384f25e3UL,\n  SHA512C12=0x0fc19dc68b8cd5b5UL,\n  SHA512C13=0x240ca1cc77ac9c65UL,\n  SHA512C14=0x2de92c6f592b0275UL,\n  SHA512C15=0x4a7484aa6ea6e483UL,\n  SHA512C16=0x5cb0a9dcbd41fbd4UL,\n  SHA512C17=0x76f988da831153b5UL,\n  SHA512C18=0x983e5152ee66dfabUL,\n  SHA512C19=0xa831c66d2db43210UL,\n  SHA512C1a=0xb00327c898fb213fUL,\n  SHA512C1b=0xbf597fc7beef0ee4UL,\n  SHA512C1c=0xc6e00bf33da88fc2UL,\n  SHA512C1d=0xd5a79147930aa725UL,\n  SHA512C1e=0x06ca6351e003826fUL,\n  SHA512C1f=0x142929670a0e6e70UL,\n  SHA512C20=0x27b70a8546d22ffcUL,\n  SHA512C21=0x2e1b21385c26c926UL,\n  SHA512C22=0x4d2c6dfc5ac42aedUL,\n  SHA512C23=0x53380d139d95b3dfUL,\n  SHA512C24=0x650a73548baf63deUL,\n  SHA512C25=0x766a0abb3c77b2a8UL,\n  SHA512C26=0x81c2c92e47edaee6UL,\n  SHA512C27=0x92722c851482353bUL,\n  SHA512C28=0xa2bfe8a14cf10364UL,\n  SHA512C29=0xa81a664bbc423001UL,\n  SHA512C2a=0xc24b8b70d0f89791UL,\n  SHA512C2b=0xc76c51a30654be30UL,\n  SHA512C2c=0xd192e819d6ef5218UL,\n  SHA512C2d=0xd69906245565a910UL,\n  SHA512C2e=0xf40e35855771202aUL,\n  SHA512C2f=0x106aa07032bbd1b8UL,\n  SHA512C30=0x19a4c116b8d2d0c8UL,\n  SHA512C31=0x1e376c085141ab53UL,\n  SHA512C32=0x2748774cdf8eeb99UL,\n  SHA512C33=0x34b0bcb5e19b48a8UL,\n  SHA512C34=0x391c0cb3c5c95a63UL,\n  SHA512C35=0x4ed8aa4ae3418acbUL,\n  SHA512C36=0x5b9cca4f7763e373UL,\n  SHA512C37=0x682e6ff3d6b2b8a3UL,\n  SHA512C38=0x748f82ee5defb2fcUL,\n  SHA512C39=0x78a5636f43172f60UL,\n  SHA512C3a=0x84c87814a1f0ab72UL,\n  SHA512C3b=0x8cc702081a6439ecUL,\n  SHA512C3c=0x90befffa23631e28UL,\n  SHA512C3d=0xa4506cebde82bde9UL,\n  SHA512C3e=0xbef9a3f7b2c67915UL,\n  SHA512C3f=0xc67178f2e372532bUL,\n  SHA512C40=0xca273eceea26619cUL,\n  SHA512C41=0xd186b8c721c0c207UL,\n  SHA512C42=0xeada7dd6cde0eb1eUL,\n  SHA512C43=0xf57d4f7fee6ed178UL,\n  SHA512C44=0x06f067aa72176fbaUL,\n  SHA512C45=0x0a637dc5a2c898a6UL,\n  SHA512C46=0x113f9804bef90daeUL,\n  SHA512C47=0x1b710b35131c471bUL,\n  SHA512C48=0x28db77f523047d84UL,\n  SHA512C49=0x32caab7b40c72493UL,\n  SHA512C4a=0x3c9ebe0a15c9bebcUL,\n  SHA512C4b=0x431d67c49c100d4cUL,\n  SHA512C4c=0x4cc5d4becb3e42b6UL,\n  SHA512C4d=0x597f299cfc657e2aUL,\n  SHA512C4e=0x5fcb6fab3ad6faecUL,\n  SHA512C4f=0x6c44198c4a475817UL\n\n} sha2_64_constants_t;\n\ntypedef enum ripemd160_constants\n{\n  RIPEMD160M_A=0x67452301U,\n  RIPEMD160M_B=0xefcdab89U,\n  RIPEMD160M_C=0x98badcfeU,\n  RIPEMD160M_D=0x10325476U,\n  RIPEMD160M_E=0xc3d2e1f0U,\n\n  RIPEMD160C00=0x00000000U,\n  RIPEMD160C10=0x5a827999U,\n  RIPEMD160C20=0x6ed9eba1U,\n  RIPEMD160C30=0x8f1bbcdcU,\n  RIPEMD160C40=0xa953fd4eU,\n  RIPEMD160C50=0x50a28be6U,\n  RIPEMD160C60=0x5c4dd124U,\n  RIPEMD160C70=0x6d703ef3U,\n  RIPEMD160C80=0x7a6d76e9U,\n  RIPEMD160C90=0x00000000U,\n\n  RIPEMD160S00=11,\n  RIPEMD160S01=14,\n  RIPEMD160S02=15,\n  RIPEMD160S03=12,\n  RIPEMD160S04=5,\n  RIPEMD160S05=8,\n  RIPEMD160S06=7,\n  RIPEMD160S07=9,\n  RIPEMD160S08=11,\n  RIPEMD160S09=13,\n  RIPEMD160S0A=14,\n  RIPEMD160S0B=15,\n  RIPEMD160S0C=6,\n  RIPEMD160S0D=7,\n  RIPEMD160S0E=9,\n  RIPEMD160S0F=8,\n\n  RIPEMD160S10=7,\n  RIPEMD160S11=6,\n  RIPEMD160S12=8,\n  RIPEMD160S13=13,\n  RIPEMD160S14=11,\n  RIPEMD160S15=9,\n  RIPEMD160S16=7,\n  RIPEMD160S17=15,\n  RIPEMD160S18=7,\n  RIPEMD160S19=12,\n  RIPEMD160S1A=15,\n  RIPEMD160S1B=9,\n  RIPEMD160S1C=11,\n  RIPEMD160S1D=7,\n  RIPEMD160S1E=13,\n  RIPEMD160S1F=12,\n\n  RIPEMD160S20=11,\n  RIPEMD160S21=13,\n  RIPEMD160S22=6,\n  RIPEMD160S23=7,\n  RIPEMD160S24=14,\n  RIPEMD160S25=9,\n  RIPEMD160S26=13,\n  RIPEMD160S27=15,\n  RIPEMD160S28=14,\n  RIPEMD160S29=8,\n  RIPEMD160S2A=13,\n  RIPEMD160S2B=6,\n  RIPEMD160S2C=5,\n  RIPEMD160S2D=12,\n  RIPEMD160S2E=7,\n  RIPEMD160S2F=5,\n\n  RIPEMD160S30=11,\n  RIPEMD160S31=12,\n  RIPEMD160S32=14,\n  RIPEMD160S33=15,\n  RIPEMD160S34=14,\n  RIPEMD160S35=15,\n  RIPEMD160S36=9,\n  RIPEMD160S37=8,\n  RIPEMD160S38=9,\n  RIPEMD160S39=14,\n  RIPEMD160S3A=5,\n  RIPEMD160S3B=6,\n  RIPEMD160S3C=8,\n  RIPEMD160S3D=6,\n  RIPEMD160S3E=5,\n  RIPEMD160S3F=12,\n\n  RIPEMD160S40=9,\n  RIPEMD160S41=15,\n  RIPEMD160S42=5,\n  RIPEMD160S43=11,\n  RIPEMD160S44=6,\n  RIPEMD160S45=8,\n  RIPEMD160S46=13,\n  RIPEMD160S47=12,\n  RIPEMD160S48=5,\n  RIPEMD160S49=12,\n  RIPEMD160S4A=13,\n  RIPEMD160S4B=14,\n  RIPEMD160S4C=11,\n  RIPEMD160S4D=8,\n  RIPEMD160S4E=5,\n  RIPEMD160S4F=6,\n\n  RIPEMD160S50=8,\n  RIPEMD160S51=9,\n  RIPEMD160S52=9,\n  RIPEMD160S53=11,\n  RIPEMD160S54=13,\n  RIPEMD160S55=15,\n  RIPEMD160S56=15,\n  RIPEMD160S57=5,\n  RIPEMD160S58=7,\n  RIPEMD160S59=7,\n  RIPEMD160S5A=8,\n  RIPEMD160S5B=11,\n  RIPEMD160S5C=14,\n  RIPEMD160S5D=14,\n  RIPEMD160S5E=12,\n  RIPEMD160S5F=6,\n\n  RIPEMD160S60=9,\n  RIPEMD160S61=13,\n  RIPEMD160S62=15,\n  RIPEMD160S63=7,\n  RIPEMD160S64=12,\n  RIPEMD160S65=8,\n  RIPEMD160S66=9,\n  RIPEMD160S67=11,\n  RIPEMD160S68=7,\n  RIPEMD160S69=7,\n  RIPEMD160S6A=12,\n  RIPEMD160S6B=7,\n  RIPEMD160S6C=6,\n  RIPEMD160S6D=15,\n  RIPEMD160S6E=13,\n  RIPEMD160S6F=11,\n\n  RIPEMD160S70=9,\n  RIPEMD160S71=7,\n  RIPEMD160S72=15,\n  RIPEMD160S73=11,\n  RIPEMD160S74=8,\n  RIPEMD160S75=6,\n  RIPEMD160S76=6,\n  RIPEMD160S77=14,\n  RIPEMD160S78=12,\n  RIPEMD160S79=13,\n  RIPEMD160S7A=5,\n  RIPEMD160S7B=14,\n  RIPEMD160S7C=13,\n  RIPEMD160S7D=13,\n  RIPEMD160S7E=7,\n  RIPEMD160S7F=5,\n\n  RIPEMD160S80=15,\n  RIPEMD160S81=5,\n  RIPEMD160S82=8,\n  RIPEMD160S83=11,\n  RIPEMD160S84=14,\n  RIPEMD160S85=14,\n  RIPEMD160S86=6,\n  RIPEMD160S87=14,\n  RIPEMD160S88=6,\n  RIPEMD160S89=9,\n  RIPEMD160S8A=12,\n  RIPEMD160S8B=9,\n  RIPEMD160S8C=12,\n  RIPEMD160S8D=5,\n  RIPEMD160S8E=15,\n  RIPEMD160S8F=8,\n\n  RIPEMD160S90=8,\n  RIPEMD160S91=5,\n  RIPEMD160S92=12,\n  RIPEMD160S93=9,\n  RIPEMD160S94=12,\n  RIPEMD160S95=5,\n  RIPEMD160S96=14,\n  RIPEMD160S97=6,\n  RIPEMD160S98=8,\n  RIPEMD160S99=13,\n  RIPEMD160S9A=6,\n  RIPEMD160S9B=5,\n  RIPEMD160S9C=15,\n  RIPEMD160S9D=13,\n  RIPEMD160S9E=11,\n  RIPEMD160S9F=11\n\n} ripemd160_constants_t;\n\ntypedef enum keccak_constants\n{\n  KECCAK_RNDC_00=0x0000000000000001UL,\n  KECCAK_RNDC_01=0x0000000000008082UL,\n  KECCAK_RNDC_02=0x800000000000808aUL,\n  KECCAK_RNDC_03=0x8000000080008000UL,\n  KECCAK_RNDC_04=0x000000000000808bUL,\n  KECCAK_RNDC_05=0x0000000080000001UL,\n  KECCAK_RNDC_06=0x8000000080008081UL,\n  KECCAK_RNDC_07=0x8000000000008009UL,\n  KECCAK_RNDC_08=0x000000000000008aUL,\n  KECCAK_RNDC_09=0x0000000000000088UL,\n  KECCAK_RNDC_10=0x0000000080008009UL,\n  KECCAK_RNDC_11=0x000000008000000aUL,\n  KECCAK_RNDC_12=0x000000008000808bUL,\n  KECCAK_RNDC_13=0x800000000000008bUL,\n  KECCAK_RNDC_14=0x8000000000008089UL,\n  KECCAK_RNDC_15=0x8000000000008003UL,\n  KECCAK_RNDC_16=0x8000000000008002UL,\n  KECCAK_RNDC_17=0x8000000000000080UL,\n  KECCAK_RNDC_18=0x000000000000800aUL,\n  KECCAK_RNDC_19=0x800000008000000aUL,\n  KECCAK_RNDC_20=0x8000000080008081UL,\n  KECCAK_RNDC_21=0x8000000000008080UL,\n  KECCAK_RNDC_22=0x0000000080000001UL,\n  KECCAK_RNDC_23=0x8000000080008008UL,\n\n  KECCAK_PILN_00=10,\n  KECCAK_PILN_01=7,\n  KECCAK_PILN_02=11,\n  KECCAK_PILN_03=17,\n  KECCAK_PILN_04=18,\n  KECCAK_PILN_05=3,\n  KECCAK_PILN_06=5,\n  KECCAK_PILN_07=16,\n  KECCAK_PILN_08=8,\n  KECCAK_PILN_09=21,\n  KECCAK_PILN_10=24,\n  KECCAK_PILN_11=4,\n  KECCAK_PILN_12=15,\n  KECCAK_PILN_13=23,\n  KECCAK_PILN_14=19,\n  KECCAK_PILN_15=13,\n  KECCAK_PILN_16=12,\n  KECCAK_PILN_17=2,\n  KECCAK_PILN_18=20,\n  KECCAK_PILN_19=14,\n  KECCAK_PILN_20=22,\n  KECCAK_PILN_21=9,\n  KECCAK_PILN_22=6,\n  KECCAK_PILN_23=1,\n\n  KECCAK_ROTC_00=1,\n  KECCAK_ROTC_01=3,\n  KECCAK_ROTC_02=6,\n  KECCAK_ROTC_03=10,\n  KECCAK_ROTC_04=15,\n  KECCAK_ROTC_05=21,\n  KECCAK_ROTC_06=28,\n  KECCAK_ROTC_07=36,\n  KECCAK_ROTC_08=45,\n  KECCAK_ROTC_09=55,\n  KECCAK_ROTC_10=2,\n  KECCAK_ROTC_11=14,\n  KECCAK_ROTC_12=27,\n  KECCAK_ROTC_13=41,\n  KECCAK_ROTC_14=56,\n  KECCAK_ROTC_15=8,\n  KECCAK_ROTC_16=25,\n  KECCAK_ROTC_17=43,\n  KECCAK_ROTC_18=62,\n  KECCAK_ROTC_19=18,\n  KECCAK_ROTC_20=39,\n  KECCAK_ROTC_21=61,\n  KECCAK_ROTC_22=20,\n  KECCAK_ROTC_23=44,\n\n} keccak_constants_t;\n\ntypedef enum mysql323_constants\n{\n  MYSQL323_A=0x50305735U,\n  MYSQL323_B=0x12345671U\n\n} mysql323_constants_t;\n\ntypedef enum fortigate_constants\n{\n  FORTIGATE_A=0x2eba88a3U,\n  FORTIGATE_B=0x4ab04c42U,\n  FORTIGATE_C=0xc1307953U,\n  FORTIGATE_D=0x3fcc0731U,\n  FORTIGATE_E=0x299032a1U,\n  FORTIGATE_F=0x705b81a9U\n\n} fortigate_constants_t;\n\ntypedef enum blake2b_constants\n{\n  BLAKE2B_IV_00=0x6a09e667f3bcc908UL,\n  BLAKE2B_IV_01=0xbb67ae8584caa73bUL,\n  BLAKE2B_IV_02=0x3c6ef372fe94f82bUL,\n  BLAKE2B_IV_03=0xa54ff53a5f1d36f1UL,\n  BLAKE2B_IV_04=0x510e527fade682d1UL,\n  BLAKE2B_IV_05=0x9b05688c2b3e6c1fUL,\n  BLAKE2B_IV_06=0x1f83d9abfb41bd6bUL,\n  BLAKE2B_IV_07=0x5be0cd19137e2179UL\n\n} blake2b_constants_t;\n\ntypedef enum blake2s_constants\n{\n  BLAKE2S_IV_00=0x6a09e667,\n  BLAKE2S_IV_01=0xbb67ae85,\n  BLAKE2S_IV_02=0x3c6ef372,\n  BLAKE2S_IV_03=0xa54ff53a,\n  BLAKE2S_IV_04=0x510e527f,\n  BLAKE2S_IV_05=0x9b05688c,\n  BLAKE2S_IV_06=0x1f83d9ab,\n  BLAKE2S_IV_07=0x5be0cd19\n\n} blake2s_constants_t;\n\ntypedef enum sm3_constants\n{\n  // SM3 Initial Hash Values\n  SM3_IV_A=0x7380166fUL,\n  SM3_IV_B=0x4914b2b9UL,\n  SM3_IV_C=0x172442d7UL,\n  SM3_IV_D=0xda8a0600UL,\n  SM3_IV_E=0xa96f30bcUL,\n  SM3_IV_F=0x163138aaUL,\n  SM3_IV_G=0xe38dee4dUL,\n  SM3_IV_H=0xb0fb0e4eUL,\n\n  // SM3 Tj round constants\n  SM3_T00=0x79CC4519UL,\n  SM3_T01=0xF3988A32UL,\n  SM3_T02=0xE7311465UL,\n  SM3_T03=0xCE6228CBUL,\n  SM3_T04=0x9CC45197UL,\n  SM3_T05=0x3988A32FUL,\n  SM3_T06=0x7311465EUL,\n  SM3_T07=0xE6228CBCUL,\n  SM3_T08=0xCC451979UL,\n  SM3_T09=0x988A32F3UL,\n  SM3_T10=0x311465E7UL,\n  SM3_T11=0x6228CBCEUL,\n  SM3_T12=0xC451979CUL,\n  SM3_T13=0x88A32F39UL,\n  SM3_T14=0x11465E73UL,\n  SM3_T15=0x228CBCE6UL,\n  SM3_T16=0x9D8A7A87UL,\n  SM3_T17=0x3B14F50FUL,\n  SM3_T18=0x7629EA1EUL,\n  SM3_T19=0xEC53D43CUL,\n  SM3_T20=0xD8A7A879UL,\n  SM3_T21=0xB14F50F3UL,\n  SM3_T22=0x629EA1E7UL,\n  SM3_T23=0xC53D43CEUL,\n  SM3_T24=0x8A7A879DUL,\n  SM3_T25=0x14F50F3BUL,\n  SM3_T26=0x29EA1E76UL,\n  SM3_T27=0x53D43CECUL,\n  SM3_T28=0xA7A879D8UL,\n  SM3_T29=0x4F50F3B1UL,\n  SM3_T30=0x9EA1E762UL,\n  SM3_T31=0x3D43CEC5UL,\n  SM3_T32=0x7A879D8AUL,\n  SM3_T33=0xF50F3B14UL,\n  SM3_T34=0xEA1E7629UL,\n  SM3_T35=0xD43CEC53UL,\n  SM3_T36=0xA879D8A7UL,\n  SM3_T37=0x50F3B14FUL,\n  SM3_T38=0xA1E7629EUL,\n  SM3_T39=0x43CEC53DUL,\n  SM3_T40=0x879D8A7AUL,\n  SM3_T41=0x0F3B14F5UL,\n  SM3_T42=0x1E7629EAUL,\n  SM3_T43=0x3CEC53D4UL,\n  SM3_T44=0x79D8A7A8UL,\n  SM3_T45=0xF3B14F50UL,\n  SM3_T46=0xE7629EA1UL,\n  SM3_T47=0xCEC53D43UL,\n  SM3_T48=0x9D8A7A87UL,\n  SM3_T49=0x3B14F50FUL,\n  SM3_T50=0x7629EA1EUL,\n  SM3_T51=0xEC53D43CUL,\n  SM3_T52=0xD8A7A879UL,\n  SM3_T53=0xB14F50F3UL,\n  SM3_T54=0x629EA1E7UL,\n  SM3_T55=0xC53D43CEUL,\n  SM3_T56=0x8A7A879DUL,\n  SM3_T57=0x14F50F3BUL,\n  SM3_T58=0x29EA1E76UL,\n  SM3_T59=0x53D43CECUL,\n  SM3_T60=0xA7A879D8UL,\n  SM3_T61=0x4F50F3B1UL,\n  SM3_T62=0x9EA1E762UL,\n  SM3_T63=0x3D43CEC5UL\n\n} sm3_constants_t;\n\ntypedef enum combinator_mode\n{\n  COMBINATOR_MODE_BASE_LEFT  = 10001,\n  COMBINATOR_MODE_BASE_RIGHT = 10002\n\n} combinator_mode_t;\n\n#ifdef KERNEL_STATIC\ntypedef struct digest\n{\n  u32 digest_buf[DGST_ELEM];\n\n} digest_t;\n#endif\n\ntypedef struct kernel_param\n{\n  // We can only move attributes into this struct which do not use special declarations like __global\n\n  u32 bitmap_mask;          // 24\n  u32 bitmap_shift1;        // 25\n  u32 bitmap_shift2;        // 26\n  u32 salt_pos_host;        // 27\n  u32 loop_pos;             // 28\n  u32 loop_cnt;             // 29\n  u32 il_cnt;               // 30\n  u32 digests_cnt;          // 31\n  u32 digests_offset_host;  // 32\n  u32 combs_mode;           // 33\n  u32 salt_repeat;          // 34\n  u64 pws_pos;              // 35\n  u64 gid_max;              // 36\n\n} kernel_param_t;\n\ntypedef struct salt\n{\n  u32 salt_buf[64];\n  u32 salt_buf_pc[64];\n\n  u32 salt_len;\n  u32 salt_len_pc;\n  u32 salt_iter;\n  u32 salt_iter2;\n  u32 salt_sign[2];\n  u32 salt_repeats;\n\n  u32 orig_pos;\n\n  u32 digests_cnt;\n  u32 digests_done;\n\n  u32 digests_offset;\n\n  u32 scrypt_N;\n  u32 scrypt_r;\n  u32 scrypt_p;\n\n} salt_t;\n\ntypedef struct\n{\n  u32 key;\n  u64 val;\n\n} hcstat_table_t;\n\ntypedef struct\n{\n  u32 cs_buf[0x100];\n  u32 cs_len;\n\n} cs_t;\n\ntypedef struct\n{\n  u32 cmds[32];\n\n} kernel_rule_t;\n\ntypedef struct pw\n{\n  u32 i[64];\n\n  u32 pw_len;\n\n} pw_t;\n\ntypedef struct pw_idx\n{\n  u32 off;\n  u32 cnt;\n  u32 len;\n\n} pw_idx_t;\n\ntypedef struct bf\n{\n  u32  i;\n\n} bf_t;\n\ntypedef struct bs_word\n{\n  u32  b[32];\n\n} bs_word_t;\n\ntypedef struct plain\n{\n  u64  gidvid;\n  u32  il_pos;\n  u32  salt_pos;\n  u32  digest_pos;\n  u32  hash_pos;\n  u32  extra1;\n  u32  extra2;\n\n} plain_t;\n\ntypedef struct keyboard_layout_mapping\n{\n  u32 src_char;\n  int src_len;\n  u32 dst_char;\n  int dst_len;\n\n} keyboard_layout_mapping_t;\n\ntypedef struct hc_enc\n{\n  int  pos;   // source offset\n\n  u32  cbuf;  // carry buffer\n  int  clen;  // carry length\n\n} hc_enc_t;\n\n#endif\n"
  },
  {
    "path": "src/main/resources/copyfromhashcat/inc_vendor.h",
    "content": "/**\n * Author......: See docs/credits.txt\n * License.....: MIT\n */\n\n#ifndef INC_VENDOR_H\n#define INC_VENDOR_H\n\n#if defined HC_CPU_OPENCL_EMU_H\n#define IS_NATIVE\n#elif defined __CUDACC__\n#define IS_CUDA\n#elif defined __HIPCC__\n#define IS_HIP\n#elif defined __METAL__ || defined __METAL_MACOS__\n#define IS_METAL\n#else\n#define IS_OPENCL\n#endif\n\n#if defined IS_METAL\n#include <metal_stdlib>\n\nusing namespace metal;\n#endif\n\n#if defined IS_NATIVE\n#define CONSTANT_VK\n#define CONSTANT_AS\n#define GLOBAL_AS\n#define LOCAL_VK\n#define LOCAL_AS\n#define PRIVATE_AS\n#define KERNEL_FQ\n#elif defined IS_CUDA\n#define CONSTANT_VK __constant__\n#define CONSTANT_AS\n#define GLOBAL_AS\n#define LOCAL_VK    __shared__\n#define LOCAL_AS\n#define PRIVATE_AS\n#define KERNEL_FQ   extern \"C\" __global__\n#elif defined IS_HIP\n#define CONSTANT_VK __constant__\n#define CONSTANT_AS\n#define GLOBAL_AS\n#define LOCAL_VK    __shared__\n#define LOCAL_AS\n#define PRIVATE_AS\n#define KERNEL_FQ   extern \"C\" __global__\n#elif defined IS_METAL\n#define CONSTANT_VK constant\n#define CONSTANT_AS constant\n#define GLOBAL_AS   device\n#define LOCAL_VK    threadgroup\n#define LOCAL_AS    threadgroup\n#define PRIVATE_AS  thread\n#define KERNEL_FQ   kernel\n#elif defined IS_OPENCL\n#define CONSTANT_VK __constant\n#define CONSTANT_AS __constant\n#define GLOBAL_AS   __global\n#define LOCAL_VK    __local\n#define LOCAL_AS    __local\n#define PRIVATE_AS\n#define KERNEL_FQ   __kernel\n#endif\n\n#ifndef MAYBE_UNUSED\n#define MAYBE_UNUSED\n#endif\n\n/**\n * device type\n */\n\n#define DEVICE_TYPE_CPU   2\n#define DEVICE_TYPE_GPU   4\n#define DEVICE_TYPE_ACCEL 8\n\n#if   DEVICE_TYPE == DEVICE_TYPE_CPU\n#define IS_CPU\n#elif DEVICE_TYPE == DEVICE_TYPE_GPU\n#define IS_GPU\n#elif DEVICE_TYPE == DEVICE_TYPE_ACCEL\n#define IS_ACCEL\n#endif\n\n/**\n * vendor specific\n */\n\n#if   VENDOR_ID == (1 << 0)\n#define IS_AMD\n#elif VENDOR_ID == (1 << 1)\n#define IS_APPLE\n#define IS_GENERIC\n#elif VENDOR_ID == (1 << 2)\n#define IS_INTEL_BEIGNET\n#define IS_GENERIC\n#elif VENDOR_ID == (1 << 3)\n#define IS_INTEL_SDK\n#define IS_GENERIC\n#elif VENDOR_ID == (1 << 4)\n#define IS_MESA\n#define IS_GENERIC\n#elif VENDOR_ID == (1 << 5)\n#define IS_NV\n#elif VENDOR_ID == (1 << 6)\n#define IS_POCL\n#define IS_GENERIC\n#elif VENDOR_ID == (1 << 8)\n#define IS_AMD_USE_HIP\n#else\n#define IS_GENERIC\n#endif\n\n#if defined IS_AMD && HAS_VPERM == 1\n#define IS_ROCM\n#endif\n\n#define LOCAL_MEM_TYPE_LOCAL  1\n#define LOCAL_MEM_TYPE_GLOBAL 2\n\n#if LOCAL_MEM_TYPE == LOCAL_MEM_TYPE_LOCAL\n#define REAL_SHM\n#endif\n\n// So far, only used by -m 22100 and only affects NVIDIA on OpenCL. CUDA seems to work fine.\n#ifdef FORCE_DISABLE_SHM\n#undef REAL_SHM\n#endif\n\n#ifdef REAL_SHM\n#define SHM_TYPE LOCAL_AS\n#else\n#define SHM_TYPE CONSTANT_AS\n#endif\n\n/**\n * function declarations can have a large influence depending on the opencl runtime\n * fast but pure kernels on rocm is a good example\n */\n\n#ifdef NO_INLINE\n#define HC_INLINE\n#else\n#define HC_INLINE inline static\n#endif\n\n#if defined IS_AMD && defined IS_GPU\n#define DECLSPEC HC_INLINE\n#elif defined IS_HIP\n#define DECLSPEC __device__ HC_INLINE\n#else\n#define DECLSPEC\n#endif\n\n/**\n * AMD specific\n */\n\n#ifdef IS_AMD\n#if defined(cl_amd_media_ops)\n#pragma OPENCL EXTENSION cl_amd_media_ops  : enable\n#endif\n#if defined(cl_amd_media_ops2)\n#pragma OPENCL EXTENSION cl_amd_media_ops2 : enable\n#endif\n#endif\n\n// Whitelist some OpenCL specific functions\n// This could create more stable kernels on systems with bad OpenCL drivers\n\n#ifdef IS_CUDA\n#define USE_BITSELECT\n#define USE_ROTATE\n#endif\n\n#ifdef IS_HIP\n#define USE_BITSELECT\n#define USE_ROTATE\n#endif\n\n#ifdef IS_ROCM\n#define USE_BITSELECT\n#define USE_ROTATE\n#endif\n\n#ifdef IS_INTEL_SDK\n#ifdef IS_CPU\n//#define USE_BITSELECT\n//#define USE_ROTATE\n#endif\n#endif\n\n#ifdef IS_OPENCL\n//#define USE_BITSELECT\n//#define USE_ROTATE\n//#define USE_SWIZZLE\n#endif\n\n#ifdef IS_METAL\n#define USE_ROTATE\n\n// Metal support max VECT_SIZE = 4\n#define s0 x\n#define s1 y\n#define s2 z\n#define s3 w\n#endif\n\n#endif // INC_VENDOR_H\n"
  },
  {
    "path": "src/main/resources/inc_defines.h",
    "content": "#define KERNEL_STATIC\n#define DGST_ELEM 4\n#define DGST_R0 0\n#define DGST_R1 1\n#define DGST_R2 2\n#define DGST_R3 3\n#define SECP256K1_TMPS_TYPE CONSTANT_AS\n"
  },
  {
    "path": "src/main/resources/inc_ecc_secp256k1custom.cl",
    "content": "/**\n * Author......: Bernard Ladenthin, 2020\n * License.....: MIT\n */\n/*\n// example private key (in)\n// hex: 68e23530deb6d5011ab56d8ad9f7b4a3b424f1112f08606357497495929f72dc\n// decimal: 47440210799387980664936216788675555637818488436833759923669526136462528967388\n// WiF\n// to generate the public key (out)\n// 025d99d81d9e731e0d7eebd1c858b1155da7981b1f0a16d322a361f8b589ad2e3b\n// hex:\nk_local[7] = 0x68e23530;\nk_local[6] = 0xdeb6d501;\nk_local[5] = 0x1ab56d8a;\nk_local[4] = 0xd9f7b4a3;\nk_local[3] = 0xb424f111;\nk_local[2] = 0x2f086063;\nk_local[1] = 0x57497495;\nk_local[0] = 0x929f72dc;\n*/\n\n// ==== BEGIN: SYNCHRONIZED WITH JAVA CONSTANTS (Do not modify without updating Java) ====\n// ==== Base Units ====\n#define BITS_PER_BYTE                                      8\n#define U32_PER_WORD                                       1\n#define U32_NUM_BYTES                                      4\n#define BYTE_SHIFT_TO_U32_MSB                              24\n\n// ==== private key ====\n#define PRIVATE_KEY_MAX_NUM_BITS                           256\n#define PRIVATE_KEY_MAX_NUM_BYTES                          (PRIVATE_KEY_MAX_NUM_BITS / BITS_PER_BYTE) // 32\n#define PRIVATE_KEY_MAX_NUM_WORDS                          (PRIVATE_KEY_MAX_NUM_BYTES / U32_NUM_BYTES) // 8\n\n// ==== SEC format prefixes ====\n#define SEC_PREFIX_NUM_BITS                                BITS_PER_BYTE\n#define SEC_PREFIX_NUM_BYTES                               1\n#define SEC_PREFIX_NUM_WORDS                               U32_PER_WORD\n#define SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT                0x04\n#define SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y           0x02\n#define SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y            0x03\n\n// ==== SEC format prefixes shifted versions (for use in u32[0] with MSB-first layout) ====\n#define SEC_PREFIX_SHIFTED_NUM_BYTES                       U32_NUM_BYTES\n#define SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT_SHIFTED        (SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT      << BYTE_SHIFT_TO_U32_MSB)\n#define SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y_SHIFTED   (SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y << BYTE_SHIFT_TO_U32_MSB)\n#define SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y_SHIFTED    (SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y  << BYTE_SHIFT_TO_U32_MSB)\n\n// ==== x, y coordinate length ====\n#define ONE_COORDINATE_NUM_BITS                            256\n#define ONE_COORDINATE_NUM_BYTES                           (ONE_COORDINATE_NUM_BITS / BITS_PER_BYTE) // 32\n#define TWO_COORDINATES_NUM_BITS                           (ONE_COORDINATE_NUM_BITS * 2) // 512\n#define TWO_COORDINATES_NUM_BYTES                          (ONE_COORDINATE_NUM_BYTES * 2) // 64\n#define ONE_COORDINATE_NUM_WORDS                           (ONE_COORDINATE_NUM_BYTES / U32_NUM_BYTES) // 8\n#define TWO_COORDINATE_NUM_WORDS                           (ONE_COORDINATE_NUM_WORDS * 2) // 16\n\n// ==== public key length ====\n#define SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BITS               (SEC_PREFIX_NUM_BITS  + TWO_COORDINATES_NUM_BITS)  // 520\n#define SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BYTES              (SEC_PREFIX_NUM_BYTES + TWO_COORDINATES_NUM_BYTES) // 65\n#define SEC_PUBLIC_KEY_UNCOMPRESSED_WORDS                  (SEC_PREFIX_NUM_WORDS + TWO_COORDINATE_NUM_WORDS)  // 17\n#define SEC_PUBLIC_KEY_COMPRESSED_NUM_BITS                 (SEC_PREFIX_NUM_BITS  + ONE_COORDINATE_NUM_BITS)   // 264\n#define SEC_PUBLIC_KEY_COMPRESSED_NUM_BYTES                (SEC_PREFIX_NUM_BYTES + ONE_COORDINATE_NUM_BYTES)  // 33\n#define SEC_PUBLIC_KEY_COMPRESSED_WORDS                    (SEC_PREFIX_NUM_WORDS + ONE_COORDINATE_NUM_WORDS)  // 9\n\n// === Hash sizes ===\n#define SHA256_INPUT_BLOCK_SIZE_BITS                       512\n#define SHA256_INPUT_BLOCK_SIZE_BYTES                      (SHA256_INPUT_BLOCK_SIZE_BITS /  BITS_PER_BYTE) // 64\n#define SHA256_INPUT_BLOCK_SIZE_WORDS                      (SHA256_INPUT_BLOCK_SIZE_BYTES / U32_NUM_BYTES) // 16\n#define RIPEMD160_INPUT_BLOCK_SIZE_BITS                    512\n#define RIPEMD160_INPUT_BLOCK_SIZE_BYTES                   (RIPEMD160_INPUT_BLOCK_SIZE_BITS /  BITS_PER_BYTE) // 64\n#define RIPEMD160_INPUT_BLOCK_SIZE_WORDS                   (RIPEMD160_INPUT_BLOCK_SIZE_BYTES / U32_NUM_BYTES) // 16\n#define SHA256_HASH_NUM_BITS                               256\n#define SHA256_HASH_NUM_BYTES                              (SHA256_HASH_NUM_BITS /  BITS_PER_BYTE)    // 32\n#define SHA256_HASH_NUM_WORDS                              (SHA256_HASH_NUM_BYTES / U32_NUM_BYTES)    // 8\n#define RIPEMD160_HASH_NUM_BITS                            160\n#define RIPEMD160_HASH_NUM_BYTES                           (RIPEMD160_HASH_NUM_BITS /  BITS_PER_BYTE) // 20\n#define RIPEMD160_HASH_NUM_WORDS                           (RIPEMD160_HASH_NUM_BYTES / U32_NUM_BYTES) // 5\n\n#define SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC 2\n#define SHA256_INPUT_TOTAL_BITS_UNCOMPRESSED     (SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BITS)  // 1024\n#define SHA256_INPUT_TOTAL_BYTES_UNCOMPRESSED    (SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BYTES) // 128\n#define SHA256_INPUT_TOTAL_WORDS_UNCOMPRESSED    (SHA256_INPUT_BLOCKS_FOR_UNCOMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_WORDS) // 32\n\n#define SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC 1\n#define SHA256_INPUT_TOTAL_BITS_COMPRESSED       (SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BITS)  // 512\n#define SHA256_INPUT_TOTAL_BYTES_COMPRESSED      (SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_BYTES) // 64\n#define SHA256_INPUT_TOTAL_WORDS_COMPRESSED      (SHA256_INPUT_BLOCKS_FOR_COMPRESSED_SEC * SHA256_INPUT_BLOCK_SIZE_WORDS) // 16\n\n// ==== Individual Chunk Sizes (Words in OpenCL) ====\n#define CHUNK_SIZE_00_NUM_WORDS_BIG_ENDIAN_X                         ONE_COORDINATE_NUM_WORDS\n#define CHUNK_SIZE_01_NUM_WORDS_BIG_ENDIAN_Y                         ONE_COORDINATE_NUM_WORDS\n#define CHUNK_SIZE_10_NUM_WORDS_RIPEMD160_UNCOMPRESSED               RIPEMD160_HASH_NUM_WORDS\n#define CHUNK_SIZE_11_NUM_WORDS_RIPEMD160_COMPRESSED                 RIPEMD160_HASH_NUM_WORDS\n\n// ==== Offsets Within a Chunk ====\n#define CHUNK_OFFSET_00_NUM_WORDS_BIG_ENDIAN_X                       0\n#define CHUNK_OFFSET_01_NUM_WORDS_BIG_ENDIAN_Y                       (CHUNK_OFFSET_00_NUM_WORDS_BIG_ENDIAN_X           + CHUNK_SIZE_00_NUM_WORDS_BIG_ENDIAN_X)\n#define CHUNK_OFFSET_10_NUM_WORDS_RIPEMD160_UNCOMPRESSED             (CHUNK_OFFSET_01_NUM_WORDS_BIG_ENDIAN_Y           + CHUNK_SIZE_01_NUM_WORDS_BIG_ENDIAN_Y)\n#define CHUNK_OFFSET_11_NUM_WORDS_RIPEMD160_COMPRESSED               (CHUNK_OFFSET_10_NUM_WORDS_RIPEMD160_UNCOMPRESSED + CHUNK_SIZE_10_NUM_WORDS_RIPEMD160_UNCOMPRESSED)\n#define CHUNK_OFFSET_99_NUM_WORDS_END_OF_CHUNK                       (CHUNK_OFFSET_11_NUM_WORDS_RIPEMD160_COMPRESSED   + CHUNK_SIZE_11_NUM_WORDS_RIPEMD160_COMPRESSED)\n\n// ==== Total Chunk Size ====\n#define CHUNK_SIZE_NUM_WORDS                                         CHUNK_OFFSET_99_NUM_WORDS_END_OF_CHUNK\n// ==== END: SYNCHRONIZED WITH JAVA CONSTANTS ====\n\n/**\n * @brief\n * Precomputed multiples of the base point G used in wNAF-based scalar multiplication.\n *\n * This table includes:\n * - ±1·G, ±3·G, ±5·G, ±7·G (total: 8 point pairs)\n * - Each point consists of (x, y) coordinates, 256 bits each\n * - For each y, the negative value is precomputed as well\n *\n * Memory layout:\n * - 4 window values (±1, ±3, ±5, ±7)\n * - 8 points × 2 coordinates (x, y) = 16 × 32 bytes = 512 bytes\n * - Each coordinate consists of 8 × u32 = 256 bits\n * - 8 (x) + 8 (y) + 8 (–y) = 24 coordinates per point (for sign flipping)\n * - Total: 96 × 4 bytes = **384 bytes** for each coordinate\n * - Overall memory usage: 96 × 4 = **384 bytes**\n *\n * This constant fits well into the GPU’s __constant memory space (64 KB on RTX 3090)\n * and benefits from fast broadcast access across all threads in a workgroup.\n *\n * Note:\n * Using __constant ensures:\n * - Reduced register pressure\n * - No redundant memory transfers per thread\n * - Better caching performance vs. global memory\n *\n * This allows thousands of threads to reuse the same precomputed data efficiently,\n * which is crucial in large scalar multiplication kernels on GPGPU.\n */\n__constant secp256k1_t g_precomputed = {\n    .xy = {\n        // x1\n        SECP256K1_G_PRE_COMPUTED_00,\n        SECP256K1_G_PRE_COMPUTED_01,\n        SECP256K1_G_PRE_COMPUTED_02,\n        SECP256K1_G_PRE_COMPUTED_03,\n        SECP256K1_G_PRE_COMPUTED_04,\n        SECP256K1_G_PRE_COMPUTED_05,\n        SECP256K1_G_PRE_COMPUTED_06,\n        SECP256K1_G_PRE_COMPUTED_07,\n\n        // y1\n        SECP256K1_G_PRE_COMPUTED_08,\n        SECP256K1_G_PRE_COMPUTED_09,\n        SECP256K1_G_PRE_COMPUTED_10,\n        SECP256K1_G_PRE_COMPUTED_11,\n        SECP256K1_G_PRE_COMPUTED_12,\n        SECP256K1_G_PRE_COMPUTED_13,\n        SECP256K1_G_PRE_COMPUTED_14,\n        SECP256K1_G_PRE_COMPUTED_15,\n\n        // -y1\n        SECP256K1_G_PRE_COMPUTED_16,\n        SECP256K1_G_PRE_COMPUTED_17,\n        SECP256K1_G_PRE_COMPUTED_18,\n        SECP256K1_G_PRE_COMPUTED_19,\n        SECP256K1_G_PRE_COMPUTED_20,\n        SECP256K1_G_PRE_COMPUTED_21,\n        SECP256K1_G_PRE_COMPUTED_22,\n        SECP256K1_G_PRE_COMPUTED_23,\n\n        // x3\n        SECP256K1_G_PRE_COMPUTED_24,\n        SECP256K1_G_PRE_COMPUTED_25,\n        SECP256K1_G_PRE_COMPUTED_26,\n        SECP256K1_G_PRE_COMPUTED_27,\n        SECP256K1_G_PRE_COMPUTED_28,\n        SECP256K1_G_PRE_COMPUTED_29,\n        SECP256K1_G_PRE_COMPUTED_30,\n        SECP256K1_G_PRE_COMPUTED_31,\n\n        // y3\n        SECP256K1_G_PRE_COMPUTED_32,\n        SECP256K1_G_PRE_COMPUTED_33,\n        SECP256K1_G_PRE_COMPUTED_34,\n        SECP256K1_G_PRE_COMPUTED_35,\n        SECP256K1_G_PRE_COMPUTED_36,\n        SECP256K1_G_PRE_COMPUTED_37,\n        SECP256K1_G_PRE_COMPUTED_38,\n        SECP256K1_G_PRE_COMPUTED_39,\n\n        // -y3\n        SECP256K1_G_PRE_COMPUTED_40,\n        SECP256K1_G_PRE_COMPUTED_41,\n        SECP256K1_G_PRE_COMPUTED_42,\n        SECP256K1_G_PRE_COMPUTED_43,\n        SECP256K1_G_PRE_COMPUTED_44,\n        SECP256K1_G_PRE_COMPUTED_45,\n        SECP256K1_G_PRE_COMPUTED_46,\n        SECP256K1_G_PRE_COMPUTED_47,\n\n        // x5\n        SECP256K1_G_PRE_COMPUTED_48,\n        SECP256K1_G_PRE_COMPUTED_49,\n        SECP256K1_G_PRE_COMPUTED_50,\n        SECP256K1_G_PRE_COMPUTED_51,\n        SECP256K1_G_PRE_COMPUTED_52,\n        SECP256K1_G_PRE_COMPUTED_53,\n        SECP256K1_G_PRE_COMPUTED_54,\n        SECP256K1_G_PRE_COMPUTED_55,\n\n        // y5\n        SECP256K1_G_PRE_COMPUTED_56,\n        SECP256K1_G_PRE_COMPUTED_57,\n        SECP256K1_G_PRE_COMPUTED_58,\n        SECP256K1_G_PRE_COMPUTED_59,\n        SECP256K1_G_PRE_COMPUTED_60,\n        SECP256K1_G_PRE_COMPUTED_61,\n        SECP256K1_G_PRE_COMPUTED_62,\n        SECP256K1_G_PRE_COMPUTED_63,\n\n        // -y5\n        SECP256K1_G_PRE_COMPUTED_64,\n        SECP256K1_G_PRE_COMPUTED_65,\n        SECP256K1_G_PRE_COMPUTED_66,\n        SECP256K1_G_PRE_COMPUTED_67,\n        SECP256K1_G_PRE_COMPUTED_68,\n        SECP256K1_G_PRE_COMPUTED_69,\n        SECP256K1_G_PRE_COMPUTED_70,\n        SECP256K1_G_PRE_COMPUTED_71,\n\n        // x7\n        SECP256K1_G_PRE_COMPUTED_72,\n        SECP256K1_G_PRE_COMPUTED_73,\n        SECP256K1_G_PRE_COMPUTED_74,\n        SECP256K1_G_PRE_COMPUTED_75,\n        SECP256K1_G_PRE_COMPUTED_76,\n        SECP256K1_G_PRE_COMPUTED_77,\n        SECP256K1_G_PRE_COMPUTED_78,\n        SECP256K1_G_PRE_COMPUTED_79,\n\n        // y7\n        SECP256K1_G_PRE_COMPUTED_80,\n        SECP256K1_G_PRE_COMPUTED_81,\n        SECP256K1_G_PRE_COMPUTED_82,\n        SECP256K1_G_PRE_COMPUTED_83,\n        SECP256K1_G_PRE_COMPUTED_84,\n        SECP256K1_G_PRE_COMPUTED_85,\n        SECP256K1_G_PRE_COMPUTED_86,\n        SECP256K1_G_PRE_COMPUTED_87,\n\n        // -y7\n        SECP256K1_G_PRE_COMPUTED_88,\n        SECP256K1_G_PRE_COMPUTED_89,\n        SECP256K1_G_PRE_COMPUTED_90,\n        SECP256K1_G_PRE_COMPUTED_91,\n        SECP256K1_G_PRE_COMPUTED_92,\n        SECP256K1_G_PRE_COMPUTED_93,\n        SECP256K1_G_PRE_COMPUTED_94,\n        SECP256K1_G_PRE_COMPUTED_95\n    }\n};\n\n// Coordinates per point\n#define COORDS_PER_POINT            (ONE_COORDINATE_NUM_WORDS * 2)\n\n// Precomputed base point offsets\n#define G_OFFSET_X1                 (0)\n#define G_OFFSET_Y1                 (G_OFFSET_X1 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_NEG_Y1             (G_OFFSET_Y1 + ONE_COORDINATE_NUM_WORDS)\n\n#define G_OFFSET_X3                 (G_OFFSET_NEG_Y1 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_Y3                 (G_OFFSET_X3 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_NEG_Y3             (G_OFFSET_Y3 + ONE_COORDINATE_NUM_WORDS)\n\n#define G_OFFSET_X5                 (G_OFFSET_NEG_Y3 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_Y5                 (G_OFFSET_X5 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_NEG_Y5             (G_OFFSET_Y5 + ONE_COORDINATE_NUM_WORDS)\n\n#define G_OFFSET_X7                 (G_OFFSET_NEG_Y5 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_Y7                 (G_OFFSET_X7 + ONE_COORDINATE_NUM_WORDS)\n#define G_OFFSET_NEG_Y7             (G_OFFSET_Y7 + ONE_COORDINATE_NUM_WORDS)\n\n#define G_PRECOMPUTED_TOTAL_WORDS   (G_OFFSET_NEG_Y7 + ONE_COORDINATE_NUM_WORDS)\n\nDECLSPEC void point_add_xy (PRIVATE_AS u32 *x1, PRIVATE_AS u32 *y1, PRIVATE_AS const u32 *x2, PRIVATE_AS const u32 *y2)\n{\n    u32 z1[8] = { 0 };\n    z1[0] = 1;\n\n    point_add(x1, y1, z1, x2, y2);\n\n    // z1 now holds z of result -> need to transform back to affine\n    inv_mod(z1);\n\n    u32 z2[8];\n    mul_mod(z2, z1, z1);     // z^2\n    mul_mod(x1, x1, z2);     // x_affine = x / z^2\n\n    mul_mod(z2, z2, z1);     // z^3\n    mul_mod(y1, y1, z2);     // y_affine = y / z^3\n}\n\n/**\n * @brief Copies a given number of u32 values from __constant to __private memory.\n *\n * Performs a direct word-wise copy of 32-bit values from a statically allocated\n * constant memory region (e.g., precomputed lookup tables) into private memory\n * (thread-local registers or stack).\n *\n * This is useful when working with values stored in `__constant` space such as\n * secp256k1 precomputed base points that need to be accessed with full\n * read/write flexibility in local registers.\n *\n * @param dst Destination array of u32 values in __private address space.\n * @param src Source array of u32 values in __constant address space.\n * @param word_count Number of 32-bit words (u32) to copy.\n */\ninline void copy_constant_u32_array_private_u32(u32 *dst, __constant const u32 *src, const int word_count) {\n    #pragma unroll\n    for (int i = 0; i < word_count; i++) {\n        dst[i] = src[i];\n    }\n}\n\n/**\n * @brief Copies a given number of u32 values from one u32 array to another.\n *\n * Performs a direct word-wise copy of 32-bit values from src to dst.\n *\n * @param dst Destination array of u32 values.\n * @param src Source array of u32 values.\n * @param word_count Number of u32 values to copy.\n */\ninline void copy_global_u32_array_private_u32(u32 *dst, __global const u32 *src, const int word_count) {\n    #pragma unroll\n    for (int i = 0; i < word_count; i++) {\n        dst[i] = src[i];\n    }\n}\n\n/**\n * @brief Copies a given number of u32 values from one u32 array to another.\n *\n * Performs a direct word-wise copy of 32-bit values from src to dst.\n *\n * @param dst Destination array of u32 values.\n * @param src Source array of u32 values.\n * @param word_count Number of u32 values to copy.\n */\ninline void copy_private_u32_array_global_u32(__global u32 *dst, const u32 *src, const int word_count) {\n    #pragma unroll\n    for (int i = 0; i < word_count; i++) {\n        dst[i] = src[i];\n    }\n}\n\n/**\n * @brief Copies the raw bytes of a u32 array into a uchar array.\n *\n * Copies word_count * 4 bytes from the source u32 array into the\n * destination byte array starting at the given offset.\n *\n * @param dst Destination byte array (uchar*).\n * @param dst_offset Byte offset in the destination array to begin writing.\n * @param src Source array of u32 values.\n * @param word_count Number of u32 words to copy (1 word = 4 bytes).\n */\ninline void copy_u32_array_bytes(uchar *dst, int dst_offset, const u32 *src, const int word_count) {\n    const uchar *src_bytes = (const uchar *)src;\n    #pragma unroll\n    for (int i = 0; i < word_count * 4; i++) {\n        dst[dst_offset + i] = src_bytes[i];\n    }\n}\n\ninline uchar get_lsb_of_little_endian_coordinate(const u32 *coord) {\n    return as_uchar4(coord[0]).s0;\n}\n\ninline uchar get_lsb_of_big_endian_coordinate(const u32 *coord) {\n    return as_uchar4(coord[ONE_COORDINATE_NUM_WORDS - 1]).s3;\n}\n\n// ======= Swap 32-bit value (safe across OpenCL versions) =======\n\ninline u32 swap_u32(u32 v) {\n#if defined(__builtin_bswap32)\n    return __builtin_bswap32(v);\n#else\n    uchar4 bytes = as_uchar4(v);\n    return as_uint((uchar4)(bytes.s3, bytes.s2, bytes.s1, bytes.s0));\n#endif\n}\n\n/**\n * @brief Copies a u32 array to another while reversing word order and byte order (endianness).\n *\n * The source is interpreted as little-endian; the result will be big-endian, both in word and byte order.\n *\n * @param dst Destination u32 array.\n * @param dst_offset Starting index in the destination array.\n * @param src Source u32 array.\n * @param word_count Number of 32-bit words to copy and reverse.\n */\ninline void copy_and_reverse_endianness_u32_array(u32 *dst, int dst_offset, const u32 *src, const int word_count) {\n    #pragma unroll\n    for (int i = 0; i < word_count; i++) {\n        dst[dst_offset + i] = swap_u32(src[word_count - 1 - i]);\n    }\n}\n\n/**\n * @brief Converts a byte array into an array of u32 words (big-endian).\n *\n * Packs 4 bytes at a time from the input byte array `src` into 32-bit words in `dst`,\n * assuming the byte order is big-endian (most significant byte first).\n *\n * For example, the bytes {0x12, 0x34, 0x56, 0x78} will become the u32 word 0x12345678.\n *\n * @param src Input byte array (length must be at least word_count * 4).\n * @param dst Output array of u32 words.\n * @param word_count Number of 32-bit words to produce (reads 4 * word_count bytes from src).\n */\ninline void pack_bytes_to_u32_words(const uchar *src, u32 *dst, const int word_count)\n{\n    #pragma unroll\n    for (int i = 0; i < word_count; i++) {\n        dst[i] =\n            ((u32)src[i * 4 + 0] << 24) |\n            ((u32)src[i * 4 + 1] << 16) |\n            ((u32)src[i * 4 + 2] << 8 ) |\n            ((u32)src[i * 4 + 3]);\n    }\n}\n\ninline void sha256_add_padding(u32 *dst, const int padding_start_index, const u32 final_byte, const int length_index, const u32 bit_len)\n{\n    // Write the final byte + 0x80 bit\n    dst[padding_start_index] = ((u32)final_byte << 24) | 0x00800000;\n\n    // Zero-fill from padding_start_index + 1 up to length_index - 1\n    #pragma unroll\n    for (int i = padding_start_index + 1; i < length_index; i++) {\n        dst[i] = 0;\n    }\n\n    // Store bit length\n    dst[length_index] = bit_len;\n}\n\ninline void get_sec_bytes_uncompressed(const u32 *x_bigEndian, const u32 *y_bigEndian, uchar *out_sec)\n{\n    out_sec[0] = SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT;\n    copy_u32_array_bytes(out_sec,  1, x_bigEndian, ONE_COORDINATE_NUM_WORDS);\n    copy_u32_array_bytes(out_sec, 33, y_bigEndian, ONE_COORDINATE_NUM_WORDS);\n}\n\ninline uchar get_compressed_prefix_from_lsb(uchar lsb)\n{\n    return (lsb & 1) == 0 ? SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y\n                          : SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y;\n}\n\ninline void get_sec_bytes_compressed(const u32 *x_bigEndian, const u32 *y_bigEndian, uchar *out_sec)\n{\n    uchar lsb = get_lsb_of_big_endian_coordinate(y_bigEndian);\n    out_sec[0] = get_compressed_prefix_from_lsb(lsb);\n    copy_u32_array_bytes(out_sec, 1, x_bigEndian, ONE_COORDINATE_NUM_WORDS);\n}\n\ninline void transform_sec_prefix_from_uncompressed_to_compressed(uchar *out_sec)\n{\n    uchar lsb = out_sec[SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BYTES - 1];\n    out_sec[0] = get_compressed_prefix_from_lsb(lsb);\n}\n\ninline void build_sha256_block_from_uncompressed_pubkey(const uchar *sec, u32 *sha256_input)\n{\n    // Pack 64 bytes from sec[0..63] into sha256_input[0..15]\n    pack_bytes_to_u32_words(sec, sha256_input, TWO_COORDINATE_NUM_WORDS);\n\n    // Apply SHA-256 padding: write 0x80 bit, zero-fill, append bit length (520 bits)\n    sha256_add_padding(sha256_input, TWO_COORDINATE_NUM_WORDS, sec[TWO_COORDINATES_NUM_BYTES], SHA256_INPUT_TOTAL_WORDS_UNCOMPRESSED - 1, SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BITS);\n}\n\ninline void build_sha256_block_from_compressed_pubkey(const uchar *sec, u32 *sha256_input)\n{\n    // Pack 32 bytes from sec[0..31] into sha256_input[0..7]\n    pack_bytes_to_u32_words(sec, sha256_input, ONE_COORDINATE_NUM_WORDS);\n\n    // Apply SHA-256 padding: write 0x80 bit, zero-fill, append bit length (264 bits)\n    sha256_add_padding(sha256_input, ONE_COORDINATE_NUM_WORDS, sec[ONE_COORDINATE_NUM_BYTES], SHA256_INPUT_TOTAL_WORDS_COMPRESSED - 1, SEC_PUBLIC_KEY_COMPRESSED_NUM_BITS);\n}\n\ninline void build_ripemd160_block_from_sha256(const u32 *sha256_hash, u32 *ripemd_input)\n{\n    // Copy 8 words (32 bytes) from SHA256\n    #pragma unroll\n    for (int i = 0; i < SHA256_HASH_NUM_WORDS; i++) {\n        ripemd_input[i] = sha256_hash[i];\n    }\n\n    // Add RIPEMD160 padding\n    // write \"1\" bit right after public key for SHA-256 padding\n    ripemd_input[8] = 0x80000000;\n\n    #pragma unroll\n    for (int i = 9; i < 14; i++) {\n        ripemd_input[i] = 0;\n    }\n\n    // begin of 64 length bits:\n    // 0x0000000000010000  // 256 bits = 0x100 in hex\n    // decimal 65536 is 00000000 00000001 00000000 00000000 in binary\n    ripemd_input[14] = 0x00010000; // low word (bits 0–31)\n    ripemd_input[15] = 0x00000000; // high word (bits 32–63)\n}\n\n/**\n * @define REUSE_UNCOMPRESSED_SEC_FOR_COMPRESSED\n *\n * When defined, enables optimization by reusing the buffer that stores the\n * uncompressed SEC (Standards for Efficient Cryptography) public key representation\n * to also hold the compressed form.\n *\n * Rationale:\n * - The compressed SEC format shares the same X coordinate as the uncompressed form.\n * - The only difference is the prefix byte (0x02 or 0x03 instead of 0x04).\n * - This allows us to avoid allocating a second array for the compressed key.\n *\n * Benefits:\n * - Reduces memory usage.\n * - Avoids redundant serialization logic.\n * - Helps GPU kernels minimize register and local memory pressure.\n *\n * Safety:\n * - This optimization is safe as long as the uncompressed SEC buffer is no longer needed\n *   after being overwritten with the compressed prefix.\n */\n#define REUSE_FOR_COMPRESSED\n\n/**\n * @brief\n * Generates multiple public key candidates from a single private key base by modifying the least significant bits.\n *\n * This kernel computes elliptic curve public keys and their corresponding Bitcoin address hashes for a grid\n * of private key candidates, where each candidate is derived by OR-ing the given base key with `global_id`.\n *\n * The output includes:\n * - X and Y coordinates of the resulting public key (in big-endian)\n * - RIPEMD-160 hash of the SHA-256 hash of the uncompressed public key\n * - RIPEMD-160 hash of the SHA-256 hash of the compressed public key\n *\n * Computation steps per work item:\n * 1. Take base private key from global memory and modify it by OR-ing with the thread's global ID.\n * 2. Multiply the private key with the curve's base point G using a precomputed wNAF table.\n * 3. Convert the resulting public key coordinates from little-endian to big-endian.\n * 4. Store X and Y coordinates in output buffer.\n * 5. Serialize uncompressed SEC format (0x04 + X + Y), hash it (SHA-256 then RIPEMD-160), and store the hash.\n * 6. Serialize compressed SEC format (0x02/0x03 + X), hash it (SHA-256 then RIPEMD-160), and store the hash.\n *\n * Optimization:\n * - If `REUSE_FOR_COMPRESSED` is defined, the buffer used for the uncompressed SEC format is reused for\n *   the compressed version to reduce memory footprint.\n *\n * @param r Output buffer (global u32*). Must be large enough to hold all chunks per thread.\n *          Each thread writes CHUNK_SIZE_NUM_WORDS u32 values.\n * @param k Input buffer (global const u32*) representing a single base private key (8 words, little-endian).\n */\n__kernel void generateKeysKernel_grid(__global u32 *r, __global const u32 *k, const u32 loopCount)\n{\n    // Little Endian format\n    u32 k_littleEndian_local[PRIVATE_KEY_LENGTH];\n    u32 x_littleEndian_local[ONE_COORDINATE_NUM_WORDS];\n    u32 y_littleEndian_local[ONE_COORDINATE_NUM_WORDS];\n    // Big Endian format\n    u32 x_bigEndian_local[ONE_COORDINATE_NUM_WORDS];\n    u32 y_bigEndian_local[ONE_COORDINATE_NUM_WORDS];\n\n    u32 x1_local[ONE_COORDINATE_NUM_WORDS];\n    u32 y1_local[ONE_COORDINATE_NUM_WORDS];\n    u32 z1_local[ONE_COORDINATE_NUM_WORDS] = { 0 };\n    z1_local[0] = 1; // Initialize Jacobian Z-coordinate (affine point: z = 1)\n    \n    u32             *sha256_input_uncompressed    ;\n    u32             *ripemd160_input_uncompressed ;\n    uchar           *sec_uncompressed             ;\n    \n    u32             *sha256_input_compressed      ;\n    u32             *ripemd160_input_compressed   ;\n    uchar           *sec_compressed               ;\n    \n    u32             sha256_input_uncompressed_alloc[SHA256_INPUT_TOTAL_WORDS_UNCOMPRESSED];\n    u32             ripemd160_input_uncompressed_alloc[RIPEMD160_INPUT_BLOCK_SIZE_WORDS];\n    uchar           sec_uncompressed_alloc[SEC_PUBLIC_KEY_UNCOMPRESSED_NUM_BYTES];\n    \n    sha256_input_uncompressed      = sha256_input_uncompressed_alloc;\n    ripemd160_input_uncompressed   = ripemd160_input_uncompressed_alloc;\n    sec_uncompressed               = sec_uncompressed_alloc;\n\n    #ifdef REUSE_FOR_COMPRESSED\n        // Shared context for both compressed and uncompressed operations\n        sha256_ctx_t                             sha_ctx_shared;\n        ripemd160_ctx_t                          ripemd_ctx_shared;\n\n        // Aliases for readability — both use the shared context\n        #define sha_ctx_uncompressed             sha_ctx_shared\n        #define sha_ctx_compressed               sha_ctx_shared\n\n        #define ripemd_ctx_uncompressed          ripemd_ctx_shared\n        #define ripemd_ctx_compressed            ripemd_ctx_shared\n        \n        // arrays\n        sha256_input_compressed    =             sha256_input_uncompressed_alloc;\n        ripemd160_input_compressed =             ripemd160_input_uncompressed_alloc;\n        sec_compressed             =             sec_uncompressed_alloc;\n    #else\n        // Separate contexts for uncompressed and compressed operations\n        sha256_ctx_t                             sha_ctx_uncompressed;\n        sha256_ctx_t                             sha_ctx_compressed;\n        ripemd160_ctx_t                          ripemd_ctx_uncompressed;\n        ripemd160_ctx_t                          ripemd_ctx_compressed;\n        \n        u32                                      sha256_input_compressed_alloc[SHA256_INPUT_TOTAL_WORDS_COMPRESSED];\n        u32                                      ripemd160_input_compressed_alloc[RIPEMD160_INPUT_BLOCK_SIZE_WORDS];\n        uchar                                    sec_compressed_alloc[SEC_PUBLIC_KEY_COMPRESSED_NUM_BYTES];\n        \n        sha256_input_compressed    =             sha256_input_compressed_alloc;\n        ripemd160_input_compressed =             ripemd160_input_compressed_alloc;\n        sec_compressed             =             sec_compressed_alloc;\n    #endif\n\n    // get_global_id(dim) where dim is the dimension index (0 for first, 1 for second dimension etc.)\n    // The above call is equivalent to get_local_size(dim)*get_group_id(dim) + get_local_id(dim)\n    // size_t global_id = get_global_id(0);\n    u32 global_id = get_global_id(0);\n    u32 base_offset = global_id * loopCount;\n\n    //int local_id = get_local_id(0);\n    //int local_size = get_local_size(0);\n\n    // Copy private key to local register\n    copy_global_u32_array_private_u32(k_littleEndian_local, k, PRIVATE_KEY_MAX_NUM_WORDS);\n    u32 baseK0 = k_littleEndian_local[0];\n\n    // Copy base point G (in affine coordinates) from constant memory to local registers.\n    // This avoids repeated global memory access during the loop (e.g., for point additions).\n    copy_constant_u32_array_private_u32(x1_local, &g_precomputed.xy[G_OFFSET_X1], ONE_COORDINATE_NUM_WORDS);\n    copy_constant_u32_array_private_u32(y1_local, &g_precomputed.xy[G_OFFSET_Y1], ONE_COORDINATE_NUM_WORDS);\n\n    for (u32 i = 0; i < loopCount; i++) {\n        u32 loop_index = base_offset + i;\n        u32 r_offset = loop_index * CHUNK_SIZE_NUM_WORDS;\n\n        // Apply variation (global_id) to LSB part of key (k[0])\n        // We use bitwise OR (|) instead of addition (+) to modify the key,\n        // because it avoids carry propagation and is typically faster on GPU hardware.\n        //\n        // Rationale:\n        // - Addition introduces data dependencies (carry chain across bits).\n        // - Bitwise OR has no carry and maps directly to a single instruction.\n        // - On most GPU architectures (NVIDIA, AMD), bitwise operations are cheaper\n        //   than integer addition in terms of instruction latency and power usage.\n        // - Using OR guarantees deterministic variation without overflow concerns,\n        //   assuming loop_index is within expected bit range (e.g. lower N bits).\n        //\n        // Result:\n        // baseK0 | loop_index = key variation with fast, non-carrying logic.\n        k_littleEndian_local[0] = (baseK0 | loop_index);\n\n        if (i == 0) {\n            point_mul_xy(x_littleEndian_local, y_littleEndian_local, k_littleEndian_local, &g_precomputed);\n        } else {\n            point_add_xy(x_littleEndian_local, y_littleEndian_local, x1_local, y1_local);\n        }\n\n        // create big endian\n        // x\n        copy_and_reverse_endianness_u32_array(x_bigEndian_local, 0, x_littleEndian_local, ONE_COORDINATE_NUM_WORDS);\n        copy_private_u32_array_global_u32(&r[r_offset + CHUNK_OFFSET_00_NUM_WORDS_BIG_ENDIAN_X],      x_bigEndian_local, CHUNK_SIZE_00_NUM_WORDS_BIG_ENDIAN_X);\n        // y\n        copy_and_reverse_endianness_u32_array(y_bigEndian_local, 0, y_littleEndian_local, ONE_COORDINATE_NUM_WORDS);\n        copy_private_u32_array_global_u32(&r[r_offset + CHUNK_OFFSET_01_NUM_WORDS_BIG_ENDIAN_Y],      y_bigEndian_local, CHUNK_SIZE_01_NUM_WORDS_BIG_ENDIAN_Y);\n\n        // === Hash uncompressed key ===\n        get_sec_bytes_uncompressed(x_bigEndian_local, y_bigEndian_local, sec_uncompressed);\n        build_sha256_block_from_uncompressed_pubkey(sec_uncompressed, sha256_input_uncompressed);\n        sha256_init(&sha_ctx_uncompressed);\n        sha256_update(&sha_ctx_uncompressed, sha256_input_uncompressed, SHA256_INPUT_TOTAL_BYTES_UNCOMPRESSED);\n\n        build_ripemd160_block_from_sha256(sha_ctx_uncompressed.h, ripemd160_input_uncompressed);\n        ripemd160_init(&ripemd_ctx_uncompressed);\n        ripemd160_update_swap(&ripemd_ctx_uncompressed, ripemd160_input_uncompressed, RIPEMD160_INPUT_BLOCK_SIZE_BYTES);\n\n        copy_private_u32_array_global_u32(&r[r_offset + CHUNK_OFFSET_10_NUM_WORDS_RIPEMD160_UNCOMPRESSED], ripemd_ctx_uncompressed.h, RIPEMD160_HASH_NUM_WORDS);\n\n        // === Hash compressed key ===\n        #ifdef REUSE_FOR_COMPRESSED\n            transform_sec_prefix_from_uncompressed_to_compressed(sec_compressed);\n        #else\n            get_sec_bytes_compressed(x_bigEndian_local, y_bigEndian_local, sec_compressed);\n        #endif\n        build_sha256_block_from_compressed_pubkey(sec_compressed, sha256_input_compressed);\n        sha256_init(&sha_ctx_compressed);\n        sha256_update(&sha_ctx_compressed, sha256_input_compressed, SHA256_INPUT_TOTAL_BYTES_COMPRESSED);\n\n        build_ripemd160_block_from_sha256(sha_ctx_compressed.h, ripemd160_input_compressed);\n        ripemd160_init(&ripemd_ctx_compressed);\n        ripemd160_update_swap(&ripemd_ctx_compressed, ripemd160_input_compressed, RIPEMD160_INPUT_BLOCK_SIZE_BYTES);\n\n        copy_private_u32_array_global_u32(&r[r_offset + CHUNK_OFFSET_11_NUM_WORDS_RIPEMD160_COMPRESSED], ripemd_ctx_compressed.h, RIPEMD160_HASH_NUM_WORDS);\n    }\n}\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/chinese_simplified.txt",
    "content": "的\n一\n是\n在\n不\n了\n有\n和\n人\n这\n中\n大\n为\n上\n个\n国\n我\n以\n要\n他\n时\n来\n用\n们\n生\n到\n作\n地\n于\n出\n就\n分\n对\n成\n会\n可\n主\n发\n年\n动\n同\n工\n也\n能\n下\n过\n子\n说\n产\n种\n面\n而\n方\n后\n多\n定\n行\n学\n法\n所\n民\n得\n经\n十\n三\n之\n进\n着\n等\n部\n度\n家\n电\n力\n里\n如\n水\n化\n高\n自\n二\n理\n起\n小\n物\n现\n实\n加\n量\n都\n两\n体\n制\n机\n当\n使\n点\n从\n业\n本\n去\n把\n性\n好\n应\n开\n它\n合\n还\n因\n由\n其\n些\n然\n前\n外\n天\n政\n四\n日\n那\n社\n义\n事\n平\n形\n相\n全\n表\n间\n样\n与\n关\n各\n重\n新\n线\n内\n数\n正\n心\n反\n你\n明\n看\n原\n又\n么\n利\n比\n或\n但\n质\n气\n第\n向\n道\n命\n此\n变\n条\n只\n没\n结\n解\n问\n意\n建\n月\n公\n无\n系\n军\n很\n情\n者\n最\n立\n代\n想\n已\n通\n并\n提\n直\n题\n党\n程\n展\n五\n果\n料\n象\n员\n革\n位\n入\n常\n文\n总\n次\n品\n式\n活\n设\n及\n管\n特\n件\n长\n求\n老\n头\n基\n资\n边\n流\n路\n级\n少\n图\n山\n统\n接\n知\n较\n将\n组\n见\n计\n别\n她\n手\n角\n期\n根\n论\n运\n农\n指\n几\n九\n区\n强\n放\n决\n西\n被\n干\n做\n必\n战\n先\n回\n则\n任\n取\n据\n处\n队\n南\n给\n色\n光\n门\n即\n保\n治\n北\n造\n百\n规\n热\n领\n七\n海\n口\n东\n导\n器\n压\n志\n世\n金\n增\n争\n济\n阶\n油\n思\n术\n极\n交\n受\n联\n什\n认\n六\n共\n权\n收\n证\n改\n清\n美\n再\n采\n转\n更\n单\n风\n切\n打\n白\n教\n速\n花\n带\n安\n场\n身\n车\n例\n真\n务\n具\n万\n每\n目\n至\n达\n走\n积\n示\n议\n声\n报\n斗\n完\n类\n八\n离\n华\n名\n确\n才\n科\n张\n信\n马\n节\n话\n米\n整\n空\n元\n况\n今\n集\n温\n传\n土\n许\n步\n群\n广\n石\n记\n需\n段\n研\n界\n拉\n林\n律\n叫\n且\n究\n观\n越\n织\n装\n影\n算\n低\n持\n音\n众\n书\n布\n复\n容\n儿\n须\n际\n商\n非\n验\n连\n断\n深\n难\n近\n矿\n千\n周\n委\n素\n技\n备\n半\n办\n青\n省\n列\n习\n响\n约\n支\n般\n史\n感\n劳\n便\n团\n往\n酸\n历\n市\n克\n何\n除\n消\n构\n府\n称\n太\n准\n精\n值\n号\n率\n族\n维\n划\n选\n标\n写\n存\n候\n毛\n亲\n快\n效\n斯\n院\n查\n江\n型\n眼\n王\n按\n格\n养\n易\n置\n派\n层\n片\n始\n却\n专\n状\n育\n厂\n京\n识\n适\n属\n圆\n包\n火\n住\n调\n满\n县\n局\n照\n参\n红\n细\n引\n听\n该\n铁\n价\n严\n首\n底\n液\n官\n德\n随\n病\n苏\n失\n尔\n死\n讲\n配\n女\n黄\n推\n显\n谈\n罪\n神\n艺\n呢\n席\n含\n企\n望\n密\n批\n营\n项\n防\n举\n球\n英\n氧\n势\n告\n李\n台\n落\n木\n帮\n轮\n破\n亚\n师\n围\n注\n远\n字\n材\n排\n供\n河\n态\n封\n另\n施\n减\n树\n溶\n怎\n止\n案\n言\n士\n均\n武\n固\n叶\n鱼\n波\n视\n仅\n费\n紧\n爱\n左\n章\n早\n朝\n害\n续\n轻\n服\n试\n食\n充\n兵\n源\n判\n护\n司\n足\n某\n练\n差\n致\n板\n田\n降\n黑\n犯\n负\n击\n范\n继\n兴\n似\n余\n坚\n曲\n输\n修\n故\n城\n夫\n够\n送\n笔\n船\n占\n右\n财\n吃\n富\n春\n职\n觉\n汉\n画\n功\n巴\n跟\n虽\n杂\n飞\n检\n吸\n助\n升\n阳\n互\n初\n创\n抗\n考\n投\n坏\n策\n古\n径\n换\n未\n跑\n留\n钢\n曾\n端\n责\n站\n简\n述\n钱\n副\n尽\n帝\n射\n草\n冲\n承\n独\n令\n限\n阿\n宣\n环\n双\n请\n超\n微\n让\n控\n州\n良\n轴\n找\n否\n纪\n益\n依\n优\n顶\n础\n载\n倒\n房\n突\n坐\n粉\n敌\n略\n客\n袁\n冷\n胜\n绝\n析\n块\n剂\n测\n丝\n协\n诉\n念\n陈\n仍\n罗\n盐\n友\n洋\n错\n苦\n夜\n刑\n移\n频\n逐\n靠\n混\n母\n短\n皮\n终\n聚\n汽\n村\n云\n哪\n既\n距\n卫\n停\n烈\n央\n察\n烧\n迅\n境\n若\n印\n洲\n刻\n括\n激\n孔\n搞\n甚\n室\n待\n核\n校\n散\n侵\n吧\n甲\n游\n久\n菜\n味\n旧\n模\n湖\n货\n损\n预\n阻\n毫\n普\n稳\n乙\n妈\n植\n息\n扩\n银\n语\n挥\n酒\n守\n拿\n序\n纸\n医\n缺\n雨\n吗\n针\n刘\n啊\n急\n唱\n误\n训\n愿\n审\n附\n获\n茶\n鲜\n粮\n斤\n孩\n脱\n硫\n肥\n善\n龙\n演\n父\n渐\n血\n欢\n械\n掌\n歌\n沙\n刚\n攻\n谓\n盾\n讨\n晚\n粒\n乱\n燃\n矛\n乎\n杀\n药\n宁\n鲁\n贵\n钟\n煤\n读\n班\n伯\n香\n介\n迫\n句\n丰\n培\n握\n兰\n担\n弦\n蛋\n沉\n假\n穿\n执\n答\n乐\n谁\n顺\n烟\n缩\n征\n脸\n喜\n松\n脚\n困\n异\n免\n背\n星\n福\n买\n染\n井\n概\n慢\n怕\n磁\n倍\n祖\n皇\n促\n静\n补\n评\n翻\n肉\n践\n尼\n衣\n宽\n扬\n棉\n希\n伤\n操\n垂\n秋\n宜\n氢\n套\n督\n振\n架\n亮\n末\n宪\n庆\n编\n牛\n触\n映\n雷\n销\n诗\n座\n居\n抓\n裂\n胞\n呼\n娘\n景\n威\n绿\n晶\n厚\n盟\n衡\n鸡\n孙\n延\n危\n胶\n屋\n乡\n临\n陆\n顾\n掉\n呀\n灯\n岁\n措\n束\n耐\n剧\n玉\n赵\n跳\n哥\n季\n课\n凯\n胡\n额\n款\n绍\n卷\n齐\n伟\n蒸\n殖\n永\n宗\n苗\n川\n炉\n岩\n弱\n零\n杨\n奏\n沿\n露\n杆\n探\n滑\n镇\n饭\n浓\n航\n怀\n赶\n库\n夺\n伊\n灵\n税\n途\n灭\n赛\n归\n召\n鼓\n播\n盘\n裁\n险\n康\n唯\n录\n菌\n纯\n借\n糖\n盖\n横\n符\n私\n努\n堂\n域\n枪\n润\n幅\n哈\n竟\n熟\n虫\n泽\n脑\n壤\n碳\n欧\n遍\n侧\n寨\n敢\n彻\n虑\n斜\n薄\n庭\n纳\n弹\n饲\n伸\n折\n麦\n湿\n暗\n荷\n瓦\n塞\n床\n筑\n恶\n户\n访\n塔\n奇\n透\n梁\n刀\n旋\n迹\n卡\n氯\n遇\n份\n毒\n泥\n退\n洗\n摆\n灰\n彩\n卖\n耗\n夏\n择\n忙\n铜\n献\n硬\n予\n繁\n圈\n雪\n函\n亦\n抽\n篇\n阵\n阴\n丁\n尺\n追\n堆\n雄\n迎\n泛\n爸\n楼\n避\n谋\n吨\n野\n猪\n旗\n累\n偏\n典\n馆\n索\n秦\n脂\n潮\n爷\n豆\n忽\n托\n惊\n塑\n遗\n愈\n朱\n替\n纤\n粗\n倾\n尚\n痛\n楚\n谢\n奋\n购\n磨\n君\n池\n旁\n碎\n骨\n监\n捕\n弟\n暴\n割\n贯\n殊\n释\n词\n亡\n壁\n顿\n宝\n午\n尘\n闻\n揭\n炮\n残\n冬\n桥\n妇\n警\n综\n招\n吴\n付\n浮\n遭\n徐\n您\n摇\n谷\n赞\n箱\n隔\n订\n男\n吹\n园\n纷\n唐\n败\n宋\n玻\n巨\n耕\n坦\n荣\n闭\n湾\n键\n凡\n驻\n锅\n救\n恩\n剥\n凝\n碱\n齿\n截\n炼\n麻\n纺\n禁\n废\n盛\n版\n缓\n净\n睛\n昌\n婚\n涉\n筒\n嘴\n插\n岸\n朗\n庄\n街\n藏\n姑\n贸\n腐\n奴\n啦\n惯\n乘\n伙\n恢\n匀\n纱\n扎\n辩\n耳\n彪\n臣\n亿\n璃\n抵\n脉\n秀\n萨\n俄\n网\n舞\n店\n喷\n纵\n寸\n汗\n挂\n洪\n贺\n闪\n柬\n爆\n烯\n津\n稻\n墙\n软\n勇\n像\n滚\n厘\n蒙\n芳\n肯\n坡\n柱\n荡\n腿\n仪\n旅\n尾\n轧\n冰\n贡\n登\n黎\n削\n钻\n勒\n逃\n障\n氨\n郭\n峰\n币\n港\n伏\n轨\n亩\n毕\n擦\n莫\n刺\n浪\n秘\n援\n株\n健\n售\n股\n岛\n甘\n泡\n睡\n童\n铸\n汤\n阀\n休\n汇\n舍\n牧\n绕\n炸\n哲\n磷\n绩\n朋\n淡\n尖\n启\n陷\n柴\n呈\n徒\n颜\n泪\n稍\n忘\n泵\n蓝\n拖\n洞\n授\n镜\n辛\n壮\n锋\n贫\n虚\n弯\n摩\n泰\n幼\n廷\n尊\n窗\n纲\n弄\n隶\n疑\n氏\n宫\n姐\n震\n瑞\n怪\n尤\n琴\n循\n描\n膜\n违\n夹\n腰\n缘\n珠\n穷\n森\n枝\n竹\n沟\n催\n绳\n忆\n邦\n剩\n幸\n浆\n栏\n拥\n牙\n贮\n礼\n滤\n钠\n纹\n罢\n拍\n咱\n喊\n袖\n埃\n勤\n罚\n焦\n潜\n伍\n墨\n欲\n缝\n姓\n刊\n饱\n仿\n奖\n铝\n鬼\n丽\n跨\n默\n挖\n链\n扫\n喝\n袋\n炭\n污\n幕\n诸\n弧\n励\n梅\n奶\n洁\n灾\n舟\n鉴\n苯\n讼\n抱\n毁\n懂\n寒\n智\n埔\n寄\n届\n跃\n渡\n挑\n丹\n艰\n贝\n碰\n拔\n爹\n戴\n码\n梦\n芽\n熔\n赤\n渔\n哭\n敬\n颗\n奔\n铅\n仲\n虎\n稀\n妹\n乏\n珍\n申\n桌\n遵\n允\n隆\n螺\n仓\n魏\n锐\n晓\n氮\n兼\n隐\n碍\n赫\n拨\n忠\n肃\n缸\n牵\n抢\n博\n巧\n壳\n兄\n杜\n讯\n诚\n碧\n祥\n柯\n页\n巡\n矩\n悲\n灌\n龄\n伦\n票\n寻\n桂\n铺\n圣\n恐\n恰\n郑\n趣\n抬\n荒\n腾\n贴\n柔\n滴\n猛\n阔\n辆\n妻\n填\n撤\n储\n签\n闹\n扰\n紫\n砂\n递\n戏\n吊\n陶\n伐\n喂\n疗\n瓶\n婆\n抚\n臂\n摸\n忍\n虾\n蜡\n邻\n胸\n巩\n挤\n偶\n弃\n槽\n劲\n乳\n邓\n吉\n仁\n烂\n砖\n租\n乌\n舰\n伴\n瓜\n浅\n丙\n暂\n燥\n橡\n柳\n迷\n暖\n牌\n秧\n胆\n详\n簧\n踏\n瓷\n谱\n呆\n宾\n糊\n洛\n辉\n愤\n竞\n隙\n怒\n粘\n乃\n绪\n肩\n籍\n敏\n涂\n熙\n皆\n侦\n悬\n掘\n享\n纠\n醒\n狂\n锁\n淀\n恨\n牲\n霸\n爬\n赏\n逆\n玩\n陵\n祝\n秒\n浙\n貌\n役\n彼\n悉\n鸭\n趋\n凤\n晨\n畜\n辈\n秩\n卵\n署\n梯\n炎\n滩\n棋\n驱\n筛\n峡\n冒\n啥\n寿\n译\n浸\n泉\n帽\n迟\n硅\n疆\n贷\n漏\n稿\n冠\n嫩\n胁\n芯\n牢\n叛\n蚀\n奥\n鸣\n岭\n羊\n凭\n串\n塘\n绘\n酵\n融\n盆\n锡\n庙\n筹\n冻\n辅\n摄\n袭\n筋\n拒\n僚\n旱\n钾\n鸟\n漆\n沈\n眉\n疏\n添\n棒\n穗\n硝\n韩\n逼\n扭\n侨\n凉\n挺\n碗\n栽\n炒\n杯\n患\n馏\n劝\n豪\n辽\n勃\n鸿\n旦\n吏\n拜\n狗\n埋\n辊\n掩\n饮\n搬\n骂\n辞\n勾\n扣\n估\n蒋\n绒\n雾\n丈\n朵\n姆\n拟\n宇\n辑\n陕\n雕\n偿\n蓄\n崇\n剪\n倡\n厅\n咬\n驶\n薯\n刷\n斥\n番\n赋\n奉\n佛\n浇\n漫\n曼\n扇\n钙\n桃\n扶\n仔\n返\n俗\n亏\n腔\n鞋\n棱\n覆\n框\n悄\n叔\n撞\n骗\n勘\n旺\n沸\n孤\n吐\n孟\n渠\n屈\n疾\n妙\n惜\n仰\n狠\n胀\n谐\n抛\n霉\n桑\n岗\n嘛\n衰\n盗\n渗\n脏\n赖\n涌\n甜\n曹\n阅\n肌\n哩\n厉\n烃\n纬\n毅\n昨\n伪\n症\n煮\n叹\n钉\n搭\n茎\n笼\n酷\n偷\n弓\n锥\n恒\n杰\n坑\n鼻\n翼\n纶\n叙\n狱\n逮\n罐\n络\n棚\n抑\n膨\n蔬\n寺\n骤\n穆\n冶\n枯\n册\n尸\n凸\n绅\n坯\n牺\n焰\n轰\n欣\n晋\n瘦\n御\n锭\n锦\n丧\n旬\n锻\n垄\n搜\n扑\n邀\n亭\n酯\n迈\n舒\n脆\n酶\n闲\n忧\n酚\n顽\n羽\n涨\n卸\n仗\n陪\n辟\n惩\n杭\n姚\n肚\n捉\n飘\n漂\n昆\n欺\n吾\n郎\n烷\n汁\n呵\n饰\n萧\n雅\n邮\n迁\n燕\n撒\n姻\n赴\n宴\n烦\n债\n帐\n斑\n铃\n旨\n醇\n董\n饼\n雏\n姿\n拌\n傅\n腹\n妥\n揉\n贤\n拆\n歪\n葡\n胺\n丢\n浩\n徽\n昂\n垫\n挡\n览\n贪\n慰\n缴\n汪\n慌\n冯\n诺\n姜\n谊\n凶\n劣\n诬\n耀\n昏\n躺\n盈\n骑\n乔\n溪\n丛\n卢\n抹\n闷\n咨\n刮\n驾\n缆\n悟\n摘\n铒\n掷\n颇\n幻\n柄\n惠\n惨\n佳\n仇\n腊\n窝\n涤\n剑\n瞧\n堡\n泼\n葱\n罩\n霍\n捞\n胎\n苍\n滨\n俩\n捅\n湘\n砍\n霞\n邵\n萄\n疯\n淮\n遂\n熊\n粪\n烘\n宿\n档\n戈\n驳\n嫂\n裕\n徙\n箭\n捐\n肠\n撑\n晒\n辨\n殿\n莲\n摊\n搅\n酱\n屏\n疫\n哀\n蔡\n堵\n沫\n皱\n畅\n叠\n阁\n莱\n敲\n辖\n钩\n痕\n坝\n巷\n饿\n祸\n丘\n玄\n溜\n曰\n逻\n彭\n尝\n卿\n妨\n艇\n吞\n韦\n怨\n矮\n歇\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/chinese_traditional.txt",
    "content": "的\n一\n是\n在\n不\n了\n有\n和\n人\n這\n中\n大\n為\n上\n個\n國\n我\n以\n要\n他\n時\n來\n用\n們\n生\n到\n作\n地\n於\n出\n就\n分\n對\n成\n會\n可\n主\n發\n年\n動\n同\n工\n也\n能\n下\n過\n子\n說\n產\n種\n面\n而\n方\n後\n多\n定\n行\n學\n法\n所\n民\n得\n經\n十\n三\n之\n進\n著\n等\n部\n度\n家\n電\n力\n裡\n如\n水\n化\n高\n自\n二\n理\n起\n小\n物\n現\n實\n加\n量\n都\n兩\n體\n制\n機\n當\n使\n點\n從\n業\n本\n去\n把\n性\n好\n應\n開\n它\n合\n還\n因\n由\n其\n些\n然\n前\n外\n天\n政\n四\n日\n那\n社\n義\n事\n平\n形\n相\n全\n表\n間\n樣\n與\n關\n各\n重\n新\n線\n內\n數\n正\n心\n反\n你\n明\n看\n原\n又\n麼\n利\n比\n或\n但\n質\n氣\n第\n向\n道\n命\n此\n變\n條\n只\n沒\n結\n解\n問\n意\n建\n月\n公\n無\n系\n軍\n很\n情\n者\n最\n立\n代\n想\n已\n通\n並\n提\n直\n題\n黨\n程\n展\n五\n果\n料\n象\n員\n革\n位\n入\n常\n文\n總\n次\n品\n式\n活\n設\n及\n管\n特\n件\n長\n求\n老\n頭\n基\n資\n邊\n流\n路\n級\n少\n圖\n山\n統\n接\n知\n較\n將\n組\n見\n計\n別\n她\n手\n角\n期\n根\n論\n運\n農\n指\n幾\n九\n區\n強\n放\n決\n西\n被\n幹\n做\n必\n戰\n先\n回\n則\n任\n取\n據\n處\n隊\n南\n給\n色\n光\n門\n即\n保\n治\n北\n造\n百\n規\n熱\n領\n七\n海\n口\n東\n導\n器\n壓\n志\n世\n金\n增\n爭\n濟\n階\n油\n思\n術\n極\n交\n受\n聯\n什\n認\n六\n共\n權\n收\n證\n改\n清\n美\n再\n採\n轉\n更\n單\n風\n切\n打\n白\n教\n速\n花\n帶\n安\n場\n身\n車\n例\n真\n務\n具\n萬\n每\n目\n至\n達\n走\n積\n示\n議\n聲\n報\n鬥\n完\n類\n八\n離\n華\n名\n確\n才\n科\n張\n信\n馬\n節\n話\n米\n整\n空\n元\n況\n今\n集\n溫\n傳\n土\n許\n步\n群\n廣\n石\n記\n需\n段\n研\n界\n拉\n林\n律\n叫\n且\n究\n觀\n越\n織\n裝\n影\n算\n低\n持\n音\n眾\n書\n布\n复\n容\n兒\n須\n際\n商\n非\n驗\n連\n斷\n深\n難\n近\n礦\n千\n週\n委\n素\n技\n備\n半\n辦\n青\n省\n列\n習\n響\n約\n支\n般\n史\n感\n勞\n便\n團\n往\n酸\n歷\n市\n克\n何\n除\n消\n構\n府\n稱\n太\n準\n精\n值\n號\n率\n族\n維\n劃\n選\n標\n寫\n存\n候\n毛\n親\n快\n效\n斯\n院\n查\n江\n型\n眼\n王\n按\n格\n養\n易\n置\n派\n層\n片\n始\n卻\n專\n狀\n育\n廠\n京\n識\n適\n屬\n圓\n包\n火\n住\n調\n滿\n縣\n局\n照\n參\n紅\n細\n引\n聽\n該\n鐵\n價\n嚴\n首\n底\n液\n官\n德\n隨\n病\n蘇\n失\n爾\n死\n講\n配\n女\n黃\n推\n顯\n談\n罪\n神\n藝\n呢\n席\n含\n企\n望\n密\n批\n營\n項\n防\n舉\n球\n英\n氧\n勢\n告\n李\n台\n落\n木\n幫\n輪\n破\n亞\n師\n圍\n注\n遠\n字\n材\n排\n供\n河\n態\n封\n另\n施\n減\n樹\n溶\n怎\n止\n案\n言\n士\n均\n武\n固\n葉\n魚\n波\n視\n僅\n費\n緊\n愛\n左\n章\n早\n朝\n害\n續\n輕\n服\n試\n食\n充\n兵\n源\n判\n護\n司\n足\n某\n練\n差\n致\n板\n田\n降\n黑\n犯\n負\n擊\n范\n繼\n興\n似\n餘\n堅\n曲\n輸\n修\n故\n城\n夫\n夠\n送\n筆\n船\n佔\n右\n財\n吃\n富\n春\n職\n覺\n漢\n畫\n功\n巴\n跟\n雖\n雜\n飛\n檢\n吸\n助\n昇\n陽\n互\n初\n創\n抗\n考\n投\n壞\n策\n古\n徑\n換\n未\n跑\n留\n鋼\n曾\n端\n責\n站\n簡\n述\n錢\n副\n盡\n帝\n射\n草\n衝\n承\n獨\n令\n限\n阿\n宣\n環\n雙\n請\n超\n微\n讓\n控\n州\n良\n軸\n找\n否\n紀\n益\n依\n優\n頂\n礎\n載\n倒\n房\n突\n坐\n粉\n敵\n略\n客\n袁\n冷\n勝\n絕\n析\n塊\n劑\n測\n絲\n協\n訴\n念\n陳\n仍\n羅\n鹽\n友\n洋\n錯\n苦\n夜\n刑\n移\n頻\n逐\n靠\n混\n母\n短\n皮\n終\n聚\n汽\n村\n雲\n哪\n既\n距\n衛\n停\n烈\n央\n察\n燒\n迅\n境\n若\n印\n洲\n刻\n括\n激\n孔\n搞\n甚\n室\n待\n核\n校\n散\n侵\n吧\n甲\n遊\n久\n菜\n味\n舊\n模\n湖\n貨\n損\n預\n阻\n毫\n普\n穩\n乙\n媽\n植\n息\n擴\n銀\n語\n揮\n酒\n守\n拿\n序\n紙\n醫\n缺\n雨\n嗎\n針\n劉\n啊\n急\n唱\n誤\n訓\n願\n審\n附\n獲\n茶\n鮮\n糧\n斤\n孩\n脫\n硫\n肥\n善\n龍\n演\n父\n漸\n血\n歡\n械\n掌\n歌\n沙\n剛\n攻\n謂\n盾\n討\n晚\n粒\n亂\n燃\n矛\n乎\n殺\n藥\n寧\n魯\n貴\n鐘\n煤\n讀\n班\n伯\n香\n介\n迫\n句\n豐\n培\n握\n蘭\n擔\n弦\n蛋\n沉\n假\n穿\n執\n答\n樂\n誰\n順\n煙\n縮\n徵\n臉\n喜\n松\n腳\n困\n異\n免\n背\n星\n福\n買\n染\n井\n概\n慢\n怕\n磁\n倍\n祖\n皇\n促\n靜\n補\n評\n翻\n肉\n踐\n尼\n衣\n寬\n揚\n棉\n希\n傷\n操\n垂\n秋\n宜\n氫\n套\n督\n振\n架\n亮\n末\n憲\n慶\n編\n牛\n觸\n映\n雷\n銷\n詩\n座\n居\n抓\n裂\n胞\n呼\n娘\n景\n威\n綠\n晶\n厚\n盟\n衡\n雞\n孫\n延\n危\n膠\n屋\n鄉\n臨\n陸\n顧\n掉\n呀\n燈\n歲\n措\n束\n耐\n劇\n玉\n趙\n跳\n哥\n季\n課\n凱\n胡\n額\n款\n紹\n卷\n齊\n偉\n蒸\n殖\n永\n宗\n苗\n川\n爐\n岩\n弱\n零\n楊\n奏\n沿\n露\n桿\n探\n滑\n鎮\n飯\n濃\n航\n懷\n趕\n庫\n奪\n伊\n靈\n稅\n途\n滅\n賽\n歸\n召\n鼓\n播\n盤\n裁\n險\n康\n唯\n錄\n菌\n純\n借\n糖\n蓋\n橫\n符\n私\n努\n堂\n域\n槍\n潤\n幅\n哈\n竟\n熟\n蟲\n澤\n腦\n壤\n碳\n歐\n遍\n側\n寨\n敢\n徹\n慮\n斜\n薄\n庭\n納\n彈\n飼\n伸\n折\n麥\n濕\n暗\n荷\n瓦\n塞\n床\n築\n惡\n戶\n訪\n塔\n奇\n透\n梁\n刀\n旋\n跡\n卡\n氯\n遇\n份\n毒\n泥\n退\n洗\n擺\n灰\n彩\n賣\n耗\n夏\n擇\n忙\n銅\n獻\n硬\n予\n繁\n圈\n雪\n函\n亦\n抽\n篇\n陣\n陰\n丁\n尺\n追\n堆\n雄\n迎\n泛\n爸\n樓\n避\n謀\n噸\n野\n豬\n旗\n累\n偏\n典\n館\n索\n秦\n脂\n潮\n爺\n豆\n忽\n托\n驚\n塑\n遺\n愈\n朱\n替\n纖\n粗\n傾\n尚\n痛\n楚\n謝\n奮\n購\n磨\n君\n池\n旁\n碎\n骨\n監\n捕\n弟\n暴\n割\n貫\n殊\n釋\n詞\n亡\n壁\n頓\n寶\n午\n塵\n聞\n揭\n炮\n殘\n冬\n橋\n婦\n警\n綜\n招\n吳\n付\n浮\n遭\n徐\n您\n搖\n谷\n贊\n箱\n隔\n訂\n男\n吹\n園\n紛\n唐\n敗\n宋\n玻\n巨\n耕\n坦\n榮\n閉\n灣\n鍵\n凡\n駐\n鍋\n救\n恩\n剝\n凝\n鹼\n齒\n截\n煉\n麻\n紡\n禁\n廢\n盛\n版\n緩\n淨\n睛\n昌\n婚\n涉\n筒\n嘴\n插\n岸\n朗\n莊\n街\n藏\n姑\n貿\n腐\n奴\n啦\n慣\n乘\n夥\n恢\n勻\n紗\n扎\n辯\n耳\n彪\n臣\n億\n璃\n抵\n脈\n秀\n薩\n俄\n網\n舞\n店\n噴\n縱\n寸\n汗\n掛\n洪\n賀\n閃\n柬\n爆\n烯\n津\n稻\n牆\n軟\n勇\n像\n滾\n厘\n蒙\n芳\n肯\n坡\n柱\n盪\n腿\n儀\n旅\n尾\n軋\n冰\n貢\n登\n黎\n削\n鑽\n勒\n逃\n障\n氨\n郭\n峰\n幣\n港\n伏\n軌\n畝\n畢\n擦\n莫\n刺\n浪\n秘\n援\n株\n健\n售\n股\n島\n甘\n泡\n睡\n童\n鑄\n湯\n閥\n休\n匯\n舍\n牧\n繞\n炸\n哲\n磷\n績\n朋\n淡\n尖\n啟\n陷\n柴\n呈\n徒\n顏\n淚\n稍\n忘\n泵\n藍\n拖\n洞\n授\n鏡\n辛\n壯\n鋒\n貧\n虛\n彎\n摩\n泰\n幼\n廷\n尊\n窗\n綱\n弄\n隸\n疑\n氏\n宮\n姐\n震\n瑞\n怪\n尤\n琴\n循\n描\n膜\n違\n夾\n腰\n緣\n珠\n窮\n森\n枝\n竹\n溝\n催\n繩\n憶\n邦\n剩\n幸\n漿\n欄\n擁\n牙\n貯\n禮\n濾\n鈉\n紋\n罷\n拍\n咱\n喊\n袖\n埃\n勤\n罰\n焦\n潛\n伍\n墨\n欲\n縫\n姓\n刊\n飽\n仿\n獎\n鋁\n鬼\n麗\n跨\n默\n挖\n鏈\n掃\n喝\n袋\n炭\n污\n幕\n諸\n弧\n勵\n梅\n奶\n潔\n災\n舟\n鑑\n苯\n訟\n抱\n毀\n懂\n寒\n智\n埔\n寄\n屆\n躍\n渡\n挑\n丹\n艱\n貝\n碰\n拔\n爹\n戴\n碼\n夢\n芽\n熔\n赤\n漁\n哭\n敬\n顆\n奔\n鉛\n仲\n虎\n稀\n妹\n乏\n珍\n申\n桌\n遵\n允\n隆\n螺\n倉\n魏\n銳\n曉\n氮\n兼\n隱\n礙\n赫\n撥\n忠\n肅\n缸\n牽\n搶\n博\n巧\n殼\n兄\n杜\n訊\n誠\n碧\n祥\n柯\n頁\n巡\n矩\n悲\n灌\n齡\n倫\n票\n尋\n桂\n鋪\n聖\n恐\n恰\n鄭\n趣\n抬\n荒\n騰\n貼\n柔\n滴\n猛\n闊\n輛\n妻\n填\n撤\n儲\n簽\n鬧\n擾\n紫\n砂\n遞\n戲\n吊\n陶\n伐\n餵\n療\n瓶\n婆\n撫\n臂\n摸\n忍\n蝦\n蠟\n鄰\n胸\n鞏\n擠\n偶\n棄\n槽\n勁\n乳\n鄧\n吉\n仁\n爛\n磚\n租\n烏\n艦\n伴\n瓜\n淺\n丙\n暫\n燥\n橡\n柳\n迷\n暖\n牌\n秧\n膽\n詳\n簧\n踏\n瓷\n譜\n呆\n賓\n糊\n洛\n輝\n憤\n競\n隙\n怒\n粘\n乃\n緒\n肩\n籍\n敏\n塗\n熙\n皆\n偵\n懸\n掘\n享\n糾\n醒\n狂\n鎖\n淀\n恨\n牲\n霸\n爬\n賞\n逆\n玩\n陵\n祝\n秒\n浙\n貌\n役\n彼\n悉\n鴨\n趨\n鳳\n晨\n畜\n輩\n秩\n卵\n署\n梯\n炎\n灘\n棋\n驅\n篩\n峽\n冒\n啥\n壽\n譯\n浸\n泉\n帽\n遲\n矽\n疆\n貸\n漏\n稿\n冠\n嫩\n脅\n芯\n牢\n叛\n蝕\n奧\n鳴\n嶺\n羊\n憑\n串\n塘\n繪\n酵\n融\n盆\n錫\n廟\n籌\n凍\n輔\n攝\n襲\n筋\n拒\n僚\n旱\n鉀\n鳥\n漆\n沈\n眉\n疏\n添\n棒\n穗\n硝\n韓\n逼\n扭\n僑\n涼\n挺\n碗\n栽\n炒\n杯\n患\n餾\n勸\n豪\n遼\n勃\n鴻\n旦\n吏\n拜\n狗\n埋\n輥\n掩\n飲\n搬\n罵\n辭\n勾\n扣\n估\n蔣\n絨\n霧\n丈\n朵\n姆\n擬\n宇\n輯\n陝\n雕\n償\n蓄\n崇\n剪\n倡\n廳\n咬\n駛\n薯\n刷\n斥\n番\n賦\n奉\n佛\n澆\n漫\n曼\n扇\n鈣\n桃\n扶\n仔\n返\n俗\n虧\n腔\n鞋\n棱\n覆\n框\n悄\n叔\n撞\n騙\n勘\n旺\n沸\n孤\n吐\n孟\n渠\n屈\n疾\n妙\n惜\n仰\n狠\n脹\n諧\n拋\n黴\n桑\n崗\n嘛\n衰\n盜\n滲\n臟\n賴\n湧\n甜\n曹\n閱\n肌\n哩\n厲\n烴\n緯\n毅\n昨\n偽\n症\n煮\n嘆\n釘\n搭\n莖\n籠\n酷\n偷\n弓\n錐\n恆\n傑\n坑\n鼻\n翼\n綸\n敘\n獄\n逮\n罐\n絡\n棚\n抑\n膨\n蔬\n寺\n驟\n穆\n冶\n枯\n冊\n屍\n凸\n紳\n坯\n犧\n焰\n轟\n欣\n晉\n瘦\n禦\n錠\n錦\n喪\n旬\n鍛\n壟\n搜\n撲\n邀\n亭\n酯\n邁\n舒\n脆\n酶\n閒\n憂\n酚\n頑\n羽\n漲\n卸\n仗\n陪\n闢\n懲\n杭\n姚\n肚\n捉\n飄\n漂\n昆\n欺\n吾\n郎\n烷\n汁\n呵\n飾\n蕭\n雅\n郵\n遷\n燕\n撒\n姻\n赴\n宴\n煩\n債\n帳\n斑\n鈴\n旨\n醇\n董\n餅\n雛\n姿\n拌\n傅\n腹\n妥\n揉\n賢\n拆\n歪\n葡\n胺\n丟\n浩\n徽\n昂\n墊\n擋\n覽\n貪\n慰\n繳\n汪\n慌\n馮\n諾\n姜\n誼\n兇\n劣\n誣\n耀\n昏\n躺\n盈\n騎\n喬\n溪\n叢\n盧\n抹\n悶\n諮\n刮\n駕\n纜\n悟\n摘\n鉺\n擲\n頗\n幻\n柄\n惠\n慘\n佳\n仇\n臘\n窩\n滌\n劍\n瞧\n堡\n潑\n蔥\n罩\n霍\n撈\n胎\n蒼\n濱\n倆\n捅\n湘\n砍\n霞\n邵\n萄\n瘋\n淮\n遂\n熊\n糞\n烘\n宿\n檔\n戈\n駁\n嫂\n裕\n徙\n箭\n捐\n腸\n撐\n曬\n辨\n殿\n蓮\n攤\n攪\n醬\n屏\n疫\n哀\n蔡\n堵\n沫\n皺\n暢\n疊\n閣\n萊\n敲\n轄\n鉤\n痕\n壩\n巷\n餓\n禍\n丘\n玄\n溜\n曰\n邏\n彭\n嘗\n卿\n妨\n艇\n吞\n韋\n怨\n矮\n歇\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/czech.txt",
    "content": "abdikace\nabeceda\nadresa\nagrese\nakce\naktovka\nalej\nalkohol\namputace\nananas\nandulka\nanekdota\nanketa\nantika\nanulovat\narcha\narogance\nasfalt\nasistent\naspirace\nastma\nastronom\natlas\natletika\natol\nautobus\nazyl\nbabka\nbachor\nbacil\nbaculka\nbadatel\nbageta\nbagr\nbahno\nbakterie\nbalada\nbaletka\nbalkon\nbalonek\nbalvan\nbalza\nbambus\nbankomat\nbarbar\nbaret\nbarman\nbaroko\nbarva\nbaterka\nbatoh\nbavlna\nbazalka\nbazilika\nbazuka\nbedna\nberan\nbeseda\nbestie\nbeton\nbezinka\nbezmoc\nbeztak\nbicykl\nbidlo\nbiftek\nbikiny\nbilance\nbiograf\nbiolog\nbitva\nbizon\nblahobyt\nblatouch\nblecha\nbledule\nblesk\nblikat\nblizna\nblokovat\nbloudit\nblud\nbobek\nbobr\nbodlina\nbodnout\nbohatost\nbojkot\nbojovat\nbokorys\nbolest\nborec\nborovice\nbota\nboubel\nbouchat\nbouda\nboule\nbourat\nboxer\nbradavka\nbrambora\nbranka\nbratr\nbrepta\nbriketa\nbrko\nbrloh\nbronz\nbroskev\nbrunetka\nbrusinka\nbrzda\nbrzy\nbublina\nbubnovat\nbuchta\nbuditel\nbudka\nbudova\nbufet\nbujarost\nbukvice\nbuldok\nbulva\nbunda\nbunkr\nburza\nbutik\nbuvol\nbuzola\nbydlet\nbylina\nbytovka\nbzukot\ncapart\ncarevna\ncedr\ncedule\ncejch\ncejn\ncela\nceler\ncelkem\ncelnice\ncenina\ncennost\ncenovka\ncentrum\ncenzor\ncestopis\ncetka\nchalupa\nchapadlo\ncharita\nchata\nchechtat\nchemie\nchichot\nchirurg\nchlad\nchleba\nchlubit\nchmel\nchmura\nchobot\nchochol\nchodba\ncholera\nchomout\nchopit\nchoroba\nchov\nchrapot\nchrlit\nchrt\nchrup\nchtivost\nchudina\nchutnat\nchvat\nchvilka\nchvost\nchyba\nchystat\nchytit\ncibule\ncigareta\ncihelna\ncihla\ncinkot\ncirkus\ncisterna\ncitace\ncitrus\ncizinec\ncizost\nclona\ncokoliv\ncouvat\nctitel\nctnost\ncudnost\ncuketa\ncukr\ncupot\ncvaknout\ncval\ncvik\ncvrkot\ncyklista\ndaleko\ndareba\ndatel\ndatum\ndcera\ndebata\ndechovka\ndecibel\ndeficit\ndeflace\ndekl\ndekret\ndemokrat\ndeprese\nderby\ndeska\ndetektiv\ndikobraz\ndiktovat\ndioda\ndiplom\ndisk\ndisplej\ndivadlo\ndivoch\ndlaha\ndlouho\ndluhopis\ndnes\ndobro\ndobytek\ndocent\ndochutit\ndodnes\ndohled\ndohoda\ndohra\ndojem\ndojnice\ndoklad\ndokola\ndoktor\ndokument\ndolar\ndoleva\ndolina\ndoma\ndominant\ndomluvit\ndomov\ndonutit\ndopad\ndopis\ndoplnit\ndoposud\ndoprovod\ndopustit\ndorazit\ndorost\ndort\ndosah\ndoslov\ndostatek\ndosud\ndosyta\ndotaz\ndotek\ndotknout\ndoufat\ndoutnat\ndovozce\ndozadu\ndoznat\ndozorce\ndrahota\ndrak\ndramatik\ndravec\ndraze\ndrdol\ndrobnost\ndrogerie\ndrozd\ndrsnost\ndrtit\ndrzost\nduben\nduchovno\ndudek\nduha\nduhovka\ndusit\ndusno\ndutost\ndvojice\ndvorec\ndynamit\nekolog\nekonomie\nelektron\nelipsa\nemail\nemise\nemoce\nempatie\nepizoda\nepocha\nepopej\nepos\nesej\nesence\neskorta\neskymo\netiketa\neuforie\nevoluce\nexekuce\nexkurze\nexpedice\nexploze\nexport\nextrakt\nfacka\nfajfka\nfakulta\nfanatik\nfantazie\nfarmacie\nfavorit\nfazole\nfederace\nfejeton\nfenka\nfialka\nfigurant\nfilozof\nfiltr\nfinance\nfinta\nfixace\nfjord\nflanel\nflirt\nflotila\nfond\nfosfor\nfotbal\nfotka\nfoton\nfrakce\nfreska\nfronta\nfukar\nfunkce\nfyzika\ngaleje\ngarant\ngenetika\ngeolog\ngilotina\nglazura\nglejt\ngolem\ngolfista\ngotika\ngraf\ngramofon\ngranule\ngrep\ngril\ngrog\ngroteska\nguma\nhadice\nhadr\nhala\nhalenka\nhanba\nhanopis\nharfa\nharpuna\nhavran\nhebkost\nhejkal\nhejno\nhejtman\nhektar\nhelma\nhematom\nherec\nherna\nheslo\nhezky\nhistorik\nhladovka\nhlasivky\nhlava\nhledat\nhlen\nhlodavec\nhloh\nhloupost\nhltat\nhlubina\nhluchota\nhmat\nhmota\nhmyz\nhnis\nhnojivo\nhnout\nhoblina\nhoboj\nhoch\nhodiny\nhodlat\nhodnota\nhodovat\nhojnost\nhokej\nholinka\nholka\nholub\nhomole\nhonitba\nhonorace\nhoral\nhorda\nhorizont\nhorko\nhorlivec\nhormon\nhornina\nhoroskop\nhorstvo\nhospoda\nhostina\nhotovost\nhouba\nhouf\nhoupat\nhouska\nhovor\nhradba\nhranice\nhravost\nhrazda\nhrbolek\nhrdina\nhrdlo\nhrdost\nhrnek\nhrobka\nhromada\nhrot\nhrouda\nhrozen\nhrstka\nhrubost\nhryzat\nhubenost\nhubnout\nhudba\nhukot\nhumr\nhusita\nhustota\nhvozd\nhybnost\nhydrant\nhygiena\nhymna\nhysterik\nidylka\nihned\nikona\niluze\nimunita\ninfekce\ninflace\ninkaso\ninovace\ninspekce\ninternet\ninvalida\ninvestor\ninzerce\nironie\njablko\njachta\njahoda\njakmile\njakost\njalovec\njantar\njarmark\njaro\njasan\njasno\njatka\njavor\njazyk\njedinec\njedle\njednatel\njehlan\njekot\njelen\njelito\njemnost\njenom\njepice\njeseter\njevit\njezdec\njezero\njinak\njindy\njinoch\njiskra\njistota\njitrnice\njizva\njmenovat\njogurt\njurta\nkabaret\nkabel\nkabinet\nkachna\nkadet\nkadidlo\nkahan\nkajak\nkajuta\nkakao\nkaktus\nkalamita\nkalhoty\nkalibr\nkalnost\nkamera\nkamkoliv\nkamna\nkanibal\nkanoe\nkantor\nkapalina\nkapela\nkapitola\nkapka\nkaple\nkapota\nkapr\nkapusta\nkapybara\nkaramel\nkarotka\nkarton\nkasa\nkatalog\nkatedra\nkauce\nkauza\nkavalec\nkazajka\nkazeta\nkazivost\nkdekoliv\nkdesi\nkedluben\nkemp\nkeramika\nkino\nklacek\nkladivo\nklam\nklapot\nklasika\nklaun\nklec\nklenba\nklepat\nklesnout\nklid\nklima\nklisna\nklobouk\nklokan\nklopa\nkloub\nklubovna\nklusat\nkluzkost\nkmen\nkmitat\nkmotr\nkniha\nknot\nkoalice\nkoberec\nkobka\nkobliha\nkobyla\nkocour\nkohout\nkojenec\nkokos\nkoktejl\nkolaps\nkoleda\nkolize\nkolo\nkomando\nkometa\nkomik\nkomnata\nkomora\nkompas\nkomunita\nkonat\nkoncept\nkondice\nkonec\nkonfese\nkongres\nkonina\nkonkurs\nkontakt\nkonzerva\nkopanec\nkopie\nkopnout\nkoprovka\nkorbel\nkorektor\nkormidlo\nkoroptev\nkorpus\nkoruna\nkoryto\nkorzet\nkosatec\nkostka\nkotel\nkotleta\nkotoul\nkoukat\nkoupelna\nkousek\nkouzlo\nkovboj\nkoza\nkozoroh\nkrabice\nkrach\nkrajina\nkralovat\nkrasopis\nkravata\nkredit\nkrejcar\nkresba\nkreveta\nkriket\nkritik\nkrize\nkrkavec\nkrmelec\nkrmivo\nkrocan\nkrok\nkronika\nkropit\nkroupa\nkrovka\nkrtek\nkruhadlo\nkrupice\nkrutost\nkrvinka\nkrychle\nkrypta\nkrystal\nkryt\nkudlanka\nkufr\nkujnost\nkukla\nkulajda\nkulich\nkulka\nkulomet\nkultura\nkuna\nkupodivu\nkurt\nkurzor\nkutil\nkvalita\nkvasinka\nkvestor\nkynolog\nkyselina\nkytara\nkytice\nkytka\nkytovec\nkyvadlo\nlabrador\nlachtan\nladnost\nlaik\nlakomec\nlamela\nlampa\nlanovka\nlasice\nlaso\nlastura\nlatinka\nlavina\nlebka\nleckdy\nleden\nlednice\nledovka\nledvina\nlegenda\nlegie\nlegrace\nlehce\nlehkost\nlehnout\nlektvar\nlenochod\nlentilka\nlepenka\nlepidlo\nletadlo\nletec\nletmo\nletokruh\nlevhart\nlevitace\nlevobok\nlibra\nlichotka\nlidojed\nlidskost\nlihovina\nlijavec\nlilek\nlimetka\nlinie\nlinka\nlinoleum\nlistopad\nlitina\nlitovat\nlobista\nlodivod\nlogika\nlogoped\nlokalita\nloket\nlomcovat\nlopata\nlopuch\nlord\nlosos\nlotr\nloudal\nlouh\nlouka\nlouskat\nlovec\nlstivost\nlucerna\nlucifer\nlump\nlusk\nlustrace\nlvice\nlyra\nlyrika\nlysina\nmadam\nmadlo\nmagistr\nmahagon\nmajetek\nmajitel\nmajorita\nmakak\nmakovice\nmakrela\nmalba\nmalina\nmalovat\nmalvice\nmaminka\nmandle\nmanko\nmarnost\nmasakr\nmaskot\nmasopust\nmatice\nmatrika\nmaturita\nmazanec\nmazivo\nmazlit\nmazurka\nmdloba\nmechanik\nmeditace\nmedovina\nmelasa\nmeloun\nmentolka\nmetla\nmetoda\nmetr\nmezera\nmigrace\nmihnout\nmihule\nmikina\nmikrofon\nmilenec\nmilimetr\nmilost\nmimika\nmincovna\nminibar\nminomet\nminulost\nmiska\nmistr\nmixovat\nmladost\nmlha\nmlhovina\nmlok\nmlsat\nmluvit\nmnich\nmnohem\nmobil\nmocnost\nmodelka\nmodlitba\nmohyla\nmokro\nmolekula\nmomentka\nmonarcha\nmonokl\nmonstrum\nmontovat\nmonzun\nmosaz\nmoskyt\nmost\nmotivace\nmotorka\nmotyka\nmoucha\nmoudrost\nmozaika\nmozek\nmozol\nmramor\nmravenec\nmrkev\nmrtvola\nmrzet\nmrzutost\nmstitel\nmudrc\nmuflon\nmulat\nmumie\nmunice\nmuset\nmutace\nmuzeum\nmuzikant\nmyslivec\nmzda\nnabourat\nnachytat\nnadace\nnadbytek\nnadhoz\nnadobro\nnadpis\nnahlas\nnahnat\nnahodile\nnahradit\nnaivita\nnajednou\nnajisto\nnajmout\nnaklonit\nnakonec\nnakrmit\nnalevo\nnamazat\nnamluvit\nnanometr\nnaoko\nnaopak\nnaostro\nnapadat\nnapevno\nnaplnit\nnapnout\nnaposled\nnaprosto\nnarodit\nnaruby\nnarychlo\nnasadit\nnasekat\nnaslepo\nnastat\nnatolik\nnavenek\nnavrch\nnavzdory\nnazvat\nnebe\nnechat\nnecky\nnedaleko\nnedbat\nneduh\nnegace\nnehet\nnehoda\nnejen\nnejprve\nneklid\nnelibost\nnemilost\nnemoc\nneochota\nneonka\nnepokoj\nnerost\nnerv\nnesmysl\nnesoulad\nnetvor\nneuron\nnevina\nnezvykle\nnicota\nnijak\nnikam\nnikdy\nnikl\nnikterak\nnitro\nnocleh\nnohavice\nnominace\nnora\nnorek\nnositel\nnosnost\nnouze\nnoviny\nnovota\nnozdra\nnuda\nnudle\nnuget\nnutit\nnutnost\nnutrie\nnymfa\nobal\nobarvit\nobava\nobdiv\nobec\nobehnat\nobejmout\nobezita\nobhajoba\nobilnice\nobjasnit\nobjekt\nobklopit\noblast\noblek\nobliba\nobloha\nobluda\nobnos\nobohatit\nobojek\nobout\nobrazec\nobrna\nobruba\nobrys\nobsah\nobsluha\nobstarat\nobuv\nobvaz\nobvinit\nobvod\nobvykle\nobyvatel\nobzor\nocas\nocel\nocenit\nochladit\nochota\nochrana\nocitnout\nodboj\nodbyt\nodchod\nodcizit\nodebrat\nodeslat\nodevzdat\nodezva\nodhadce\nodhodit\nodjet\nodjinud\nodkaz\nodkoupit\nodliv\nodluka\nodmlka\nodolnost\nodpad\nodpis\nodplout\nodpor\nodpustit\nodpykat\nodrazka\nodsoudit\nodstup\nodsun\nodtok\nodtud\nodvaha\nodveta\nodvolat\nodvracet\nodznak\nofina\nofsajd\nohlas\nohnisko\nohrada\nohrozit\nohryzek\nokap\nokenice\noklika\nokno\nokouzlit\nokovy\nokrasa\nokres\nokrsek\nokruh\nokupant\nokurka\nokusit\nolejnina\nolizovat\nomak\nomeleta\nomezit\nomladina\nomlouvat\nomluva\nomyl\nonehdy\nopakovat\nopasek\noperace\nopice\nopilost\nopisovat\nopora\nopozice\nopravdu\noproti\norbital\norchestr\norgie\norlice\norloj\nortel\nosada\noschnout\nosika\nosivo\noslava\noslepit\noslnit\noslovit\nosnova\nosoba\nosolit\nospalec\nosten\nostraha\nostuda\nostych\nosvojit\noteplit\notisk\notop\notrhat\notrlost\notrok\notruby\notvor\novanout\novar\noves\novlivnit\novoce\noxid\nozdoba\npachatel\npacient\npadouch\npahorek\npakt\npalanda\npalec\npalivo\npaluba\npamflet\npamlsek\npanenka\npanika\npanna\npanovat\npanstvo\npantofle\npaprika\nparketa\nparodie\nparta\nparuka\nparyba\npaseka\npasivita\npastelka\npatent\npatrona\npavouk\npazneht\npazourek\npecka\npedagog\npejsek\npeklo\npeloton\npenalta\npendrek\npenze\nperiskop\npero\npestrost\npetarda\npetice\npetrolej\npevnina\npexeso\npianista\npiha\npijavice\npikle\npiknik\npilina\npilnost\npilulka\npinzeta\npipeta\npisatel\npistole\npitevna\npivnice\npivovar\nplacenta\nplakat\nplamen\nplaneta\nplastika\nplatit\nplavidlo\nplaz\nplech\nplemeno\nplenta\nples\npletivo\nplevel\nplivat\nplnit\nplno\nplocha\nplodina\nplomba\nplout\npluk\nplyn\npobavit\npobyt\npochod\npocit\npoctivec\npodat\npodcenit\npodepsat\npodhled\npodivit\npodklad\npodmanit\npodnik\npodoba\npodpora\npodraz\npodstata\npodvod\npodzim\npoezie\npohanka\npohnutka\npohovor\npohroma\npohyb\npointa\npojistka\npojmout\npokazit\npokles\npokoj\npokrok\npokuta\npokyn\npoledne\npolibek\npolknout\npoloha\npolynom\npomalu\npominout\npomlka\npomoc\npomsta\npomyslet\nponechat\nponorka\nponurost\npopadat\npopel\npopisek\npoplach\npoprosit\npopsat\npopud\nporadce\nporce\nporod\nporucha\nporyv\nposadit\nposed\nposila\nposkok\nposlanec\nposoudit\npospolu\npostava\nposudek\nposyp\npotah\npotkan\npotlesk\npotomek\npotrava\npotupa\npotvora\npoukaz\npouto\npouzdro\npovaha\npovidla\npovlak\npovoz\npovrch\npovstat\npovyk\npovzdech\npozdrav\npozemek\npoznatek\npozor\npozvat\npracovat\nprahory\npraktika\nprales\npraotec\npraporek\nprase\npravda\nprincip\nprkno\nprobudit\nprocento\nprodej\nprofese\nprohra\nprojekt\nprolomit\npromile\npronikat\npropad\nprorok\nprosba\nproton\nproutek\nprovaz\nprskavka\nprsten\nprudkost\nprut\nprvek\nprvohory\npsanec\npsovod\npstruh\nptactvo\npuberta\npuch\npudl\npukavec\npuklina\npukrle\npult\npumpa\npunc\npupen\npusa\npusinka\npustina\nputovat\nputyka\npyramida\npysk\npytel\nracek\nrachot\nradiace\nradnice\nradon\nraft\nragby\nraketa\nrakovina\nrameno\nrampouch\nrande\nrarach\nrarita\nrasovna\nrastr\nratolest\nrazance\nrazidlo\nreagovat\nreakce\nrecept\nredaktor\nreferent\nreflex\nrejnok\nreklama\nrekord\nrekrut\nrektor\nreputace\nrevize\nrevma\nrevolver\nrezerva\nriskovat\nriziko\nrobotika\nrodokmen\nrohovka\nrokle\nrokoko\nromaneto\nropovod\nropucha\nrorejs\nrosol\nrostlina\nrotmistr\nrotoped\nrotunda\nroubenka\nroucho\nroup\nroura\nrovina\nrovnice\nrozbor\nrozchod\nrozdat\nrozeznat\nrozhodce\nrozinka\nrozjezd\nrozkaz\nrozloha\nrozmar\nrozpad\nrozruch\nrozsah\nroztok\nrozum\nrozvod\nrubrika\nruchadlo\nrukavice\nrukopis\nryba\nrybolov\nrychlost\nrydlo\nrypadlo\nrytina\nryzost\nsadista\nsahat\nsako\nsamec\nsamizdat\nsamota\nsanitka\nsardinka\nsasanka\nsatelit\nsazba\nsazenice\nsbor\nschovat\nsebranka\nsecese\nsedadlo\nsediment\nsedlo\nsehnat\nsejmout\nsekera\nsekta\nsekunda\nsekvoje\nsemeno\nseno\nservis\nsesadit\nseshora\nseskok\nseslat\nsestra\nsesuv\nsesypat\nsetba\nsetina\nsetkat\nsetnout\nsetrvat\nsever\nseznam\nshoda\nshrnout\nsifon\nsilnice\nsirka\nsirotek\nsirup\nsituace\nskafandr\nskalisko\nskanzen\nskaut\nskeptik\nskica\nskladba\nsklenice\nsklo\nskluz\nskoba\nskokan\nskoro\nskripta\nskrz\nskupina\nskvost\nskvrna\nslabika\nsladidlo\nslanina\nslast\nslavnost\nsledovat\nslepec\nsleva\nslezina\nslib\nslina\nsliznice\nslon\nsloupek\nslovo\nsluch\nsluha\nslunce\nslupka\nslza\nsmaragd\nsmetana\nsmilstvo\nsmlouva\nsmog\nsmrad\nsmrk\nsmrtka\nsmutek\nsmysl\nsnad\nsnaha\nsnob\nsobota\nsocha\nsodovka\nsokol\nsopka\nsotva\nsouboj\nsoucit\nsoudce\nsouhlas\nsoulad\nsoumrak\nsouprava\nsoused\nsoutok\nsouviset\nspalovna\nspasitel\nspis\nsplav\nspodek\nspojenec\nspolu\nsponzor\nspornost\nspousta\nsprcha\nspustit\nsranda\nsraz\nsrdce\nsrna\nsrnec\nsrovnat\nsrpen\nsrst\nsrub\nstanice\nstarosta\nstatika\nstavba\nstehno\nstezka\nstodola\nstolek\nstopa\nstorno\nstoupat\nstrach\nstres\nstrhnout\nstrom\nstruna\nstudna\nstupnice\nstvol\nstyk\nsubjekt\nsubtropy\nsuchar\nsudost\nsukno\nsundat\nsunout\nsurikata\nsurovina\nsvah\nsvalstvo\nsvetr\nsvatba\nsvazek\nsvisle\nsvitek\nsvoboda\nsvodidlo\nsvorka\nsvrab\nsykavka\nsykot\nsynek\nsynovec\nsypat\nsypkost\nsyrovost\nsysel\nsytost\ntabletka\ntabule\ntahoun\ntajemno\ntajfun\ntajga\ntajit\ntajnost\ntaktika\ntamhle\ntampon\ntancovat\ntanec\ntanker\ntapeta\ntavenina\ntazatel\ntechnika\ntehdy\ntekutina\ntelefon\ntemnota\ntendence\ntenista\ntenor\nteplota\ntepna\nteprve\nterapie\ntermoska\ntextil\nticho\ntiskopis\ntitulek\ntkadlec\ntkanina\ntlapka\ntleskat\ntlukot\ntlupa\ntmel\ntoaleta\ntopinka\ntopol\ntorzo\ntouha\ntoulec\ntradice\ntraktor\ntramp\ntrasa\ntraverza\ntrefit\ntrest\ntrezor\ntrhavina\ntrhlina\ntrochu\ntrojice\ntroska\ntrouba\ntrpce\ntrpitel\ntrpkost\ntrubec\ntruchlit\ntruhlice\ntrus\ntrvat\ntudy\ntuhnout\ntuhost\ntundra\nturista\nturnaj\ntuzemsko\ntvaroh\ntvorba\ntvrdost\ntvrz\ntygr\ntykev\nubohost\nuboze\nubrat\nubrousek\nubrus\nubytovna\nucho\nuctivost\nudivit\nuhradit\nujednat\nujistit\nujmout\nukazatel\nuklidnit\nuklonit\nukotvit\nukrojit\nulice\nulita\nulovit\numyvadlo\nunavit\nuniforma\nuniknout\nupadnout\nuplatnit\nuplynout\nupoutat\nupravit\nuran\nurazit\nusednout\nusilovat\nusmrtit\nusnadnit\nusnout\nusoudit\nustlat\nustrnout\nutahovat\nutkat\nutlumit\nutonout\nutopenec\nutrousit\nuvalit\nuvolnit\nuvozovka\nuzdravit\nuzel\nuzenina\nuzlina\nuznat\nvagon\nvalcha\nvaloun\nvana\nvandal\nvanilka\nvaran\nvarhany\nvarovat\nvcelku\nvchod\nvdova\nvedro\nvegetace\nvejce\nvelbloud\nveletrh\nvelitel\nvelmoc\nvelryba\nvenkov\nveranda\nverze\nveselka\nveskrze\nvesnice\nvespodu\nvesta\nveterina\nveverka\nvibrace\nvichr\nvideohra\nvidina\nvidle\nvila\nvinice\nviset\nvitalita\nvize\nvizitka\nvjezd\nvklad\nvkus\nvlajka\nvlak\nvlasec\nvlevo\nvlhkost\nvliv\nvlnovka\nvloupat\nvnucovat\nvnuk\nvoda\nvodivost\nvodoznak\nvodstvo\nvojensky\nvojna\nvojsko\nvolant\nvolba\nvolit\nvolno\nvoskovka\nvozidlo\nvozovna\nvpravo\nvrabec\nvracet\nvrah\nvrata\nvrba\nvrcholek\nvrhat\nvrstva\nvrtule\nvsadit\nvstoupit\nvstup\nvtip\nvybavit\nvybrat\nvychovat\nvydat\nvydra\nvyfotit\nvyhledat\nvyhnout\nvyhodit\nvyhradit\nvyhubit\nvyjasnit\nvyjet\nvyjmout\nvyklopit\nvykonat\nvylekat\nvymazat\nvymezit\nvymizet\nvymyslet\nvynechat\nvynikat\nvynutit\nvypadat\nvyplatit\nvypravit\nvypustit\nvyrazit\nvyrovnat\nvyrvat\nvyslovit\nvysoko\nvystavit\nvysunout\nvysypat\nvytasit\nvytesat\nvytratit\nvyvinout\nvyvolat\nvyvrhel\nvyzdobit\nvyznat\nvzadu\nvzbudit\nvzchopit\nvzdor\nvzduch\nvzdychat\nvzestup\nvzhledem\nvzkaz\nvzlykat\nvznik\nvzorek\nvzpoura\nvztah\nvztek\nxylofon\nzabrat\nzabydlet\nzachovat\nzadarmo\nzadusit\nzafoukat\nzahltit\nzahodit\nzahrada\nzahynout\nzajatec\nzajet\nzajistit\nzaklepat\nzakoupit\nzalepit\nzamezit\nzamotat\nzamyslet\nzanechat\nzanikat\nzaplatit\nzapojit\nzapsat\nzarazit\nzastavit\nzasunout\nzatajit\nzatemnit\nzatknout\nzaujmout\nzavalit\nzavelet\nzavinit\nzavolat\nzavrtat\nzazvonit\nzbavit\nzbrusu\nzbudovat\nzbytek\nzdaleka\nzdarma\nzdatnost\nzdivo\nzdobit\nzdroj\nzdvih\nzdymadlo\nzelenina\nzeman\nzemina\nzeptat\nzezadu\nzezdola\nzhatit\nzhltnout\nzhluboka\nzhotovit\nzhruba\nzima\nzimnice\nzjemnit\nzklamat\nzkoumat\nzkratka\nzkumavka\nzlato\nzlehka\nzloba\nzlom\nzlost\nzlozvyk\nzmapovat\nzmar\nzmatek\nzmije\nzmizet\nzmocnit\nzmodrat\nzmrzlina\nzmutovat\nznak\nznalost\nznamenat\nznovu\nzobrazit\nzotavit\nzoubek\nzoufale\nzplodit\nzpomalit\nzprava\nzprostit\nzprudka\nzprvu\nzrada\nzranit\nzrcadlo\nzrnitost\nzrno\nzrovna\nzrychlit\nzrzavost\nzticha\nztratit\nzubovina\nzubr\nzvednout\nzvenku\nzvesela\nzvon\nzvrat\nzvukovod\nzvyk\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/english.txt",
    "content": "abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/french.txt",
    "content": "abaisser\nabandon\nabdiquer\nabeille\nabolir\naborder\naboutir\naboyer\nabrasif\nabreuver\nabriter\nabroger\nabrupt\nabsence\nabsolu\nabsurde\nabusif\nabyssal\nacadémie\nacajou\nacarien\naccabler\naccepter\nacclamer\naccolade\naccroche\naccuser\nacerbe\nachat\nacheter\naciduler\nacier\nacompte\nacquérir\nacronyme\nacteur\nactif\nactuel\nadepte\nadéquat\nadhésif\nadjectif\nadjuger\nadmettre\nadmirer\nadopter\nadorer\nadoucir\nadresse\nadroit\nadulte\nadverbe\naérer\naéronef\naffaire\naffecter\naffiche\naffreux\naffubler\nagacer\nagencer\nagile\nagiter\nagrafer\nagréable\nagrume\naider\naiguille\nailier\naimable\naisance\najouter\najuster\nalarmer\nalchimie\nalerte\nalgèbre\nalgue\naliéner\naliment\nalléger\nalliage\nallouer\nallumer\nalourdir\nalpaga\naltesse\nalvéole\namateur\nambigu\nambre\naménager\namertume\namidon\namiral\namorcer\namour\namovible\namphibie\nampleur\namusant\nanalyse\nanaphore\nanarchie\nanatomie\nancien\nanéantir\nangle\nangoisse\nanguleux\nanimal\nannexer\nannonce\nannuel\nanodin\nanomalie\nanonyme\nanormal\nantenne\nantidote\nanxieux\napaiser\napéritif\naplanir\napologie\nappareil\nappeler\napporter\nappuyer\naquarium\naqueduc\narbitre\narbuste\nardeur\nardoise\nargent\narlequin\narmature\narmement\narmoire\narmure\narpenter\narracher\narriver\narroser\narsenic\nartériel\narticle\naspect\nasphalte\naspirer\nassaut\nasservir\nassiette\nassocier\nassurer\nasticot\nastre\nastuce\natelier\natome\natrium\natroce\nattaque\nattentif\nattirer\nattraper\naubaine\nauberge\naudace\naudible\naugurer\naurore\nautomne\nautruche\navaler\navancer\navarice\navenir\naverse\naveugle\naviateur\navide\navion\naviser\navoine\navouer\navril\naxial\naxiome\nbadge\nbafouer\nbagage\nbaguette\nbaignade\nbalancer\nbalcon\nbaleine\nbalisage\nbambin\nbancaire\nbandage\nbanlieue\nbannière\nbanquier\nbarbier\nbaril\nbaron\nbarque\nbarrage\nbassin\nbastion\nbataille\nbateau\nbatterie\nbaudrier\nbavarder\nbelette\nbélier\nbelote\nbénéfice\nberceau\nberger\nberline\nbermuda\nbesace\nbesogne\nbétail\nbeurre\nbiberon\nbicycle\nbidule\nbijou\nbilan\nbilingue\nbillard\nbinaire\nbiologie\nbiopsie\nbiotype\nbiscuit\nbison\nbistouri\nbitume\nbizarre\nblafard\nblague\nblanchir\nblessant\nblinder\nblond\nbloquer\nblouson\nbobard\nbobine\nboire\nboiser\nbolide\nbonbon\nbondir\nbonheur\nbonifier\nbonus\nbordure\nborne\nbotte\nboucle\nboueux\nbougie\nboulon\nbouquin\nbourse\nboussole\nboutique\nboxeur\nbranche\nbrasier\nbrave\nbrebis\nbrèche\nbreuvage\nbricoler\nbrigade\nbrillant\nbrioche\nbrique\nbrochure\nbroder\nbronzer\nbrousse\nbroyeur\nbrume\nbrusque\nbrutal\nbruyant\nbuffle\nbuisson\nbulletin\nbureau\nburin\nbustier\nbutiner\nbutoir\nbuvable\nbuvette\ncabanon\ncabine\ncachette\ncadeau\ncadre\ncaféine\ncaillou\ncaisson\ncalculer\ncalepin\ncalibre\ncalmer\ncalomnie\ncalvaire\ncamarade\ncaméra\ncamion\ncampagne\ncanal\ncaneton\ncanon\ncantine\ncanular\ncapable\ncaporal\ncaprice\ncapsule\ncapter\ncapuche\ncarabine\ncarbone\ncaresser\ncaribou\ncarnage\ncarotte\ncarreau\ncarton\ncascade\ncasier\ncasque\ncassure\ncauser\ncaution\ncavalier\ncaverne\ncaviar\ncédille\nceinture\ncéleste\ncellule\ncendrier\ncensurer\ncentral\ncercle\ncérébral\ncerise\ncerner\ncerveau\ncesser\nchagrin\nchaise\nchaleur\nchambre\nchance\nchapitre\ncharbon\nchasseur\nchaton\nchausson\nchavirer\nchemise\nchenille\nchéquier\nchercher\ncheval\nchien\nchiffre\nchignon\nchimère\nchiot\nchlorure\nchocolat\nchoisir\nchose\nchouette\nchrome\nchute\ncigare\ncigogne\ncimenter\ncinéma\ncintrer\ncirculer\ncirer\ncirque\nciterne\ncitoyen\ncitron\ncivil\nclairon\nclameur\nclaquer\nclasse\nclavier\nclient\ncligner\nclimat\nclivage\ncloche\nclonage\ncloporte\ncobalt\ncobra\ncocasse\ncocotier\ncoder\ncodifier\ncoffre\ncogner\ncohésion\ncoiffer\ncoincer\ncolère\ncolibri\ncolline\ncolmater\ncolonel\ncombat\ncomédie\ncommande\ncompact\nconcert\nconduire\nconfier\ncongeler\nconnoter\nconsonne\ncontact\nconvexe\ncopain\ncopie\ncorail\ncorbeau\ncordage\ncorniche\ncorpus\ncorrect\ncortège\ncosmique\ncostume\ncoton\ncoude\ncoupure\ncourage\ncouteau\ncouvrir\ncoyote\ncrabe\ncrainte\ncravate\ncrayon\ncréature\ncréditer\ncrémeux\ncreuser\ncrevette\ncribler\ncrier\ncristal\ncritère\ncroire\ncroquer\ncrotale\ncrucial\ncruel\ncrypter\ncubique\ncueillir\ncuillère\ncuisine\ncuivre\nculminer\ncultiver\ncumuler\ncupide\ncuratif\ncurseur\ncyanure\ncycle\ncylindre\ncynique\ndaigner\ndamier\ndanger\ndanseur\ndauphin\ndébattre\ndébiter\ndéborder\ndébrider\ndébutant\ndécaler\ndécembre\ndéchirer\ndécider\ndéclarer\ndécorer\ndécrire\ndécupler\ndédale\ndéductif\ndéesse\ndéfensif\ndéfiler\ndéfrayer\ndégager\ndégivrer\ndéglutir\ndégrafer\ndéjeuner\ndélice\ndéloger\ndemander\ndemeurer\ndémolir\ndénicher\ndénouer\ndentelle\ndénuder\ndépart\ndépenser\ndéphaser\ndéplacer\ndéposer\ndéranger\ndérober\ndésastre\ndescente\ndésert\ndésigner\ndésobéir\ndessiner\ndestrier\ndétacher\ndétester\ndétourer\ndétresse\ndevancer\ndevenir\ndeviner\ndevoir\ndiable\ndialogue\ndiamant\ndicter\ndifférer\ndigérer\ndigital\ndigne\ndiluer\ndimanche\ndiminuer\ndioxyde\ndirectif\ndiriger\ndiscuter\ndisposer\ndissiper\ndistance\ndivertir\ndiviser\ndocile\ndocteur\ndogme\ndoigt\ndomaine\ndomicile\ndompter\ndonateur\ndonjon\ndonner\ndopamine\ndortoir\ndorure\ndosage\ndoseur\ndossier\ndotation\ndouanier\ndouble\ndouceur\ndouter\ndoyen\ndragon\ndraper\ndresser\ndribbler\ndroiture\nduperie\nduplexe\ndurable\ndurcir\ndynastie\néblouir\nécarter\nécharpe\néchelle\néclairer\néclipse\néclore\nécluse\nécole\néconomie\nécorce\nécouter\nécraser\nécrémer\nécrivain\nécrou\nécume\nécureuil\nédifier\néduquer\neffacer\neffectif\neffigie\neffort\neffrayer\neffusion\négaliser\négarer\néjecter\nélaborer\nélargir\nélectron\nélégant\néléphant\nélève\néligible\nélitisme\néloge\nélucider\néluder\nemballer\nembellir\nembryon\némeraude\némission\nemmener\némotion\némouvoir\nempereur\nemployer\nemporter\nemprise\némulsion\nencadrer\nenchère\nenclave\nencoche\nendiguer\nendosser\nendroit\nenduire\nénergie\nenfance\nenfermer\nenfouir\nengager\nengin\nenglober\nénigme\nenjamber\nenjeu\nenlever\nennemi\nennuyeux\nenrichir\nenrobage\nenseigne\nentasser\nentendre\nentier\nentourer\nentraver\nénumérer\nenvahir\nenviable\nenvoyer\nenzyme\néolien\népaissir\népargne\népatant\népaule\népicerie\népidémie\népier\népilogue\népine\népisode\népitaphe\népoque\népreuve\néprouver\népuisant\néquerre\néquipe\nériger\nérosion\nerreur\néruption\nescalier\nespadon\nespèce\nespiègle\nespoir\nesprit\nesquiver\nessayer\nessence\nessieu\nessorer\nestime\nestomac\nestrade\nétagère\nétaler\nétanche\nétatique\néteindre\nétendoir\néternel\néthanol\néthique\nethnie\nétirer\nétoffer\nétoile\nétonnant\nétourdir\nétrange\nétroit\nétude\neuphorie\névaluer\névasion\néventail\névidence\néviter\névolutif\névoquer\nexact\nexagérer\nexaucer\nexceller\nexcitant\nexclusif\nexcuse\nexécuter\nexemple\nexercer\nexhaler\nexhorter\nexigence\nexiler\nexister\nexotique\nexpédier\nexplorer\nexposer\nexprimer\nexquis\nextensif\nextraire\nexulter\nfable\nfabuleux\nfacette\nfacile\nfacture\nfaiblir\nfalaise\nfameux\nfamille\nfarceur\nfarfelu\nfarine\nfarouche\nfasciner\nfatal\nfatigue\nfaucon\nfautif\nfaveur\nfavori\nfébrile\nféconder\nfédérer\nfélin\nfemme\nfémur\nfendoir\nféodal\nfermer\nféroce\nferveur\nfestival\nfeuille\nfeutre\nfévrier\nfiasco\nficeler\nfictif\nfidèle\nfigure\nfilature\nfiletage\nfilière\nfilleul\nfilmer\nfilou\nfiltrer\nfinancer\nfinir\nfiole\nfirme\nfissure\nfixer\nflairer\nflamme\nflasque\nflatteur\nfléau\nflèche\nfleur\nflexion\nflocon\nflore\nfluctuer\nfluide\nfluvial\nfolie\nfonderie\nfongible\nfontaine\nforcer\nforgeron\nformuler\nfortune\nfossile\nfoudre\nfougère\nfouiller\nfoulure\nfourmi\nfragile\nfraise\nfranchir\nfrapper\nfrayeur\nfrégate\nfreiner\nfrelon\nfrémir\nfrénésie\nfrère\nfriable\nfriction\nfrisson\nfrivole\nfroid\nfromage\nfrontal\nfrotter\nfruit\nfugitif\nfuite\nfureur\nfurieux\nfurtif\nfusion\nfutur\ngagner\ngalaxie\ngalerie\ngambader\ngarantir\ngardien\ngarnir\ngarrigue\ngazelle\ngazon\ngéant\ngélatine\ngélule\ngendarme\ngénéral\ngénie\ngenou\ngentil\ngéologie\ngéomètre\ngéranium\ngerme\ngestuel\ngeyser\ngibier\ngicler\ngirafe\ngivre\nglace\nglaive\nglisser\nglobe\ngloire\nglorieux\ngolfeur\ngomme\ngonfler\ngorge\ngorille\ngoudron\ngouffre\ngoulot\ngoupille\ngourmand\ngoutte\ngraduel\ngraffiti\ngraine\ngrand\ngrappin\ngratuit\ngravir\ngrenat\ngriffure\ngriller\ngrimper\ngrogner\ngronder\ngrotte\ngroupe\ngruger\ngrutier\ngruyère\nguépard\nguerrier\nguide\nguimauve\nguitare\ngustatif\ngymnaste\ngyrostat\nhabitude\nhachoir\nhalte\nhameau\nhangar\nhanneton\nharicot\nharmonie\nharpon\nhasard\nhélium\nhématome\nherbe\nhérisson\nhermine\nhéron\nhésiter\nheureux\nhiberner\nhibou\nhilarant\nhistoire\nhiver\nhomard\nhommage\nhomogène\nhonneur\nhonorer\nhonteux\nhorde\nhorizon\nhorloge\nhormone\nhorrible\nhouleux\nhousse\nhublot\nhuileux\nhumain\nhumble\nhumide\nhumour\nhurler\nhydromel\nhygiène\nhymne\nhypnose\nidylle\nignorer\niguane\nillicite\nillusion\nimage\nimbiber\nimiter\nimmense\nimmobile\nimmuable\nimpact\nimpérial\nimplorer\nimposer\nimprimer\nimputer\nincarner\nincendie\nincident\nincliner\nincolore\nindexer\nindice\ninductif\ninédit\nineptie\ninexact\ninfini\ninfliger\ninformer\ninfusion\ningérer\ninhaler\ninhiber\ninjecter\ninjure\ninnocent\ninoculer\ninonder\ninscrire\ninsecte\ninsigne\ninsolite\ninspirer\ninstinct\ninsulter\nintact\nintense\nintime\nintrigue\nintuitif\ninutile\ninvasion\ninventer\ninviter\ninvoquer\nironique\nirradier\nirréel\nirriter\nisoler\nivoire\nivresse\njaguar\njaillir\njambe\njanvier\njardin\njauger\njaune\njavelot\njetable\njeton\njeudi\njeunesse\njoindre\njoncher\njongler\njoueur\njouissif\njournal\njovial\njoyau\njoyeux\njubiler\njugement\njunior\njupon\njuriste\njustice\njuteux\njuvénile\nkayak\nkimono\nkiosque\nlabel\nlabial\nlabourer\nlacérer\nlactose\nlagune\nlaine\nlaisser\nlaitier\nlambeau\nlamelle\nlampe\nlanceur\nlangage\nlanterne\nlapin\nlargeur\nlarme\nlaurier\nlavabo\nlavoir\nlecture\nlégal\nléger\nlégume\nlessive\nlettre\nlevier\nlexique\nlézard\nliasse\nlibérer\nlibre\nlicence\nlicorne\nliège\nlièvre\nligature\nligoter\nligue\nlimer\nlimite\nlimonade\nlimpide\nlinéaire\nlingot\nlionceau\nliquide\nlisière\nlister\nlithium\nlitige\nlittoral\nlivreur\nlogique\nlointain\nloisir\nlombric\nloterie\nlouer\nlourd\nloutre\nlouve\nloyal\nlubie\nlucide\nlucratif\nlueur\nlugubre\nluisant\nlumière\nlunaire\nlundi\nluron\nlutter\nluxueux\nmachine\nmagasin\nmagenta\nmagique\nmaigre\nmaillon\nmaintien\nmairie\nmaison\nmajorer\nmalaxer\nmaléfice\nmalheur\nmalice\nmallette\nmammouth\nmandater\nmaniable\nmanquant\nmanteau\nmanuel\nmarathon\nmarbre\nmarchand\nmardi\nmaritime\nmarqueur\nmarron\nmarteler\nmascotte\nmassif\nmatériel\nmatière\nmatraque\nmaudire\nmaussade\nmauve\nmaximal\nméchant\nméconnu\nmédaille\nmédecin\nméditer\nméduse\nmeilleur\nmélange\nmélodie\nmembre\nmémoire\nmenacer\nmener\nmenhir\nmensonge\nmentor\nmercredi\nmérite\nmerle\nmessager\nmesure\nmétal\nmétéore\nméthode\nmétier\nmeuble\nmiauler\nmicrobe\nmiette\nmignon\nmigrer\nmilieu\nmillion\nmimique\nmince\nminéral\nminimal\nminorer\nminute\nmiracle\nmiroiter\nmissile\nmixte\nmobile\nmoderne\nmoelleux\nmondial\nmoniteur\nmonnaie\nmonotone\nmonstre\nmontagne\nmonument\nmoqueur\nmorceau\nmorsure\nmortier\nmoteur\nmotif\nmouche\nmoufle\nmoulin\nmousson\nmouton\nmouvant\nmultiple\nmunition\nmuraille\nmurène\nmurmure\nmuscle\nmuséum\nmusicien\nmutation\nmuter\nmutuel\nmyriade\nmyrtille\nmystère\nmythique\nnageur\nnappe\nnarquois\nnarrer\nnatation\nnation\nnature\nnaufrage\nnautique\nnavire\nnébuleux\nnectar\nnéfaste\nnégation\nnégliger\nnégocier\nneige\nnerveux\nnettoyer\nneurone\nneutron\nneveu\nniche\nnickel\nnitrate\nniveau\nnoble\nnocif\nnocturne\nnoirceur\nnoisette\nnomade\nnombreux\nnommer\nnormatif\nnotable\nnotifier\nnotoire\nnourrir\nnouveau\nnovateur\nnovembre\nnovice\nnuage\nnuancer\nnuire\nnuisible\nnuméro\nnuptial\nnuque\nnutritif\nobéir\nobjectif\nobliger\nobscur\nobserver\nobstacle\nobtenir\nobturer\noccasion\noccuper\nocéan\noctobre\noctroyer\noctupler\noculaire\nodeur\nodorant\noffenser\nofficier\noffrir\nogive\noiseau\noisillon\nolfactif\nolivier\nombrage\nomettre\nonctueux\nonduler\nonéreux\nonirique\nopale\nopaque\nopérer\nopinion\nopportun\nopprimer\nopter\noptique\norageux\norange\norbite\nordonner\noreille\norgane\norgueil\norifice\nornement\norque\nortie\nosciller\nosmose\nossature\notarie\nouragan\nourson\noutil\noutrager\nouvrage\novation\noxyde\noxygène\nozone\npaisible\npalace\npalmarès\npalourde\npalper\npanache\npanda\npangolin\npaniquer\npanneau\npanorama\npantalon\npapaye\npapier\npapoter\npapyrus\nparadoxe\nparcelle\nparesse\nparfumer\nparler\nparole\nparrain\nparsemer\npartager\nparure\nparvenir\npassion\npastèque\npaternel\npatience\npatron\npavillon\npavoiser\npayer\npaysage\npeigne\npeintre\npelage\npélican\npelle\npelouse\npeluche\npendule\npénétrer\npénible\npensif\npénurie\npépite\npéplum\nperdrix\nperforer\npériode\npermuter\nperplexe\npersil\nperte\npeser\npétale\npetit\npétrir\npeuple\npharaon\nphobie\nphoque\nphoton\nphrase\nphysique\npiano\npictural\npièce\npierre\npieuvre\npilote\npinceau\npipette\npiquer\npirogue\npiscine\npiston\npivoter\npixel\npizza\nplacard\nplafond\nplaisir\nplaner\nplaque\nplastron\nplateau\npleurer\nplexus\npliage\nplomb\nplonger\npluie\nplumage\npochette\npoésie\npoète\npointe\npoirier\npoisson\npoivre\npolaire\npolicier\npollen\npolygone\npommade\npompier\nponctuel\npondérer\nponey\nportique\nposition\nposséder\nposture\npotager\npoteau\npotion\npouce\npoulain\npoumon\npourpre\npoussin\npouvoir\nprairie\npratique\nprécieux\nprédire\npréfixe\nprélude\nprénom\nprésence\nprétexte\nprévoir\nprimitif\nprince\nprison\npriver\nproblème\nprocéder\nprodige\nprofond\nprogrès\nproie\nprojeter\nprologue\npromener\npropre\nprospère\nprotéger\nprouesse\nproverbe\nprudence\npruneau\npsychose\npublic\npuceron\npuiser\npulpe\npulsar\npunaise\npunitif\npupitre\npurifier\npuzzle\npyramide\nquasar\nquerelle\nquestion\nquiétude\nquitter\nquotient\nracine\nraconter\nradieux\nragondin\nraideur\nraisin\nralentir\nrallonge\nramasser\nrapide\nrasage\nratisser\nravager\nravin\nrayonner\nréactif\nréagir\nréaliser\nréanimer\nrecevoir\nréciter\nréclamer\nrécolter\nrecruter\nreculer\nrecycler\nrédiger\nredouter\nrefaire\nréflexe\nréformer\nrefrain\nrefuge\nrégalien\nrégion\nréglage\nrégulier\nréitérer\nrejeter\nrejouer\nrelatif\nrelever\nrelief\nremarque\nremède\nremise\nremonter\nremplir\nremuer\nrenard\nrenfort\nrenifler\nrenoncer\nrentrer\nrenvoi\nreplier\nreporter\nreprise\nreptile\nrequin\nréserve\nrésineux\nrésoudre\nrespect\nrester\nrésultat\nrétablir\nretenir\nréticule\nretomber\nretracer\nréunion\nréussir\nrevanche\nrevivre\nrévolte\nrévulsif\nrichesse\nrideau\nrieur\nrigide\nrigoler\nrincer\nriposter\nrisible\nrisque\nrituel\nrival\nrivière\nrocheux\nromance\nrompre\nronce\nrondin\nroseau\nrosier\nrotatif\nrotor\nrotule\nrouge\nrouille\nrouleau\nroutine\nroyaume\nruban\nrubis\nruche\nruelle\nrugueux\nruiner\nruisseau\nruser\nrustique\nrythme\nsabler\nsaboter\nsabre\nsacoche\nsafari\nsagesse\nsaisir\nsalade\nsalive\nsalon\nsaluer\nsamedi\nsanction\nsanglier\nsarcasme\nsardine\nsaturer\nsaugrenu\nsaumon\nsauter\nsauvage\nsavant\nsavonner\nscalpel\nscandale\nscélérat\nscénario\nsceptre\nschéma\nscience\nscinder\nscore\nscrutin\nsculpter\nséance\nsécable\nsécher\nsecouer\nsécréter\nsédatif\nséduire\nseigneur\nséjour\nsélectif\nsemaine\nsembler\nsemence\nséminal\nsénateur\nsensible\nsentence\nséparer\nséquence\nserein\nsergent\nsérieux\nserrure\nsérum\nservice\nsésame\nsévir\nsevrage\nsextuple\nsidéral\nsiècle\nsiéger\nsiffler\nsigle\nsignal\nsilence\nsilicium\nsimple\nsincère\nsinistre\nsiphon\nsirop\nsismique\nsituer\nskier\nsocial\nsocle\nsodium\nsoigneux\nsoldat\nsoleil\nsolitude\nsoluble\nsombre\nsommeil\nsomnoler\nsonde\nsongeur\nsonnette\nsonore\nsorcier\nsortir\nsosie\nsottise\nsoucieux\nsoudure\nsouffle\nsoulever\nsoupape\nsource\nsoutirer\nsouvenir\nspacieux\nspatial\nspécial\nsphère\nspiral\nstable\nstation\nsternum\nstimulus\nstipuler\nstrict\nstudieux\nstupeur\nstyliste\nsublime\nsubstrat\nsubtil\nsubvenir\nsuccès\nsucre\nsuffixe\nsuggérer\nsuiveur\nsulfate\nsuperbe\nsupplier\nsurface\nsuricate\nsurmener\nsurprise\nsursaut\nsurvie\nsuspect\nsyllabe\nsymbole\nsymétrie\nsynapse\nsyntaxe\nsystème\ntabac\ntablier\ntactile\ntailler\ntalent\ntalisman\ntalonner\ntambour\ntamiser\ntangible\ntapis\ntaquiner\ntarder\ntarif\ntartine\ntasse\ntatami\ntatouage\ntaupe\ntaureau\ntaxer\ntémoin\ntemporel\ntenaille\ntendre\nteneur\ntenir\ntension\nterminer\nterne\nterrible\ntétine\ntexte\nthème\nthéorie\nthérapie\nthorax\ntibia\ntiède\ntimide\ntirelire\ntiroir\ntissu\ntitane\ntitre\ntituber\ntoboggan\ntolérant\ntomate\ntonique\ntonneau\ntoponyme\ntorche\ntordre\ntornade\ntorpille\ntorrent\ntorse\ntortue\ntotem\ntoucher\ntournage\ntousser\ntoxine\ntraction\ntrafic\ntragique\ntrahir\ntrain\ntrancher\ntravail\ntrèfle\ntremper\ntrésor\ntreuil\ntriage\ntribunal\ntricoter\ntrilogie\ntriomphe\ntripler\ntriturer\ntrivial\ntrombone\ntronc\ntropical\ntroupeau\ntuile\ntulipe\ntumulte\ntunnel\nturbine\ntuteur\ntutoyer\ntuyau\ntympan\ntyphon\ntypique\ntyran\nubuesque\nultime\nultrason\nunanime\nunifier\nunion\nunique\nunitaire\nunivers\nuranium\nurbain\nurticant\nusage\nusine\nusuel\nusure\nutile\nutopie\nvacarme\nvaccin\nvagabond\nvague\nvaillant\nvaincre\nvaisseau\nvalable\nvalise\nvallon\nvalve\nvampire\nvanille\nvapeur\nvarier\nvaseux\nvassal\nvaste\nvecteur\nvedette\nvégétal\nvéhicule\nveinard\nvéloce\nvendredi\nvénérer\nvenger\nvenimeux\nventouse\nverdure\nvérin\nvernir\nverrou\nverser\nvertu\nveston\nvétéran\nvétuste\nvexant\nvexer\nviaduc\nviande\nvictoire\nvidange\nvidéo\nvignette\nvigueur\nvilain\nvillage\nvinaigre\nviolon\nvipère\nvirement\nvirtuose\nvirus\nvisage\nviseur\nvision\nvisqueux\nvisuel\nvital\nvitesse\nviticole\nvitrine\nvivace\nvivipare\nvocation\nvoguer\nvoile\nvoisin\nvoiture\nvolaille\nvolcan\nvoltiger\nvolume\nvorace\nvortex\nvoter\nvouloir\nvoyage\nvoyelle\nwagon\nxénon\nyacht\nzèbre\nzénith\nzeste\nzoologie\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/italian.txt",
    "content": "abaco\nabbaglio\nabbinato\nabete\nabisso\nabolire\nabrasivo\nabrogato\naccadere\naccenno\naccusato\nacetone\nachille\nacido\nacqua\nacre\nacrilico\nacrobata\nacuto\nadagio\naddebito\naddome\nadeguato\naderire\nadipe\nadottare\nadulare\naffabile\naffetto\naffisso\naffranto\naforisma\nafoso\nafricano\nagave\nagente\nagevole\naggancio\nagire\nagitare\nagonismo\nagricolo\nagrumeto\naguzzo\nalabarda\nalato\nalbatro\nalberato\nalbo\nalbume\nalce\nalcolico\nalettone\nalfa\nalgebra\naliante\nalibi\nalimento\nallagato\nallegro\nallievo\nallodola\nallusivo\nalmeno\nalogeno\nalpaca\nalpestre\naltalena\nalterno\nalticcio\naltrove\nalunno\nalveolo\nalzare\namalgama\namanita\namarena\nambito\nambrato\nameba\namerica\nametista\namico\nammasso\nammenda\nammirare\nammonito\namore\nampio\nampliare\namuleto\nanacardo\nanagrafe\nanalista\nanarchia\nanatra\nanca\nancella\nancora\nandare\nandrea\nanello\nangelo\nangolare\nangusto\nanima\nannegare\nannidato\nanno\nannuncio\nanonimo\nanticipo\nanzi\napatico\napertura\napode\napparire\nappetito\nappoggio\napprodo\nappunto\naprile\narabica\narachide\naragosta\naraldica\narancio\naratura\narazzo\narbitro\narchivio\nardito\narenile\nargento\nargine\narguto\naria\narmonia\narnese\narredato\narringa\narrosto\narsenico\narso\nartefice\narzillo\nasciutto\nascolto\nasepsi\nasettico\nasfalto\nasino\nasola\naspirato\naspro\nassaggio\nasse\nassoluto\nassurdo\nasta\nastenuto\nastice\nastratto\natavico\nateismo\natomico\natono\nattesa\nattivare\nattorno\nattrito\nattuale\nausilio\naustria\nautista\nautonomo\nautunno\navanzato\navere\navvenire\navviso\navvolgere\nazione\nazoto\nazzimo\nazzurro\nbabele\nbaccano\nbacino\nbaco\nbadessa\nbadilata\nbagnato\nbaita\nbalcone\nbaldo\nbalena\nballata\nbalzano\nbambino\nbandire\nbaraonda\nbarbaro\nbarca\nbaritono\nbarlume\nbarocco\nbasilico\nbasso\nbatosta\nbattuto\nbaule\nbava\nbavosa\nbecco\nbeffa\nbelgio\nbelva\nbenda\nbenevole\nbenigno\nbenzina\nbere\nberlina\nbeta\nbibita\nbici\nbidone\nbifido\nbiga\nbilancia\nbimbo\nbinocolo\nbiologo\nbipede\nbipolare\nbirbante\nbirra\nbiscotto\nbisesto\nbisnonno\nbisonte\nbisturi\nbizzarro\nblando\nblatta\nbollito\nbonifico\nbordo\nbosco\nbotanico\nbottino\nbozzolo\nbraccio\nbradipo\nbrama\nbranca\nbravura\nbretella\nbrevetto\nbrezza\nbriglia\nbrillante\nbrindare\nbroccolo\nbrodo\nbronzina\nbrullo\nbruno\nbubbone\nbuca\nbudino\nbuffone\nbuio\nbulbo\nbuono\nburlone\nburrasca\nbussola\nbusta\ncadetto\ncaduco\ncalamaro\ncalcolo\ncalesse\ncalibro\ncalmo\ncaloria\ncambusa\ncamerata\ncamicia\ncammino\ncamola\ncampale\ncanapa\ncandela\ncane\ncanino\ncanotto\ncantina\ncapace\ncapello\ncapitolo\ncapogiro\ncappero\ncapra\ncapsula\ncarapace\ncarcassa\ncardo\ncarisma\ncarovana\ncarretto\ncartolina\ncasaccio\ncascata\ncaserma\ncaso\ncassone\ncastello\ncasuale\ncatasta\ncatena\ncatrame\ncauto\ncavillo\ncedibile\ncedrata\ncefalo\ncelebre\ncellulare\ncena\ncenone\ncentesimo\nceramica\ncercare\ncerto\ncerume\ncervello\ncesoia\ncespo\nceto\nchela\nchiaro\nchicca\nchiedere\nchimera\nchina\nchirurgo\nchitarra\nciao\nciclismo\ncifrare\ncigno\ncilindro\nciottolo\ncirca\ncirrosi\ncitrico\ncittadino\nciuffo\ncivetta\ncivile\nclassico\nclinica\ncloro\ncocco\ncodardo\ncodice\ncoerente\ncognome\ncollare\ncolmato\ncolore\ncolposo\ncoltivato\ncolza\ncoma\ncometa\ncommando\ncomodo\ncomputer\ncomune\nconciso\ncondurre\nconferma\ncongelare\nconiuge\nconnesso\nconoscere\nconsumo\ncontinuo\nconvegno\ncoperto\ncopione\ncoppia\ncopricapo\ncorazza\ncordata\ncoricato\ncornice\ncorolla\ncorpo\ncorredo\ncorsia\ncortese\ncosmico\ncostante\ncottura\ncovato\ncratere\ncravatta\ncreato\ncredere\ncremoso\ncrescita\ncreta\ncriceto\ncrinale\ncrisi\ncritico\ncroce\ncronaca\ncrostata\ncruciale\ncrusca\ncucire\ncuculo\ncugino\ncullato\ncupola\ncuratore\ncursore\ncurvo\ncuscino\ncustode\ndado\ndaino\ndalmata\ndamerino\ndaniela\ndannoso\ndanzare\ndatato\ndavanti\ndavvero\ndebutto\ndecennio\ndeciso\ndeclino\ndecollo\ndecreto\ndedicato\ndefinito\ndeforme\ndegno\ndelegare\ndelfino\ndelirio\ndelta\ndemenza\ndenotato\ndentro\ndeposito\nderapata\nderivare\nderoga\ndescritto\ndeserto\ndesiderio\ndesumere\ndetersivo\ndevoto\ndiametro\ndicembre\ndiedro\ndifeso\ndiffuso\ndigerire\ndigitale\ndiluvio\ndinamico\ndinnanzi\ndipinto\ndiploma\ndipolo\ndiradare\ndire\ndirotto\ndirupo\ndisagio\ndiscreto\ndisfare\ndisgelo\ndisposto\ndistanza\ndisumano\ndito\ndivano\ndivelto\ndividere\ndivorato\ndoblone\ndocente\ndoganale\ndogma\ndolce\ndomato\ndomenica\ndominare\ndondolo\ndono\ndormire\ndote\ndottore\ndovuto\ndozzina\ndrago\ndruido\ndubbio\ndubitare\nducale\nduna\nduomo\nduplice\nduraturo\nebano\neccesso\necco\neclissi\neconomia\nedera\nedicola\nedile\neditoria\neducare\negemonia\negli\negoismo\negregio\nelaborato\nelargire\nelegante\nelencato\neletto\nelevare\nelfico\nelica\nelmo\nelsa\neluso\nemanato\nemblema\nemesso\nemiro\nemotivo\nemozione\nempirico\nemulo\nendemico\nenduro\nenergia\nenfasi\nenoteca\nentrare\nenzima\nepatite\nepilogo\nepisodio\nepocale\neppure\nequatore\nerario\nerba\nerboso\nerede\neremita\nerigere\nermetico\neroe\nerosivo\nerrante\nesagono\nesame\nesanime\nesaudire\nesca\nesempio\nesercito\nesibito\nesigente\nesistere\nesito\nesofago\nesortato\nesoso\nespanso\nespresso\nessenza\nesso\nesteso\nestimare\nestonia\nestroso\nesultare\netilico\netnico\netrusco\netto\neuclideo\neuropa\nevaso\nevidenza\nevitato\nevoluto\nevviva\nfabbrica\nfaccenda\nfachiro\nfalco\nfamiglia\nfanale\nfanfara\nfango\nfantasma\nfare\nfarfalla\nfarinoso\nfarmaco\nfascia\nfastoso\nfasullo\nfaticare\nfato\nfavoloso\nfebbre\nfecola\nfede\nfegato\nfelpa\nfeltro\nfemmina\nfendere\nfenomeno\nfermento\nferro\nfertile\nfessura\nfestivo\nfetta\nfeudo\nfiaba\nfiducia\nfifa\nfigurato\nfilo\nfinanza\nfinestra\nfinire\nfiore\nfiscale\nfisico\nfiume\nflacone\nflamenco\nflebo\nflemma\nflorido\nfluente\nfluoro\nfobico\nfocaccia\nfocoso\nfoderato\nfoglio\nfolata\nfolclore\nfolgore\nfondente\nfonetico\nfonia\nfontana\nforbito\nforchetta\nforesta\nformica\nfornaio\nforo\nfortezza\nforzare\nfosfato\nfosso\nfracasso\nfrana\nfrassino\nfratello\nfreccetta\nfrenata\nfresco\nfrigo\nfrollino\nfronde\nfrugale\nfrutta\nfucilata\nfucsia\nfuggente\nfulmine\nfulvo\nfumante\nfumetto\nfumoso\nfune\nfunzione\nfuoco\nfurbo\nfurgone\nfurore\nfuso\nfutile\ngabbiano\ngaffe\ngalateo\ngallina\ngaloppo\ngambero\ngamma\ngaranzia\ngarbo\ngarofano\ngarzone\ngasdotto\ngasolio\ngastrico\ngatto\ngaudio\ngazebo\ngazzella\ngeco\ngelatina\ngelso\ngemello\ngemmato\ngene\ngenitore\ngennaio\ngenotipo\ngergo\nghepardo\nghiaccio\nghisa\ngiallo\ngilda\nginepro\ngiocare\ngioiello\ngiorno\ngiove\ngirato\ngirone\ngittata\ngiudizio\ngiurato\ngiusto\nglobulo\nglutine\ngnomo\ngobba\ngolf\ngomito\ngommone\ngonfio\ngonna\ngoverno\ngracile\ngrado\ngrafico\ngrammo\ngrande\ngrattare\ngravoso\ngrazia\ngreca\ngregge\ngrifone\ngrigio\ngrinza\ngrotta\ngruppo\nguadagno\nguaio\nguanto\nguardare\ngufo\nguidare\nibernato\nicona\nidentico\nidillio\nidolo\nidra\nidrico\nidrogeno\nigiene\nignaro\nignorato\nilare\nilleso\nillogico\nilludere\nimballo\nimbevuto\nimbocco\nimbuto\nimmane\nimmerso\nimmolato\nimpacco\nimpeto\nimpiego\nimporto\nimpronta\ninalare\ninarcare\ninattivo\nincanto\nincendio\ninchino\nincisivo\nincluso\nincontro\nincrocio\nincubo\nindagine\nindia\nindole\ninedito\ninfatti\ninfilare\ninflitto\ningaggio\ningegno\ninglese\ningordo\ningrosso\ninnesco\ninodore\ninoltrare\ninondato\ninsano\ninsetto\ninsieme\ninsonnia\ninsulina\nintasato\nintero\nintonaco\nintuito\ninumidire\ninvalido\ninvece\ninvito\niperbole\nipnotico\nipotesi\nippica\niride\nirlanda\nironico\nirrigato\nirrorare\nisolato\nisotopo\nisterico\nistituto\nistrice\nitalia\niterare\nlabbro\nlabirinto\nlacca\nlacerato\nlacrima\nlacuna\nladdove\nlago\nlampo\nlancetta\nlanterna\nlardoso\nlarga\nlaringe\nlastra\nlatenza\nlatino\nlattuga\nlavagna\nlavoro\nlegale\nleggero\nlembo\nlentezza\nlenza\nleone\nlepre\nlesivo\nlessato\nlesto\nletterale\nleva\nlevigato\nlibero\nlido\nlievito\nlilla\nlimatura\nlimitare\nlimpido\nlineare\nlingua\nliquido\nlira\nlirica\nlisca\nlite\nlitigio\nlivrea\nlocanda\nlode\nlogica\nlombare\nlondra\nlongevo\nloquace\nlorenzo\nloto\nlotteria\nluce\nlucidato\nlumaca\nluminoso\nlungo\nlupo\nluppolo\nlusinga\nlusso\nlutto\nmacabro\nmacchina\nmacero\nmacinato\nmadama\nmagico\nmaglia\nmagnete\nmagro\nmaiolica\nmalafede\nmalgrado\nmalinteso\nmalsano\nmalto\nmalumore\nmana\nmancia\nmandorla\nmangiare\nmanifesto\nmannaro\nmanovra\nmansarda\nmantide\nmanubrio\nmappa\nmaratona\nmarcire\nmaretta\nmarmo\nmarsupio\nmaschera\nmassaia\nmastino\nmaterasso\nmatricola\nmattone\nmaturo\nmazurca\nmeandro\nmeccanico\nmecenate\nmedesimo\nmeditare\nmega\nmelassa\nmelis\nmelodia\nmeninge\nmeno\nmensola\nmercurio\nmerenda\nmerlo\nmeschino\nmese\nmessere\nmestolo\nmetallo\nmetodo\nmettere\nmiagolare\nmica\nmicelio\nmichele\nmicrobo\nmidollo\nmiele\nmigliore\nmilano\nmilite\nmimosa\nminerale\nmini\nminore\nmirino\nmirtillo\nmiscela\nmissiva\nmisto\nmisurare\nmitezza\nmitigare\nmitra\nmittente\nmnemonico\nmodello\nmodifica\nmodulo\nmogano\nmogio\nmole\nmolosso\nmonastero\nmonco\nmondina\nmonetario\nmonile\nmonotono\nmonsone\nmontato\nmonviso\nmora\nmordere\nmorsicato\nmostro\nmotivato\nmotosega\nmotto\nmovenza\nmovimento\nmozzo\nmucca\nmucosa\nmuffa\nmughetto\nmugnaio\nmulatto\nmulinello\nmultiplo\nmummia\nmunto\nmuovere\nmurale\nmusa\nmuscolo\nmusica\nmutevole\nmuto\nnababbo\nnafta\nnanometro\nnarciso\nnarice\nnarrato\nnascere\nnastrare\nnaturale\nnautica\nnaviglio\nnebulosa\nnecrosi\nnegativo\nnegozio\nnemmeno\nneofita\nneretto\nnervo\nnessuno\nnettuno\nneutrale\nneve\nnevrotico\nnicchia\nninfa\nnitido\nnobile\nnocivo\nnodo\nnome\nnomina\nnordico\nnormale\nnorvegese\nnostrano\nnotare\nnotizia\nnotturno\nnovella\nnucleo\nnulla\nnumero\nnuovo\nnutrire\nnuvola\nnuziale\noasi\nobbedire\nobbligo\nobelisco\noblio\nobolo\nobsoleto\noccasione\nocchio\noccidente\noccorrere\noccultare\nocra\noculato\nodierno\nodorare\nofferta\noffrire\noffuscato\noggetto\noggi\nognuno\nolandese\nolfatto\noliato\noliva\nologramma\noltre\nomaggio\nombelico\nombra\nomega\nomissione\nondoso\nonere\nonice\nonnivoro\nonorevole\nonta\noperato\nopinione\nopposto\noracolo\norafo\nordine\norecchino\norefice\norfano\norganico\norigine\norizzonte\norma\normeggio\nornativo\norologio\norrendo\norribile\nortensia\nortica\norzata\norzo\nosare\noscurare\nosmosi\nospedale\nospite\nossa\nossidare\nostacolo\noste\notite\notre\nottagono\nottimo\nottobre\novale\novest\novino\noviparo\novocito\novunque\novviare\nozio\npacchetto\npace\npacifico\npadella\npadrone\npaese\npaga\npagina\npalazzina\npalesare\npallido\npalo\npalude\npandoro\npannello\npaolo\npaonazzo\npaprica\nparabola\nparcella\nparere\npargolo\npari\nparlato\nparola\npartire\nparvenza\nparziale\npassivo\npasticca\npatacca\npatologia\npattume\npavone\npeccato\npedalare\npedonale\npeggio\npeloso\npenare\npendice\npenisola\npennuto\npenombra\npensare\npentola\npepe\npepita\nperbene\npercorso\nperdonato\nperforare\npergamena\nperiodo\npermesso\nperno\nperplesso\npersuaso\npertugio\npervaso\npesatore\npesista\npeso\npestifero\npetalo\npettine\npetulante\npezzo\npiacere\npianta\npiattino\npiccino\npicozza\npiega\npietra\npiffero\npigiama\npigolio\npigro\npila\npilifero\npillola\npilota\npimpante\npineta\npinna\npinolo\npioggia\npiombo\npiramide\npiretico\npirite\npirolisi\npitone\npizzico\nplacebo\nplanare\nplasma\nplatano\nplenario\npochezza\npoderoso\npodismo\npoesia\npoggiare\npolenta\npoligono\npollice\npolmonite\npolpetta\npolso\npoltrona\npolvere\npomice\npomodoro\nponte\npopoloso\nporfido\nporoso\nporpora\nporre\nportata\nposa\npositivo\npossesso\npostulato\npotassio\npotere\npranzo\nprassi\npratica\nprecluso\npredica\nprefisso\npregiato\nprelievo\npremere\nprenotare\npreparato\npresenza\npretesto\nprevalso\nprima\nprincipe\nprivato\nproblema\nprocura\nprodurre\nprofumo\nprogetto\nprolunga\npromessa\npronome\nproposta\nproroga\nproteso\nprova\nprudente\nprugna\nprurito\npsiche\npubblico\npudica\npugilato\npugno\npulce\npulito\npulsante\npuntare\npupazzo\npupilla\npuro\nquadro\nqualcosa\nquasi\nquerela\nquota\nraccolto\nraddoppio\nradicale\nradunato\nraffica\nragazzo\nragione\nragno\nramarro\nramingo\nramo\nrandagio\nrantolare\nrapato\nrapina\nrappreso\nrasatura\nraschiato\nrasente\nrassegna\nrastrello\nrata\nravveduto\nreale\nrecepire\nrecinto\nrecluta\nrecondito\nrecupero\nreddito\nredimere\nregalato\nregistro\nregola\nregresso\nrelazione\nremare\nremoto\nrenna\nreplica\nreprimere\nreputare\nresa\nresidente\nresponso\nrestauro\nrete\nretina\nretorica\nrettifica\nrevocato\nriassunto\nribadire\nribelle\nribrezzo\nricarica\nricco\nricevere\nriciclato\nricordo\nricreduto\nridicolo\nridurre\nrifasare\nriflesso\nriforma\nrifugio\nrigare\nrigettato\nrighello\nrilassato\nrilevato\nrimanere\nrimbalzo\nrimedio\nrimorchio\nrinascita\nrincaro\nrinforzo\nrinnovo\nrinomato\nrinsavito\nrintocco\nrinuncia\nrinvenire\nriparato\nripetuto\nripieno\nriportare\nripresa\nripulire\nrisata\nrischio\nriserva\nrisibile\nriso\nrispetto\nristoro\nrisultato\nrisvolto\nritardo\nritegno\nritmico\nritrovo\nriunione\nriva\nriverso\nrivincita\nrivolto\nrizoma\nroba\nrobotico\nrobusto\nroccia\nroco\nrodaggio\nrodere\nroditore\nrogito\nrollio\nromantico\nrompere\nronzio\nrosolare\nrospo\nrotante\nrotondo\nrotula\nrovescio\nrubizzo\nrubrica\nruga\nrullino\nrumine\nrumoroso\nruolo\nrupe\nrussare\nrustico\nsabato\nsabbiare\nsabotato\nsagoma\nsalasso\nsaldatura\nsalgemma\nsalivare\nsalmone\nsalone\nsaltare\nsaluto\nsalvo\nsapere\nsapido\nsaporito\nsaraceno\nsarcasmo\nsarto\nsassoso\nsatellite\nsatira\nsatollo\nsaturno\nsavana\nsavio\nsaziato\nsbadiglio\nsbalzo\nsbancato\nsbarra\nsbattere\nsbavare\nsbendare\nsbirciare\nsbloccato\nsbocciato\nsbrinare\nsbruffone\nsbuffare\nscabroso\nscadenza\nscala\nscambiare\nscandalo\nscapola\nscarso\nscatenare\nscavato\nscelto\nscenico\nscettro\nscheda\nschiena\nsciarpa\nscienza\nscindere\nscippo\nsciroppo\nscivolo\nsclerare\nscodella\nscolpito\nscomparto\nsconforto\nscoprire\nscorta\nscossone\nscozzese\nscriba\nscrollare\nscrutinio\nscuderia\nscultore\nscuola\nscuro\nscusare\nsdebitare\nsdoganare\nseccatura\nsecondo\nsedano\nseggiola\nsegnalato\nsegregato\nseguito\nselciato\nselettivo\nsella\nselvaggio\nsemaforo\nsembrare\nseme\nseminato\nsempre\nsenso\nsentire\nsepolto\nsequenza\nserata\nserbato\nsereno\nserio\nserpente\nserraglio\nservire\nsestina\nsetola\nsettimana\nsfacelo\nsfaldare\nsfamato\nsfarzoso\nsfaticato\nsfera\nsfida\nsfilato\nsfinge\nsfocato\nsfoderare\nsfogo\nsfoltire\nsforzato\nsfratto\nsfruttato\nsfuggito\nsfumare\nsfuso\nsgabello\nsgarbato\nsgonfiare\nsgorbio\nsgrassato\nsguardo\nsibilo\nsiccome\nsierra\nsigla\nsignore\nsilenzio\nsillaba\nsimbolo\nsimpatico\nsimulato\nsinfonia\nsingolo\nsinistro\nsino\nsintesi\nsinusoide\nsipario\nsisma\nsistole\nsituato\nslitta\nslogatura\nsloveno\nsmarrito\nsmemorato\nsmentito\nsmeraldo\nsmilzo\nsmontare\nsmottato\nsmussato\nsnellire\nsnervato\nsnodo\nsobbalzo\nsobrio\nsoccorso\nsociale\nsodale\nsoffitto\nsogno\nsoldato\nsolenne\nsolido\nsollazzo\nsolo\nsolubile\nsolvente\nsomatico\nsomma\nsonda\nsonetto\nsonnifero\nsopire\nsoppeso\nsopra\nsorgere\nsorpasso\nsorriso\nsorso\nsorteggio\nsorvolato\nsospiro\nsosta\nsottile\nspada\nspalla\nspargere\nspatola\nspavento\nspazzola\nspecie\nspedire\nspegnere\nspelatura\nsperanza\nspessore\nspettrale\nspezzato\nspia\nspigoloso\nspillato\nspinoso\nspirale\nsplendido\nsportivo\nsposo\nspranga\nsprecare\nspronato\nspruzzo\nspuntino\nsquillo\nsradicare\nsrotolato\nstabile\nstacco\nstaffa\nstagnare\nstampato\nstantio\nstarnuto\nstasera\nstatuto\nstelo\nsteppa\nsterzo\nstiletto\nstima\nstirpe\nstivale\nstizzoso\nstonato\nstorico\nstrappo\nstregato\nstridulo\nstrozzare\nstrutto\nstuccare\nstufo\nstupendo\nsubentro\nsuccoso\nsudore\nsuggerito\nsugo\nsultano\nsuonare\nsuperbo\nsupporto\nsurgelato\nsurrogato\nsussurro\nsutura\nsvagare\nsvedese\nsveglio\nsvelare\nsvenuto\nsvezia\nsviluppo\nsvista\nsvizzera\nsvolta\nsvuotare\ntabacco\ntabulato\ntacciare\ntaciturno\ntale\ntalismano\ntampone\ntannino\ntara\ntardivo\ntargato\ntariffa\ntarpare\ntartaruga\ntasto\ntattico\ntaverna\ntavolata\ntazza\nteca\ntecnico\ntelefono\ntemerario\ntempo\ntemuto\ntendone\ntenero\ntensione\ntentacolo\nteorema\nterme\nterrazzo\nterzetto\ntesi\ntesserato\ntestato\ntetro\ntettoia\ntifare\ntigella\ntimbro\ntinto\ntipico\ntipografo\ntiraggio\ntiro\ntitanio\ntitolo\ntitubante\ntizio\ntizzone\ntoccare\ntollerare\ntolto\ntombola\ntomo\ntonfo\ntonsilla\ntopazio\ntopologia\ntoppa\ntorba\ntornare\ntorrone\ntortora\ntoscano\ntossire\ntostatura\ntotano\ntrabocco\ntrachea\ntrafila\ntragedia\ntralcio\ntramonto\ntransito\ntrapano\ntrarre\ntrasloco\ntrattato\ntrave\ntreccia\ntremolio\ntrespolo\ntributo\ntricheco\ntrifoglio\ntrillo\ntrincea\ntrio\ntristezza\ntriturato\ntrivella\ntromba\ntrono\ntroppo\ntrottola\ntrovare\ntruccato\ntubatura\ntuffato\ntulipano\ntumulto\ntunisia\nturbare\nturchino\ntuta\ntutela\nubicato\nuccello\nuccisore\nudire\nuditivo\nuffa\nufficio\nuguale\nulisse\nultimato\numano\numile\numorismo\nuncinetto\nungere\nungherese\nunicorno\nunificato\nunisono\nunitario\nunte\nuovo\nupupa\nuragano\nurgenza\nurlo\nusanza\nusato\nuscito\nusignolo\nusuraio\nutensile\nutilizzo\nutopia\nvacante\nvaccinato\nvagabondo\nvagliato\nvalanga\nvalgo\nvalico\nvalletta\nvaloroso\nvalutare\nvalvola\nvampata\nvangare\nvanitoso\nvano\nvantaggio\nvanvera\nvapore\nvarano\nvarcato\nvariante\nvasca\nvedetta\nvedova\nveduto\nvegetale\nveicolo\nvelcro\nvelina\nvelluto\nveloce\nvenato\nvendemmia\nvento\nverace\nverbale\nvergogna\nverifica\nvero\nverruca\nverticale\nvescica\nvessillo\nvestale\nveterano\nvetrina\nvetusto\nviandante\nvibrante\nvicenda\nvichingo\nvicinanza\nvidimare\nvigilia\nvigneto\nvigore\nvile\nvillano\nvimini\nvincitore\nviola\nvipera\nvirgola\nvirologo\nvirulento\nviscoso\nvisione\nvispo\nvissuto\nvisura\nvita\nvitello\nvittima\nvivanda\nvivido\nviziare\nvoce\nvoga\nvolatile\nvolere\nvolpe\nvoragine\nvulcano\nzampogna\nzanna\nzappato\nzattera\nzavorra\nzefiro\nzelante\nzelo\nzenzero\nzerbino\nzibetto\nzinco\nzircone\nzitto\nzolla\nzotico\nzucchero\nzufolo\nzulu\nzuppa\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/japanese.txt",
    "content": "あいこくしん\nあいさつ\nあいだ\nあおぞら\nあかちゃん\nあきる\nあけがた\nあける\nあこがれる\nあさい\nあさひ\nあしあと\nあじわう\nあずかる\nあずき\nあそぶ\nあたえる\nあたためる\nあたりまえ\nあたる\nあつい\nあつかう\nあっしゅく\nあつまり\nあつめる\nあてな\nあてはまる\nあひる\nあぶら\nあぶる\nあふれる\nあまい\nあまど\nあまやかす\nあまり\nあみもの\nあめりか\nあやまる\nあゆむ\nあらいぐま\nあらし\nあらすじ\nあらためる\nあらゆる\nあらわす\nありがとう\nあわせる\nあわてる\nあんい\nあんがい\nあんこ\nあんぜん\nあんてい\nあんない\nあんまり\nいいだす\nいおん\nいがい\nいがく\nいきおい\nいきなり\nいきもの\nいきる\nいくじ\nいくぶん\nいけばな\nいけん\nいこう\nいこく\nいこつ\nいさましい\nいさん\nいしき\nいじゅう\nいじょう\nいじわる\nいずみ\nいずれ\nいせい\nいせえび\nいせかい\nいせき\nいぜん\nいそうろう\nいそがしい\nいだい\nいだく\nいたずら\nいたみ\nいたりあ\nいちおう\nいちじ\nいちど\nいちば\nいちぶ\nいちりゅう\nいつか\nいっしゅん\nいっせい\nいっそう\nいったん\nいっち\nいってい\nいっぽう\nいてざ\nいてん\nいどう\nいとこ\nいない\nいなか\nいねむり\nいのち\nいのる\nいはつ\nいばる\nいはん\nいびき\nいひん\nいふく\nいへん\nいほう\nいみん\nいもうと\nいもたれ\nいもり\nいやがる\nいやす\nいよかん\nいよく\nいらい\nいらすと\nいりぐち\nいりょう\nいれい\nいれもの\nいれる\nいろえんぴつ\nいわい\nいわう\nいわかん\nいわば\nいわゆる\nいんげんまめ\nいんさつ\nいんしょう\nいんよう\nうえき\nうえる\nうおざ\nうがい\nうかぶ\nうかべる\nうきわ\nうくらいな\nうくれれ\nうけたまわる\nうけつけ\nうけとる\nうけもつ\nうける\nうごかす\nうごく\nうこん\nうさぎ\nうしなう\nうしろがみ\nうすい\nうすぎ\nうすぐらい\nうすめる\nうせつ\nうちあわせ\nうちがわ\nうちき\nうちゅう\nうっかり\nうつくしい\nうったえる\nうつる\nうどん\nうなぎ\nうなじ\nうなずく\nうなる\nうねる\nうのう\nうぶげ\nうぶごえ\nうまれる\nうめる\nうもう\nうやまう\nうよく\nうらがえす\nうらぐち\nうらない\nうりあげ\nうりきれ\nうるさい\nうれしい\nうれゆき\nうれる\nうろこ\nうわき\nうわさ\nうんこう\nうんちん\nうんてん\nうんどう\nえいえん\nえいが\nえいきょう\nえいご\nえいせい\nえいぶん\nえいよう\nえいわ\nえおり\nえがお\nえがく\nえきたい\nえくせる\nえしゃく\nえすて\nえつらん\nえのぐ\nえほうまき\nえほん\nえまき\nえもじ\nえもの\nえらい\nえらぶ\nえりあ\nえんえん\nえんかい\nえんぎ\nえんげき\nえんしゅう\nえんぜつ\nえんそく\nえんちょう\nえんとつ\nおいかける\nおいこす\nおいしい\nおいつく\nおうえん\nおうさま\nおうじ\nおうせつ\nおうたい\nおうふく\nおうべい\nおうよう\nおえる\nおおい\nおおう\nおおどおり\nおおや\nおおよそ\nおかえり\nおかず\nおがむ\nおかわり\nおぎなう\nおきる\nおくさま\nおくじょう\nおくりがな\nおくる\nおくれる\nおこす\nおこなう\nおこる\nおさえる\nおさない\nおさめる\nおしいれ\nおしえる\nおじぎ\nおじさん\nおしゃれ\nおそらく\nおそわる\nおたがい\nおたく\nおだやか\nおちつく\nおっと\nおつり\nおでかけ\nおとしもの\nおとなしい\nおどり\nおどろかす\nおばさん\nおまいり\nおめでとう\nおもいで\nおもう\nおもたい\nおもちゃ\nおやつ\nおやゆび\nおよぼす\nおらんだ\nおろす\nおんがく\nおんけい\nおんしゃ\nおんせん\nおんだん\nおんちゅう\nおんどけい\nかあつ\nかいが\nがいき\nがいけん\nがいこう\nかいさつ\nかいしゃ\nかいすいよく\nかいぜん\nかいぞうど\nかいつう\nかいてん\nかいとう\nかいふく\nがいへき\nかいほう\nかいよう\nがいらい\nかいわ\nかえる\nかおり\nかかえる\nかがく\nかがし\nかがみ\nかくご\nかくとく\nかざる\nがぞう\nかたい\nかたち\nがちょう\nがっきゅう\nがっこう\nがっさん\nがっしょう\nかなざわし\nかのう\nがはく\nかぶか\nかほう\nかほご\nかまう\nかまぼこ\nかめれおん\nかゆい\nかようび\nからい\nかるい\nかろう\nかわく\nかわら\nがんか\nかんけい\nかんこう\nかんしゃ\nかんそう\nかんたん\nかんち\nがんばる\nきあい\nきあつ\nきいろ\nぎいん\nきうい\nきうん\nきえる\nきおう\nきおく\nきおち\nきおん\nきかい\nきかく\nきかんしゃ\nききて\nきくばり\nきくらげ\nきけんせい\nきこう\nきこえる\nきこく\nきさい\nきさく\nきさま\nきさらぎ\nぎじかがく\nぎしき\nぎじたいけん\nぎじにってい\nぎじゅつしゃ\nきすう\nきせい\nきせき\nきせつ\nきそう\nきぞく\nきぞん\nきたえる\nきちょう\nきつえん\nぎっちり\nきつつき\nきつね\nきてい\nきどう\nきどく\nきない\nきなが\nきなこ\nきぬごし\nきねん\nきのう\nきのした\nきはく\nきびしい\nきひん\nきふく\nきぶん\nきぼう\nきほん\nきまる\nきみつ\nきむずかしい\nきめる\nきもだめし\nきもち\nきもの\nきゃく\nきやく\nぎゅうにく\nきよう\nきょうりゅう\nきらい\nきらく\nきりん\nきれい\nきれつ\nきろく\nぎろん\nきわめる\nぎんいろ\nきんかくじ\nきんじょ\nきんようび\nぐあい\nくいず\nくうかん\nくうき\nくうぐん\nくうこう\nぐうせい\nくうそう\nぐうたら\nくうふく\nくうぼ\nくかん\nくきょう\nくげん\nぐこう\nくさい\nくさき\nくさばな\nくさる\nくしゃみ\nくしょう\nくすのき\nくすりゆび\nくせげ\nくせん\nぐたいてき\nくださる\nくたびれる\nくちこみ\nくちさき\nくつした\nぐっすり\nくつろぐ\nくとうてん\nくどく\nくなん\nくねくね\nくのう\nくふう\nくみあわせ\nくみたてる\nくめる\nくやくしょ\nくらす\nくらべる\nくるま\nくれる\nくろう\nくわしい\nぐんかん\nぐんしょく\nぐんたい\nぐんて\nけあな\nけいかく\nけいけん\nけいこ\nけいさつ\nげいじゅつ\nけいたい\nげいのうじん\nけいれき\nけいろ\nけおとす\nけおりもの\nげきか\nげきげん\nげきだん\nげきちん\nげきとつ\nげきは\nげきやく\nげこう\nげこくじょう\nげざい\nけさき\nげざん\nけしき\nけしごむ\nけしょう\nげすと\nけたば\nけちゃっぷ\nけちらす\nけつあつ\nけつい\nけつえき\nけっこん\nけつじょ\nけっせき\nけってい\nけつまつ\nげつようび\nげつれい\nけつろん\nげどく\nけとばす\nけとる\nけなげ\nけなす\nけなみ\nけぬき\nげねつ\nけねん\nけはい\nげひん\nけぶかい\nげぼく\nけまり\nけみかる\nけむし\nけむり\nけもの\nけらい\nけろけろ\nけわしい\nけんい\nけんえつ\nけんお\nけんか\nげんき\nけんげん\nけんこう\nけんさく\nけんしゅう\nけんすう\nげんそう\nけんちく\nけんてい\nけんとう\nけんない\nけんにん\nげんぶつ\nけんま\nけんみん\nけんめい\nけんらん\nけんり\nこあくま\nこいぬ\nこいびと\nごうい\nこうえん\nこうおん\nこうかん\nごうきゅう\nごうけい\nこうこう\nこうさい\nこうじ\nこうすい\nごうせい\nこうそく\nこうたい\nこうちゃ\nこうつう\nこうてい\nこうどう\nこうない\nこうはい\nごうほう\nごうまん\nこうもく\nこうりつ\nこえる\nこおり\nごかい\nごがつ\nごかん\nこくご\nこくさい\nこくとう\nこくない\nこくはく\nこぐま\nこけい\nこける\nここのか\nこころ\nこさめ\nこしつ\nこすう\nこせい\nこせき\nこぜん\nこそだて\nこたい\nこたえる\nこたつ\nこちょう\nこっか\nこつこつ\nこつばん\nこつぶ\nこてい\nこてん\nことがら\nことし\nことば\nことり\nこなごな\nこねこね\nこのまま\nこのみ\nこのよ\nごはん\nこひつじ\nこふう\nこふん\nこぼれる\nごまあぶら\nこまかい\nごますり\nこまつな\nこまる\nこむぎこ\nこもじ\nこもち\nこもの\nこもん\nこやく\nこやま\nこゆう\nこゆび\nこよい\nこよう\nこりる\nこれくしょん\nころっけ\nこわもて\nこわれる\nこんいん\nこんかい\nこんき\nこんしゅう\nこんすい\nこんだて\nこんとん\nこんなん\nこんびに\nこんぽん\nこんまけ\nこんや\nこんれい\nこんわく\nざいえき\nさいかい\nさいきん\nざいげん\nざいこ\nさいしょ\nさいせい\nざいたく\nざいちゅう\nさいてき\nざいりょう\nさうな\nさかいし\nさがす\nさかな\nさかみち\nさがる\nさぎょう\nさくし\nさくひん\nさくら\nさこく\nさこつ\nさずかる\nざせき\nさたん\nさつえい\nざつおん\nざっか\nざつがく\nさっきょく\nざっし\nさつじん\nざっそう\nさつたば\nさつまいも\nさてい\nさといも\nさとう\nさとおや\nさとし\nさとる\nさのう\nさばく\nさびしい\nさべつ\nさほう\nさほど\nさます\nさみしい\nさみだれ\nさむけ\nさめる\nさやえんどう\nさゆう\nさよう\nさよく\nさらだ\nざるそば\nさわやか\nさわる\nさんいん\nさんか\nさんきゃく\nさんこう\nさんさい\nざんしょ\nさんすう\nさんせい\nさんそ\nさんち\nさんま\nさんみ\nさんらん\nしあい\nしあげ\nしあさって\nしあわせ\nしいく\nしいん\nしうち\nしえい\nしおけ\nしかい\nしかく\nじかん\nしごと\nしすう\nじだい\nしたうけ\nしたぎ\nしたて\nしたみ\nしちょう\nしちりん\nしっかり\nしつじ\nしつもん\nしてい\nしてき\nしてつ\nじてん\nじどう\nしなぎれ\nしなもの\nしなん\nしねま\nしねん\nしのぐ\nしのぶ\nしはい\nしばかり\nしはつ\nしはらい\nしはん\nしひょう\nしふく\nじぶん\nしへい\nしほう\nしほん\nしまう\nしまる\nしみん\nしむける\nじむしょ\nしめい\nしめる\nしもん\nしゃいん\nしゃうん\nしゃおん\nじゃがいも\nしやくしょ\nしゃくほう\nしゃけん\nしゃこ\nしゃざい\nしゃしん\nしゃせん\nしゃそう\nしゃたい\nしゃちょう\nしゃっきん\nじゃま\nしゃりん\nしゃれい\nじゆう\nじゅうしょ\nしゅくはく\nじゅしん\nしゅっせき\nしゅみ\nしゅらば\nじゅんばん\nしょうかい\nしょくたく\nしょっけん\nしょどう\nしょもつ\nしらせる\nしらべる\nしんか\nしんこう\nじんじゃ\nしんせいじ\nしんちく\nしんりん\nすあげ\nすあし\nすあな\nずあん\nすいえい\nすいか\nすいとう\nずいぶん\nすいようび\nすうがく\nすうじつ\nすうせん\nすおどり\nすきま\nすくう\nすくない\nすける\nすごい\nすこし\nずさん\nすずしい\nすすむ\nすすめる\nすっかり\nずっしり\nずっと\nすてき\nすてる\nすねる\nすのこ\nすはだ\nすばらしい\nずひょう\nずぶぬれ\nすぶり\nすふれ\nすべて\nすべる\nずほう\nすぼん\nすまい\nすめし\nすもう\nすやき\nすらすら\nするめ\nすれちがう\nすろっと\nすわる\nすんぜん\nすんぽう\nせあぶら\nせいかつ\nせいげん\nせいじ\nせいよう\nせおう\nせかいかん\nせきにん\nせきむ\nせきゆ\nせきらんうん\nせけん\nせこう\nせすじ\nせたい\nせたけ\nせっかく\nせっきゃく\nぜっく\nせっけん\nせっこつ\nせっさたくま\nせつぞく\nせつだん\nせつでん\nせっぱん\nせつび\nせつぶん\nせつめい\nせつりつ\nせなか\nせのび\nせはば\nせびろ\nせぼね\nせまい\nせまる\nせめる\nせもたれ\nせりふ\nぜんあく\nせんい\nせんえい\nせんか\nせんきょ\nせんく\nせんげん\nぜんご\nせんさい\nせんしゅ\nせんすい\nせんせい\nせんぞ\nせんたく\nせんちょう\nせんてい\nせんとう\nせんぬき\nせんねん\nせんぱい\nぜんぶ\nぜんぽう\nせんむ\nせんめんじょ\nせんもん\nせんやく\nせんゆう\nせんよう\nぜんら\nぜんりゃく\nせんれい\nせんろ\nそあく\nそいとげる\nそいね\nそうがんきょう\nそうき\nそうご\nそうしん\nそうだん\nそうなん\nそうび\nそうめん\nそうり\nそえもの\nそえん\nそがい\nそげき\nそこう\nそこそこ\nそざい\nそしな\nそせい\nそせん\nそそぐ\nそだてる\nそつう\nそつえん\nそっかん\nそつぎょう\nそっけつ\nそっこう\nそっせん\nそっと\nそとがわ\nそとづら\nそなえる\nそなた\nそふぼ\nそぼく\nそぼろ\nそまつ\nそまる\nそむく\nそむりえ\nそめる\nそもそも\nそよかぜ\nそらまめ\nそろう\nそんかい\nそんけい\nそんざい\nそんしつ\nそんぞく\nそんちょう\nぞんび\nぞんぶん\nそんみん\nたあい\nたいいん\nたいうん\nたいえき\nたいおう\nだいがく\nたいき\nたいぐう\nたいけん\nたいこ\nたいざい\nだいじょうぶ\nだいすき\nたいせつ\nたいそう\nだいたい\nたいちょう\nたいてい\nだいどころ\nたいない\nたいねつ\nたいのう\nたいはん\nだいひょう\nたいふう\nたいへん\nたいほ\nたいまつばな\nたいみんぐ\nたいむ\nたいめん\nたいやき\nたいよう\nたいら\nたいりょく\nたいる\nたいわん\nたうえ\nたえる\nたおす\nたおる\nたおれる\nたかい\nたかね\nたきび\nたくさん\nたこく\nたこやき\nたさい\nたしざん\nだじゃれ\nたすける\nたずさわる\nたそがれ\nたたかう\nたたく\nただしい\nたたみ\nたちばな\nだっかい\nだっきゃく\nだっこ\nだっしゅつ\nだったい\nたてる\nたとえる\nたなばた\nたにん\nたぬき\nたのしみ\nたはつ\nたぶん\nたべる\nたぼう\nたまご\nたまる\nだむる\nためいき\nためす\nためる\nたもつ\nたやすい\nたよる\nたらす\nたりきほんがん\nたりょう\nたりる\nたると\nたれる\nたれんと\nたろっと\nたわむれる\nだんあつ\nたんい\nたんおん\nたんか\nたんき\nたんけん\nたんご\nたんさん\nたんじょうび\nだんせい\nたんそく\nたんたい\nだんち\nたんてい\nたんとう\nだんな\nたんにん\nだんねつ\nたんのう\nたんぴん\nだんぼう\nたんまつ\nたんめい\nだんれつ\nだんろ\nだんわ\nちあい\nちあん\nちいき\nちいさい\nちえん\nちかい\nちから\nちきゅう\nちきん\nちけいず\nちけん\nちこく\nちさい\nちしき\nちしりょう\nちせい\nちそう\nちたい\nちたん\nちちおや\nちつじょ\nちてき\nちてん\nちぬき\nちぬり\nちのう\nちひょう\nちへいせん\nちほう\nちまた\nちみつ\nちみどろ\nちめいど\nちゃんこなべ\nちゅうい\nちゆりょく\nちょうし\nちょさくけん\nちらし\nちらみ\nちりがみ\nちりょう\nちるど\nちわわ\nちんたい\nちんもく\nついか\nついたち\nつうか\nつうじょう\nつうはん\nつうわ\nつかう\nつかれる\nつくね\nつくる\nつけね\nつける\nつごう\nつたえる\nつづく\nつつじ\nつつむ\nつとめる\nつながる\nつなみ\nつねづね\nつのる\nつぶす\nつまらない\nつまる\nつみき\nつめたい\nつもり\nつもる\nつよい\nつるぼ\nつるみく\nつわもの\nつわり\nてあし\nてあて\nてあみ\nていおん\nていか\nていき\nていけい\nていこく\nていさつ\nていし\nていせい\nていたい\nていど\nていねい\nていひょう\nていへん\nていぼう\nてうち\nておくれ\nてきとう\nてくび\nでこぼこ\nてさぎょう\nてさげ\nてすり\nてそう\nてちがい\nてちょう\nてつがく\nてつづき\nでっぱ\nてつぼう\nてつや\nでぬかえ\nてぬき\nてぬぐい\nてのひら\nてはい\nてぶくろ\nてふだ\nてほどき\nてほん\nてまえ\nてまきずし\nてみじか\nてみやげ\nてらす\nてれび\nてわけ\nてわたし\nでんあつ\nてんいん\nてんかい\nてんき\nてんぐ\nてんけん\nてんごく\nてんさい\nてんし\nてんすう\nでんち\nてんてき\nてんとう\nてんない\nてんぷら\nてんぼうだい\nてんめつ\nてんらんかい\nでんりょく\nでんわ\nどあい\nといれ\nどうかん\nとうきゅう\nどうぐ\nとうし\nとうむぎ\nとおい\nとおか\nとおく\nとおす\nとおる\nとかい\nとかす\nときおり\nときどき\nとくい\nとくしゅう\nとくてん\nとくに\nとくべつ\nとけい\nとける\nとこや\nとさか\nとしょかん\nとそう\nとたん\nとちゅう\nとっきゅう\nとっくん\nとつぜん\nとつにゅう\nとどける\nととのえる\nとない\nとなえる\nとなり\nとのさま\nとばす\nどぶがわ\nとほう\nとまる\nとめる\nともだち\nともる\nどようび\nとらえる\nとんかつ\nどんぶり\nないかく\nないこう\nないしょ\nないす\nないせん\nないそう\nなおす\nながい\nなくす\nなげる\nなこうど\nなさけ\nなたでここ\nなっとう\nなつやすみ\nななおし\nなにごと\nなにもの\nなにわ\nなのか\nなふだ\nなまいき\nなまえ\nなまみ\nなみだ\nなめらか\nなめる\nなやむ\nならう\nならび\nならぶ\nなれる\nなわとび\nなわばり\nにあう\nにいがた\nにうけ\nにおい\nにかい\nにがて\nにきび\nにくしみ\nにくまん\nにげる\nにさんかたんそ\nにしき\nにせもの\nにちじょう\nにちようび\nにっか\nにっき\nにっけい\nにっこう\nにっさん\nにっしょく\nにっすう\nにっせき\nにってい\nになう\nにほん\nにまめ\nにもつ\nにやり\nにゅういん\nにりんしゃ\nにわとり\nにんい\nにんか\nにんき\nにんげん\nにんしき\nにんずう\nにんそう\nにんたい\nにんち\nにんてい\nにんにく\nにんぷ\nにんまり\nにんむ\nにんめい\nにんよう\nぬいくぎ\nぬかす\nぬぐいとる\nぬぐう\nぬくもり\nぬすむ\nぬまえび\nぬめり\nぬらす\nぬんちゃく\nねあげ\nねいき\nねいる\nねいろ\nねぐせ\nねくたい\nねくら\nねこぜ\nねこむ\nねさげ\nねすごす\nねそべる\nねだん\nねつい\nねっしん\nねつぞう\nねったいぎょ\nねぶそく\nねふだ\nねぼう\nねほりはほり\nねまき\nねまわし\nねみみ\nねむい\nねむたい\nねもと\nねらう\nねわざ\nねんいり\nねんおし\nねんかん\nねんきん\nねんぐ\nねんざ\nねんし\nねんちゃく\nねんど\nねんぴ\nねんぶつ\nねんまつ\nねんりょう\nねんれい\nのいず\nのおづま\nのがす\nのきなみ\nのこぎり\nのこす\nのこる\nのせる\nのぞく\nのぞむ\nのたまう\nのちほど\nのっく\nのばす\nのはら\nのべる\nのぼる\nのみもの\nのやま\nのらいぬ\nのらねこ\nのりもの\nのりゆき\nのれん\nのんき\nばあい\nはあく\nばあさん\nばいか\nばいく\nはいけん\nはいご\nはいしん\nはいすい\nはいせん\nはいそう\nはいち\nばいばい\nはいれつ\nはえる\nはおる\nはかい\nばかり\nはかる\nはくしゅ\nはけん\nはこぶ\nはさみ\nはさん\nはしご\nばしょ\nはしる\nはせる\nぱそこん\nはそん\nはたん\nはちみつ\nはつおん\nはっかく\nはづき\nはっきり\nはっくつ\nはっけん\nはっこう\nはっさん\nはっしん\nはったつ\nはっちゅう\nはってん\nはっぴょう\nはっぽう\nはなす\nはなび\nはにかむ\nはぶらし\nはみがき\nはむかう\nはめつ\nはやい\nはやし\nはらう\nはろうぃん\nはわい\nはんい\nはんえい\nはんおん\nはんかく\nはんきょう\nばんぐみ\nはんこ\nはんしゃ\nはんすう\nはんだん\nぱんち\nぱんつ\nはんてい\nはんとし\nはんのう\nはんぱ\nはんぶん\nはんぺん\nはんぼうき\nはんめい\nはんらん\nはんろん\nひいき\nひうん\nひえる\nひかく\nひかり\nひかる\nひかん\nひくい\nひけつ\nひこうき\nひこく\nひさい\nひさしぶり\nひさん\nびじゅつかん\nひしょ\nひそか\nひそむ\nひたむき\nひだり\nひたる\nひつぎ\nひっこし\nひっし\nひつじゅひん\nひっす\nひつぜん\nぴったり\nぴっちり\nひつよう\nひてい\nひとごみ\nひなまつり\nひなん\nひねる\nひはん\nひびく\nひひょう\nひほう\nひまわり\nひまん\nひみつ\nひめい\nひめじし\nひやけ\nひやす\nひよう\nびょうき\nひらがな\nひらく\nひりつ\nひりょう\nひるま\nひるやすみ\nひれい\nひろい\nひろう\nひろき\nひろゆき\nひんかく\nひんけつ\nひんこん\nひんしゅ\nひんそう\nぴんち\nひんぱん\nびんぼう\nふあん\nふいうち\nふうけい\nふうせん\nぷうたろう\nふうとう\nふうふ\nふえる\nふおん\nふかい\nふきん\nふくざつ\nふくぶくろ\nふこう\nふさい\nふしぎ\nふじみ\nふすま\nふせい\nふせぐ\nふそく\nぶたにく\nふたん\nふちょう\nふつう\nふつか\nふっかつ\nふっき\nふっこく\nぶどう\nふとる\nふとん\nふのう\nふはい\nふひょう\nふへん\nふまん\nふみん\nふめつ\nふめん\nふよう\nふりこ\nふりる\nふるい\nふんいき\nぶんがく\nぶんぐ\nふんしつ\nぶんせき\nふんそう\nぶんぽう\nへいあん\nへいおん\nへいがい\nへいき\nへいげん\nへいこう\nへいさ\nへいしゃ\nへいせつ\nへいそ\nへいたく\nへいてん\nへいねつ\nへいわ\nへきが\nへこむ\nべにいろ\nべにしょうが\nへらす\nへんかん\nべんきょう\nべんごし\nへんさい\nへんたい\nべんり\nほあん\nほいく\nぼうぎょ\nほうこく\nほうそう\nほうほう\nほうもん\nほうりつ\nほえる\nほおん\nほかん\nほきょう\nぼきん\nほくろ\nほけつ\nほけん\nほこう\nほこる\nほしい\nほしつ\nほしゅ\nほしょう\nほせい\nほそい\nほそく\nほたて\nほたる\nぽちぶくろ\nほっきょく\nほっさ\nほったん\nほとんど\nほめる\nほんい\nほんき\nほんけ\nほんしつ\nほんやく\nまいにち\nまかい\nまかせる\nまがる\nまける\nまこと\nまさつ\nまじめ\nますく\nまぜる\nまつり\nまとめ\nまなぶ\nまぬけ\nまねく\nまほう\nまもる\nまゆげ\nまよう\nまろやか\nまわす\nまわり\nまわる\nまんが\nまんきつ\nまんぞく\nまんなか\nみいら\nみうち\nみえる\nみがく\nみかた\nみかん\nみけん\nみこん\nみじかい\nみすい\nみすえる\nみせる\nみっか\nみつかる\nみつける\nみてい\nみとめる\nみなと\nみなみかさい\nみねらる\nみのう\nみのがす\nみほん\nみもと\nみやげ\nみらい\nみりょく\nみわく\nみんか\nみんぞく\nむいか\nむえき\nむえん\nむかい\nむかう\nむかえ\nむかし\nむぎちゃ\nむける\nむげん\nむさぼる\nむしあつい\nむしば\nむじゅん\nむしろ\nむすう\nむすこ\nむすぶ\nむすめ\nむせる\nむせん\nむちゅう\nむなしい\nむのう\nむやみ\nむよう\nむらさき\nむりょう\nむろん\nめいあん\nめいうん\nめいえん\nめいかく\nめいきょく\nめいさい\nめいし\nめいそう\nめいぶつ\nめいれい\nめいわく\nめぐまれる\nめざす\nめした\nめずらしい\nめだつ\nめまい\nめやす\nめんきょ\nめんせき\nめんどう\nもうしあげる\nもうどうけん\nもえる\nもくし\nもくてき\nもくようび\nもちろん\nもどる\nもらう\nもんく\nもんだい\nやおや\nやける\nやさい\nやさしい\nやすい\nやすたろう\nやすみ\nやせる\nやそう\nやたい\nやちん\nやっと\nやっぱり\nやぶる\nやめる\nややこしい\nやよい\nやわらかい\nゆうき\nゆうびんきょく\nゆうべ\nゆうめい\nゆけつ\nゆしゅつ\nゆせん\nゆそう\nゆたか\nゆちゃく\nゆでる\nゆにゅう\nゆびわ\nゆらい\nゆれる\nようい\nようか\nようきゅう\nようじ\nようす\nようちえん\nよかぜ\nよかん\nよきん\nよくせい\nよくぼう\nよけい\nよごれる\nよさん\nよしゅう\nよそう\nよそく\nよっか\nよてい\nよどがわく\nよねつ\nよやく\nよゆう\nよろこぶ\nよろしい\nらいう\nらくがき\nらくご\nらくさつ\nらくだ\nらしんばん\nらせん\nらぞく\nらたい\nらっか\nられつ\nりえき\nりかい\nりきさく\nりきせつ\nりくぐん\nりくつ\nりけん\nりこう\nりせい\nりそう\nりそく\nりてん\nりねん\nりゆう\nりゅうがく\nりよう\nりょうり\nりょかん\nりょくちゃ\nりょこう\nりりく\nりれき\nりろん\nりんご\nるいけい\nるいさい\nるいじ\nるいせき\nるすばん\nるりがわら\nれいかん\nれいぎ\nれいせい\nれいぞうこ\nれいとう\nれいぼう\nれきし\nれきだい\nれんあい\nれんけい\nれんこん\nれんさい\nれんしゅう\nれんぞく\nれんらく\nろうか\nろうご\nろうじん\nろうそく\nろくが\nろこつ\nろじうら\nろしゅつ\nろせん\nろてん\nろめん\nろれつ\nろんぎ\nろんぱ\nろんぶん\nろんり\nわかす\nわかめ\nわかやま\nわかれる\nわしつ\nわじまし\nわすれもの\nわらう\nわれる\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/korean.txt",
    "content": "가격\n가끔\n가난\n가능\n가득\n가르침\n가뭄\n가방\n가상\n가슴\n가운데\n가을\n가이드\n가입\n가장\n가정\n가족\n가죽\n각오\n각자\n간격\n간부\n간섭\n간장\n간접\n간판\n갈등\n갈비\n갈색\n갈증\n감각\n감기\n감소\n감수성\n감자\n감정\n갑자기\n강남\n강당\n강도\n강력히\n강변\n강북\n강사\n강수량\n강아지\n강원도\n강의\n강제\n강조\n같이\n개구리\n개나리\n개방\n개별\n개선\n개성\n개인\n객관적\n거실\n거액\n거울\n거짓\n거품\n걱정\n건강\n건물\n건설\n건조\n건축\n걸음\n검사\n검토\n게시판\n게임\n겨울\n견해\n결과\n결국\n결론\n결석\n결승\n결심\n결정\n결혼\n경계\n경고\n경기\n경력\n경복궁\n경비\n경상도\n경영\n경우\n경쟁\n경제\n경주\n경찰\n경치\n경향\n경험\n계곡\n계단\n계란\n계산\n계속\n계약\n계절\n계층\n계획\n고객\n고구려\n고궁\n고급\n고등학생\n고무신\n고민\n고양이\n고장\n고전\n고집\n고춧가루\n고통\n고향\n곡식\n골목\n골짜기\n골프\n공간\n공개\n공격\n공군\n공급\n공기\n공동\n공무원\n공부\n공사\n공식\n공업\n공연\n공원\n공장\n공짜\n공책\n공통\n공포\n공항\n공휴일\n과목\n과일\n과장\n과정\n과학\n관객\n관계\n관광\n관념\n관람\n관련\n관리\n관습\n관심\n관점\n관찰\n광경\n광고\n광장\n광주\n괴로움\n굉장히\n교과서\n교문\n교복\n교실\n교양\n교육\n교장\n교직\n교통\n교환\n교훈\n구경\n구름\n구멍\n구별\n구분\n구석\n구성\n구속\n구역\n구입\n구청\n구체적\n국가\n국기\n국내\n국립\n국물\n국민\n국수\n국어\n국왕\n국적\n국제\n국회\n군대\n군사\n군인\n궁극적\n권리\n권위\n권투\n귀국\n귀신\n규정\n규칙\n균형\n그날\n그냥\n그늘\n그러나\n그룹\n그릇\n그림\n그제서야\n그토록\n극복\n극히\n근거\n근교\n근래\n근로\n근무\n근본\n근원\n근육\n근처\n글씨\n글자\n금강산\n금고\n금년\n금메달\n금액\n금연\n금요일\n금지\n긍정적\n기간\n기관\n기념\n기능\n기독교\n기둥\n기록\n기름\n기법\n기본\n기분\n기쁨\n기숙사\n기술\n기억\n기업\n기온\n기운\n기원\n기적\n기준\n기침\n기혼\n기획\n긴급\n긴장\n길이\n김밥\n김치\n김포공항\n깍두기\n깜빡\n깨달음\n깨소금\n껍질\n꼭대기\n꽃잎\n나들이\n나란히\n나머지\n나물\n나침반\n나흘\n낙엽\n난방\n날개\n날씨\n날짜\n남녀\n남대문\n남매\n남산\n남자\n남편\n남학생\n낭비\n낱말\n내년\n내용\n내일\n냄비\n냄새\n냇물\n냉동\n냉면\n냉방\n냉장고\n넥타이\n넷째\n노동\n노란색\n노력\n노인\n녹음\n녹차\n녹화\n논리\n논문\n논쟁\n놀이\n농구\n농담\n농민\n농부\n농업\n농장\n농촌\n높이\n눈동자\n눈물\n눈썹\n뉴욕\n느낌\n늑대\n능동적\n능력\n다방\n다양성\n다음\n다이어트\n다행\n단계\n단골\n단독\n단맛\n단순\n단어\n단위\n단점\n단체\n단추\n단편\n단풍\n달걀\n달러\n달력\n달리\n닭고기\n담당\n담배\n담요\n담임\n답변\n답장\n당근\n당분간\n당연히\n당장\n대규모\n대낮\n대단히\n대답\n대도시\n대략\n대량\n대륙\n대문\n대부분\n대신\n대응\n대장\n대전\n대접\n대중\n대책\n대출\n대충\n대통령\n대학\n대한민국\n대합실\n대형\n덩어리\n데이트\n도대체\n도덕\n도둑\n도망\n도서관\n도심\n도움\n도입\n도자기\n도저히\n도전\n도중\n도착\n독감\n독립\n독서\n독일\n독창적\n동화책\n뒷모습\n뒷산\n딸아이\n마누라\n마늘\n마당\n마라톤\n마련\n마무리\n마사지\n마약\n마요네즈\n마을\n마음\n마이크\n마중\n마지막\n마찬가지\n마찰\n마흔\n막걸리\n막내\n막상\n만남\n만두\n만세\n만약\n만일\n만점\n만족\n만화\n많이\n말기\n말씀\n말투\n맘대로\n망원경\n매년\n매달\n매력\n매번\n매스컴\n매일\n매장\n맥주\n먹이\n먼저\n먼지\n멀리\n메일\n며느리\n며칠\n면담\n멸치\n명단\n명령\n명예\n명의\n명절\n명칭\n명함\n모금\n모니터\n모델\n모든\n모범\n모습\n모양\n모임\n모조리\n모집\n모퉁이\n목걸이\n목록\n목사\n목소리\n목숨\n목적\n목표\n몰래\n몸매\n몸무게\n몸살\n몸속\n몸짓\n몸통\n몹시\n무관심\n무궁화\n무더위\n무덤\n무릎\n무슨\n무엇\n무역\n무용\n무조건\n무지개\n무척\n문구\n문득\n문법\n문서\n문제\n문학\n문화\n물가\n물건\n물결\n물고기\n물론\n물리학\n물음\n물질\n물체\n미국\n미디어\n미사일\n미술\n미역\n미용실\n미움\n미인\n미팅\n미혼\n민간\n민족\n민주\n믿음\n밀가루\n밀리미터\n밑바닥\n바가지\n바구니\n바나나\n바늘\n바닥\n바닷가\n바람\n바이러스\n바탕\n박물관\n박사\n박수\n반대\n반드시\n반말\n반발\n반성\n반응\n반장\n반죽\n반지\n반찬\n받침\n발가락\n발걸음\n발견\n발달\n발레\n발목\n발바닥\n발생\n발음\n발자국\n발전\n발톱\n발표\n밤하늘\n밥그릇\n밥맛\n밥상\n밥솥\n방금\n방면\n방문\n방바닥\n방법\n방송\n방식\n방안\n방울\n방지\n방학\n방해\n방향\n배경\n배꼽\n배달\n배드민턴\n백두산\n백색\n백성\n백인\n백제\n백화점\n버릇\n버섯\n버튼\n번개\n번역\n번지\n번호\n벌금\n벌레\n벌써\n범위\n범인\n범죄\n법률\n법원\n법적\n법칙\n베이징\n벨트\n변경\n변동\n변명\n변신\n변호사\n변화\n별도\n별명\n별일\n병실\n병아리\n병원\n보관\n보너스\n보라색\n보람\n보름\n보상\n보안\n보자기\n보장\n보전\n보존\n보통\n보편적\n보험\n복도\n복사\n복숭아\n복습\n볶음\n본격적\n본래\n본부\n본사\n본성\n본인\n본질\n볼펜\n봉사\n봉지\n봉투\n부근\n부끄러움\n부담\n부동산\n부문\n부분\n부산\n부상\n부엌\n부인\n부작용\n부장\n부정\n부족\n부지런히\n부친\n부탁\n부품\n부회장\n북부\n북한\n분노\n분량\n분리\n분명\n분석\n분야\n분위기\n분필\n분홍색\n불고기\n불과\n불교\n불꽃\n불만\n불법\n불빛\n불안\n불이익\n불행\n브랜드\n비극\n비난\n비닐\n비둘기\n비디오\n비로소\n비만\n비명\n비밀\n비바람\n비빔밥\n비상\n비용\n비율\n비중\n비타민\n비판\n빌딩\n빗물\n빗방울\n빗줄기\n빛깔\n빨간색\n빨래\n빨리\n사건\n사계절\n사나이\n사냥\n사람\n사랑\n사립\n사모님\n사물\n사방\n사상\n사생활\n사설\n사슴\n사실\n사업\n사용\n사월\n사장\n사전\n사진\n사촌\n사춘기\n사탕\n사투리\n사흘\n산길\n산부인과\n산업\n산책\n살림\n살인\n살짝\n삼계탕\n삼국\n삼십\n삼월\n삼촌\n상관\n상금\n상대\n상류\n상반기\n상상\n상식\n상업\n상인\n상자\n상점\n상처\n상추\n상태\n상표\n상품\n상황\n새벽\n색깔\n색연필\n생각\n생명\n생물\n생방송\n생산\n생선\n생신\n생일\n생활\n서랍\n서른\n서명\n서민\n서비스\n서양\n서울\n서적\n서점\n서쪽\n서클\n석사\n석유\n선거\n선물\n선배\n선생\n선수\n선원\n선장\n선전\n선택\n선풍기\n설거지\n설날\n설렁탕\n설명\n설문\n설사\n설악산\n설치\n설탕\n섭씨\n성공\n성당\n성명\n성별\n성인\n성장\n성적\n성질\n성함\n세금\n세미나\n세상\n세월\n세종대왕\n세탁\n센터\n센티미터\n셋째\n소규모\n소극적\n소금\n소나기\n소년\n소득\n소망\n소문\n소설\n소속\n소아과\n소용\n소원\n소음\n소중히\n소지품\n소질\n소풍\n소형\n속담\n속도\n속옷\n손가락\n손길\n손녀\n손님\n손등\n손목\n손뼉\n손실\n손질\n손톱\n손해\n솔직히\n솜씨\n송아지\n송이\n송편\n쇠고기\n쇼핑\n수건\n수년\n수단\n수돗물\n수동적\n수면\n수명\n수박\n수상\n수석\n수술\n수시로\n수업\n수염\n수영\n수입\n수준\n수집\n수출\n수컷\n수필\n수학\n수험생\n수화기\n숙녀\n숙소\n숙제\n순간\n순서\n순수\n순식간\n순위\n숟가락\n술병\n술집\n숫자\n스님\n스물\n스스로\n스승\n스웨터\n스위치\n스케이트\n스튜디오\n스트레스\n스포츠\n슬쩍\n슬픔\n습관\n습기\n승객\n승리\n승부\n승용차\n승진\n시각\n시간\n시골\n시금치\n시나리오\n시댁\n시리즈\n시멘트\n시민\n시부모\n시선\n시설\n시스템\n시아버지\n시어머니\n시월\n시인\n시일\n시작\n시장\n시절\n시점\n시중\n시즌\n시집\n시청\n시합\n시험\n식구\n식기\n식당\n식량\n식료품\n식물\n식빵\n식사\n식생활\n식초\n식탁\n식품\n신고\n신규\n신념\n신문\n신발\n신비\n신사\n신세\n신용\n신제품\n신청\n신체\n신화\n실감\n실내\n실력\n실례\n실망\n실수\n실습\n실시\n실장\n실정\n실질적\n실천\n실체\n실컷\n실태\n실패\n실험\n실현\n심리\n심부름\n심사\n심장\n심정\n심판\n쌍둥이\n씨름\n씨앗\n아가씨\n아나운서\n아드님\n아들\n아쉬움\n아스팔트\n아시아\n아울러\n아저씨\n아줌마\n아직\n아침\n아파트\n아프리카\n아픔\n아홉\n아흔\n악기\n악몽\n악수\n안개\n안경\n안과\n안내\n안녕\n안동\n안방\n안부\n안주\n알루미늄\n알코올\n암시\n암컷\n압력\n앞날\n앞문\n애인\n애정\n액수\n앨범\n야간\n야단\n야옹\n약간\n약국\n약속\n약수\n약점\n약품\n약혼녀\n양념\n양력\n양말\n양배추\n양주\n양파\n어둠\n어려움\n어른\n어젯밤\n어쨌든\n어쩌다가\n어쩐지\n언니\n언덕\n언론\n언어\n얼굴\n얼른\n얼음\n얼핏\n엄마\n업무\n업종\n업체\n엉덩이\n엉망\n엉터리\n엊그제\n에너지\n에어컨\n엔진\n여건\n여고생\n여관\n여군\n여권\n여대생\n여덟\n여동생\n여든\n여론\n여름\n여섯\n여성\n여왕\n여인\n여전히\n여직원\n여학생\n여행\n역사\n역시\n역할\n연결\n연구\n연극\n연기\n연락\n연설\n연세\n연속\n연습\n연애\n연예인\n연인\n연장\n연주\n연출\n연필\n연합\n연휴\n열기\n열매\n열쇠\n열심히\n열정\n열차\n열흘\n염려\n엽서\n영국\n영남\n영상\n영양\n영역\n영웅\n영원히\n영하\n영향\n영혼\n영화\n옆구리\n옆방\n옆집\n예감\n예금\n예방\n예산\n예상\n예선\n예술\n예습\n예식장\n예약\n예전\n예절\n예정\n예컨대\n옛날\n오늘\n오락\n오랫동안\n오렌지\n오로지\n오른발\n오븐\n오십\n오염\n오월\n오전\n오직\n오징어\n오페라\n오피스텔\n오히려\n옥상\n옥수수\n온갖\n온라인\n온몸\n온종일\n온통\n올가을\n올림픽\n올해\n옷차림\n와이셔츠\n와인\n완성\n완전\n왕비\n왕자\n왜냐하면\n왠지\n외갓집\n외국\n외로움\n외삼촌\n외출\n외침\n외할머니\n왼발\n왼손\n왼쪽\n요금\n요일\n요즘\n요청\n용기\n용서\n용어\n우산\n우선\n우승\n우연히\n우정\n우체국\n우편\n운동\n운명\n운반\n운전\n운행\n울산\n울음\n움직임\n웃어른\n웃음\n워낙\n원고\n원래\n원서\n원숭이\n원인\n원장\n원피스\n월급\n월드컵\n월세\n월요일\n웨이터\n위반\n위법\n위성\n위원\n위험\n위협\n윗사람\n유난히\n유럽\n유명\n유물\n유산\n유적\n유치원\n유학\n유행\n유형\n육군\n육상\n육십\n육체\n은행\n음력\n음료\n음반\n음성\n음식\n음악\n음주\n의견\n의논\n의문\n의복\n의식\n의심\n의외로\n의욕\n의원\n의학\n이것\n이곳\n이념\n이놈\n이달\n이대로\n이동\n이렇게\n이력서\n이론적\n이름\n이민\n이발소\n이별\n이불\n이빨\n이상\n이성\n이슬\n이야기\n이용\n이웃\n이월\n이윽고\n이익\n이전\n이중\n이튿날\n이틀\n이혼\n인간\n인격\n인공\n인구\n인근\n인기\n인도\n인류\n인물\n인생\n인쇄\n인연\n인원\n인재\n인종\n인천\n인체\n인터넷\n인하\n인형\n일곱\n일기\n일단\n일대\n일등\n일반\n일본\n일부\n일상\n일생\n일손\n일요일\n일월\n일정\n일종\n일주일\n일찍\n일체\n일치\n일행\n일회용\n임금\n임무\n입대\n입력\n입맛\n입사\n입술\n입시\n입원\n입장\n입학\n자가용\n자격\n자극\n자동\n자랑\n자부심\n자식\n자신\n자연\n자원\n자율\n자전거\n자정\n자존심\n자판\n작가\n작년\n작성\n작업\n작용\n작은딸\n작품\n잔디\n잔뜩\n잔치\n잘못\n잠깐\n잠수함\n잠시\n잠옷\n잠자리\n잡지\n장관\n장군\n장기간\n장래\n장례\n장르\n장마\n장면\n장모\n장미\n장비\n장사\n장소\n장식\n장애인\n장인\n장점\n장차\n장학금\n재능\n재빨리\n재산\n재생\n재작년\n재정\n재채기\n재판\n재학\n재활용\n저것\n저고리\n저곳\n저녁\n저런\n저렇게\n저번\n저울\n저절로\n저축\n적극\n적당히\n적성\n적용\n적응\n전개\n전공\n전기\n전달\n전라도\n전망\n전문\n전반\n전부\n전세\n전시\n전용\n전자\n전쟁\n전주\n전철\n전체\n전통\n전혀\n전후\n절대\n절망\n절반\n절약\n절차\n점검\n점수\n점심\n점원\n점점\n점차\n접근\n접시\n접촉\n젓가락\n정거장\n정도\n정류장\n정리\n정말\n정면\n정문\n정반대\n정보\n정부\n정비\n정상\n정성\n정오\n정원\n정장\n정지\n정치\n정확히\n제공\n제과점\n제대로\n제목\n제발\n제법\n제삿날\n제안\n제일\n제작\n제주도\n제출\n제품\n제한\n조각\n조건\n조금\n조깅\n조명\n조미료\n조상\n조선\n조용히\n조절\n조정\n조직\n존댓말\n존재\n졸업\n졸음\n종교\n종로\n종류\n종소리\n종업원\n종종\n종합\n좌석\n죄인\n주관적\n주름\n주말\n주머니\n주먹\n주문\n주민\n주방\n주변\n주식\n주인\n주일\n주장\n주전자\n주택\n준비\n줄거리\n줄기\n줄무늬\n중간\n중계방송\n중국\n중년\n중단\n중독\n중반\n중부\n중세\n중소기업\n중순\n중앙\n중요\n중학교\n즉석\n즉시\n즐거움\n증가\n증거\n증권\n증상\n증세\n지각\n지갑\n지경\n지극히\n지금\n지급\n지능\n지름길\n지리산\n지방\n지붕\n지식\n지역\n지우개\n지원\n지적\n지점\n지진\n지출\n직선\n직업\n직원\n직장\n진급\n진동\n진로\n진료\n진리\n진짜\n진찰\n진출\n진통\n진행\n질문\n질병\n질서\n짐작\n집단\n집안\n집중\n짜증\n찌꺼기\n차남\n차라리\n차량\n차림\n차별\n차선\n차츰\n착각\n찬물\n찬성\n참가\n참기름\n참새\n참석\n참여\n참외\n참조\n찻잔\n창가\n창고\n창구\n창문\n창밖\n창작\n창조\n채널\n채점\n책가방\n책방\n책상\n책임\n챔피언\n처벌\n처음\n천국\n천둥\n천장\n천재\n천천히\n철도\n철저히\n철학\n첫날\n첫째\n청년\n청바지\n청소\n청춘\n체계\n체력\n체온\n체육\n체중\n체험\n초등학생\n초반\n초밥\n초상화\n초순\n초여름\n초원\n초저녁\n초점\n초청\n초콜릿\n촛불\n총각\n총리\n총장\n촬영\n최근\n최상\n최선\n최신\n최악\n최종\n추석\n추억\n추진\n추천\n추측\n축구\n축소\n축제\n축하\n출근\n출발\n출산\n출신\n출연\n출입\n출장\n출판\n충격\n충고\n충돌\n충분히\n충청도\n취업\n취직\n취향\n치약\n친구\n친척\n칠십\n칠월\n칠판\n침대\n침묵\n침실\n칫솔\n칭찬\n카메라\n카운터\n칼국수\n캐릭터\n캠퍼스\n캠페인\n커튼\n컨디션\n컬러\n컴퓨터\n코끼리\n코미디\n콘서트\n콜라\n콤플렉스\n콩나물\n쾌감\n쿠데타\n크림\n큰길\n큰딸\n큰소리\n큰아들\n큰어머니\n큰일\n큰절\n클래식\n클럽\n킬로\n타입\n타자기\n탁구\n탁자\n탄생\n태권도\n태양\n태풍\n택시\n탤런트\n터널\n터미널\n테니스\n테스트\n테이블\n텔레비전\n토론\n토마토\n토요일\n통계\n통과\n통로\n통신\n통역\n통일\n통장\n통제\n통증\n통합\n통화\n퇴근\n퇴원\n퇴직금\n튀김\n트럭\n특급\n특별\n특성\n특수\n특징\n특히\n튼튼히\n티셔츠\n파란색\n파일\n파출소\n판결\n판단\n판매\n판사\n팔십\n팔월\n팝송\n패션\n팩스\n팩시밀리\n팬티\n퍼센트\n페인트\n편견\n편의\n편지\n편히\n평가\n평균\n평생\n평소\n평양\n평일\n평화\n포스터\n포인트\n포장\n포함\n표면\n표정\n표준\n표현\n품목\n품질\n풍경\n풍속\n풍습\n프랑스\n프린터\n플라스틱\n피곤\n피망\n피아노\n필름\n필수\n필요\n필자\n필통\n핑계\n하느님\n하늘\n하드웨어\n하룻밤\n하반기\n하숙집\n하순\n하여튼\n하지만\n하천\n하품\n하필\n학과\n학교\n학급\n학기\n학년\n학력\n학번\n학부모\n학비\n학생\n학술\n학습\n학용품\n학원\n학위\n학자\n학점\n한계\n한글\n한꺼번에\n한낮\n한눈\n한동안\n한때\n한라산\n한마디\n한문\n한번\n한복\n한식\n한여름\n한쪽\n할머니\n할아버지\n할인\n함께\n함부로\n합격\n합리적\n항공\n항구\n항상\n항의\n해결\n해군\n해답\n해당\n해물\n해석\n해설\n해수욕장\n해안\n핵심\n핸드백\n햄버거\n햇볕\n햇살\n행동\n행복\n행사\n행운\n행위\n향기\n향상\n향수\n허락\n허용\n헬기\n현관\n현금\n현대\n현상\n현실\n현장\n현재\n현지\n혈액\n협력\n형부\n형사\n형수\n형식\n형제\n형태\n형편\n혜택\n호기심\n호남\n호랑이\n호박\n호텔\n호흡\n혹시\n홀로\n홈페이지\n홍보\n홍수\n홍차\n화면\n화분\n화살\n화요일\n화장\n화학\n확보\n확인\n확장\n확정\n환갑\n환경\n환영\n환율\n환자\n활기\n활동\n활발히\n활용\n활짝\n회견\n회관\n회복\n회색\n회원\n회장\n회전\n횟수\n횡단보도\n효율적\n후반\n후춧가루\n훈련\n훨씬\n휴식\n휴일\n흉내\n흐름\n흑백\n흑인\n흔적\n흔히\n흥미\n흥분\n희곡\n희망\n희생\n흰색\n힘껏\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/portuguese.txt",
    "content": "abacate\nabaixo\nabalar\nabater\nabduzir\nabelha\naberto\nabismo\nabotoar\nabranger\nabreviar\nabrigar\nabrupto\nabsinto\nabsoluto\nabsurdo\nabutre\nacabado\nacalmar\nacampar\nacanhar\nacaso\naceitar\nacelerar\nacenar\nacervo\nacessar\nacetona\nachatar\nacidez\nacima\nacionado\nacirrar\naclamar\naclive\nacolhida\nacomodar\nacoplar\nacordar\nacumular\nacusador\nadaptar\nadega\nadentro\nadepto\nadequar\naderente\nadesivo\nadeus\nadiante\naditivo\nadjetivo\nadjunto\nadmirar\nadorar\nadquirir\nadubo\nadverso\nadvogado\naeronave\nafastar\naferir\nafetivo\nafinador\nafivelar\naflito\nafluente\nafrontar\nagachar\nagarrar\nagasalho\nagenciar\nagilizar\nagiota\nagitado\nagora\nagradar\nagreste\nagrupar\naguardar\nagulha\najoelhar\najudar\najustar\nalameda\nalarme\nalastrar\nalavanca\nalbergue\nalbino\nalcatra\naldeia\nalecrim\nalegria\nalertar\nalface\nalfinete\nalgum\nalheio\naliar\nalicate\nalienar\nalinhar\naliviar\nalmofada\nalocar\nalpiste\nalterar\naltitude\nalucinar\nalugar\naluno\nalusivo\nalvo\namaciar\namador\namarelo\namassar\nambas\nambiente\nameixa\namenizar\namido\namistoso\namizade\namolador\namontoar\namoroso\namostra\namparar\nampliar\nampola\nanagrama\nanalisar\nanarquia\nanatomia\nandaime\nanel\nanexo\nangular\nanimar\nanjo\nanomalia\nanotado\nansioso\nanterior\nanuidade\nanunciar\nanzol\napagador\napalpar\napanhado\napego\napelido\napertada\napesar\napetite\napito\naplauso\naplicada\napoio\napontar\naposta\naprendiz\naprovar\naquecer\narame\naranha\narara\narcada\nardente\nareia\narejar\narenito\naresta\nargiloso\nargola\narma\narquivo\narraial\narrebate\narriscar\narroba\narrumar\narsenal\narterial\nartigo\narvoredo\nasfaltar\nasilado\naspirar\nassador\nassinar\nassoalho\nassunto\nastral\natacado\natadura\natalho\natarefar\natear\natender\naterro\nateu\natingir\natirador\nativo\natoleiro\natracar\natrevido\natriz\natual\natum\nauditor\naumentar\naura\naurora\nautismo\nautoria\nautuar\navaliar\navante\navaria\navental\navesso\naviador\navisar\navulso\naxila\nazarar\nazedo\nazeite\nazulejo\nbabar\nbabosa\nbacalhau\nbacharel\nbacia\nbagagem\nbaiano\nbailar\nbaioneta\nbairro\nbaixista\nbajular\nbaleia\nbaliza\nbalsa\nbanal\nbandeira\nbanho\nbanir\nbanquete\nbarato\nbarbado\nbaronesa\nbarraca\nbarulho\nbaseado\nbastante\nbatata\nbatedor\nbatida\nbatom\nbatucar\nbaunilha\nbeber\nbeijo\nbeirada\nbeisebol\nbeldade\nbeleza\nbelga\nbeliscar\nbendito\nbengala\nbenzer\nberimbau\nberlinda\nberro\nbesouro\nbexiga\nbezerro\nbico\nbicudo\nbienal\nbifocal\nbifurcar\nbigorna\nbilhete\nbimestre\nbimotor\nbiologia\nbiombo\nbiosfera\nbipolar\nbirrento\nbiscoito\nbisneto\nbispo\nbissexto\nbitola\nbizarro\nblindado\nbloco\nbloquear\nboato\nbobagem\nbocado\nbocejo\nbochecha\nboicotar\nbolada\nboletim\nbolha\nbolo\nbombeiro\nbonde\nboneco\nbonita\nborbulha\nborda\nboreal\nborracha\nbovino\nboxeador\nbranco\nbrasa\nbraveza\nbreu\nbriga\nbrilho\nbrincar\nbroa\nbrochura\nbronzear\nbroto\nbruxo\nbucha\nbudismo\nbufar\nbule\nburaco\nbusca\nbusto\nbuzina\ncabana\ncabelo\ncabide\ncabo\ncabrito\ncacau\ncacetada\ncachorro\ncacique\ncadastro\ncadeado\ncafezal\ncaiaque\ncaipira\ncaixote\ncajado\ncaju\ncalafrio\ncalcular\ncaldeira\ncalibrar\ncalmante\ncalota\ncamada\ncambista\ncamisa\ncamomila\ncampanha\ncamuflar\ncanavial\ncancelar\ncaneta\ncanguru\ncanhoto\ncanivete\ncanoa\ncansado\ncantar\ncanudo\ncapacho\ncapela\ncapinar\ncapotar\ncapricho\ncaptador\ncapuz\ncaracol\ncarbono\ncardeal\ncareca\ncarimbar\ncarneiro\ncarpete\ncarreira\ncartaz\ncarvalho\ncasaco\ncasca\ncasebre\ncastelo\ncasulo\ncatarata\ncativar\ncaule\ncausador\ncautelar\ncavalo\ncaverna\ncebola\ncedilha\ncegonha\ncelebrar\ncelular\ncenoura\ncenso\ncenteio\ncercar\ncerrado\ncerteiro\ncerveja\ncetim\ncevada\nchacota\nchaleira\nchamado\nchapada\ncharme\nchatice\nchave\nchefe\nchegada\ncheiro\ncheque\nchicote\nchifre\nchinelo\nchocalho\nchover\nchumbo\nchutar\nchuva\ncicatriz\nciclone\ncidade\ncidreira\nciente\ncigana\ncimento\ncinto\ncinza\nciranda\ncircuito\ncirurgia\ncitar\nclareza\nclero\nclicar\nclone\nclube\ncoado\ncoagir\ncobaia\ncobertor\ncobrar\ncocada\ncoelho\ncoentro\ncoeso\ncogumelo\ncoibir\ncoifa\ncoiote\ncolar\ncoleira\ncolher\ncolidir\ncolmeia\ncolono\ncoluna\ncomando\ncombinar\ncomentar\ncomitiva\ncomover\ncomplexo\ncomum\nconcha\ncondor\nconectar\nconfuso\ncongelar\nconhecer\nconjugar\nconsumir\ncontrato\nconvite\ncooperar\ncopeiro\ncopiador\ncopo\ncoquetel\ncoragem\ncordial\ncorneta\ncoronha\ncorporal\ncorreio\ncortejo\ncoruja\ncorvo\ncosseno\ncostela\ncotonete\ncouro\ncouve\ncovil\ncozinha\ncratera\ncravo\ncreche\ncredor\ncreme\ncrer\ncrespo\ncriada\ncriminal\ncrioulo\ncrise\ncriticar\ncrosta\ncrua\ncruzeiro\ncubano\ncueca\ncuidado\ncujo\nculatra\nculminar\nculpar\ncultura\ncumprir\ncunhado\ncupido\ncurativo\ncurral\ncursar\ncurto\ncuspir\ncustear\ncutelo\ndamasco\ndatar\ndebater\ndebitar\ndeboche\ndebulhar\ndecalque\ndecimal\ndeclive\ndecote\ndecretar\ndedal\ndedicado\ndeduzir\ndefesa\ndefumar\ndegelo\ndegrau\ndegustar\ndeitado\ndeixar\ndelator\ndelegado\ndelinear\ndelonga\ndemanda\ndemitir\ndemolido\ndentista\ndepenado\ndepilar\ndepois\ndepressa\ndepurar\nderiva\nderramar\ndesafio\ndesbotar\ndescanso\ndesenho\ndesfiado\ndesgaste\ndesigual\ndeslize\ndesmamar\ndesova\ndespesa\ndestaque\ndesviar\ndetalhar\ndetentor\ndetonar\ndetrito\ndeusa\ndever\ndevido\ndevotado\ndezena\ndiagrama\ndialeto\ndidata\ndifuso\ndigitar\ndilatado\ndiluente\ndiminuir\ndinastia\ndinheiro\ndiocese\ndireto\ndiscreta\ndisfarce\ndisparo\ndisquete\ndissipar\ndistante\nditador\ndiurno\ndiverso\ndivisor\ndivulgar\ndizer\ndobrador\ndolorido\ndomador\ndominado\ndonativo\ndonzela\ndormente\ndorsal\ndosagem\ndourado\ndoutor\ndrenagem\ndrible\ndrogaria\nduelar\nduende\ndueto\nduplo\nduquesa\ndurante\nduvidoso\neclodir\necoar\necologia\nedificar\nedital\neducado\nefeito\nefetivar\nejetar\nelaborar\neleger\neleitor\nelenco\nelevador\neliminar\nelogiar\nembargo\nembolado\nembrulho\nembutido\nemenda\nemergir\nemissor\nempatia\nempenho\nempinado\nempolgar\nemprego\nempurrar\nemulador\nencaixe\nencenado\nenchente\nencontro\nendeusar\nendossar\nenfaixar\nenfeite\nenfim\nengajado\nengenho\nenglobar\nengomado\nengraxar\nenguia\nenjoar\nenlatar\nenquanto\nenraizar\nenrolado\nenrugar\nensaio\nenseada\nensino\nensopado\nentanto\nenteado\nentidade\nentortar\nentrada\nentulho\nenvergar\nenviado\nenvolver\nenxame\nenxerto\nenxofre\nenxuto\nepiderme\nequipar\nereto\nerguido\nerrata\nerva\nervilha\nesbanjar\nesbelto\nescama\nescola\nescrita\nescuta\nesfinge\nesfolar\nesfregar\nesfumado\nesgrima\nesmalte\nespanto\nespelho\nespiga\nesponja\nespreita\nespumar\nesquerda\nestaca\nesteira\nesticar\nestofado\nestrela\nestudo\nesvaziar\netanol\netiqueta\neuforia\neuropeu\nevacuar\nevaporar\nevasivo\neventual\nevidente\nevoluir\nexagero\nexalar\nexaminar\nexato\nexausto\nexcesso\nexcitar\nexclamar\nexecutar\nexemplo\nexibir\nexigente\nexonerar\nexpandir\nexpelir\nexpirar\nexplanar\nexposto\nexpresso\nexpulsar\nexterno\nextinto\nextrato\nfabricar\nfabuloso\nfaceta\nfacial\nfada\nfadiga\nfaixa\nfalar\nfalta\nfamiliar\nfandango\nfanfarra\nfantoche\nfardado\nfarelo\nfarinha\nfarofa\nfarpa\nfartura\nfatia\nfator\nfavorita\nfaxina\nfazenda\nfechado\nfeijoada\nfeirante\nfelino\nfeminino\nfenda\nfeno\nfera\nferiado\nferrugem\nferver\nfestejar\nfetal\nfeudal\nfiapo\nfibrose\nficar\nficheiro\nfigurado\nfileira\nfilho\nfilme\nfiltrar\nfirmeza\nfisgada\nfissura\nfita\nfivela\nfixador\nfixo\nflacidez\nflamingo\nflanela\nflechada\nflora\nflutuar\nfluxo\nfocal\nfocinho\nfofocar\nfogo\nfoguete\nfoice\nfolgado\nfolheto\nforjar\nformiga\nforno\nforte\nfosco\nfossa\nfragata\nfralda\nfrango\nfrasco\nfraterno\nfreira\nfrente\nfretar\nfrieza\nfriso\nfritura\nfronha\nfrustrar\nfruteira\nfugir\nfulano\nfuligem\nfundar\nfungo\nfunil\nfurador\nfurioso\nfutebol\ngabarito\ngabinete\ngado\ngaiato\ngaiola\ngaivota\ngalega\ngalho\ngalinha\ngalocha\nganhar\ngaragem\ngarfo\ngargalo\ngarimpo\ngaroupa\ngarrafa\ngasoduto\ngasto\ngata\ngatilho\ngaveta\ngazela\ngelado\ngeleia\ngelo\ngemada\ngemer\ngemido\ngeneroso\ngengiva\ngenial\ngenoma\ngenro\ngeologia\ngerador\ngerminar\ngesso\ngestor\nginasta\ngincana\ngingado\ngirafa\ngirino\nglacial\nglicose\nglobal\nglorioso\ngoela\ngoiaba\ngolfe\ngolpear\ngordura\ngorjeta\ngorro\ngostoso\ngoteira\ngovernar\ngracejo\ngradual\ngrafite\ngralha\ngrampo\ngranada\ngratuito\ngraveto\ngraxa\ngrego\ngrelhar\ngreve\ngrilo\ngrisalho\ngritaria\ngrosso\ngrotesco\ngrudado\ngrunhido\ngruta\nguache\nguarani\nguaxinim\nguerrear\nguiar\nguincho\nguisado\ngula\nguloso\nguru\nhabitar\nharmonia\nhaste\nhaver\nhectare\nherdar\nheresia\nhesitar\nhiato\nhibernar\nhidratar\nhiena\nhino\nhipismo\nhipnose\nhipoteca\nhoje\nholofote\nhomem\nhonesto\nhonrado\nhormonal\nhospedar\nhumorado\niate\nideia\nidoso\nignorado\nigreja\niguana\nileso\nilha\niludido\niluminar\nilustrar\nimagem\nimediato\nimenso\nimersivo\niminente\nimitador\nimortal\nimpacto\nimpedir\nimplante\nimpor\nimprensa\nimpune\nimunizar\ninalador\ninapto\ninativo\nincenso\ninchar\nincidir\nincluir\nincolor\nindeciso\nindireto\nindutor\nineficaz\ninerente\ninfantil\ninfestar\ninfinito\ninflamar\ninformal\ninfrator\ningerir\ninibido\ninicial\ninimigo\ninjetar\ninocente\ninodoro\ninovador\ninox\ninquieto\ninscrito\ninseto\ninsistir\ninspetor\ninstalar\ninsulto\nintacto\nintegral\nintimar\nintocado\nintriga\ninvasor\ninverno\ninvicto\ninvocar\niogurte\niraniano\nironizar\nirreal\nirritado\nisca\nisento\nisolado\nisqueiro\nitaliano\njaneiro\njangada\njanta\njararaca\njardim\njarro\njasmim\njato\njavali\njazida\njejum\njoaninha\njoelhada\njogador\njoia\njornal\njorrar\njovem\njuba\njudeu\njudoca\njuiz\njulgador\njulho\njurado\njurista\njuro\njusta\nlabareda\nlaboral\nlacre\nlactante\nladrilho\nlagarta\nlagoa\nlaje\nlamber\nlamentar\nlaminar\nlampejo\nlanche\nlapidar\nlapso\nlaranja\nlareira\nlargura\nlasanha\nlastro\nlateral\nlatido\nlavanda\nlavoura\nlavrador\nlaxante\nlazer\nlealdade\nlebre\nlegado\nlegendar\nlegista\nleigo\nleiloar\nleitura\nlembrete\nleme\nlenhador\nlentilha\nleoa\nlesma\nleste\nletivo\nletreiro\nlevar\nleveza\nlevitar\nliberal\nlibido\nliderar\nligar\nligeiro\nlimitar\nlimoeiro\nlimpador\nlinda\nlinear\nlinhagem\nliquidez\nlistagem\nlisura\nlitoral\nlivro\nlixa\nlixeira\nlocador\nlocutor\nlojista\nlombo\nlona\nlonge\nlontra\nlorde\nlotado\nloteria\nloucura\nlousa\nlouvar\nluar\nlucidez\nlucro\nluneta\nlustre\nlutador\nluva\nmacaco\nmacete\nmachado\nmacio\nmadeira\nmadrinha\nmagnata\nmagreza\nmaior\nmais\nmalandro\nmalha\nmalote\nmaluco\nmamilo\nmamoeiro\nmamute\nmanada\nmancha\nmandato\nmanequim\nmanhoso\nmanivela\nmanobrar\nmansa\nmanter\nmanusear\nmapeado\nmaquinar\nmarcador\nmaresia\nmarfim\nmargem\nmarinho\nmarmita\nmaroto\nmarquise\nmarreco\nmartelo\nmarujo\nmascote\nmasmorra\nmassagem\nmastigar\nmatagal\nmaterno\nmatinal\nmatutar\nmaxilar\nmedalha\nmedida\nmedusa\nmegafone\nmeiga\nmelancia\nmelhor\nmembro\nmemorial\nmenino\nmenos\nmensagem\nmental\nmerecer\nmergulho\nmesada\nmesclar\nmesmo\nmesquita\nmestre\nmetade\nmeteoro\nmetragem\nmexer\nmexicano\nmicro\nmigalha\nmigrar\nmilagre\nmilenar\nmilhar\nmimado\nminerar\nminhoca\nministro\nminoria\nmiolo\nmirante\nmirtilo\nmisturar\nmocidade\nmoderno\nmodular\nmoeda\nmoer\nmoinho\nmoita\nmoldura\nmoleza\nmolho\nmolinete\nmolusco\nmontanha\nmoqueca\nmorango\nmorcego\nmordomo\nmorena\nmosaico\nmosquete\nmostarda\nmotel\nmotim\nmoto\nmotriz\nmuda\nmuito\nmulata\nmulher\nmultar\nmundial\nmunido\nmuralha\nmurcho\nmuscular\nmuseu\nmusical\nnacional\nnadador\nnaja\nnamoro\nnarina\nnarrado\nnascer\nnativa\nnatureza\nnavalha\nnavegar\nnavio\nneblina\nnebuloso\nnegativa\nnegociar\nnegrito\nnervoso\nneta\nneural\nnevasca\nnevoeiro\nninar\nninho\nnitidez\nnivelar\nnobreza\nnoite\nnoiva\nnomear\nnominal\nnordeste\nnortear\nnotar\nnoticiar\nnoturno\nnovelo\nnovilho\nnovo\nnublado\nnudez\nnumeral\nnupcial\nnutrir\nnuvem\nobcecado\nobedecer\nobjetivo\nobrigado\nobscuro\nobstetra\nobter\nobturar\nocidente\nocioso\nocorrer\noculista\nocupado\nofegante\nofensiva\noferenda\noficina\nofuscado\nogiva\nolaria\noleoso\nolhar\noliveira\nombro\nomelete\nomisso\nomitir\nondulado\noneroso\nontem\nopcional\noperador\noponente\noportuno\noposto\norar\norbitar\nordem\nordinal\norfanato\norgasmo\norgulho\noriental\norigem\noriundo\norla\nortodoxo\norvalho\noscilar\nossada\nosso\nostentar\notimismo\nousadia\noutono\noutubro\nouvido\novelha\novular\noxidar\noxigenar\npacato\npaciente\npacote\npactuar\npadaria\npadrinho\npagar\npagode\npainel\npairar\npaisagem\npalavra\npalestra\npalheta\npalito\npalmada\npalpitar\npancada\npanela\npanfleto\npanqueca\npantanal\npapagaio\npapelada\npapiro\nparafina\nparcial\npardal\nparede\npartida\npasmo\npassado\npastel\npatamar\npatente\npatinar\npatrono\npaulada\npausar\npeculiar\npedalar\npedestre\npediatra\npedra\npegada\npeitoral\npeixe\npele\npelicano\npenca\npendurar\npeneira\npenhasco\npensador\npente\nperceber\nperfeito\npergunta\nperito\npermitir\nperna\nperplexo\npersiana\npertence\nperuca\npescado\npesquisa\npessoa\npetiscar\npiada\npicado\npiedade\npigmento\npilastra\npilhado\npilotar\npimenta\npincel\npinguim\npinha\npinote\npintar\npioneiro\npipoca\npiquete\npiranha\npires\npirueta\npiscar\npistola\npitanga\npivete\nplanta\nplaqueta\nplatina\nplebeu\nplumagem\npluvial\npneu\npoda\npoeira\npoetisa\npolegada\npoliciar\npoluente\npolvilho\npomar\npomba\nponderar\npontaria\npopuloso\nporta\npossuir\npostal\npote\npoupar\npouso\npovoar\npraia\nprancha\nprato\npraxe\nprece\npredador\nprefeito\npremiar\nprensar\npreparar\npresilha\npretexto\nprevenir\nprezar\nprimata\nprincesa\nprisma\nprivado\nprocesso\nproduto\nprofeta\nproibido\nprojeto\nprometer\npropagar\nprosa\nprotetor\nprovador\npublicar\npudim\npular\npulmonar\npulseira\npunhal\npunir\npupilo\npureza\npuxador\nquadra\nquantia\nquarto\nquase\nquebrar\nqueda\nqueijo\nquente\nquerido\nquimono\nquina\nquiosque\nrabanada\nrabisco\nrachar\nracionar\nradial\nraiar\nrainha\nraio\nraiva\nrajada\nralado\nramal\nranger\nranhura\nrapadura\nrapel\nrapidez\nraposa\nraquete\nraridade\nrasante\nrascunho\nrasgar\nraspador\nrasteira\nrasurar\nratazana\nratoeira\nrealeza\nreanimar\nreaver\nrebaixar\nrebelde\nrebolar\nrecado\nrecente\nrecheio\nrecibo\nrecordar\nrecrutar\nrecuar\nrede\nredimir\nredonda\nreduzida\nreenvio\nrefinar\nrefletir\nrefogar\nrefresco\nrefugiar\nregalia\nregime\nregra\nreinado\nreitor\nrejeitar\nrelativo\nremador\nremendo\nremorso\nrenovado\nreparo\nrepelir\nrepleto\nrepolho\nrepresa\nrepudiar\nrequerer\nresenha\nresfriar\nresgatar\nresidir\nresolver\nrespeito\nressaca\nrestante\nresumir\nretalho\nreter\nretirar\nretomada\nretratar\nrevelar\nrevisor\nrevolta\nriacho\nrica\nrigidez\nrigoroso\nrimar\nringue\nrisada\nrisco\nrisonho\nrobalo\nrochedo\nrodada\nrodeio\nrodovia\nroedor\nroleta\nromano\nroncar\nrosado\nroseira\nrosto\nrota\nroteiro\nrotina\nrotular\nrouco\nroupa\nroxo\nrubro\nrugido\nrugoso\nruivo\nrumo\nrupestre\nrusso\nsabor\nsaciar\nsacola\nsacudir\nsadio\nsafira\nsaga\nsagrada\nsaibro\nsalada\nsaleiro\nsalgado\nsaliva\nsalpicar\nsalsicha\nsaltar\nsalvador\nsambar\nsamurai\nsanar\nsanfona\nsangue\nsanidade\nsapato\nsarda\nsargento\nsarjeta\nsaturar\nsaudade\nsaxofone\nsazonal\nsecar\nsecular\nseda\nsedento\nsediado\nsedoso\nsedutor\nsegmento\nsegredo\nsegundo\nseiva\nseleto\nselvagem\nsemanal\nsemente\nsenador\nsenhor\nsensual\nsentado\nseparado\nsereia\nseringa\nserra\nservo\nsetembro\nsetor\nsigilo\nsilhueta\nsilicone\nsimetria\nsimpatia\nsimular\nsinal\nsincero\nsingular\nsinopse\nsintonia\nsirene\nsiri\nsituado\nsoberano\nsobra\nsocorro\nsogro\nsoja\nsolda\nsoletrar\nsolteiro\nsombrio\nsonata\nsondar\nsonegar\nsonhador\nsono\nsoprano\nsoquete\nsorrir\nsorteio\nsossego\nsotaque\nsoterrar\nsovado\nsozinho\nsuavizar\nsubida\nsubmerso\nsubsolo\nsubtrair\nsucata\nsucesso\nsuco\nsudeste\nsufixo\nsugador\nsugerir\nsujeito\nsulfato\nsumir\nsuor\nsuperior\nsuplicar\nsuposto\nsuprimir\nsurdina\nsurfista\nsurpresa\nsurreal\nsurtir\nsuspiro\nsustento\ntabela\ntablete\ntabuada\ntacho\ntagarela\ntalher\ntalo\ntalvez\ntamanho\ntamborim\ntampa\ntangente\ntanto\ntapar\ntapioca\ntardio\ntarefa\ntarja\ntarraxa\ntatuagem\ntaurino\ntaxativo\ntaxista\nteatral\ntecer\ntecido\nteclado\ntedioso\nteia\nteimar\ntelefone\ntelhado\ntempero\ntenente\ntensor\ntentar\ntermal\nterno\nterreno\ntese\ntesoura\ntestado\nteto\ntextura\ntexugo\ntiara\ntigela\ntijolo\ntimbrar\ntimidez\ntingido\ntinteiro\ntiragem\ntitular\ntoalha\ntocha\ntolerar\ntolice\ntomada\ntomilho\ntonel\ntontura\ntopete\ntora\ntorcido\ntorneio\ntorque\ntorrada\ntorto\ntostar\ntouca\ntoupeira\ntoxina\ntrabalho\ntracejar\ntradutor\ntrafegar\ntrajeto\ntrama\ntrancar\ntrapo\ntraseiro\ntratador\ntravar\ntreino\ntremer\ntrepidar\ntrevo\ntriagem\ntribo\ntriciclo\ntridente\ntrilogia\ntrindade\ntriplo\ntriturar\ntriunfal\ntrocar\ntrombeta\ntrova\ntrunfo\ntruque\ntubular\ntucano\ntudo\ntulipa\ntupi\nturbo\nturma\nturquesa\ntutelar\ntutorial\nuivar\numbigo\nunha\nunidade\nuniforme\nurologia\nurso\nurtiga\nurubu\nusado\nusina\nusufruir\nvacina\nvadiar\nvagaroso\nvaidoso\nvala\nvalente\nvalidade\nvalores\nvantagem\nvaqueiro\nvaranda\nvareta\nvarrer\nvascular\nvasilha\nvassoura\nvazar\nvazio\nveado\nvedar\nvegetar\nveicular\nveleiro\nvelhice\nveludo\nvencedor\nvendaval\nvenerar\nventre\nverbal\nverdade\nvereador\nvergonha\nvermelho\nverniz\nversar\nvertente\nvespa\nvestido\nvetorial\nviaduto\nviagem\nviajar\nviatura\nvibrador\nvideira\nvidraria\nviela\nviga\nvigente\nvigiar\nvigorar\nvilarejo\nvinco\nvinheta\nvinil\nvioleta\nvirada\nvirtude\nvisitar\nvisto\nvitral\nviveiro\nvizinho\nvoador\nvoar\nvogal\nvolante\nvoleibol\nvoltagem\nvolumoso\nvontade\nvulto\nvuvuzela\nxadrez\nxarope\nxeque\nxeretar\nxerife\nxingar\nzangado\nzarpar\nzebu\nzelador\nzombar\nzoologia\nzumbido\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/russian.txt",
    "content": "абзац\nабонент\nабсурд\nавангард\nавария\nавгуст\nавиация\nавтор\nагент\nагитация\nагрегат\nадвокат\nадмирал\nадрес\nазарт\nазот\nакадемия\nаквариум\nаксиома\nакула\nакцент\nакция\nаллея\nалмаз\nалтарь\nальбом\nальянс\nамбиция\nанализ\nанекдот\nанкета\nансамбль\nантенна\nапельсин\nаппарат\nаппетит\nапрель\nаптека\nарбуз\nаргумент\nаренда\nарест\nармия\nаромат\nарсенал\nартерия\nартист\nархив\nаспирант\nасфальт\nатака\nатомный\nатрибут\nаукцион\nафиша\nаэропорт\nбабочка\nбабушка\nбагаж\nбаза\nбактерия\nбаланс\nбалерина\nбалкон\nбандит\nбанк\nбарабан\nбарон\nбарышня\nбарьер\nбассейн\nбатарея\nбашмак\nбашня\nбедный\nбеженец\nбездна\nбелка\nбелый\nбензин\nберег\nбеседа\nбешеный\nбилет\nбинокль\nбиржа\nбитва\nблаго\nблеск\nблизкий\nблин\nблок\nблюдо\nбогатый\nбодрый\nбоец\nбокал\nбоковой\nбокс\nболее\nболото\nболтать\nбольшой\nбомба\nборт\nборьба\nбосой\nботинок\nбояться\nбрак\nбрать\nбревно\nбред\nбригада\nбродяга\nброня\nбросить\nбрызги\nбрюки\nбрюхо\nбугор\nбудка\nбудни\nбудущее\nбуква\nбукет\nбульвар\nбумага\nбунт\nбурный\nбуря\nбутылка\nбухта\nбывший\nбыстро\nбытовой\nбыть\nбюджет\nбюро\nбюст\nвагон\nважный\nвакцина\nваленок\nвальс\nвалюта\nванная\nваренье\nвариант\nвблизи\nвверх\nвводить\nвдали\nвдвое\nвдова\nвдоль\nвдруг\nведро\nведущий\nведьма\nвежливо\nвезде\nвеко\nвексель\nвелеть\nвеликий\nвенец\nвеник\nверанда\nверблюд\nверить\nверный\nверсия\nвертеть\nверхний\nвершина\nвесело\nвесна\nвесомый\nвести\nвесь\nветеран\nветхий\nвечер\nвечно\nвешалка\nвещество\nвзамен\nвзгляд\nвздох\nвзнос\nвзойти\nвзор\nвзрыв\nвзять\nвидеть\nвидимо\nвизг\nвизит\nвилка\nвина\nвирус\nвисок\nвитамин\nвитрина\nвихрь\nвишня\nвкус\nвлага\nвладелец\nвласть\nвлево\nвлияние\nвложить\nвместе\nвнешний\nвникать\nвнимание\nвновь\nвнук\nвнутри\nвнучка\nвнушать\nвовлечь\nвовремя\nвовсю\nвода\nводород\nводяной\nвоевать\nвозврат\nвозглас\nвоздух\nвозить\nвозле\nвозня\nвозраст\nвойна\nвойско\nвокзал\nволос\nволчий\nвольный\nволя\nвообще\nвопль\nвопрос\nворота\nвосемь\nвосток\nвплоть\nвполне\nвправе\nвпредь\nвпрочем\nврач\nвредный\nвремя\nвручить\nвсадник\nвсегда\nвскоре\nвскрыть\nвсплеск\nвспышка\nвстреча\nвсюду\nвсякий\nвторой\nвход\nвчера\nвыбор\nвывод\nвыгнать\nвыдать\nвыехать\nвызов\nвыйти\nвыкуп\nвылезти\nвымыть\nвыпасть\nвыпить\nвыплата\nвыпуск\nвырасти\nвыручка\nвыслать\nвысокий\nвыставка\nвышка\nвязать\nвялый\nгазета\nгазовый\nгалерея\nгалстук\nгамма\nгарантия\nгармония\nгарнизон\nгастроли\nгвардия\nгвоздь\nгектар\nгенерал\nгений\nгеном\nгеолог\nгерб\nгерой\nгибкий\nгигант\nгимн\nгипотеза\nгитара\nглавный\nглагол\nгладить\nглаз\nглина\nглоток\nглубокий\nглупый\nглухой\nглыба\nглядеть\nгнев\nгнездо\nгнилой\nгодовой\nголова\nголубой\nголый\nгонорар\nгордость\nгоризонт\nгорло\nгорный\nгород\nгоршок\nгорький\nгорючее\nгорячий\nготовый\nградус\nграмм\nграница\nграф\nгребень\nгриб\nгримаса\nгрозить\nгрохот\nгрош\nгрубый\nгрудь\nгруз\nгрунт\nгруппа\nгруша\nгрязный\nгуба\nгудок\nгулкий\nгулять\nгусеница\nгусто\nгусь\nдавление\nдавно\nдаже\nдальний\nданный\nдарить\nдатчик\nдать\nдача\nдвадцать\nдважды\nдверь\nдвигать\nдвижение\nдвойной\nдвор\nдебют\nдевятый\nдежурный\nдействие\nдекабрь\nделение\nдело\nдельфин\nдень\nдерево\nдержать\nдерзкий\nдесять\nдеталь\nдетский\nдефект\nдефицит\nдеятель\nджаз\nджинсы\nджунгли\nдиагноз\nдиалог\nдиапазон\nдиван\nдивизия\nдивный\nдиета\nдизайн\nдикарь\nдилер\nдинамика\nдиплом\nдиректор\nдитя\nдлинный\nдневник\nдобрый\nдобыча\nдоверие\nдогадка\nдогнать\nдождь\nдоклад\nдоктор\nдокумент\nдолго\nдолжен\nдолина\nдонос\nдорога\nдосада\nдоска\nдостать\nдосуг\nдоход\nдоцент\nдощатый\nдрака\nдревний\nдремать\nдробный\nдрова\nдрожать\nдругой\nдружба\nдубовый\nдуга\nдумать\nдурной\nдухи\nдушный\nдуэль\nдуэт\nдыра\nдыхание\nдюжина\nдядя\nедва\nединый\nерунда\nесли\nехать\nжадный\nжажда\nжалеть\nжалоба\nжанр\nжареный\nжаркий\nжгучий\nжевать\nжелание\nжелудок\nжена\nженщина\nжертва\nжест\nжидкость\nжитель\nжить\nжрец\nжулик\nжурнал\nжуткий\nзабрать\nзабыть\nзавести\nзавод\nзавтра\nзагадка\nзагнать\nзаговор\nзадача\nзадеть\nзадний\nзадолго\nзаехать\nзаказ\nзакон\nзакрыть\nзакуска\nзалезть\nзалить\nзалп\nзамок\nзамуж\nзамысел\nзанавес\nзаново\nзанять\nзаодно\nзапись\nзапрос\nзапуск\nзапястье\nзаранее\nзаросль\nзарплата\nзаря\nзасада\nзаслуга\nзаснуть\nзастать\nзатвор\nзатеять\nзатрата\nзатылок\nзахват\nзачем\nзащита\nзаявить\nзаяц\nзвезда\nзвено\nзвонить\nздесь\nзелень\nземля\nзеркало\nзерно\nзима\nзлой\nзмея\nзнамя\nзнание\nзначит\nзолотой\nзона\nзонтик\nзоопарк\nзрачок\nзрение\nзритель\nзубной\nзубр\nигла\nидеал\nидеолог\nидея\nидол\nидти\nизба\nизбить\nизбрать\nизбыток\nизвлечь\nизвне\nизгиб\nизгнать\nиздание\nизделие\nизнутри\nизобилие\nизоляция\nизредка\nизрядно\nизучение\nизъять\nизящный\nикона\nикра\nиллюзия\nименно\nиметь\nимидж\nимперия\nимпульс\nиначе\nинвалид\nиндекс\nиндивид\nинерция\nинженер\nиногда\nиной\nинститут\nинтерес\nинтрига\nинтуиция\nинфаркт\nинцидент\nирония\nискать\nиспуг\nистория\nитог\nиюнь\nкабель\nкабинет\nкаблук\nкавалер\nкадр\nкаждый\nкажется\nказино\nкалитка\nкамень\nкамин\nканал\nкандидат\nканикулы\nканон\nкапитан\nкапля\nкапот\nкапуста\nкарандаш\nкарета\nкаркас\nкарман\nкартина\nкарьера\nкаска\nкассета\nкастрюля\nкаталог\nкатер\nкаток\nкатушка\nкафедра\nкачество\nкаша\nкашлять\nкаюта\nквадрат\nквартира\nквота\nкепка\nкивнуть\nкилометр\nкино\nкиоск\nкипяток\nкирпич\nкислота\nкисть\nклавиша\nклапан\nкласс\nклей\nклетка\nклиент\nклимат\nклиника\nкличка\nклоун\nклочок\nклуб\nклумба\nключ\nкнига\nкнопка\nкнут\nкнягиня\nкнязь\nкобура\nкогда\nкодекс\nкожа\nкоктейль\nколено\nколлега\nколонна\nколпак\nкольцо\nколючий\nколяска\nкоманда\nкомедия\nкомиссия\nкоммуна\nкомната\nкомок\nкомпания\nкомфорт\nконвейер\nконгресс\nконечно\nконкурс\nконтроль\nконцерт\nконь\nконюшня\nкопать\nкопейка\nкопыто\nкорабль\nкорень\nкорзина\nкоридор\nкормить\nкорпус\nкосмос\nкостюм\nкосяк\nкотел\nкотлета\nкоторый\nкоттедж\nкофе\nкофта\nкошка\nкража\nкрай\nкрасный\nкраткий\nкредит\nкрем\nкрепкий\nкресло\nкривой\nкризис\nкристалл\nкритерий\nкричать\nкровь\nкрокодил\nкролик\nкроме\nкрона\nкруг\nкружка\nкрупный\nкрутой\nкрушение\nкрыло\nкрыша\nкрючок\nкстати\nкубик\nкуда\nкузов\nкукла\nкулак\nкулиса\nкультура\nкумир\nкупе\nкупить\nкупол\nкупюра\nкурица\nкурорт\nкурс\nкуртка\nкусок\nкуст\nкухня\nкушать\nлабиринт\nлавка\nлагерь\nладно\nладонь\nлапа\nлауреат\nлгать\nлебедь\nлевый\nлегенда\nлегкий\nледяной\nлежать\nлезвие\nлезть\nлекция\nленивый\nлента\nлепесток\nлесной\nлестница\nлететь\nлето\nлечить\nлига\nлидер\nлиловый\nлимон\nлиния\nлипкий\nлист\nлитр\nлихой\nлицо\nлишить\nлишний\nловить\nлогика\nлодка\nложь\nлозунг\nлокоть\nлопата\nлошадь\nлукавый\nлуна\nлучший\nлысый\nльгота\nлюбить\nлюбой\nлюдской\nлюстра\nлютый\nлягушка\nмагазин\nмагия\nмайор\nмайский\nмаксимум\nмакушка\nмало\nмальчик\nмама\nманера\nмарка\nмарт\nмаршрут\nмасса\nмастер\nмасштаб\nматериал\nматч\nмахать\nмашина\nмаяк\nмебель\nмедаль\nмедведь\nмедицина\nмедь\nмежду\nмелкий\nмелочь\nмемуары\nменьше\nменю\nменять\nмера\nмерцать\nместо\nмесяц\nметалл\nметод\nметр\nмеханизм\nмеховой\nмечтать\nмешать\nмешок\nмиграция\nмикрофон\nмилиция\nмиллион\nмилость\nмиля\nмимо\nминерал\nминистр\nминута\nмирный\nмиска\nмиссия\nмитинг\nмишень\nмладший\nмнение\nмнимый\nмного\nмогучий\nмодель\nможет\nмозг\nмокрый\nмолекула\nмолния\nмолодой\nмолчать\nмомент\nмонета\nмонитор\nмонолог\nмонстр\nмонтаж\nмораль\nморе\nморковь\nмороз\nморщина\nмостовая\nмотать\nмотив\nмотор\nмохнатый\nмрамор\nмрачный\nмстить\nмудрый\nмужество\nмужчина\nмузей\nмузыка\nмундир\nмуравей\nмусор\nмуха\nмчаться\nмысль\nмыться\nмышца\nмышь\nмюзикл\nмягкий\nмясо\nнабор\nнавык\nнаглый\nнагрузка\nнадежда\nнадзор\nнадо\nнаедине\nназад\nназвание\nназло\nнаивный\nнайти\nнаконец\nналево\nналичие\nналог\nнамерен\nнанести\nнапасть\nнапример\nнарод\nнаследие\nнатура\nнаука\nнаутро\nначать\nнебо\nневажно\nневеста\nнегодяй\nнедавно\nнеделя\nнедолго\nнедра\nнедуг\nнежный\nнезачем\nнекто\nнелепый\nнеловко\nнельзя\nнемало\nнемой\nнеплохо\nнервный\nнередко\nнестись\nнеудача\nнеужели\nнефть\nнеясный\nнигде\nнизкий\nникакой\nникогда\nникуда\nничто\nничуть\nниша\nнищий\nновость\nновый\nнога\nноготь\nножницы\nноздря\nномер\nносить\nносок\nночь\nноябрь\nнрав\nнуль\nнынче\nнырять\nнюанс\nняня\nобаяние\nобед\nобезьяна\nобещать\nобжечь\nобзор\nобилие\nобитать\nобласть\nоблик\nобложка\nобмен\nобморок\nобожать\nобои\nоболочка\nоборона\nобочина\nобраз\nобрести\nобрыв\nобувь\nобучение\nобход\nобщество\nобщий\nобъект\nобыск\nобычно\nобязать\nовощи\nовраг\nовца\nоговорка\nограда\nогурец\nодежда\nодеяло\nодин\nоднако\nодолеть\nожидать\nозеро\nокеан\nокно\nоколо\nокоп\nокраина\nоктябрь\nопасный\nопека\nоперация\nописание\nоплата\nопора\nоппонент\nоптимизм\nоптовый\nопухоль\nопыт\nоратор\nорбита\nорган\nорден\nорел\nоригинал\nориентир\nоркестр\nоружие\nосенний\nосколок\nосмотр\nостров\nотбор\nотбыть\nотвлечь\nотдать\nотдел\nотдых\nотель\nотец\nотзыв\nотказ\nотклик\nоткрыть\nоткуда\nотличие\nотныне\nотойти\nотпуск\nотрасль\nотросток\nотрывок\nотряд\nотсек\nотставка\nотсюда\nоттенок\nоттого\nотчего\nотъезд\nофис\nофицер\nохота\nохрана\nоценка\nочаг\nочень\nочередь\nочищать\nошибка\nощущение\nпавильон\nпадать\nпазуха\nпакет\nпалата\nпалец\nпалуба\nпальто\nпамять\nпанель\nпаника\nпара\nпарень\nпароход\nпартия\nпарус\nпаспорт\nпассажир\nпастух\nпатент\nпатрон\nпауза\nпаук\nпаутина\nпафос\nпахнуть\nпациент\nпачка\nпевец\nпедагог\nпейзаж\nпенсия\nпепел\nпервый\nперед\nпериод\nперо\nперрон\nперсонаж\nперчатка\nпесня\nпесок\nпетля\nпетрушка\nпетух\nпехота\nпечать\nпечень\nпешком\nпещера\nпианист\nпиджак\nпилот\nпионер\nпирамида\nпирожок\nписьмо\nпища\nплавание\nплакать\nпламя\nплан\nпласт\nплатить\nпленный\nплечо\nплита\nплод\nплоский\nплотный\nплохой\nплощадь\nплыть\nплюс\nпляж\nплясать\nпобеда\nповар\nповод\nповсюду\nповязка\nпогода\nпогреб\nподбор\nподвиг\nподделка\nподжать\nподнос\nподпись\nподруга\nподход\nподчас\nподъезд\nпоединок\nпоезд\nпоесть\nпоехать\nпожалуй\nпожилой\nпозади\nпозвать\nпоздний\nпозиция\nпозор\nпоиск\nпоймать\nпойти\nпоклон\nпокой\nпокрыть\nполдень\nполезный\nползти\nполк\nполный\nполовина\nполтора\nпольза\nполяна\nпомидор\nпомнить\nпомощь\nпопасть\nпоперек\nпоплыть\nпополам\nпоправка\nпопугай\nпопытка\nпорог\nпортрет\nпорция\nпорыв\nпорядок\nпосле\nпосол\nпосреди\nпостель\nпосуда\nпотом\nпохвала\nпохожий\nпоцелуй\nпочва\nпочему\nпошлина\nпоэма\nпоэтому\nправо\nпраздник\nпрактика\nпрах\nпреграда\nпредмет\nпрежде\nпрелесть\nпремия\nпрепарат\nпресса\nприбыть\nприжать\nприйти\nприказ\nприлавок\nпример\nпринять\nприрода\nпритом\nприхожая\nприцел\nпричина\nприют\nпрогноз\nпродукт\nпроект\nпрожить\nпрокат\nпромысел\nпропуск\nпросто\nпротив\nпрофиль\nпроцесс\nпрочий\nпрошлый\nпрощать\nпружина\nпрут\nпрыжок\nпрямой\nптица\nпублика\nпугать\nпуговица\nпузырь\nпульт\nпуля\nпункт\nпускать\nпустой\nпуть\nпухлый\nпучок\nпушистый\nпушка\nпчела\nпшеница\nпылать\nпыль\nпышный\nпьеса\nпятка\nпятно\nпятый\nпятьсот\nработа\nравнина\nради\nрадость\nрадуга\nразбить\nразвитие\nразговор\nраздел\nразличие\nразмер\nразный\nразрыв\nразум\nрайон\nракета\nраковина\nрамка\nрано\nрапорт\nраспад\nрассказ\nрасти\nрасход\nрасцвет\nрация\nрвануть\nрваться\nреакция\nребро\nреветь\nредактор\nредкий\nреестр\nрежим\nрезать\nрезерв\nрезина\nрезко\nрезной\nрейс\nреклама\nрекорд\nрелигия\nрельс\nремень\nремонт\nреплика\nрепортаж\nресница\nресторан\nреформа\nрецепт\nречь\nрешение\nржавый\nриск\nрисунок\nритуал\nрифма\nробко\nробот\nровесник\nровно\nродной\nрождение\nроза\nрозовый\nрозыск\nроль\nроман\nроскошь\nроспись\nрост\nрубашка\nрубеж\nрубить\nрубрика\nрудник\nрука\nрукопись\nрумяный\nрусло\nрухнуть\nручей\nручной\nрыба\nрыжий\nрынок\nрыхлый\nрыцарь\nрычаг\nрюкзак\nрядом\nсадовый\nсажать\nсалон\nсалфетка\nсалют\nсамец\nсамовар\nсамый\nсани\nсанкция\nсапог\nсарай\nсатира\nсахар\nсбить\nсбоку\nсборная\nсбыт\nсвадьба\nсвалка\nсварить\nсвежий\nсверху\nсвет\nсвеча\nсвинья\nсвист\nсвитер\nсвобода\nсводка\nсвой\nсвыше\nсвязь\nсдаться\nсделать\nсегмент\nсегодня\nседло\nседой\nседьмой\nсезон\nсейф\nсейчас\nсекрет\nсектор\nсекунда\nсеминар\nсемья\nсенатор\nсено\nсенсация\nсентябрь\nсервис\nсердце\nсередина\nсержант\nсерия\nсерый\nсессия\nсесть\nсетевой\nсжатый\nсжечь\nсзади\nсигнал\nсиденье\nсила\nсилуэт\nсильный\nсимвол\nсимпатия\nсимфония\nсиний\nсинтез\nсиняк\nсирень\nсистема\nситуация\nсияние\nсказать\nскала\nскамейка\nскандал\nскатерть\nскачок\nскважина\nсквер\nсквозь\nскелет\nскидка\nсклад\nсколько\nскорый\nскосить\nскот\nскрипка\nскудный\nскука\nслабый\nслава\nсладкий\nслегка\nслед\nслеза\nслепой\nслесарь\nслишком\nслово\nслог\nсложный\nсломать\nслужба\nслух\nслучай\nслышать\nслюна\nсмежный\nсмелый\nсменить\nсмесь\nсметана\nсмех\nсмола\nсмуглый\nсмутный\nсмущать\nсмысл\nснайпер\nснаряд\nсначала\nснег\nснизу\nсниться\nсно��а\nснять\nсобака\nсоблазн\nсобрание\nсобытие\nсовесть\nсовсем\nсогласие\nсоздать\nсознание\nсозреть\nсойтись\nсокол\nсолдат\nсоленый\nсолнце\nсолома\nсомнение\nсонный\nсоперник\nсоратник\nсорвать\nсосед\nсосиска\nсостав\nсотня\nсоус\nсоюз\nспад\nспальня\nспасти\nспектр\nсперва\nспешить\nспина\nспирт\nсписок\nспичка\nсплав\nспонсор\nспор\nспособ\nсправка\nспустя\nспутник\nсразу\nсредство\nсрок\nсрыв\nссора\nссылка\nставить\nстадия\nстакан\nстанция\nстарый\nстая\nстебель\nстекло\nстена\nстепень\nстереть\nстиль\nстимул\nстирать\nстихи\nстоить\nстойка\nстол\nстонать\nстопа\nсторона\nстоянка\nстрана\nстричь\nстрогий\nструя\nстудент\nстук\nступня\nстыдно\nсуббота\nсубъект\nсувенир\nсугроб\nсугубо\nсудить\nсудно\nсудьба\nсуета\nсуметь\nсумма\nсумрак\nсундук\nсупруг\nсуровый\nсутки\nсухой\nсуша\nсущество\nсфера\nсхема\nсхожий\nсценарий\nсчастье\nсчитать\nсъезд\nсыграть\nсырой\nсытый\nсыщик\nсюда\nсюжет\nсюрприз\nтайна\nтакже\nтакой\nтакси\nтактика\nталия\nтаможня\nтанец\nтаракан\nтарелка\nтариф\nтащить\nтаять\nтварь\nтеатр\nтезис\nтекст\nтекущий\nтелефон\nтема\nтемнота\nтеневой\nтеннис\nтеория\nтеперь\nтепло\nтерапия\nтерзать\nтермин\nтерпеть\nтерраса\nтерять\nтесный\nтетрадь\nтехника\nтечение\nтигр\nтиповой\nтираж\nтитул\nтихий\nткань\nтоварищ\nтоже\nтолпа\nтолстый\nтолчок\nтолщина\nтолько\nтонкий\nтонна\nтопить\nтопор\nторговля\nтормоз\nторчать\nтотчас\nточка\nточно\nтощий\nтрава\nтрадиция\nтрактор\nтрамвай\nтраншея\nтрасса\nтревога\nтрезвый\nтренер\nтрепет\nтреск\nтретий\nтрещина\nтрибуна\nтридцать\nтриста\nтриумф\nтрогать\nтройка\nтронуть\nтропа\nтротуар\nтрубка\nтруд\nтрюк\nтряпка\nтуго\nтуловище\nтуман\nтумбочка\nтундра\nтупик\nтурист\nтурнир\nтусклый\nтуфля\nтуча\nтысяча\nтяга\nтяжело\nубежать\nубогий\nуборка\nуважение\nувезти\nуволить\nугадать\nугол\nугощать\nугроза\nугрюмый\nудар\nудачный\nуделять\nудивить\nудобный\nудочка\nуезжать\nужин\nузел\nузкий\nуйти\nуказание\nуклон\nукрасть\nукусить\nулетать\nулица\nулыбка\nумело\nумение\nумный\nумолять\nунести\nунижать\nунылый\nупаковка\nупасть\nупорно\nупрек\nурна\nуровень\nурожай\nуронить\nусадьба\nусатый\nусвоить\nусилие\nусловие\nуслуга\nусмешка\nуспеть\nустав\nустоять\nутечка\nутешать\nутро\nуцелеть\nучастие\nученик\nучесть\nущелье\nущерб\nуютный\nфабрика\nфаворит\nфакел\nфакт\nфамилия\nфантазия\nфасад\nфевраль\nфеномен\nфермер\nфигура\nфизика\nфилиал\nфилософ\nфильм\nфинал\nфлаг\nфлот\nфойе\nфокус\nфонарь\nфонд\nфонтан\nформа\nфорум\nфото\nфрагмент\nфраза\nфракция\nфронт\nфрукт\nфункция\nфуражка\nфутбол\nфутляр\nхалат\nхаос\nхарактер\nхата\nхвалить\nхватать\nхвойный\nхвост\nхимия\nхирург\nхитрый\nхищник\nхлеб\nхлынуть\nхмурый\nходить\nхозяин\nхоккей\nхолм\nхолст\nхорошо\nхотеть\nхрабрый\nхрам\nхранить\nхребет\nхрен\nхрипло\nхроника\nхрупкий\nхудожник\nхудший\nхулиган\nхутор\nцарь\nцветок\nцелевой\nцеликом\nцелое\nцель\nцензура\nценить\nцентр\nцепной\nцикл\nцилиндр\nцирк\nцитата\nцифра\nчайник\nчасы\nчашка\nчеловек\nчелюсть\nчемодан\nчемпион\nчепуха\nчервь\nчердак\nчерез\nчернила\nчерта\nчеснок\nчестно\nчетверть\nчетыре\nчисло\nчистый\nчитатель\nчтение\nчтобы\nчувство\nчудак\nчудный\nчудо\nчужой\nчулок\nчума\nчушь\nчуять\nшагать\nшанс\nшапка\nшарик\nшарф\nшахматы\nшашлык\nшедевр\nшептать\nшерсть\nшестой\nшинель\nширина\nшишка\nшкаф\nшкола\nшкура\nшланг\nшлем\nшнур\nшоколад\nшорох\nшоссе\nшпион\nшприц\nштаб\nштамм\nштаны\nштатный\nштора\nштраф\nштурм\nштык\nшумно\nшуршать\nшутить\nшутка\nщедрый\nщека\nщенок\nэкзамен\nэкипаж\nэкономия\nэкран\nэксперт\nэлемент\nэлитный\nэмоция\nэнергия\nэпизод\nэпоха\nэскиз\nэстрада\nэтап\nэтика\nэтот\nэфир\nэффект\nэшелон\nюбилей\nюбка\nюжный\nюмор\nюность\nюрист\nюстиция\nяблоко\nявление\nягода\nядро\nязык\nяйцо\nякобы\nякорь\nянварь\nяркий\nярмарка\nярость\nясный\nяхта\nячейка\nящик\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/spanish.txt",
    "content": "ábaco\nabdomen\nabeja\nabierto\nabogado\nabono\naborto\nabrazo\nabrir\nabuelo\nabuso\nacabar\nacademia\nacceso\nacción\naceite\nacelga\nacento\naceptar\nácido\naclarar\nacné\nacoger\nacoso\nactivo\nacto\nactriz\nactuar\nacudir\nacuerdo\nacusar\nadicto\nadmitir\nadoptar\nadorno\naduana\nadulto\naéreo\nafectar\nafición\nafinar\nafirmar\nágil\nagitar\nagonía\nagosto\nagotar\nagregar\nagrio\nagua\nagudo\náguila\naguja\nahogo\nahorro\naire\naislar\najedrez\najeno\najuste\nalacrán\nalambre\nalarma\nalba\nálbum\nalcalde\naldea\nalegre\nalejar\nalerta\naleta\nalfiler\nalga\nalgodón\naliado\naliento\nalivio\nalma\nalmeja\nalmíbar\naltar\nalteza\naltivo\nalto\naltura\nalumno\nalzar\namable\namante\namapola\namargo\namasar\námbar\námbito\nameno\namigo\namistad\namor\namparo\namplio\nancho\nanciano\nancla\nandar\nandén\nanemia\nángulo\nanillo\nánimo\nanís\nanotar\nantena\nantiguo\nantojo\nanual\nanular\nanuncio\nañadir\nañejo\naño\napagar\naparato\napetito\napio\naplicar\napodo\naporte\napoyo\naprender\naprobar\napuesta\napuro\narado\naraña\narar\nárbitro\nárbol\narbusto\narchivo\narco\narder\nardilla\narduo\nárea\nárido\naries\narmonía\narnés\naroma\narpa\narpón\narreglo\narroz\narruga\narte\nartista\nasa\nasado\nasalto\nascenso\nasegurar\naseo\nasesor\nasiento\nasilo\nasistir\nasno\nasombro\náspero\nastilla\nastro\nastuto\nasumir\nasunto\natajo\nataque\natar\natento\nateo\nático\natleta\nátomo\natraer\natroz\natún\naudaz\naudio\nauge\naula\naumento\nausente\nautor\naval\navance\navaro\nave\navellana\navena\navestruz\navión\naviso\nayer\nayuda\nayuno\nazafrán\nazar\nazote\nazúcar\nazufre\nazul\nbaba\nbabor\nbache\nbahía\nbaile\nbajar\nbalanza\nbalcón\nbalde\nbambú\nbanco\nbanda\nbaño\nbarba\nbarco\nbarniz\nbarro\nbáscula\nbastón\nbasura\nbatalla\nbatería\nbatir\nbatuta\nbaúl\nbazar\nbebé\nbebida\nbello\nbesar\nbeso\nbestia\nbicho\nbien\nbingo\nblanco\nbloque\nblusa\nboa\nbobina\nbobo\nboca\nbocina\nboda\nbodega\nboina\nbola\nbolero\nbolsa\nbomba\nbondad\nbonito\nbono\nbonsái\nborde\nborrar\nbosque\nbote\nbotín\nbóveda\nbozal\nbravo\nbrazo\nbrecha\nbreve\nbrillo\nbrinco\nbrisa\nbroca\nbroma\nbronce\nbrote\nbruja\nbrusco\nbruto\nbuceo\nbucle\nbueno\nbuey\nbufanda\nbufón\nbúho\nbuitre\nbulto\nburbuja\nburla\nburro\nbuscar\nbutaca\nbuzón\ncaballo\ncabeza\ncabina\ncabra\ncacao\ncadáver\ncadena\ncaer\ncafé\ncaída\ncaimán\ncaja\ncajón\ncal\ncalamar\ncalcio\ncaldo\ncalidad\ncalle\ncalma\ncalor\ncalvo\ncama\ncambio\ncamello\ncamino\ncampo\ncáncer\ncandil\ncanela\ncanguro\ncanica\ncanto\ncaña\ncañón\ncaoba\ncaos\ncapaz\ncapitán\ncapote\ncaptar\ncapucha\ncara\ncarbón\ncárcel\ncareta\ncarga\ncariño\ncarne\ncarpeta\ncarro\ncarta\ncasa\ncasco\ncasero\ncaspa\ncastor\ncatorce\ncatre\ncaudal\ncausa\ncazo\ncebolla\nceder\ncedro\ncelda\ncélebre\nceloso\ncélula\ncemento\nceniza\ncentro\ncerca\ncerdo\ncereza\ncero\ncerrar\ncerteza\ncésped\ncetro\nchacal\nchaleco\nchampú\nchancla\nchapa\ncharla\nchico\nchiste\nchivo\nchoque\nchoza\nchuleta\nchupar\nciclón\nciego\ncielo\ncien\ncierto\ncifra\ncigarro\ncima\ncinco\ncine\ncinta\nciprés\ncirco\nciruela\ncisne\ncita\nciudad\nclamor\nclan\nclaro\nclase\nclave\ncliente\nclima\nclínica\ncobre\ncocción\ncochino\ncocina\ncoco\ncódigo\ncodo\ncofre\ncoger\ncohete\ncojín\ncojo\ncola\ncolcha\ncolegio\ncolgar\ncolina\ncollar\ncolmo\ncolumna\ncombate\ncomer\ncomida\ncómodo\ncompra\nconde\nconejo\nconga\nconocer\nconsejo\ncontar\ncopa\ncopia\ncorazón\ncorbata\ncorcho\ncordón\ncorona\ncorrer\ncoser\ncosmos\ncosta\ncráneo\ncráter\ncrear\ncrecer\ncreído\ncrema\ncría\ncrimen\ncripta\ncrisis\ncromo\ncrónica\ncroqueta\ncrudo\ncruz\ncuadro\ncuarto\ncuatro\ncubo\ncubrir\ncuchara\ncuello\ncuento\ncuerda\ncuesta\ncueva\ncuidar\nculebra\nculpa\nculto\ncumbre\ncumplir\ncuna\ncuneta\ncuota\ncupón\ncúpula\ncurar\ncurioso\ncurso\ncurva\ncutis\ndama\ndanza\ndar\ndardo\ndátil\ndeber\ndébil\ndécada\ndecir\ndedo\ndefensa\ndefinir\ndejar\ndelfín\ndelgado\ndelito\ndemora\ndenso\ndental\ndeporte\nderecho\nderrota\ndesayuno\ndeseo\ndesfile\ndesnudo\ndestino\ndesvío\ndetalle\ndetener\ndeuda\ndía\ndiablo\ndiadema\ndiamante\ndiana\ndiario\ndibujo\ndictar\ndiente\ndieta\ndiez\ndifícil\ndigno\ndilema\ndiluir\ndinero\ndirecto\ndirigir\ndisco\ndiseño\ndisfraz\ndiva\ndivino\ndoble\ndoce\ndolor\ndomingo\ndon\ndonar\ndorado\ndormir\ndorso\ndos\ndosis\ndragón\ndroga\nducha\nduda\nduelo\ndueño\ndulce\ndúo\nduque\ndurar\ndureza\nduro\nébano\nebrio\nechar\neco\necuador\nedad\nedición\nedificio\neditor\neducar\nefecto\neficaz\neje\nejemplo\nelefante\nelegir\nelemento\nelevar\nelipse\nélite\nelixir\nelogio\neludir\nembudo\nemitir\nemoción\nempate\nempeño\nempleo\nempresa\nenano\nencargo\nenchufe\nencía\nenemigo\nenero\nenfado\nenfermo\nengaño\nenigma\nenlace\nenorme\nenredo\nensayo\nenseñar\nentero\nentrar\nenvase\nenvío\népoca\nequipo\nerizo\nescala\nescena\nescolar\nescribir\nescudo\nesencia\nesfera\nesfuerzo\nespada\nespejo\nespía\nesposa\nespuma\nesquí\nestar\neste\nestilo\nestufa\netapa\neterno\nética\netnia\nevadir\nevaluar\nevento\nevitar\nexacto\nexamen\nexceso\nexcusa\nexento\nexigir\nexilio\nexistir\néxito\nexperto\nexplicar\nexponer\nextremo\nfábrica\nfábula\nfachada\nfácil\nfactor\nfaena\nfaja\nfalda\nfallo\nfalso\nfaltar\nfama\nfamilia\nfamoso\nfaraón\nfarmacia\nfarol\nfarsa\nfase\nfatiga\nfauna\nfavor\nfax\nfebrero\nfecha\nfeliz\nfeo\nferia\nferoz\nfértil\nfervor\nfestín\nfiable\nfianza\nfiar\nfibra\nficción\nficha\nfideo\nfiebre\nfiel\nfiera\nfiesta\nfigura\nfijar\nfijo\nfila\nfilete\nfilial\nfiltro\nfin\nfinca\nfingir\nfinito\nfirma\nflaco\nflauta\nflecha\nflor\nflota\nfluir\nflujo\nflúor\nfobia\nfoca\nfogata\nfogón\nfolio\nfolleto\nfondo\nforma\nforro\nfortuna\nforzar\nfosa\nfoto\nfracaso\nfrágil\nfranja\nfrase\nfraude\nfreír\nfreno\nfresa\nfrío\nfrito\nfruta\nfuego\nfuente\nfuerza\nfuga\nfumar\nfunción\nfunda\nfurgón\nfuria\nfusil\nfútbol\nfuturo\ngacela\ngafas\ngaita\ngajo\ngala\ngalería\ngallo\ngamba\nganar\ngancho\nganga\nganso\ngaraje\ngarza\ngasolina\ngastar\ngato\ngavilán\ngemelo\ngemir\ngen\ngénero\ngenio\ngente\ngeranio\ngerente\ngermen\ngesto\ngigante\ngimnasio\ngirar\ngiro\nglaciar\nglobo\ngloria\ngol\ngolfo\ngoloso\ngolpe\ngoma\ngordo\ngorila\ngorra\ngota\ngoteo\ngozar\ngrada\ngráfico\ngrano\ngrasa\ngratis\ngrave\ngrieta\ngrillo\ngripe\ngris\ngrito\ngrosor\ngrúa\ngrueso\ngrumo\ngrupo\nguante\nguapo\nguardia\nguerra\nguía\nguiño\nguion\nguiso\nguitarra\ngusano\ngustar\nhaber\nhábil\nhablar\nhacer\nhacha\nhada\nhallar\nhamaca\nharina\nhaz\nhazaña\nhebilla\nhebra\nhecho\nhelado\nhelio\nhembra\nherir\nhermano\nhéroe\nhervir\nhielo\nhierro\nhígado\nhigiene\nhijo\nhimno\nhistoria\nhocico\nhogar\nhoguera\nhoja\nhombre\nhongo\nhonor\nhonra\nhora\nhormiga\nhorno\nhostil\nhoyo\nhueco\nhuelga\nhuerta\nhueso\nhuevo\nhuida\nhuir\nhumano\nhúmedo\nhumilde\nhumo\nhundir\nhuracán\nhurto\nicono\nideal\nidioma\nídolo\niglesia\niglú\nigual\nilegal\nilusión\nimagen\nimán\nimitar\nimpar\nimperio\nimponer\nimpulso\nincapaz\níndice\ninerte\ninfiel\ninforme\ningenio\ninicio\ninmenso\ninmune\ninnato\ninsecto\ninstante\ninterés\níntimo\nintuir\ninútil\ninvierno\nira\niris\nironía\nisla\nislote\njabalí\njabón\njamón\njarabe\njardín\njarra\njaula\njazmín\njefe\njeringa\njinete\njornada\njoroba\njoven\njoya\njuerga\njueves\njuez\njugador\njugo\njuguete\njuicio\njunco\njungla\njunio\njuntar\njúpiter\njurar\njusto\njuvenil\njuzgar\nkilo\nkoala\nlabio\nlacio\nlacra\nlado\nladrón\nlagarto\nlágrima\nlaguna\nlaico\nlamer\nlámina\nlámpara\nlana\nlancha\nlangosta\nlanza\nlápiz\nlargo\nlarva\nlástima\nlata\nlátex\nlatir\nlaurel\nlavar\nlazo\nleal\nlección\nleche\nlector\nleer\nlegión\nlegumbre\nlejano\nlengua\nlento\nleña\nleón\nleopardo\nlesión\nletal\nletra\nleve\nleyenda\nlibertad\nlibro\nlicor\nlíder\nlidiar\nlienzo\nliga\nligero\nlima\nlímite\nlimón\nlimpio\nlince\nlindo\nlínea\nlingote\nlino\nlinterna\nlíquido\nliso\nlista\nlitera\nlitio\nlitro\nllaga\nllama\nllanto\nllave\nllegar\nllenar\nllevar\nllorar\nllover\nlluvia\nlobo\nloción\nloco\nlocura\nlógica\nlogro\nlombriz\nlomo\nlonja\nlote\nlucha\nlucir\nlugar\nlujo\nluna\nlunes\nlupa\nlustro\nluto\nluz\nmaceta\nmacho\nmadera\nmadre\nmaduro\nmaestro\nmafia\nmagia\nmago\nmaíz\nmaldad\nmaleta\nmalla\nmalo\nmamá\nmambo\nmamut\nmanco\nmando\nmanejar\nmanga\nmaniquí\nmanjar\nmano\nmanso\nmanta\nmañana\nmapa\nmáquina\nmar\nmarco\nmarea\nmarfil\nmargen\nmarido\nmármol\nmarrón\nmartes\nmarzo\nmasa\nmáscara\nmasivo\nmatar\nmateria\nmatiz\nmatriz\nmáximo\nmayor\nmazorca\nmecha\nmedalla\nmedio\nmédula\nmejilla\nmejor\nmelena\nmelón\nmemoria\nmenor\nmensaje\nmente\nmenú\nmercado\nmerengue\nmérito\nmes\nmesón\nmeta\nmeter\nmétodo\nmetro\nmezcla\nmiedo\nmiel\nmiembro\nmiga\nmil\nmilagro\nmilitar\nmillón\nmimo\nmina\nminero\nmínimo\nminuto\nmiope\nmirar\nmisa\nmiseria\nmisil\nmismo\nmitad\nmito\nmochila\nmoción\nmoda\nmodelo\nmoho\nmojar\nmolde\nmoler\nmolino\nmomento\nmomia\nmonarca\nmoneda\nmonja\nmonto\nmoño\nmorada\nmorder\nmoreno\nmorir\nmorro\nmorsa\nmortal\nmosca\nmostrar\nmotivo\nmover\nmóvil\nmozo\nmucho\nmudar\nmueble\nmuela\nmuerte\nmuestra\nmugre\nmujer\nmula\nmuleta\nmulta\nmundo\nmuñeca\nmural\nmuro\nmúsculo\nmuseo\nmusgo\nmúsica\nmuslo\nnácar\nnación\nnadar\nnaipe\nnaranja\nnariz\nnarrar\nnasal\nnatal\nnativo\nnatural\nnáusea\nnaval\nnave\nnavidad\nnecio\nnéctar\nnegar\nnegocio\nnegro\nneón\nnervio\nneto\nneutro\nnevar\nnevera\nnicho\nnido\nniebla\nnieto\nniñez\nniño\nnítido\nnivel\nnobleza\nnoche\nnómina\nnoria\nnorma\nnorte\nnota\nnoticia\nnovato\nnovela\nnovio\nnube\nnuca\nnúcleo\nnudillo\nnudo\nnuera\nnueve\nnuez\nnulo\nnúmero\nnutria\noasis\nobeso\nobispo\nobjeto\nobra\nobrero\nobservar\nobtener\nobvio\noca\nocaso\nocéano\nochenta\nocho\nocio\nocre\noctavo\noctubre\noculto\nocupar\nocurrir\nodiar\nodio\nodisea\noeste\nofensa\noferta\noficio\nofrecer\nogro\noído\noír\nojo\nola\noleada\nolfato\nolivo\nolla\nolmo\nolor\nolvido\nombligo\nonda\nonza\nopaco\nopción\nópera\nopinar\noponer\noptar\nóptica\nopuesto\noración\norador\noral\nórbita\norca\norden\noreja\nórgano\norgía\norgullo\noriente\norigen\norilla\noro\norquesta\noruga\nosadía\noscuro\nosezno\noso\nostra\notoño\notro\noveja\nóvulo\nóxido\noxígeno\noyente\nozono\npacto\npadre\npaella\npágina\npago\npaís\npájaro\npalabra\npalco\npaleta\npálido\npalma\npaloma\npalpar\npan\npanal\npánico\npantera\npañuelo\npapá\npapel\npapilla\npaquete\nparar\nparcela\npared\nparir\nparo\npárpado\nparque\npárrafo\nparte\npasar\npaseo\npasión\npaso\npasta\npata\npatio\npatria\npausa\npauta\npavo\npayaso\npeatón\npecado\npecera\npecho\npedal\npedir\npegar\npeine\npelar\npeldaño\npelea\npeligro\npellejo\npelo\npeluca\npena\npensar\npeñón\npeón\npeor\npepino\npequeño\npera\npercha\nperder\npereza\nperfil\nperico\nperla\npermiso\nperro\npersona\npesa\npesca\npésimo\npestaña\npétalo\npetróleo\npez\npezuña\npicar\npichón\npie\npiedra\npierna\npieza\npijama\npilar\npiloto\npimienta\npino\npintor\npinza\npiña\npiojo\npipa\npirata\npisar\npiscina\npiso\npista\npitón\npizca\nplaca\nplan\nplata\nplaya\nplaza\npleito\npleno\nplomo\npluma\nplural\npobre\npoco\npoder\npodio\npoema\npoesía\npoeta\npolen\npolicía\npollo\npolvo\npomada\npomelo\npomo\npompa\nponer\nporción\nportal\nposada\nposeer\nposible\nposte\npotencia\npotro\npozo\nprado\nprecoz\npregunta\npremio\nprensa\npreso\nprevio\nprimo\npríncipe\nprisión\nprivar\nproa\nprobar\nproceso\nproducto\nproeza\nprofesor\nprograma\nprole\npromesa\npronto\npropio\npróximo\nprueba\npúblico\npuchero\npudor\npueblo\npuerta\npuesto\npulga\npulir\npulmón\npulpo\npulso\npuma\npunto\npuñal\npuño\npupa\npupila\npuré\nquedar\nqueja\nquemar\nquerer\nqueso\nquieto\nquímica\nquince\nquitar\nrábano\nrabia\nrabo\nración\nradical\nraíz\nrama\nrampa\nrancho\nrango\nrapaz\nrápido\nrapto\nrasgo\nraspa\nrato\nrayo\nraza\nrazón\nreacción\nrealidad\nrebaño\nrebote\nrecaer\nreceta\nrechazo\nrecoger\nrecreo\nrecto\nrecurso\nred\nredondo\nreducir\nreflejo\nreforma\nrefrán\nrefugio\nregalo\nregir\nregla\nregreso\nrehén\nreino\nreír\nreja\nrelato\nrelevo\nrelieve\nrelleno\nreloj\nremar\nremedio\nremo\nrencor\nrendir\nrenta\nreparto\nrepetir\nreposo\nreptil\nres\nrescate\nresina\nrespeto\nresto\nresumen\nretiro\nretorno\nretrato\nreunir\nrevés\nrevista\nrey\nrezar\nrico\nriego\nrienda\nriesgo\nrifa\nrígido\nrigor\nrincón\nriñón\nrío\nriqueza\nrisa\nritmo\nrito\nrizo\nroble\nroce\nrociar\nrodar\nrodeo\nrodilla\nroer\nrojizo\nrojo\nromero\nromper\nron\nronco\nronda\nropa\nropero\nrosa\nrosca\nrostro\nrotar\nrubí\nrubor\nrudo\nrueda\nrugir\nruido\nruina\nruleta\nrulo\nrumbo\nrumor\nruptura\nruta\nrutina\nsábado\nsaber\nsabio\nsable\nsacar\nsagaz\nsagrado\nsala\nsaldo\nsalero\nsalir\nsalmón\nsalón\nsalsa\nsalto\nsalud\nsalvar\nsamba\nsanción\nsandía\nsanear\nsangre\nsanidad\nsano\nsanto\nsapo\nsaque\nsardina\nsartén\nsastre\nsatán\nsauna\nsaxofón\nsección\nseco\nsecreto\nsecta\nsed\nseguir\nseis\nsello\nselva\nsemana\nsemilla\nsenda\nsensor\nseñal\nseñor\nseparar\nsepia\nsequía\nser\nserie\nsermón\nservir\nsesenta\nsesión\nseta\nsetenta\nsevero\nsexo\nsexto\nsidra\nsiesta\nsiete\nsiglo\nsigno\nsílaba\nsilbar\nsilencio\nsilla\nsímbolo\nsimio\nsirena\nsistema\nsitio\nsituar\nsobre\nsocio\nsodio\nsol\nsolapa\nsoldado\nsoledad\nsólido\nsoltar\nsolución\nsombra\nsondeo\nsonido\nsonoro\nsonrisa\nsopa\nsoplar\nsoporte\nsordo\nsorpresa\nsorteo\nsostén\nsótano\nsuave\nsubir\nsuceso\nsudor\nsuegra\nsuelo\nsueño\nsuerte\nsufrir\nsujeto\nsultán\nsumar\nsuperar\nsuplir\nsuponer\nsupremo\nsur\nsurco\nsureño\nsurgir\nsusto\nsutil\ntabaco\ntabique\ntabla\ntabú\ntaco\ntacto\ntajo\ntalar\ntalco\ntalento\ntalla\ntalón\ntamaño\ntambor\ntango\ntanque\ntapa\ntapete\ntapia\ntapón\ntaquilla\ntarde\ntarea\ntarifa\ntarjeta\ntarot\ntarro\ntarta\ntatuaje\ntauro\ntaza\ntazón\nteatro\ntecho\ntecla\ntécnica\ntejado\ntejer\ntejido\ntela\nteléfono\ntema\ntemor\ntemplo\ntenaz\ntender\ntener\ntenis\ntenso\nteoría\nterapia\nterco\ntérmino\nternura\nterror\ntesis\ntesoro\ntestigo\ntetera\ntexto\ntez\ntibio\ntiburón\ntiempo\ntienda\ntierra\ntieso\ntigre\ntijera\ntilde\ntimbre\ntímido\ntimo\ntinta\ntío\ntípico\ntipo\ntira\ntirón\ntitán\ntítere\ntítulo\ntiza\ntoalla\ntobillo\ntocar\ntocino\ntodo\ntoga\ntoldo\ntomar\ntono\ntonto\ntopar\ntope\ntoque\ntórax\ntorero\ntormenta\ntorneo\ntoro\ntorpedo\ntorre\ntorso\ntortuga\ntos\ntosco\ntoser\ntóxico\ntrabajo\ntractor\ntraer\ntráfico\ntrago\ntraje\ntramo\ntrance\ntrato\ntrauma\ntrazar\ntrébol\ntregua\ntreinta\ntren\ntrepar\ntres\ntribu\ntrigo\ntripa\ntriste\ntriunfo\ntrofeo\ntrompa\ntronco\ntropa\ntrote\ntrozo\ntruco\ntrueno\ntrufa\ntubería\ntubo\ntuerto\ntumba\ntumor\ntúnel\ntúnica\nturbina\nturismo\nturno\ntutor\nubicar\núlcera\numbral\nunidad\nunir\nuniverso\nuno\nuntar\nuña\nurbano\nurbe\nurgente\nurna\nusar\nusuario\nútil\nutopía\nuva\nvaca\nvacío\nvacuna\nvagar\nvago\nvaina\nvajilla\nvale\nválido\nvalle\nvalor\nválvula\nvampiro\nvara\nvariar\nvarón\nvaso\nvecino\nvector\nvehículo\nveinte\nvejez\nvela\nvelero\nveloz\nvena\nvencer\nvenda\nveneno\nvengar\nvenir\nventa\nvenus\nver\nverano\nverbo\nverde\nvereda\nverja\nverso\nverter\nvía\nviaje\nvibrar\nvicio\nvíctima\nvida\nvídeo\nvidrio\nviejo\nviernes\nvigor\nvil\nvilla\nvinagre\nvino\nviñedo\nviolín\nviral\nvirgo\nvirtud\nvisor\nvíspera\nvista\nvitamina\nviudo\nvivaz\nvivero\nvivir\nvivo\nvolcán\nvolumen\nvolver\nvoraz\nvotar\nvoto\nvoz\nvuelo\nvulgar\nyacer\nyate\nyegua\nyema\nyerno\nyeso\nyodo\nyoga\nyogur\nzafiro\nzanja\nzapato\nzarza\nzona\nzorro\nzumo\nzurdo\n"
  },
  {
    "path": "src/main/resources/mnemonic/wordlist/turkish.txt",
    "content": "abajur\nabaküs\nabartı\nabdal\nabdest\nabiye\nabluka\nabone\nabsorbe\nabsürt\nacayip\nacele\nacemi\naçıkgöz\nadalet\nadam\nadezyon\nadisyon\nadliye\nadres\nafacan\nafili\nafiş\nafiyet\naforizm\nafra\nağaç\nağır\nahbap\nahkam\nahlak\nahtapot\naidat\naile\najan\nakademi\nakarsu\nakbaş\nakciğer\nakdeniz\nakıbet\nakıl\nakıntı\nakide\nakrep\nakrobasi\naksiyon\nakşam\naktif\naktör\naktris\nakustik\nalaca\nalbüm\nalçak\naldanma\naleni\nalet\nalfabe\nalgılama\nalıngan\nalkış\nalkol\nalpay\nalperen\naltın\naltüst\naltyapı\nalyuvar\namade\namatör\namazon\nambalaj\namblem\nambulans\namca\namel\namigo\namir\namiyane\namorti\nampul\nanadolu\nanahtar\nanakonda\nanaokul\nanapara\nanarşi\nanatomi\nanayasa\nanekdot\nanestezi\nangaje\nanka\nanket\nanlamlı\nanne\nanomali\nanonim\nanten\nantlaşma\napse\naraba\naracı\naraf\narbede\narda\narefe\narena\nargo\nargüman\narkadaş\narmoni\naroma\narsa\narsız\nartı\nartist\naruz\nasansör\nasayiş\nasfalt\nasgari\nasil\nasker\naskı\naslan\nasosyal\nastsubay\nasya\naşçı\naşırı\naşure\natabey\nataman\nateş\natmaca\natmosfer\natom\natölye\navcı\navdet\navize\navlu\navokado\navrupa\navukat\nayaz\nayçiçeği\naydın\naygıt\nayna\nayran\nayrıntı\nazim\nbaca\nbagaj\nbağlantı\nbahadır\nbahçe\nbaki\nbakkal\nbaklava\nbakteri\nbalçık\nbalina\nbalo\nbalta\nbant\nbanyo\nbardak\nbarış\nbaşbuğ\nbaşıboş\nbaşkan\nbaşlık\nbavul\nbayındır\nbaykuş\nbazlama\nbedel\nbegüm\nbekçi\nbekle\nbelge\nbelki\nbencil\nbenek\nbengi\nbenzer\nberjer\nberk\nbermuda\nberrak\nbeşik\nbeton\nbeyin\nbeyoğlu\nbıçak\nbiberiye\nbidon\nbiftek\nbihaber\nbikini\nbilezik\nbilinç\nbilye\nbina\nbinbaşı\nbinyıl\nbisiklet\nbisküvi\nbitki\nbizzat\nbodrum\nboğaz\nbohça\nbolero\nboncuk\nbonfile\nborsa\nboru\nbostan\nboşboğaz\nbotanik\nboya\nboykot\nboynuz\nbozgun\nbozkır\nbölüm\nbörek\nbuçuk\nbugün\nbuğday\nbuhar\nbuhran\nbulvar\nburam\nburçak\nburs\nburun\nbutik\nbuzdağı\nbuzkıran\nbücür\nbüfe\nbülten\nbütçe\nbütün\nbüyük\ncacık\ncadı\ncahil\ncambaz\ncanhıraş\ncasus\ncazibe\ncehalet\ncehennem\nceket\ncemre\ncenin\ncennet\ncepken\ncerrah\ncesur\ncetvel\ncevher\nceylan\ncılız\ncıva\ncilt\ncisim\nciyak\ncoğrafya\ncömert\ncumba\ncüzdan\nçabucak\nçadır\nçağdaş\nçağlayan\nçağrı\nçakmak\nçalışkan\nçamaşır\nçapa\nçaput\nçarık\nçarpan\nçarşaf\nçayhane\nçekirdek\nçelebi\nçember\nçenet\nçengel\nçerçeve\nçerez\nçeşit\nçeşme\nçete\nçevre\nçeyiz\nçeyrek\nçığır\nçılgın\nçıngırak\nçift\nçiğdem\nçikolata\nçilek\nçimen\nçivi\nçoban\nçocuk\nçokgen\nçomak\nçorba\nçözelti\nçubuk\nçukur\nçuval\nçürük\ndağbaşı\ndağılım\ndaktilo\ndaldırış\ndalga\ndalkavuk\ndamak\ndamıtma\ndamla\ndana\ndandik\ndanışman\ndaniska\ndantel\ndargeçit\ndarphane\ndavet\ndayı\ndefter\ndeğer\ndeğirmen\ndehşet\ndelgeç\ndemir\ndeneyim\ndenge\ndepo\ndeprem\nderdest\ndere\nderhal\nderman\ndernek\nderviş\ndesen\ndestan\ndışarı\ndışbükey\ndijital\ndikbaşlı\ndilekçe\ndimağ\ndinamik\ndindar\ndinleme\ndinozor\ndipçik\ndipnot\ndireniş\ndirsek\ndisiplin\ndisk\ndivriği\ndizüstü\ndobra\ndodurga\ndoğalgaz\ndoktor\ndoküman\ndolap\ndonanım\ndondurma\ndonör\ndoruk\ndosdoğru\ndost\ndosya\ndozer\ndöküm\ndönence\ndörtyol\ndövme\ndram\ndublaj\ndurum\nduvak\nduyarga\nduyma\nduyuru\ndüğme\ndüğüm\ndükkan\ndünür\ndüpedüz\ndürbün\ndüşünür\ndüzayak\ndüzeltme\nebeveyn\nebru\necel\necnebi\necza\nedat\nedilgen\nefendi\nefor\nefsane\negemen\negzersiz\neğrelti\nekarte\nekip\neklem\nekmek\nekol\nekonomi\nekose\nekran\nekvator\nelaman\nelastik\nelbet\nelbise\nelçi\neldiven\nelebaşı\neleştiri\nelma\neloğlu\nelveda\nemare\nemekçi\nemisyon\nemniyet\nempati\nemsal\nemzik\nendüstri\nenerji\nengebe\nengin\nenişte\nenkaz\nentari\nentegre\nentrika\nenzim\nerdem\nergen\nerguvan\nerkek\nerozyon\nertesi\nerzak\nesaret\nesenlik\neser\neski\nesnek\neşarp\neşofman\neşraf\neşya\neşzaman\netik\netken\netkinlik\netüt\nevet\nevire\nevrak\nevrim\neyalet\neyvah\nezber\nfabrika\nfanatik\nfanus\nfason\nfasulye\nfatih\nfatura\nfauna\nfavori\nfayans\nfayton\nfazıl\nfazilet\nfederal\nfelsefe\nfener\nferibot\nfersah\nfesih\nfestival\nfeveran\nfeza\nfıçı\nfıldır\nfındık\nfırça\nfırsat\nfırtına\nfıtık\nfidan\nfidye\nfigür\nfihrist\nfikir\nfildişi\nfilo\nfiltre\nfincan\nfiruze\nfitil\nfiyaka\nfizik\nflaş\nflüt\nfosil\nfren\nfukara\nfutbol\ngarabet\ngariban\ngarnitür\ngazi\ngece\ngedik\ngelenek\ngelin\ngemi\ngenç\ngeniş\ngeometri\ngerçek\ngevrek\ngezegen\ngezgin\ngeziyolu\ngıcık\ngıda\ngıybet\ngirdap\ngirişim\ngitar\ngiyecek\ngiysi\ngizem\ngofret\ngoril\ngöbek\ngöçebe\ngöğüs\ngökdelen\ngökmen\ngökyüzü\ngölge\ngömlek\ngönül\ngörenek\ngörkemli\ngörsel\ngösteri\ngövde\ngözaltı\ngözcü\ngözdağı\ngözleme\ngözyaşı\ngrup\ngurbet\ngusül\ngübre\ngüfte\ngümüş\ngünaydın\ngüncel\ngündüz\ngüneş\ngünyüzü\ngürbüz\ngüvercin\ngüzel\nhaber\nhacamat\nhacim\nhademe\nhafız\nhafriyat\nhafta\nhakan\nhakem\nhakikat\nhaksever\nhalı\nhançer\nhane\nhangar\nhapis\nhapşırık\nharf\nhaseki\nhasret\nhatun\nhavuç\nhaylaz\nhaysiyet\nhayvan\nhedef\nhektar\nhemen\nhemfikir\nhendek\nhepsi\nhergele\nherhangi\nhesap\nheyecan\nheykel\nhezimet\nhıçkırık\nhızölçer\nhicviye\nhikaye\nhikmet\nhile\nhisse\nhobi\nhoca\nhorlama\nhormon\nhoşbeş\nhoşgörü\nhoyrat\nhörgüç\nhöyük\nhudut\nhukuk\nhunhar\nhurda\nhuysuz\nhuzur\nhücum\nhükümet\nhünkar\nhüviyet\nırmak\nısıölçer\nısıtıcı\nıspanak\nısrar\nışıldak\nızdırap\nızgara\nibadet\nicat\niçbükey\niçecek\niçgüdü\niçsel\nidman\niftihar\niğne\nihanet\nihbar\nihdas\nihmal\nihracat\nihsan\nikilem\nikindi\nikircik\niklim\niksir\niktibas\nilaç\nilçe\nileri\niletişim\nilgi\nilhak\nilkbahar\nilkokul\nilmek\nimkan\nimleç\nimsak\nimtihan\nimza\nince\ninkar\ninşa\nipek\nipucu\nirade\nirfan\nirmik\nisabet\niskele\nisraf\nisyan\nişçi\nişgal\nişgüzar\nişlem\nitibar\nitiraf\nivedi\nivme\niyileşme\niyimser\nizbandut\nizci\nizdiham\nizin\njakoben\njandarma\njargon\nkabadayı\nkablo\nkabus\nkaçamak\nkadeh\nkadın\nkadraj\nkafa\nkafkas\nkağıt\nkağnı\nkahkaha\nkahraman\nkahvaltı\nkakül\nkaldırım\nkale\nkalibre\nkalkan\nkalpak\nkamış\nkamyon\nkanat\nkandaş\nkanepe\nkanser\nkanun\nkaos\nkapı\nkaplıca\nkaptan\nkaranlık\nkardeş\nkarga\nkarınca\nkarmaşa\nkarşıt\nkasırga\nkask\nkasvet\nkatkı\nkatman\nkavram\nkaygan\nkaynakça\nkayyum\nkedi\nkehanet\nkekik\nkelebek\nkenar\nkerkenez\nkerpiç\nkesirli\nkesmece\nkestane\nkeşkek\nketçap\nkeyfiyet\nkıble\nkıdemli\nkılavuz\nkılçık\nkılıf\nkıraç\nkırmızı\nkırsal\nkısayol\nkısım\nkıskanç\nkısmet\nkışla\nkıvanç\nkıvılcım\nkıvrık\nkıyafet\nkıymetli\nkızak\nkızılcık\nkibar\nkinaye\nkira\nkiremit\nkirli\nkirpik\nkişisel\nkitap\nkoçbaşı\nkodaman\nkoğuş\nkokteyl\nkolaycı\nkolbastı\nkolonya\nkoltuk\nkolye\nkombine\nkomedyen\nkomiser\nkomposto\nkomşu\nkomuta\nkonak\nkonfor\nkoni\nkonsül\nkopya\nkorkusuz\nkorna\nkorse\nkorunak\nkorvet\nkostüm\nkoşul\nkoyu\nkozmik\nköfte\nkökensel\nköprücük\nköpük\nkördüğüm\nkörfez\nköstebek\nköşegen\nkötü\nkravat\nkriter\nkuantum\nkudurma\nkuluçka\nkulübe\nkumanya\nkumbara\nkumlu\nkumpir\nkumral\nkundura\nkupa\nkupkuru\nkuramsal\nkurbağa\nkurdele\nkurgu\nkurmay\nkurşun\nkurtuluş\nkurultay\nkurye\nkusursuz\nkuşak\nkuşbaşı\nkuşkulu\nkutlama\nkutsal\nkutup\nkuver\nkuyruk\nkuzey\nkuzgun\nküçük\nkülçe\nkülfet\nkülliye\nkültürel\nkümes\nkünefe\nküresel\nkütle\nlahana\nlahmacun\nlamba\nlansman\nlavaş\nlayık\nleğen\nlevent\nleziz\nlezzet\nlider\nlikide\nliman\nliste\nlitre\nliyakat\nlodos\nlokanta\nlokman\nlokum\nlunapark\nlütfen\nlüzum\nnokta\nmabet\nmacera\nmacun\nmadalya\nmadde\nmadem\nmağara\nmağdur\nmağfiret\nmağlup\nmahalle\nmahcup\nmahir\nmahkeme\nmahlas\nmahrum\nmahsul\nmakas\nmakbuz\nmakine\nmakro\nmaksat\nmakul\nmaliye\nmanav\nmangal\nmanidar\nmanken\nmantık\nmanzara\nmareşal\nmargarin\nmarifet\nmarket\nmarmelat\nmasaüstü\nmasmavi\nmasraf\nmasum\nmatah\nmateryal\nmatrak\nmaval\nmavra\nmaydanoz\nmayhoş\nmaytap\nmazbata\nmazeret\nmazlum\nmazot\nmazur\nmeblağ\nmebus\nmecaz\nmecbur\nmeclis\nmecmua\nmecnun\nmeçhul\nmedeni\nmehtap\nmekanik\nmelodi\nmeltem\nmemur\nmendil\nmenekşe\nmenteşe\nmeraklı\nmercek\nmerdiven\nmerhaba\nmerinos\nmerkez\nmermi\nmert\nmesafe\nmesele\nmesken\nmeslek\nmeşale\nmeşgul\nmeşhur\nmetafor\nmetin\nmetre\nmevcut\nmevkidaş\nmeydan\nmeyil\nmeyve\nmeziyet\nmezun\nmıknatıs\nmısra\nmızıka\nmiğfer\nmihrak\nmikrofon\nmiktar\nmilat\nmilli\nmimar\nminare\nmineral\nminik\nminyon\nmirliva\nmisafir\nmiskin\nmiting\nmiyop\nmizah\nmobilya\nmodel\nmonitör\nmorötesi\nmotive\nmotor\nmozaik\nmuavin\nmucize\nmuhafız\nmuhteşem\nmukayese\nmumya\nmusluk\nmuşamba\nmutabık\nmutfak\nmutlu\nmuzaffer\nmuzdarip\nmübarek\nmücadele\nmüdür\nmüfredat\nmüftü\nmühendis\nmühim\nmühlet\nmükemmel\nmülk\nmümkün\nmümtaz\nmüsrif\nmüstesna\nmüşahit\nmüşteri\nmütercim\nmüthiş\nmüze\nmüzik\nnabız\nnadas\nnadir\nnahoş\nnakarat\nnakış\nnalbur\nnamlu\nnamus\nnankör\nnargile\nnarkoz\nnasıl\nnasip\nnaylon\nnazar\nnazım\nnazik\nneden\nnefes\nnegatif\nneon\nneptün\nnerede\nnesil\nnesnel\nneşeli\nnetice\nnevresim\nneyse\nneyzen\nnezaket\nnezih\nnezle\nnicel\nnilüfer\nnimet\nnisan\nnispet\nnitekim\nnizam\nnohut\nnoksan\nnormal\nnostalji\nnoter\nnöbet\nnumara\nnumune\nnutuk\nnüfus\nobabaşı\nobez\nobje\nocak\nodun\nofansif\nofis\noğlak\noğuz\nokçu\noklava\noksijen\nokul\nokumuş\nokutman\nokuyucu\nokyanus\nolağan\nolanak\nolası\nolay\nolgun\nolimpik\nolumlu\nomlet\nomurga\nonarım\nonursal\nopera\noptik\noral\norantı\nordu\norganik\norijin\norkide\norman\norta\noruç\notağ\notantik\notel\notoban\notogar\notomobil\notonom\notopark\notorite\notoyol\noturum\noyuk\noyuncak\nozan\nödeme\nödenek\nödev\nödül\nödünç\nöfke\nöğlen\nöğrenci\nöğün\nöğütücü\nöksürük\nölçme\nölçü\nölümsüz\nömür\nönayak\nöncü\nönder\nönem\nönerge\nöngörü\nönlük\nönsezi\nöpücük\nördek\nörgü\nörtbas\nörtme\nörtü\nörümcek\nörüntü\nöteberi\nöteki\növünç\nöykü\nöyleyse\nözçekim\nözdeyiş\nözel\nözenti\nözerk\nözgürlük\nözlem\nözlü\nözne\nözsever\nözümseme\nözür\nözveri\npabuç\npadişah\npalamut\npalmiye\npalto\npalyaço\npamuk\npanayır\npancar\npanda\npanel\npanik\npanjur\npankart\npano\npansuman\npantolon\npanzehir\npapatya\npapyon\nparaşüt\nparça\npardösü\nparfüm\nparıltı\nparkur\nparmak\nparodi\nparsel\npartner\npasaport\npasif\npaskalya\npastırma\npaşa\npatates\npaten\npatika\npatlıcan\npatolog\npatron\npayanda\npaydaş\npayidar\npaylaşma\npaytak\npeçete\npedal\npeder\npehlivan\npekala\npekmez\npelerin\npelikan\npelüş\npembe\npena\npencere\npense\nperçin\nperde\npergel\nperişan\nperon\npersonel\nperşembe\nperuk\npervane\npespaye\npestil\npeşin\npetek\npetrol\npetunya\npeynir\npeyzaj\npınar\npırasa\npırlanta\npide\npikap\npiknik\npilav\npiliç\npilot\npipet\npipo\npiramit\npirinç\npirzola\npist\npişik\npişman\npiyasa\npiyes\nplaj\nplaket\nplanlama\nplatform\nplazma\npodyum\npoğaça\npolat\npolen\npolitika\npompa\npopüler\nporselen\nportakal\nposa\nposter\npoşet\npoyraz\npozitif\npranga\npratik\nprenses\nprim\nproblem\nprofil\nprogram\nproje\nprotokol\nprova\npuan\npudra\npusula\npüre\npürüz\npüstül\npüsür\nracon\nradar\nradikal\nradyo\nrafadan\nrafine\nrağbet\nrahat\nrahle\nrakam\nraket\nrakip\nrakun\nralli\nrampa\nrandevu\nranza\nrapor\nrastgele\nrasyonel\nrazı\nrealite\nreçine\nrefah\nreferans\nrefik\nreform\nrehber\nrehin\nreis\nrekabet\nreklam\nrekor\nrektör\nrenk\nresim\nresmen\nrestoran\nretorik\nrevaç\nrevize\nreyon\nrezalet\nrezerv\nrezil\nrıhtım\nrıza\nritim\nritüel\nrivayet\nrobot\nroman\nrota\nrozet\nröportaj\nrötar\nruble\nruhban\nruhsat\nrulet\nrulo\nrunik\nrutin\nrutubet\nrüşvet\nrütbe\nrüya\nrüzgar\nsabah\nsabıka\nsabit\nsabun\nsaçma\nsade\nsadık\nsafahat\nsafdil\nsafkan\nsağanak\nsağduyu\nsağlam\nsaha\nsahiden\nsahne\nsakal\nsakız\nsakin\nsaklama\nsaksağan\nsalamura\nsalça\nsalgı\nsalınım\nsalkım\nsalon\nsaltanat\nsanatçı\nsancak\nsandalye\nsaniye\nsaplantı\nsapsız\nsaray\nsarışın\nsarkık\nsarmaşık\nsatır\nsavaşım\nsavunma\nsaydam\nsayfa\nsaygın\nsayısal\nsebep\nseçenek\nseçim\nseçkin\nseçmen\nseda\nsedir\nsedye\nsefer\nsehpa\nsekizgen\nselektör\nselvi\nsemavi\nsembol\nseminer\nsenaryo\nsendika\nsenkron\nsensör\nsentez\nsepet\nseramik\nserbest\nserdar\nseremoni\nsergi\nserhat\nserin\nsermaye\nserpuş\nsersem\nserüven\nservis\nsesli\nsesteş\nsevap\nseviye\nseyahat\nseyirci\nsezon\nsıcak\nsıfat\nsıhhi\nsınanma\nsınır\nsıradan\nsırdaş\nsırma\nsırtüstü\nsızgıt\nsiftah\nsigorta\nsihirbaz\nsilah\nsilecek\nsilindir\nsimetri\nsimge\nsimit\nsincap\nsindirim\nsinema\nsinirli\nsipariş\nsirke\nsiroz\nsistem\nsivilce\nsiyasi\nslogan\nsoba\nsofra\nsoğuk\nsohbet\nsokak\nsolfej\nsolunum\nsomut\nsonbahar\nsonraki\nsonsuz\nsorunsuz\nsosyete\nsoyağacı\nsoydaş\nsoygun\nsoytarı\nsöğüş\nsömürge\nsönük\nsöylem\nsözcük\nsözde\nspatula\nspektrum\nspiker\nspiral\nsponsor\nsporcu\nsprey\nstabil\nstatü\nstok\nstopaj\nstrateji\nsubay\nsucuk\nsuçüstü\nsuhulet\nsulama\nsungur\nsunucu\nsurat\nsusam\nsuskun\nsükse\nsükut\nsülale\nsünger\nsüpürge\nsürahi\nsüreç\nsürgün\nsürüm\nsüsleme\nsütanne\nsütlaç\nsütun\nsüvari\nşahane\nşahbaz\nşahit\nşahsiyet\nşakıma\nşaklaban\nşakrak\nşamar\nşampiyon\nşanslı\nşantiye\nşapka\nşarkıcı\nşartname\nşaşırma\nşaşkın\nşatafat\nşayet\nşebeke\nşefkat\nşeftali\nşehir\nşehvet\nşeker\nşekil\nşelale\nşema\nşemsiye\nşerbet\nşeref\nşerit\nşımarık\nşıpıdık\nşifre\nşimdi\nşimşek\nşipşak\nşirin\nşişe\nşişirme\nşofben\nşöhret\nşölen\nşüphe\ntabaka\ntabela\ntabure\ntadilat\ntaharet\ntahıl\ntahkim\ntahlil\ntahmin\ntahrifat\ntahsilat\ntahta\ntaklit\ntakoz\ntaksici\ntaktik\ntakvim\ntalebe\ntalip\ntamamen\ntamirci\ntampon\ntamtakır\ntandır\ntanecik\ntanıtım\ntanrı\ntansiyon\ntapan\ntapınak\ntaptaze\ntapu\ntarafgir\ntarhana\ntarım\ntarih\ntarla\ntartak\ntarumar\ntasarım\ntasdik\ntaslak\ntastamam\ntaşeron\ntaşınmaz\ntaşra\ntatava\ntatbikat\ntatil\ntatlı\ntavsiye\ntavşan\ntavuk\ntaze\ntaziye\ntazminat\ntebeşir\ntebrik\ntecrübe\nteçhizat\ntedarik\ntedbir\nteftiş\nteğet\nteğmen\ntehdit\ntehlike\ntekdüze\ntekerlek\ntekme\nteknik\ntekrar\ntelef\ntelsiz\ntelve\ntemas\ntembel\ntemiz\ntemkin\ntempo\ntemsilci\ntendon\nteneke\ntenha\ntenkit\ntepegöz\ntepki\nterazi\nterbiye\ntercih\ntereyağı\nterfi\nterim\nterminal\ntersane\ntertip\ntesadüf\ntescil\ntesir\nteslimat\ntespit\ntestere\nteşekkür\nteşhir\nteşrif\nteşvik\nteyze\ntezahür\ntezgah\ntıbbi\ntıkaç\ntıkışık\ntıknaz\ntılsım\ntıpkı\ntıraş\ntırışka\ntırmanış\ntırnak\ntırpan\ntıslama\nticaret\ntilki\ntiryaki\ntitreşim\ntohum\ntokat\ntolere\ntomar\ntombak\ntomurcuk\ntopaç\ntoplum\ntoprak\ntoptan\ntoraman\ntorpido\ntortu\ntosbağa\ntoynak\ntören\ntrafik\ntrajedi\ntramvay\ntransfer\ntribün\ntriko\ntugay\ntuğla\ntuğrul\ntuhaf\ntulumba\ntunç\nturan\nturkuaz\nturnusol\nturşu\nturuncu\ntutanak\ntutkal\ntutsak\ntutum\ntuyuğ\ntuzlu\ntüccar\ntüfek\ntükenmez\ntülbent\ntümleç\ntünel\ntürbin\ntürev\ntürk\ntüzük\nucube\nucuz\nuçak\nuçurtma\nufuk\nuğrak\nuğur\nukala\nulaşım\nulema\nulus\nulvi\numursama\numut\nunutkan\nuslu\nustabaşı\nustura\nusul\nutangaç\nuyanık\nuyarı\nuydu\nuygar\nuygulama\nuykusuz\nuysal\nuyuşma\nuzantı\nuzay\nuzgören\nuzlaşma\nuzman\nuzun\nücra\nücret\nüçbudak\nüçgen\nüçkağıt\nüçleme\nüfürük\nülke\nümit\nüniforma\nünite\nünlem\nüretken\nürün\nüslup\nüstel\nüstün\nüşengeç\nüşüme\nütopya\nüvey\nüzengi\nüzgün\nüzüm\nvagon\nvaka\nvakfiye\nvakıf\nvakit\nvakum\nvapur\nvaril\nvarlık\nvarsayım\nvaryemez\nvasıta\nvasiyet\nvatandaş\nvazife\nvazo\nveciz\nvefa\nvehim\nveliaht\nveresiye\nverimli\nverkaç\nvernik\nvertigo\nvesait\nvesika\nvestiyer\nveznedar\nvicdan\nvilayet\nvirane\nvirgül\nvişne\nvites\nvokal\nvolkan\nvurma\nvurucu\nvücut\nyabancı\nyabgu\nyağış\nyağlı\nyağmur\nyakamoz\nyakın\nyaklaşık\nyalçın\nyalıtım\nyaman\nyanardağ\nyangın\nyanıt\nyankı\nyanlış\nyansıma\nyapay\nyapboz\nyapımcı\nyaprak\nyaratık\nyarbay\nyardım\nyargıç\nyarıçap\nyasemin\nyastık\nyaşam\nyatak\nyatırım\nyavru\nyaygara\nyayıncı\nyayla\nyazılım\nyekpare\nyekvücut\nyelkovan\nyelpaze\nyemek\nyemiş\nyengeç\nyeniçeri\nyeraltı\nyerküre\nyerleşke\nyeryüzü\nyeşil\nyetenek\nyetkili\nyığınak\nyıkama\nyılbaşı\nyıldırım\nyılkı\nyılmaz\nyırtıcı\nyiğit\nyoğurt\nyokuş\nyolcu\nyoldaş\nyolgeçen\nyolkesen\nyolüstü\nyordam\nyorgan\nyorumcu\nyosun\nyöndeş\nyönetim\nyönlü\nyöntem\nyöresel\nyörünge\nyufka\nyukarı\nyumruk\nyumurta\nyuvarlak\nyücelme\nyükçeker\nyüklem\nyüksek\nyürek\nyürütme\nyüzde\nyüzeysel\nyüzgeç\nyüzüstü\nyüzyıl\nzabıta\nzafer\nzahmet\nzambak\nzaptiye\nzarafet\nzaruret\nzeka\nzekice\nzemberek\nzemin\nzencefil\nzeplin\nzeytin\nzıbın\nzılgıt\nzımbırtı\nzımpara\nzıpkın\nzigon\nzihinsel\nzihniyet\nzincir\nzindan\nzirzop\nziyaret\nziynet\nzoraki\nzorlu\nzorunlu\nzüğürt\nzümre\n"
  },
  {
    "path": "src/main/resources/simplelogger.properties",
    "content": "# SLF4J's SimpleLogger configuration file\r\n# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.\r\n\r\n# Default logging detail level for all instances of SimpleLogger.\r\n# Must be one of (\"trace\", \"debug\", \"info\", \"warn\", or \"error\").\r\n# If not specified, defaults to \"info\".\r\norg.slf4j.simpleLogger.defaultLogLevel=trace\r\n\r\n# Logging detail level for a SimpleLogger instance named \"xxxxx\".\r\n# Must be one of (\"trace\", \"debug\", \"info\", \"warn\", or \"error\").\r\n# If not specified, the default logging detail level is used.\r\n#org.slf4j.simpleLogger.log.xxxxx=\r\n\r\n# Set to true if you want the current date and time to be included in output messages.\r\n# Default is false, and will output the number of milliseconds elapsed since startup.\r\n#org.slf4j.simpleLogger.showDateTime=false\r\n\r\n# The date and time format to be used in the output messages.\r\n# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.\r\n# If the format is not specified or is invalid, the default format is used.\r\n# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.\r\n#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z\r\n\r\n# Set to true if you want to output the current thread name.\r\n# Defaults to true.\r\n#org.slf4j.simpleLogger.showThreadName=true\r\n\r\n# Set to true if you want the Logger instance name to be included in output messages.\r\n# Defaults to true.\r\n#org.slf4j.simpleLogger.showLogName=true\r\n\r\n# Set to true if you want the last component of the name to be included in output messages.\r\n# Defaults to false.\r\n#org.slf4j.simpleLogger.showShortLogName=false"
  },
  {
    "path": "src/main/resources/unused/calc_addrs.cl",
    "content": "/*\n * Vanitygen, vanity bitcoin address generator\n * Copyright (C) 2011 <samr7@cs.washington.edu>\n *\n * Vanitygen is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * any later version. \n *\n * Vanitygen is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Vanitygen.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/*\n * This file contains an OpenCL kernel for performing certain parts of\n * the bitcoin address calculation process.\n *\n * Kernel: ec_add_grid\n *\n * Inputs:\n * - Row: Array of (sequential) EC points\n * - Column: Array of column increment EC points (= rowsize * Pgenerator)\n *\n * Steps:\n * - Compute P = Row[x] + Column[y]\n *   P is computed as numerator/denominator components Pxj, Pyj, Pz\n *   Final values are: Px = Pxj / (Pz^2), Py = Pyj / (Pz^3)\n *\n *   The modular inverse of Pz is required to compute Px and Py, and\n *   can be computed more efficiently in large batches.  This is done in\n *   the next kernel heap_invert.\n *\n * - Store Pxj, Pyj to intermediate point buffer\n * - Store Pz to z_heap\n *\n * Outputs:\n * - Intermediate point buffer\n * - Denominator buffer (z_heap)\n *\n * -------------------------------\n * Kernel: heap_invert\n *\n * Inputs:\n * - Denominator buffer (z_heap)\n * - N = Batch size (power of 2)\n *\n * Steps:\n * - Compute the product tree for N values in the denominator buffer\n * - Compute the modular inverse of the root of the product tree\n * - Multiply down the tree to compute the modular inverse of each leaf\n *\n * Outputs:\n * - Modular inverse denominator buffer (z_heap)\n *\n * -------------------------------\n * Kernel: hash_ec_point_get\n *\n * Inputs:\n * - Intermediate point buffer\n * - Modular inverse denominator buffer (z_heap)\n *\n * Steps:\n * - Compute Px = Pxj * (1/Pz)^2\n * - Compute Py = Pyj * (1/Pz)^3\n * - Compute H = RIPEMD160(SHA256(0x04 | Px | Py))\n *\n * Output:\n * - Array of 20-byte address hash values\n *\n * -------------------------------\n * Kernel: hash_ec_point_search_prefix\n *\n * Like hash_ec_point_get, but instead of storing the complete hash\n * value to an output buffer, it searches a sorted list of ranges,\n * and if a match is found, writes a flag to an output buffer.\n */\n\n\n/* Byte-swapping and endianness */\n#define bswap32(v)\t\t\t\t\t\\\n\t(((v) >> 24) | (((v) >> 8) & 0xff00) |\t\t\\\n\t (((v) << 8) & 0xff0000) | ((v) << 24))\n\n#if __ENDIAN_LITTLE__ != 1\n#define load_le32(v) bswap32(v)\n#define load_be32(v) (v)\n#else\n#define load_le32(v) (v)\n#define load_be32(v) bswap32(v)\n#endif\n\n/*\n * Loop unrolling macros\n *\n * In most cases, preprocessor unrolling works best.\n * The exception is NVIDIA's compiler, which seems to take unreasonably\n * long to compile a loop with a larger iteration count, or a loop with\n * a body of >50 PTX instructions, with preprocessor unrolling.\n * However, it does not seem to take as long with pragma unroll, and\n * produces good output.\n */\n\n/* Explicit loop unrolling */\n#define unroll_5(a) do { a(0) a(1) a(2) a(3) a(4) } while (0)\n#define unroll_8(a) do { a(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7) } while (0)\n#define unroll_1_7(a) do { a(1) a(2) a(3) a(4) a(5) a(6) a(7) } while (0)\n#define unroll_7(a) do { a(0) a(1) a(2) a(3) a(4) a(5) a(6) } while (0)\n#define unroll_7_0(a) do { a(7) a(6) a(5) a(4) a(3) a(2) a(1) a(0) } while (0)\n#define unroll_7_1(a) do { a(7) a(6) a(5) a(4) a(3) a(2) a(1) } while (0)\n#define unroll_16(a) do {\t\t\t\t\\\n\ta(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7)\t\t\\\n\ta(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15)\t\\\n\t} while (0)\n#define unroll_64(a) do {\t\t\t\t\\\n\ta(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7)\t\t\\\n\ta(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15)\t\\\n\ta(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) \\\n\ta(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31)\t\\\n\ta(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) \\\n\ta(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) \\\n\ta(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) \\\n\ta(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) \\\n\t} while (0)\n\n/* Conditional loop unrolling */\n#if defined(DEEP_PREPROC_UNROLL)\n#define iter_5(a) unroll_5(a)\n#define iter_8(a) unroll_8(a)\n#define iter_16(a) unroll_16(a)\n#define iter_64(a) unroll_64(a)\n#else\n#define iter_5(a) do {int _i; for (_i = 0; _i < 5; _i++) { a(_i) }} while (0)\n#define iter_8(a) do {int _i; for (_i = 0; _i < 8; _i++) { a(_i) }} while (0)\n#define iter_16(a) do {int _i; for (_i = 0; _i < 16; _i++) { a(_i) }} while (0)\n#define iter_64(a) do {int _i; for (_i = 0; _i < 64; _i++) { a(_i) }} while (0)\n#endif\n\n/*\n * BIGNUM mini-library\n * This module deals with fixed-size 256-bit bignums.\n * Where modular arithmetic is performed, the SECP256k1 prime\n * modulus (below) is assumed.\n *\n * Methods include:\n * - bn_is_zero/bn_is_one/bn_is_odd/bn_is_even/bn_is_bit_set\n * - bn_rshift[1]/bn_lshift[1]\n * - bn_neg\n * - bn_uadd/bn_uadd_p\n * - bn_usub/bn_usub_p\n */\n\ntypedef uint bn_word;\n#define BN_NBITS 256\n#define BN_WSHIFT 5\n#define BN_WBITS (1 << BN_WSHIFT)\n#define BN_NWORDS ((BN_NBITS/8) / sizeof(bn_word))\n#define BN_WORDMAX 0xffffffff\n\n#define MODULUS_BYTES \\\n\t0xfffffc2f, 0xfffffffe, 0xffffffff, 0xffffffff, \\\n\t0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff\n\ntypedef struct {\n\tbn_word d[BN_NWORDS];\n} bignum;\n\n__constant bn_word modulus[] = { MODULUS_BYTES };\n__constant bignum bn_zero;\n\n__constant bn_word mont_rr[BN_NWORDS] = { 0xe90a1, 0x7a2, 0x1, 0, };\n__constant bn_word mont_n0[2] = { 0xd2253531, 0xd838091d };\n\n\n#define bn_is_odd(bn)\t\t(bn.d[0] & 1)\n#define bn_is_even(bn) \t\t(!bn_is_odd(bn))\n#define bn_is_zero(bn) \t\t(!bn.d[0] && !bn.d[1] && !bn.d[2] && \\\n\t\t\t\t !bn.d[3] && !bn.d[4] && !bn.d[5] && \\\n\t\t\t\t !bn.d[6] && !bn.d[7])\n#define bn_is_one(bn) \t\t((bn.d[0] == 1) && !bn.d[1] && !bn.d[2] && \\\n\t\t\t\t !bn.d[3] && !bn.d[4] && !bn.d[5] && \\\n\t\t\t\t !bn.d[6] && !bn.d[7])\n#define bn_is_bit_set(bn, n) \\\n\t((((bn_word*)&bn)[n >> BN_WSHIFT]) & (1 << (n & (BN_WBITS-1))))\n\n#define bn_unroll(e) unroll_8(e)\n#define bn_unroll_sf(e)\tunroll_1_7(e)\n#define bn_unroll_sl(e)\tunroll_7(e)\n#define bn_unroll_reverse(e) unroll_7_0(e)\n#define bn_unroll_reverse_sl(e) unroll_7_1(e)\n\n#define bn_unroll_arg(e, arg)\t\t\t\t\\\n\te(arg, 0) e(arg, 1) e(arg, 2) e(arg, 3)\t\\\n\te(arg, 4) e(arg, 5) e(arg, 6) e(arg, 7)\n#define bn_unroll_arg_sf(e, arg)\t\t\t\\\n\te(arg, 1) e(arg, 2) e(arg, 3)\t\t\\\n\te(arg, 4) e(arg, 5) e(arg, 6) e(arg, 7)\n\n#define bn_iter(e) iter_8(e)\n\n\n/*\n * Bitwise shift\n */\n\nvoid\nbn_lshift1(bignum *bn)\n{\n#define bn_lshift1_inner1(i)\t\t\t\t\t\t\\\n\t\tbn->d[i] = (bn->d[i] << 1) | (bn->d[i-1] >> 31);\n\tbn_unroll_reverse_sl(bn_lshift1_inner1);\n\tbn->d[0] <<= 1;\n}\n\nvoid\nbn_rshift(bignum *bn, int shift)\n{\n\tint wd, iws, iwr;\n\tbn_word ihw, ilw;\n\tiws = (shift & (BN_WBITS-1));\n\tiwr = BN_WBITS - iws;\n\twd = (shift >> BN_WSHIFT);\n\tihw = (wd < BN_WBITS) ? bn->d[wd] : 0;\n\n#define bn_rshift_inner1(i)\t\t\t\t\\\n\t\twd++;\t\t\t\t\t\\\n\t\tilw = ihw;\t\t\t\t\\\n\t\tihw = (wd < BN_WBITS) ? bn->d[wd] : 0;\t\\\n\t\tbn->d[i] = (ilw >> iws) | (ihw << iwr);\n\tbn_unroll_sl(bn_rshift_inner1);\n\tbn->d[BN_NWORDS-1] = (ihw >> iws);\n}\n\nvoid\nbn_rshift1(bignum *bn)\n{\n#define bn_rshift1_inner1(i)\t\t\t\t\t\t\\\n\t\tbn->d[i] = (bn->d[i+1] << 31) | (bn->d[i] >> 1);\n\tbn_unroll_sl(bn_rshift1_inner1);\n\tbn->d[BN_NWORDS-1] >>= 1;\n}\n\nvoid\nbn_rshift1_2(bignum *bna, bignum *bnb)\n{\n#define bn_rshift1_2_inner1(i)\t\t\t\t\t\t\\\n\t\tbna->d[i] = (bna->d[i+1] << 31) | (bna->d[i] >> 1);\t\\\n\t\tbnb->d[i] = (bnb->d[i+1] << 31) | (bnb->d[i] >> 1);\n\tbn_unroll_sl(bn_rshift1_2_inner1);\n\tbna->d[BN_NWORDS-1] >>= 1;\n\tbnb->d[BN_NWORDS-1] >>= 1;\n}\n\n\n/*\n * Unsigned comparison\n */\n\nint\nbn_ucmp_ge(bignum *a, bignum *b)\n{\n\tint l = 0, g = 0;\n\n#define bn_ucmp_ge_inner1(i)\t\t\t\t\\\n\t\tif (a->d[i] < b->d[i]) l |= (1 << i);\t\\\n\t\tif (a->d[i] > b->d[i]) g |= (1 << i);\n\tbn_unroll_reverse(bn_ucmp_ge_inner1);\n\treturn (l > g) ? 0 : 1;\n}\n\nint\nbn_ucmp_ge_c(bignum *a, __constant bn_word *b)\n{\n\tint l = 0, g = 0;\n\n#define bn_ucmp_ge_c_inner1(i)\t\t\t\t\\\n\t\tif (a->d[i] < b[i]) l |= (1 << i);\t\\\n\t\tif (a->d[i] > b[i]) g |= (1 << i);\n\tbn_unroll_reverse(bn_ucmp_ge_c_inner1);\n\treturn (l > g) ? 0 : 1;\n}\n\n/*\n * Negate\n */\n\nvoid\nbn_neg(bignum *n)\n{\n\tint c = 1;\n\n#define bn_neg_inner1(i)\t\t\t\t\\\n\t\tc = (n->d[i] = (~n->d[i]) + c) ? 0 : c;\n\tbn_unroll(bn_neg_inner1);\n}\n\n/*\n * Add/subtract\n */\n\n#define bn_add_word(r, a, b, t, c) do {\t\t\\\n\t\tt = a + b;\t\t\t\\\n\t\tc = (t < a) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\n#define bn_addc_word(r, a, b, t, c) do {\t\t\t\\\n\t\tt = a + b + c;\t\t\t\t\t\\\n\t\tc = (t < a) ? 1 : ((c & (t == a)) ? 1 : 0);\t\\\n\t\tr = t;\t\t\t\t\t\t\\\n\t} while (0)\n\nbn_word\nbn_uadd_words_seq(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbn_word t, c = 0;\n\n#define bn_uadd_words_seq_inner1(i)\t\t\t\\\n\t\tbn_addc_word(r[i], a[i], b[i], t, c);\n\tbn_add_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_uadd_words_seq_inner1);\n\treturn c;\n}\n\nbn_word\nbn_uadd_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbn_word t, c = 0;\n\n\tbn_add_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_uadd_words_seq_inner1);\n\treturn c;\n}\n\n#define bn_sub_word(r, a, b, t, c) do {\t\t\\\n\t\tt = a - b;\t\t\t\\\n\t\tc = (a < b) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\n#define bn_subb_word(r, a, b, t, c) do {\t\\\n\t\tt = a - (b + c);\t\t\\\n\t\tc = (!(a) && c) ? 1 : 0;\t\\\n\t\tc |= (a < b) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\nbn_word\nbn_usub_words_seq(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbn_word t, c = 0;\n\n#define bn_usub_words_seq_inner1(i)\t\t\t\\\n\t\tbn_subb_word(r[i], a[i], b[i], t, c);\n\n\tbn_sub_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_usub_words_seq_inner1);\n\treturn c;\n}\n\nbn_word\nbn_usub_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbn_word t, c = 0;\n\n\tbn_sub_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_usub_words_seq_inner1);\n\treturn c;\n}\n\n/*\n * Add/subtract better suited for AMD's VLIW architecture\n */\nbn_word\nbn_uadd_words_vliw(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n#define bn_uadd_words_vliw_inner1(i)\t\t\\\n\t\tx.d[i] = a[i] + b[i];\n\n#define bn_uadd_words_vliw_inner2(i)\t\t\t\\\n\t\tc |= (a[i] > x.d[i]) ? (1 << i) : 0;\t\\\n\t\tcp |= (!~x.d[i]) ? (1 << i) : 0;\n\n#define bn_uadd_words_vliw_inner3(i)\t\t\\\n\t\tr[i] = x.d[i] + ((c >> i) & 1);\n\n\tbn_unroll(bn_uadd_words_vliw_inner1);\n\tbn_unroll(bn_uadd_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_uadd_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_uadd_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n\tbn_unroll(bn_uadd_words_vliw_inner1);\n\tbn_unroll(bn_uadd_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_uadd_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_usub_words_vliw(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n#define bn_usub_words_vliw_inner1(i)\t\t\\\n\t\tx.d[i] = a[i] - b[i];\n\n#define bn_usub_words_vliw_inner2(i)\t\t\t\\\n\t\tc |= (a[i] < b[i]) ? (1 << i) : 0;\t\\\n\t\tcp |= (!x.d[i]) ? (1 << i) : 0;\n\n#define bn_usub_words_vliw_inner3(i)\t\t\\\n\t\tr[i] = x.d[i] - ((c >> i) & 1);\n\n\tbn_unroll(bn_usub_words_vliw_inner1);\n\tbn_unroll(bn_usub_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_usub_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_usub_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n\tbn_unroll(bn_usub_words_vliw_inner1);\n\tbn_unroll(bn_usub_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_usub_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\n\n#if defined(DEEP_VLIW)\n#define bn_uadd_words bn_uadd_words_vliw\n#define bn_uadd_words_c bn_uadd_words_c_vliw\n#define bn_usub_words bn_usub_words_vliw\n#define bn_usub_words_c bn_usub_words_c_vliw\n#else\n#define bn_uadd_words bn_uadd_words_seq\n#define bn_uadd_words_c bn_uadd_words_c_seq\n#define bn_usub_words bn_usub_words_seq\n#define bn_usub_words_c bn_usub_words_c_seq\n#endif\n\n#define bn_uadd(r, a, b) bn_uadd_words((r)->d, (a)->d, (b)->d)\n#define bn_uadd_c(r, a, b) bn_uadd_words_c((r)->d, (a)->d, b)\n#define bn_usub(r, a, b) bn_usub_words((r)->d, (a)->d, (b)->d)\n#define bn_usub_c(r, a, b) bn_usub_words_c((r)->d, (a)->d, b)\n\n/*\n * Modular add/sub\n */\n\nvoid\nbn_mod_add(bignum *r, bignum *a, bignum *b)\n{\n\tif (bn_uadd(r, a, b) ||\n\t    (bn_ucmp_ge_c(r, modulus)))\n\t\tbn_usub_c(r, r, modulus);\n}\n\nvoid\nbn_mod_sub(bignum *r, bignum *a, bignum *b)\n{\n\tif (bn_usub(r, a, b))\n\t\tbn_uadd_c(r, r, modulus);\n}\n\nvoid\nbn_mod_lshift1(bignum *bn)\n{\n\tbn_word c = (bn->d[BN_NWORDS-1] & 0x80000000);\n\tbn_lshift1(bn);\n\tif (c || (bn_ucmp_ge_c(bn, modulus)))\n\t\tbn_usub_c(bn, bn, modulus);\n}\n\n/*\n * Montgomery multiplication\n *\n * This includes normal multiplication of two \"Montgomeryized\"\n * bignums, and bn_from_mont for de-Montgomeryizing a bignum.\n */\n\n#define bn_mul_word(r, a, w, c, p, s) do { \\\n\t\tr = (a * w) + c;\t   \\\n\t\tp = mul_hi(a, w);\t   \\\n\t\tc = (r < c) ? p + 1 : p;   \\\n\t} while (0)\n\n#define bn_mul_add_word(r, a, w, c, p, s) do {\t\\\n\t\ts = r + c;\t\t\t\\\n\t\tp = mul_hi(a, w);\t\t\\\n\t\tr = (a * w) + s;\t\t\\\n\t\tc = (s < c) ? p + 1 : p;\t\\\n\t\tif (r < s) c++;\t\t\t\\\n\t} while (0)\nvoid\nbn_mul_mont(bignum *r, bignum *a, bignum *b)\n{\n\tbignum t;\n\tbn_word tea, teb, c, p, s, m;\n\n#if !defined(VERY_EXPENSIVE_BRANCHES)\n\tint q;\n#endif\n\n\tc = 0;\n#define bn_mul_mont_inner1(j)\t\t\t\t\t\\\n\t\tbn_mul_word(t.d[j], a->d[j], b->d[0], c, p, s);\n\tbn_unroll(bn_mul_mont_inner1);\n\ttea = c;\n\tteb = 0;\n\n\tc = 0;\n\tm = t.d[0] * mont_n0[0];\n\tbn_mul_add_word(t.d[0], modulus[0], m, c, p, s);\n#define bn_mul_mont_inner2(j)\t\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], modulus[j], m, c, p, s);\t\\\n\t\tt.d[j-1] = t.d[j];\n\tbn_unroll_sf(bn_mul_mont_inner2);\n\tt.d[BN_NWORDS-1] = tea + c;\n\ttea = teb + ((t.d[BN_NWORDS-1] < c) ? 1 : 0);\n\n#define bn_mul_mont_inner3_1(i, j)\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], a->d[j], b->d[i], c, p, s);\n#define bn_mul_mont_inner3_2(i, j)\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], modulus[j], m, c, p, s);\t\\\n\t\tt.d[j-1] = t.d[j];\n#define bn_mul_mont_inner3(i)\t\t\t\t \\\n\tc = 0;\t\t\t\t\t\t \\\n\tbn_unroll_arg(bn_mul_mont_inner3_1, i);\t\t \\\n\ttea += c;\t\t\t\t\t \\\n\tteb = ((tea < c) ? 1 : 0);\t\t\t \\\n\tc = 0;\t\t\t\t\t\t \\\n\tm = t.d[0] * mont_n0[0];\t\t\t \\\n\tbn_mul_add_word(t.d[0], modulus[0], m, c, p, s); \\\n\tbn_unroll_arg_sf(bn_mul_mont_inner3_2, i);\t \\\n\tt.d[BN_NWORDS-1] = tea + c;\t\t\t \\\n\ttea = teb + ((t.d[BN_NWORDS-1] < c) ? 1 : 0);\n\n\t/*\n\t * The outer loop here is quite long, and we won't unroll it\n\t * unless VERY_EXPENSIVE_BRANCHES is set.\n\t */\n#if defined(VERY_EXPENSIVE_BRANCHES)\n\tbn_unroll_sf(bn_mul_mont_inner3);\n\tc = tea | !bn_usub_c(r, &t, modulus);\n\tif (!c)\n\t\t*r = t;\n\n#else\n\tfor (q = 1; q < BN_NWORDS; q++) {\n\t\tbn_mul_mont_inner3(q);\n\t}\n\tc = tea || (t.d[BN_NWORDS-1] >= modulus[BN_NWORDS-1]);\n\tif (c) {\n\t\tc = tea | !bn_usub_c(r, &t, modulus);\n\t\tif (c)\n\t\t\treturn;\n\t}\n\t*r = t;\n#endif\n}\n\nvoid\nbn_from_mont(bignum *rb, bignum *b)\n{\n#define WORKSIZE ((2*BN_NWORDS) + 1)\n\tbn_word r[WORKSIZE];\n\tbn_word m, c, p, s;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n\t/* Copy the input to the working area */\n\t/* Zero the upper words */\n#define bn_from_mont_inner1(i)\t\t\t\\\n\tr[i] = b->d[i];\n#define bn_from_mont_inner2(i)\t\t\t\\\n\tr[BN_NWORDS+i] = 0;\n\n\tbn_unroll(bn_from_mont_inner1);\n\tbn_unroll(bn_from_mont_inner2);\n\tr[WORKSIZE-1] = 0;\n\n\t/* Multiply (long) by modulus */\n#define bn_from_mont_inner3_1(i, j) \\\n\tbn_mul_add_word(r[i+j], modulus[j], m, c, p, s);\n\n#if !defined(VERY_EXPENSIVE_BRANCHES)\n#define bn_from_mont_inner3_2(i)\t\t\\\n\tif (r[BN_NWORDS + i] < c)\t\t\\\n\t\tr[BN_NWORDS + i + 1] += 1;\n#else\n#define bn_from_mont_inner3_2(i)\t\t\t\t\\\n\tr[BN_NWORDS + i + 1] += (r[BN_NWORDS + i] < c) ? 1 : 0;\n#endif\n\n#define bn_from_mont_inner3(i)\t\t\t \\\n\tm = r[i] * mont_n0[0];\t\t\t \\\n\tc = 0;\t\t\t\t\t \\\n\tbn_unroll_arg(bn_from_mont_inner3_1, i); \\\n\tr[BN_NWORDS + i] += c;\t\t\t \\\n\tbn_from_mont_inner3_2(i)\n\n\t/*\n\t * The outer loop here is not very long, so we will unroll\n\t * it by default.  However, it's just complicated enough to\n\t * cause NVIDIA's compiler to take unreasonably long to compile\n\t * it, unless we use pragma unroll.\n\t */\n#if !defined(PRAGMA_UNROLL)\n\tbn_iter(bn_from_mont_inner3);\n#else\n#pragma unroll 8\n\tfor (i = 0; i < BN_NWORDS; i++) { bn_from_mont_inner3(i) }\n#endif\n\n\t/*\n\t * Make sure the result is less than the modulus.\n\t * Subtracting is not much more expensive than compare, so\n\t * subtract always and assign based on the carry out value.\n\t */\n\tc = bn_usub_words_c(rb->d, &r[BN_NWORDS], modulus);\n\tif (c) {\n#define bn_from_mont_inner4(i)\t\t\t\t\\\n\t\t\trb->d[i] = r[BN_NWORDS + i];\n\t\tbn_unroll(bn_from_mont_inner4);\n\t}\n}\n\n/*\n * Modular inversion\n */\n\nvoid\nbn_mod_inverse(bignum *r, bignum *n)\n{\n\tbignum a, b, x, y;\n\tint shift;\n\tbn_word xc, yc;\n\tfor (shift = 0; shift < BN_NWORDS; shift++) {\n\t\ta.d[shift] = modulus[shift];\n\t\tx.d[shift] = 0;\n\t\ty.d[shift] = 0;\n\t}\n\tb = *n;\n\tx.d[0] = 1;\n\txc = 0;\n\tyc = 0;\n\twhile (!bn_is_zero(b)) {\n\t\tshift = 0;\n\t\twhile (!bn_is_odd(b)) {\n\t\t\tif (bn_is_odd(x))\n\t\t\t\txc += bn_uadd_c(&x, &x, modulus);\n\t\t\tbn_rshift1_2(&x, &b);\n\t\t\tx.d[7] |= (xc << 31);\n\t\t\txc >>= 1;\n\t\t}\n\n\t\twhile (!bn_is_odd(a)) {\n\t\t\tif (bn_is_odd(y))\n\t\t\t\tyc += bn_uadd_c(&y, &y, modulus);\n\t\t\tbn_rshift1_2(&y, &a);\n\t\t\ty.d[7] |= (yc << 31);\n\t\t\tyc >>= 1;\n\t\t}\n\n\t\tif (bn_ucmp_ge(&b, &a)) {\n\t\t\txc += yc + bn_uadd(&x, &x, &y);\n\t\t\tbn_usub(&b, &b, &a);\n\t\t} else {\n\t\t\tyc += xc + bn_uadd(&y, &y, &x);\n\t\t\tbn_usub(&a, &a, &b);\n\t\t}\n\t}\n\n\tif (!bn_is_one(a)) {\n\t\t/* no modular inverse */\n\t\t*r = bn_zero;\n\t} else {\n\t\t/* Compute y % m as cheaply as possible */\n\t\twhile (yc < 0x80000000)\n\t\t\tyc -= bn_usub_c(&y, &y, modulus);\n\t\tbn_neg(&y);\n\t\t*r = y;\n\t}\n}\n\n/*\n * HASH FUNCTIONS\n *\n * BYTE ORDER NOTE: None of the hash functions below deal with byte\n * order.  The caller is expected to be aware of this when it stuffs\n * data into in the native integer.\n *\n * NOTE #2: Endianness of the OpenCL device makes no difference here.\n */\n\n#define hash256_unroll(a) unroll_8(a)\n#define hash160_unroll(a) unroll_5(a)\n#define hash256_iter(a) iter_8(a)\n#define hash160_iter(a) iter_5(a)\n\n\n/*\n * SHA-2 256\n *\n * CAUTION: Input buffer will be overwritten/mangled.\n * Data expected in big-endian format.\n * This implementation is designed for space efficiency more than\n * raw speed.\n */\n\n__constant uint sha2_init[8] = {\n\t0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n\t0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n};\n\n__constant uint sha2_k[64] = {\n\t0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n\t0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n\t0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n\t0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n\t0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n\t0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n\t0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n\t0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n\t0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n\t0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n\t0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n\t0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n\t0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n\t0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n\t0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n\t0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n};\n\nvoid\nsha2_256_init(uint *out)\n{\n#define sha2_256_init_inner_1(i) \\\n\tout[i] = sha2_init[i];\n\n\thash256_unroll(sha2_256_init_inner_1);\n}\n\n/* The state variable remapping is really contorted */\n#define sha2_stvar(vals, i, v) vals[(64+v-i) % 8]\n#define sha2_s0(a) (rotate(a, 30U) ^ rotate(a, 19U) ^ rotate(a, 10U))\n#define sha2_s1(a) (rotate(a, 26U) ^ rotate(a, 21U) ^ rotate(a, 7U))\n#if defined(AMD_BFI_INT)\n#pragma OPENCL EXTENSION cl_amd_media_ops : enable\n#define sha2_ch(a, b, c) amd_bytealign(a, b, c)\n#define sha2_ma(a, b, c) amd_bytealign((a^c), b, a)\n#else\n#define sha2_ch(a, b, c) (c ^ (a & (b ^ c)))\n#define sha2_ma(a, b, c) ((a & c) | (b & (a | c)))\n#endif\n\nvoid\nsha2_256_block(uint *out, uint *in)\n{\n\tuint state[8], t1, t2;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n#define sha2_256_block_inner_1(i) \\\n\tstate[i] = out[i];\n\thash256_unroll(sha2_256_block_inner_1);\n\n#define sha2_256_block_inner_2(i) \\\n\tif (i >= 16) {\t\t\t\t\t\t\t\\\n\t\tt1 = in[(i + 1) % 16];\t\t\t\t\t\\\n\t\tt2 = in[(i + 14) % 16];\t\t\t\t\t\\\n\t\tin[i % 16] += (in[(i + 9) % 16] +\t\t\t\\\n\t\t       (rotate(t1, 25U) ^ rotate(t1, 14U) ^ (t1 >> 3)) + \\\n\t\t       (rotate(t2, 15U) ^ rotate(t2, 13U) ^ (t2 >> 10))); \\\n\t}\t\t\t\t\t\t\t\t\\\n\tt1 = (sha2_stvar(state, i, 7) +\t\t\t\t\t\\\n\t      sha2_s1(sha2_stvar(state, i, 4)) +\t\t\t\\\n\t      sha2_ch(sha2_stvar(state, i, 4),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 5),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 6)) +\t\t\t\\\n\t      sha2_k[i] +\t\t\t\t\t\t\\\n\t      in[i % 16]);\t\t\t\t\t\t\\\n\tt2 = (sha2_s0(sha2_stvar(state, i, 0)) +\t\t\t\\\n\t      sha2_ma(sha2_stvar(state, i, 0),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 1),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 2)));\t\t\t\\\n\tsha2_stvar(state, i, 3) += t1;\t\t\t\t\t\\\n\tsha2_stvar(state, i, 7) = t1 + t2;\t\t\t\t\\\n\n#if !defined(PRAGMA_UNROLL)\n\titer_64(sha2_256_block_inner_2);\n#else\n#pragma unroll 64\n\tfor (i = 0; i < 64; i++) { sha2_256_block_inner_2(i) }\n#endif\n\n#define sha2_256_block_inner_3(i) \\\n\tout[i] += state[i];\n\n\thash256_unroll(sha2_256_block_inner_3);\n}\n\n\n/*\n * RIPEMD160\n *\n * Data expected in little-endian format.\n */\n\n__constant uint ripemd160_iv[] = {\n\t0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 };\n__constant uint ripemd160_k[] = {\n\t0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E };\n__constant uint ripemd160_kp[] = {\n\t0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000 };\n__constant uchar ripemd160_ws[] = {\n\t0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13,\n};\n__constant uchar ripemd160_wsp[] = {\n\t5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n};\n__constant uchar ripemd160_rl[] = {\n\t11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6,\n};\n__constant uchar ripemd160_rlp[] = {\n\t8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n};\n\n#define ripemd160_val(v, i, n) (v)[(80+(n)-(i)) % 5]\n#define ripemd160_valp(v, i, n) (v)[5 + ((80+(n)-(i)) % 5)]\n#if defined(AMD_BFI_INT)\n#define ripemd160_f0(x, y, z) (x ^ y ^ z)\n#define ripemd160_f1(x, y, z) amd_bytealign(x, y, z)\n#define ripemd160_f2(x, y, z) (z ^ (x | ~y))\n#define ripemd160_f3(x, y, z) amd_bytealign(z, x, y)\n#define ripemd160_f4(x, y, z) (x ^ (y | ~z))\n#else\n#define ripemd160_f0(x, y, z) (x ^ y ^ z)\n#define ripemd160_f1(x, y, z) ((x & y) | (~x & z))\n#define ripemd160_f2(x, y, z) (z ^ (x | ~y))\n#define ripemd160_f3(x, y, z) ((x & z) | (y & ~z))\n#define ripemd160_f4(x, y, z) (x ^ (y | ~z))\n#endif\n#define ripemd160_round(i, in, vals, f, fp, t) do {\t\t\t\\\n\t\tripemd160_val(vals, i, 0) =\t\t\t\t\\\n\t\t\trotate(ripemd160_val(vals, i, 0) +\t\t\\\n\t\t\t       f(ripemd160_val(vals, i, 1),\t\t\\\n\t\t\t\t ripemd160_val(vals, i, 2),\t\t\\\n\t\t\t\t ripemd160_val(vals, i, 3)) +\t\t\\\n\t\t\t       in[ripemd160_ws[i]] +\t\t\t\\\n\t\t\t       ripemd160_k[i / 16],\t\t\t\\\n\t\t\t       (uint)ripemd160_rl[i]) +\t\t\t\\\n\t\t\tripemd160_val(vals, i, 4);\t\t\t\\\n\t\tripemd160_val(vals, i, 2) =\t\t\t\t\\\n\t\t\trotate(ripemd160_val(vals, i, 2), 10U);\t\t\\\n\t\tripemd160_valp(vals, i, 0) =\t\t\t\t\\\n\t\t\trotate(ripemd160_valp(vals, i, 0) +\t\t\\\n\t\t\t       fp(ripemd160_valp(vals, i, 1),\t\t\\\n\t\t\t\t  ripemd160_valp(vals, i, 2),\t\t\\\n\t\t\t\t  ripemd160_valp(vals, i, 3)) +\t\t\\\n\t\t\t       in[ripemd160_wsp[i]] +\t\t\t\\\n\t\t\t       ripemd160_kp[i / 16],\t\t\t\\\n\t\t\t       (uint)ripemd160_rlp[i]) +\t\t\\\n\t\t\tripemd160_valp(vals, i, 4);\t\t\t\\\n\t\tripemd160_valp(vals, i, 2) =\t\t\t\t\\\n\t\t\trotate(ripemd160_valp(vals, i, 2), 10U);\t\\\n\t} while (0)\n\nvoid\nripemd160_init(uint *out)\n{\n#define ripemd160_init_inner_1(i) \\\n\tout[i] = ripemd160_iv[i];\n\n\thash160_unroll(ripemd160_init_inner_1);\n}\n\nvoid\nripemd160_block(uint *out, uint *in)\n{\n\tuint vals[10], t;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n#define ripemd160_block_inner_1(i) \\\n\tvals[i] = vals[i + 5] = out[i];\n\n\thash160_unroll(ripemd160_block_inner_1);\n\n#define ripemd160_block_inner_p0(i)\t\t\\\n\tripemd160_round(i, in, vals, \\\n\t\t\tripemd160_f0, ripemd160_f4, t);\n#define ripemd160_block_inner_p1(i)\t\t\\\n\tripemd160_round((16 + i), in, vals,\t\t\\\n\t\t\tripemd160_f1, ripemd160_f3, t);\n#define ripemd160_block_inner_p2(i)\t\t\\\n\tripemd160_round((32 + i), in, vals,\t\t\\\n\t\t\tripemd160_f2, ripemd160_f2, t);\n#define ripemd160_block_inner_p3(i)\t\t\\\n\tripemd160_round((48 + i), in, vals,\t\t\\\n\t\t\tripemd160_f3, ripemd160_f1, t);\n#define ripemd160_block_inner_p4(i)\t\t\\\n\tripemd160_round((64 + i), in, vals,\t\t\\\n\t\t\tripemd160_f4, ripemd160_f0, t);\n\n#if !defined(PRAGMA_UNROLL)\n\titer_16(ripemd160_block_inner_p0);\n\titer_16(ripemd160_block_inner_p1);\n\titer_16(ripemd160_block_inner_p2);\n\titer_16(ripemd160_block_inner_p3);\n\titer_16(ripemd160_block_inner_p4);\n#else\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p0(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p1(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p2(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p3(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p4(i); }\n#endif\n\n\tt = out[1] + vals[2] + vals[8];\n\tout[1] = out[2] + vals[3] + vals[9];\n\tout[2] = out[3] + vals[4] + vals[5];\n\tout[3] = out[4] + vals[0] + vals[6];\n\tout[4] = out[0] + vals[1] + vals[7];\n\tout[0] = t;\n}\n\n\n#ifdef TEST_KERNELS\n/*\n * Test kernels\n */\n\n/* Montgomery multiplication test kernel */\n__kernel void\ntest_mul_mont(__global bignum *products_out, __global bignum *nums_in)\n{\n\tbignum a, b, c;\n\tint o;\n\to = get_global_id(0);\n\tnums_in += (2*o);\n\n\ta = nums_in[0];\n\tb = nums_in[1];\n\tbn_mul_mont(&c, &a, &b);\n\tproducts_out[o] = c;\n}\n\n/* modular inversion test kernel */\n__kernel void\ntest_mod_inverse(__global bignum *inv_out, __global bignum *nums_in,\n\t\t int count)\n{\n\tbignum x, xp;\n\tint i, o;\n\to = get_global_id(0) * count;\n\tfor (i = 0; i < count; i++) {\n\t\tx = nums_in[o];\n\t\tbn_mod_inverse(&xp, &x);\n\t\tinv_out[o++] = xp;\n\t}\n}\n#endif  /* TEST_KERNELS */\n\n\n#define ACCESS_BUNDLE 1024\n#define ACCESS_STRIDE (ACCESS_BUNDLE/BN_NWORDS)\n\n__kernel void\nec_add_grid(__global bn_word *points_out, __global bn_word *z_heap, \n\t    __global bn_word *row_in, __global bignum *col_in)\n{\n\tbignum rx, ry;\n\tbignum x1, y1, a, b, c, d, e, z;\n\tbn_word cy;\n\tint i, cell, start;\n\n\t/* Load the row increment point */\n\ti = 2 * get_global_id(1);\n\trx = col_in[i];\n\try = col_in[i+1];\n\n\tcell = get_global_id(0);\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\n#define ec_add_grid_inner_1(i) \\\n\tx1.d[i] = row_in[start + (i*ACCESS_STRIDE)];\n\n\tbn_unroll(ec_add_grid_inner_1);\n\tstart += (ACCESS_STRIDE/2);\n\n#define ec_add_grid_inner_2(i) \\\n\ty1.d[i] = row_in[start + (i*ACCESS_STRIDE)];\n\n\tbn_unroll(ec_add_grid_inner_2);\n\n\tbn_mod_sub(&z, &x1, &rx);\n\n\tcell += (get_global_id(1) * get_global_size(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\n#define ec_add_grid_inner_3(i) \\\n\tz_heap[start + (i*ACCESS_STRIDE)] = z.d[i];\n\n\tbn_unroll(ec_add_grid_inner_3);\n\n\tbn_mod_sub(&b, &y1, &ry);\n\tbn_mod_add(&c, &x1, &rx);\n\tbn_mod_add(&d, &y1, &ry);\n\tbn_mul_mont(&y1, &b, &b);\n\tbn_mul_mont(&x1, &z, &z);\n\tbn_mul_mont(&e, &c, &x1);\n\tbn_mod_sub(&y1, &y1, &e);\n\n\t/*\n\t * This disgusting code caters to the global memory unit on\n\t * various GPUs, by giving it a nice contiguous patch to write\n\t * per warp/wavefront.\n\t */\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\n#define ec_add_grid_inner_4(i) \\\n\tpoints_out[start + (i*ACCESS_STRIDE)] = y1.d[i];\n\n\tbn_unroll(ec_add_grid_inner_4);\n\n\tbn_mod_lshift1(&y1);\n\tbn_mod_sub(&y1, &e, &y1);\n\tbn_mul_mont(&y1, &y1, &b);\n\tbn_mul_mont(&a, &x1, &z);\n\tbn_mul_mont(&c, &d, &a);\n\tbn_mod_sub(&y1, &y1, &c);\n\tcy = 0;\n\tif (bn_is_odd(y1))\n\t\tcy = bn_uadd_c(&y1, &y1, modulus);\n\tbn_rshift1(&y1);\n\ty1.d[BN_NWORDS-1] |= (cy ? 0x80000000 : 0);\n\n\tstart += (ACCESS_STRIDE/2);\n\n\tbn_unroll(ec_add_grid_inner_4);\n}\n\n__kernel void\nheap_invert(__global bn_word *z_heap, int batch)\n{\n\tbignum a, b, c, z;\n\tint i, off, lcell, hcell, start;\n\n#define heap_invert_inner_load_a(j)\t\t\t\t\\\n\t\ta.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_load_b(j)\t\t\t\t\\\n\t\tb.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_load_z(j)\t\t\t\t\\\n\t\tz.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_store_z(j)\t\t\t\t\\\n\t\tz_heap[start + j*ACCESS_STRIDE] = z.d[j];\n#define heap_invert_inner_store_c(j)\t\t\t\t\\\n\t\tz_heap[start + j*ACCESS_STRIDE] = c.d[j];\n\n\toff = get_global_size(0);\n\tlcell = get_global_id(0);\n\thcell = (off * batch) + lcell;\n\tfor (i = 0; i < (batch-1); i++) {\n\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_load_a);\n\n\t\tlcell += off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_load_b);\n\n\t\tbn_mul_mont(&z, &a, &b);\n\n\t\tstart = (((hcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (hcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_store_z);\n\n\t\tlcell += off;\n\t\thcell += off;\n\t}\n\n\t/* Invert the root, fix up 1/ZR -> R/Z */\n\tbn_mod_inverse(&z, &z);\n\n#define heap_invert_inner_1(i)\t\t\t\\\n\ta.d[i] = mont_rr[i];\n\n\tbn_unroll(heap_invert_inner_1);\n\n\tbn_mul_mont(&z, &z, &a);\n\tbn_mul_mont(&z, &z, &a);\n\n\t/* Unroll the first iteration to avoid a load/store on the root */\n\tlcell -= (off << 1);\n\thcell -= (off << 1);\n\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_load_a);\n\n\tlcell += off;\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_load_b);\n\n\tbn_mul_mont(&c, &a, &z);\n\n\tbn_unroll(heap_invert_inner_store_c);\n\n\tbn_mul_mont(&c, &b, &z);\n\n\tlcell -= off;\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_store_c);\n\n\tlcell -= (off << 1);\n\n\tfor (i = 0; i < (batch-2); i++) {\n\t\tstart = (((hcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (hcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_z);\n\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_a);\n\n\t\tlcell += off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_b);\n\n\t\tbn_mul_mont(&c, &a, &z);\n\n\t\tbn_unroll(heap_invert_inner_store_c);\n\n\t\tbn_mul_mont(&c, &b, &z);\n\n\t\tlcell -= off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_store_c);\n\n\t\tlcell -= (off << 1);\n\t\thcell -= off;\n\t}\n}\n\nvoid\nhash_ec_point(uint *hash_out, __global bn_word *xy, __global bn_word *zip)\n{\n\tuint hash1[16], hash2[16];\n\tbignum c, zi, zzi;\n\tbn_word wh, wl;\n\n\t/*\n\t * Multiply the coordinates by the inverted Z values.\n\t * Stash the coordinates in the hash buffer.\n\t * SHA-2 requires big endian, and our intended hash input\n\t * is big-endian, so swapping is unnecessary, but\n\t * inserting the format byte in front causes a headache.\n\t */\n#define hash_ec_point_inner_1(i)\t\t\\\n\tzi.d[i] = zip[i*ACCESS_STRIDE];\n\n\tbn_unroll(hash_ec_point_inner_1);\n\n\tbn_mul_mont(&zzi, &zi, &zi);  /* 1 / Z^2 */\n\n#define hash_ec_point_inner_2(i)\t\t\\\n\tc.d[i] = xy[i*ACCESS_STRIDE];\n\n\tbn_unroll(hash_ec_point_inner_2);\n\n\tbn_mul_mont(&c, &c, &zzi);  /* X / Z^2 */\n\tbn_from_mont(&c, &c);\n\n\twh = 0x00000004;  /* POINT_CONVERSION_UNCOMPRESSED */\n\n#define hash_ec_point_inner_3(i)\t\t\\\n\twl = wh;\t\t\t\t\\\n\twh = c.d[(BN_NWORDS - 1) - i];\t\t\\\n\thash1[i] = (wl << 24) | (wh >> 8);\n\n\tbn_unroll(hash_ec_point_inner_3);\n\n\tbn_mul_mont(&zzi, &zzi, &zi);  /* 1 / Z^3 */\n\n#define hash_ec_point_inner_4(i)\t\t\t\t\\\n\tc.d[i] = xy[(ACCESS_STRIDE/2) + i*ACCESS_STRIDE];\n\n\tbn_unroll(hash_ec_point_inner_4);\n\n\tbn_mul_mont(&c, &c, &zzi);  /* Y / Z^3 */\n\tbn_from_mont(&c, &c);\n\n#define hash_ec_point_inner_5(i)\t\t\t\\\n\twl = wh;\t\t\t\t\t\\\n\twh = c.d[(BN_NWORDS - 1) - i];\t\t\t\\\n\thash1[BN_NWORDS + i] = (wl << 24) | (wh >> 8);\n\n\tbn_unroll(hash_ec_point_inner_5);\n\n\t/*\n\t * Hash the first 64 bytes of the buffer\n\t */\n\tsha2_256_init(hash2);\n\tsha2_256_block(hash2, hash1);\n\n\t/*\n\t * Hash the last byte of the buffer + SHA-2 padding\n\t */\n\thash1[0] = wh << 24 | 0x800000;\n\thash1[1] = 0;\n\thash1[2] = 0;\n\thash1[3] = 0;\n\thash1[4] = 0;\n\thash1[5] = 0;\n\thash1[6] = 0;\n\thash1[7] = 0;\n\thash1[8] = 0;\n\thash1[9] = 0;\n\thash1[10] = 0;\n\thash1[11] = 0;\n\thash1[12] = 0;\n\thash1[13] = 0;\n\thash1[14] = 0;\n\thash1[15] = 65 * 8;\n\tsha2_256_block(hash2, hash1);\n\n\t/*\n\t * Hash the SHA-2 result with RIPEMD160\n\t * Unfortunately, SHA-2 outputs big-endian, but\n\t * RIPEMD160 expects little-endian.  Need to swap!\n\t */\n\n#define hash_ec_point_inner_6(i)\t\t\\\n\thash2[i] = bswap32(hash2[i]);\n\n\thash256_unroll(hash_ec_point_inner_6);\n\n\thash2[8] = bswap32(0x80000000);\n\thash2[9] = 0;\n\thash2[10] = 0;\n\thash2[11] = 0;\n\thash2[12] = 0;\n\thash2[13] = 0;\n\thash2[14] = 32 * 8;\n\thash2[15] = 0;\n\tripemd160_init(hash_out);\n\tripemd160_block(hash_out, hash2);\n}\n\n\n__kernel void\nhash_ec_point_get(__global uint *hashes_out,\n\t\t  __global bn_word *points_in, __global bn_word *z_heap)\n{\n\tuint hash[5];\n\tint i, p, cell, start;\n\n\tcell = ((get_global_id(1) * get_global_size(0)) + get_global_id(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\tz_heap += start;\n\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\tpoints_in += start;\n\n\t/* Complete the coordinates and hash */\n\thash_ec_point(hash, points_in, z_heap);\n\n\tp = get_global_size(0);\n\ti = p * get_global_id(1);\n\thashes_out += 5 * (i + get_global_id(0));\n\n\t/* Output the hash in proper byte-order */\n#define hash_ec_point_get_inner_1(i)\t\t\\\n\thashes_out[i] = load_le32(hash[i]);\n\n\thash160_unroll(hash_ec_point_get_inner_1);\n}\n\n/*\n * Normally this would be one function that compared two hash160s.\n * This one compares a hash160 with an upper and lower bound in one\n * function to work around a problem with AMD's OpenCL compiler.\n */\nint\nhash160_ucmp_g(uint *a, __global uint *bound)\n{\n\tuint gv;\n\n#define hash160_ucmp_g_inner_1(i) \t\t\\\n\t\tgv = load_be32(bound[i]);\t\\\n\t\tif (a[i] < gv) return -1;\t\\\n\t\tif (a[i] > gv) break;\n\n\thash160_iter(hash160_ucmp_g_inner_1);\n\n#define hash160_ucmp_g_inner_2(i)   \t\t\\\n\t\tgv = load_be32(bound[5+i]);\t\\\n\t\tif (a[i] < gv) return 0;\t\\\n\t\tif (a[i] > gv) return 1;\n\n\thash160_iter(hash160_ucmp_g_inner_2);\n\treturn 0;\n}\n\n__kernel void\nhash_ec_point_search_prefix(__global uint *found,\n\t\t\t    __global bn_word *points_in,\n\t\t\t    __global bn_word *z_heap,\n\t\t\t    __global uint *target_table, int ntargets)\n{\n\tuint hash[5];\n\tint i, high, low, p, cell, start;\n\n\tcell = ((get_global_id(1) * get_global_size(0)) + get_global_id(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\tz_heap += start;\n\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\tpoints_in += start;\n\n\t/* Complete the coordinates and hash */\n\thash_ec_point(hash, points_in, z_heap);\n\n\t/*\n\t * Unconditionally byteswap the hash result, because:\n\t * - The byte-level convention of RIPEMD160 is little-endian\n\t * - We are comparing it in big-endian order\n\t */\n#define hash_ec_point_search_prefix_inner_1(i)\t\\\n\thash[i] = bswap32(hash[i]);\n\n\thash160_unroll(hash_ec_point_search_prefix_inner_1);\n\n\t/* Binary-search the target table for the hash we just computed */\n\tfor (high = ntargets - 1, low = 0, i = high >> 1;\n\t     high >= low;\n\t     i = low + ((high - low) >> 1)) {\n\t\tp = hash160_ucmp_g(hash, &target_table[10*i]);\n\t\tlow = (p > 0) ? (i + 1) : low;\n\t\thigh = (p < 0) ? (i - 1) : high;\n\t\tif (p == 0) {\n\t\t\t/* For debugging purposes, write the hash value */\n\t\t\tfound[0] = ((get_global_id(1) * get_global_size(0)) +\n\t\t\t\t    get_global_id(0));\n\t\t\tfound[1] = i;\n\n#define hash_ec_point_search_prefix_inner_2(i)\t\\\n\t\t\tfound[i+2] = load_be32(hash[i]);\n\n\t\t\thash160_unroll(hash_ec_point_search_prefix_inner_2);\n\t\t\thigh = -1;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/main/resources/unused/calc_addrs_fix_zero.cl",
    "content": "/*\n * Vanitygen, vanity bitcoin address generator\n * Copyright (C) 2011 <samr7@cs.washington.edu>\n *\n * Vanitygen is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * any later version. \n *\n * Vanitygen is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Vanitygen.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/*\n * This file contains an OpenCL kernel for performing certain parts of\n * the bitcoin address calculation process.\n *\n * Kernel: ec_add_grid\n *\n * Inputs:\n * - Row: Array of (sequential) EC points\n * - Column: Array of column increment EC points (= rowsize * Pgenerator)\n *\n * Steps:\n * - Compute P = Row[x] + Column[y]\n *   P is computed as numerator/denominator components Pxj, Pyj, Pz\n *   Final values are: Px = Pxj / (Pz^2), Py = Pyj / (Pz^3)\n *\n *   The modular inverse of Pz is required to compute Px and Py, and\n *   can be computed more efficiently in large batches.  This is done in\n *   the next kernel heap_invert.\n *\n * - Store Pxj, Pyj to intermediate point buffer\n * - Store Pz to z_heap\n *\n * Outputs:\n * - Intermediate point buffer\n * - Denominator buffer (z_heap)\n *\n * -------------------------------\n * Kernel: heap_invert\n *\n * Inputs:\n * - Denominator buffer (z_heap)\n * - N = Batch size (power of 2)\n *\n * Steps:\n * - Compute the product tree for N values in the denominator buffer\n * - Compute the modular inverse of the root of the product tree\n * - Multiply down the tree to compute the modular inverse of each leaf\n *\n * Outputs:\n * - Modular inverse denominator buffer (z_heap)\n *\n * -------------------------------\n * Kernel: hash_ec_point_get\n *\n * Inputs:\n * - Intermediate point buffer\n * - Modular inverse denominator buffer (z_heap)\n *\n * Steps:\n * - Compute Px = Pxj * (1/Pz)^2\n * - Compute Py = Pyj * (1/Pz)^3\n * - Compute H = RIPEMD160(SHA256(0x04 | Px | Py))\n *\n * Output:\n * - Array of 20-byte address hash values\n *\n * -------------------------------\n * Kernel: hash_ec_point_search_prefix\n *\n * Like hash_ec_point_get, but instead of storing the complete hash\n * value to an output buffer, it searches a sorted list of ranges,\n * and if a match is found, writes a flag to an output buffer.\n */\n\n\n/* Byte-swapping and endianness */\n#define bswap32(v)\t\t\t\t\t\\\n\t(((v) >> 24) | (((v) >> 8) & 0xff00) |\t\t\\\n\t (((v) << 8) & 0xff0000) | ((v) << 24))\n\n#if __ENDIAN_LITTLE__ != 1\n#define load_le32(v) bswap32(v)\n#define load_be32(v) (v)\n#else\n#define load_le32(v) (v)\n#define load_be32(v) bswap32(v)\n#endif\n\n/*\n * Loop unrolling macros\n *\n * In most cases, preprocessor unrolling works best.\n * The exception is NVIDIA's compiler, which seems to take unreasonably\n * long to compile a loop with a larger iteration count, or a loop with\n * a body of >50 PTX instructions, with preprocessor unrolling.\n * However, it does not seem to take as long with pragma unroll, and\n * produces good output.\n */\n\n/* Explicit loop unrolling */\n#define unroll_5(a) do { a(0) a(1) a(2) a(3) a(4) } while (0)\n#define unroll_8(a) do { a(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7) } while (0)\n#define unroll_1_7(a) do { a(1) a(2) a(3) a(4) a(5) a(6) a(7) } while (0)\n#define unroll_7(a) do { a(0) a(1) a(2) a(3) a(4) a(5) a(6) } while (0)\n#define unroll_7_0(a) do { a(7) a(6) a(5) a(4) a(3) a(2) a(1) a(0) } while (0)\n#define unroll_7_1(a) do { a(7) a(6) a(5) a(4) a(3) a(2) a(1) } while (0)\n#define unroll_16(a) do {\t\t\t\t\\\n\ta(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7)\t\t\\\n\ta(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15)\t\\\n\t} while (0)\n#define unroll_64(a) do {\t\t\t\t\\\n\ta(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7)\t\t\\\n\ta(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15)\t\\\n\ta(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) \\\n\ta(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31)\t\\\n\ta(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) \\\n\ta(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) \\\n\ta(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) \\\n\ta(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) \\\n\t} while (0)\n\n/* Conditional loop unrolling */\n#if defined(DEEP_PREPROC_UNROLL)\n#define iter_5(a) unroll_5(a)\n#define iter_8(a) unroll_8(a)\n#define iter_16(a) unroll_16(a)\n#define iter_64(a) unroll_64(a)\n#else\n#define iter_5(a) do {int _i; for (_i = 0; _i < 5; _i++) { a(_i) }} while (0)\n#define iter_8(a) do {int _i; for (_i = 0; _i < 8; _i++) { a(_i) }} while (0)\n#define iter_16(a) do {int _i; for (_i = 0; _i < 16; _i++) { a(_i) }} while (0)\n#define iter_64(a) do {int _i; for (_i = 0; _i < 64; _i++) { a(_i) }} while (0)\n#endif\n\n/*\n * BIGNUM mini-library\n * This module deals with fixed-size 256-bit bignums.\n * Where modular arithmetic is performed, the SECP256k1 prime\n * modulus (below) is assumed.\n *\n * Methods include:\n * - bn_is_zero/bn_is_one/bn_is_odd/bn_is_even/bn_is_bit_set\n * - bn_rshift[1]/bn_lshift[1]\n * - bn_neg\n * - bn_uadd/bn_uadd_p\n * - bn_usub/bn_usub_p\n */\n\ntypedef uint bn_word;\n#define BN_NBITS 256\n#define BN_WSHIFT 5\n#define BN_WBITS (1 << BN_WSHIFT)\n#define BN_NWORDS ((BN_NBITS/8) / sizeof(bn_word))\n#define BN_WORDMAX 0xffffffff\n\n#define MODULUS_BYTES \\\n\t0xfffffc2f, 0xfffffffe, 0xffffffff, 0xffffffff, \\\n\t0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff\n\ntypedef struct {\n\tbn_word d[BN_NWORDS];\n} bignum;\n\n__constant bn_word modulus[] = { MODULUS_BYTES };\n__constant bignum bn_zero = {{0}};\n\n__constant bn_word mont_rr[BN_NWORDS] = { 0xe90a1, 0x7a2, 0x1, 0, };\n__constant bn_word mont_n0[2] = { 0xd2253531, 0xd838091d };\n\n\n#define bn_is_odd(bn)\t\t(bn.d[0] & 1)\n#define bn_is_even(bn) \t\t(!bn_is_odd(bn))\n#define bn_is_zero(bn) \t\t(!bn.d[0] && !bn.d[1] && !bn.d[2] && \\\n\t\t\t\t !bn.d[3] && !bn.d[4] && !bn.d[5] && \\\n\t\t\t\t !bn.d[6] && !bn.d[7])\n#define bn_is_one(bn) \t\t((bn.d[0] == 1) && !bn.d[1] && !bn.d[2] && \\\n\t\t\t\t !bn.d[3] && !bn.d[4] && !bn.d[5] && \\\n\t\t\t\t !bn.d[6] && !bn.d[7])\n#define bn_is_bit_set(bn, n) \\\n\t((((bn_word*)&bn)[n >> BN_WSHIFT]) & (1 << (n & (BN_WBITS-1))))\n\n#define bn_unroll(e) unroll_8(e)\n#define bn_unroll_sf(e)\tunroll_1_7(e)\n#define bn_unroll_sl(e)\tunroll_7(e)\n#define bn_unroll_reverse(e) unroll_7_0(e)\n#define bn_unroll_reverse_sl(e) unroll_7_1(e)\n\n#define bn_unroll_arg(e, arg)\t\t\t\t\\\n\te(arg, 0) e(arg, 1) e(arg, 2) e(arg, 3)\t\\\n\te(arg, 4) e(arg, 5) e(arg, 6) e(arg, 7)\n#define bn_unroll_arg_sf(e, arg)\t\t\t\\\n\te(arg, 1) e(arg, 2) e(arg, 3)\t\t\\\n\te(arg, 4) e(arg, 5) e(arg, 6) e(arg, 7)\n\n#define bn_iter(e) iter_8(e)\n\n\n/*\n * Bitwise shift\n */\n\nvoid\nbn_lshift1(bignum *bn)\n{\n#define bn_lshift1_inner1(i)\t\t\t\t\t\t\\\n\t\tbn->d[i] = (bn->d[i] << 1) | (bn->d[i-1] >> 31);\n\tbn_unroll_reverse_sl(bn_lshift1_inner1);\n\tbn->d[0] <<= 1;\n}\n\nvoid\nbn_rshift(bignum *bn, int shift)\n{\n\tint wd, iws, iwr;\n\tbn_word ihw, ilw;\n\tiws = (shift & (BN_WBITS-1));\n\tiwr = BN_WBITS - iws;\n\twd = (shift >> BN_WSHIFT);\n\tihw = (wd < BN_WBITS) ? bn->d[wd] : 0;\n\n#define bn_rshift_inner1(i)\t\t\t\t\\\n\t\twd++;\t\t\t\t\t\\\n\t\tilw = ihw;\t\t\t\t\\\n\t\tihw = (wd < BN_WBITS) ? bn->d[wd] : 0;\t\\\n\t\tbn->d[i] = (ilw >> iws) | (ihw << iwr);\n\tbn_unroll_sl(bn_rshift_inner1);\n\tbn->d[BN_NWORDS-1] = (ihw >> iws);\n}\n\nvoid\nbn_rshift1(bignum *bn)\n{\n#define bn_rshift1_inner1(i)\t\t\t\t\t\t\\\n\t\tbn->d[i] = (bn->d[i+1] << 31) | (bn->d[i] >> 1);\n\tbn_unroll_sl(bn_rshift1_inner1);\n\tbn->d[BN_NWORDS-1] >>= 1;\n}\n\nvoid\nbn_rshift1_2(bignum *bna, bignum *bnb)\n{\n#define bn_rshift1_2_inner1(i)\t\t\t\t\t\t\\\n\t\tbna->d[i] = (bna->d[i+1] << 31) | (bna->d[i] >> 1);\t\\\n\t\tbnb->d[i] = (bnb->d[i+1] << 31) | (bnb->d[i] >> 1);\n\tbn_unroll_sl(bn_rshift1_2_inner1);\n\tbna->d[BN_NWORDS-1] >>= 1;\n\tbnb->d[BN_NWORDS-1] >>= 1;\n}\n\n\n/*\n * Unsigned comparison\n */\n\nint\nbn_ucmp_ge(bignum *a, bignum *b)\n{\n\tint l = 0, g = 0;\n\n#define bn_ucmp_ge_inner1(i)\t\t\t\t\\\n\t\tif (a->d[i] < b->d[i]) l |= (1 << i);\t\\\n\t\tif (a->d[i] > b->d[i]) g |= (1 << i);\n\tbn_unroll_reverse(bn_ucmp_ge_inner1);\n\treturn (l > g) ? 0 : 1;\n}\n\nint\nbn_ucmp_ge_c(bignum *a, __constant bn_word *b)\n{\n\tint l = 0, g = 0;\n\n#define bn_ucmp_ge_c_inner1(i)\t\t\t\t\\\n\t\tif (a->d[i] < b[i]) l |= (1 << i);\t\\\n\t\tif (a->d[i] > b[i]) g |= (1 << i);\n\tbn_unroll_reverse(bn_ucmp_ge_c_inner1);\n\treturn (l > g) ? 0 : 1;\n}\n\n/*\n * Negate\n */\n\nvoid\nbn_neg(bignum *n)\n{\n\tint c = 1;\n\n#define bn_neg_inner1(i)\t\t\t\t\\\n\t\tc = (n->d[i] = (~n->d[i]) + c) ? 0 : c;\n\tbn_unroll(bn_neg_inner1);\n}\n\n/*\n * Add/subtract\n */\n\n#define bn_add_word(r, a, b, t, c) do {\t\t\\\n\t\tt = a + b;\t\t\t\\\n\t\tc = (t < a) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\n#define bn_addc_word(r, a, b, t, c) do {\t\t\t\\\n\t\tt = a + b + c;\t\t\t\t\t\\\n\t\tc = (t < a) ? 1 : ((c & (t == a)) ? 1 : 0);\t\\\n\t\tr = t;\t\t\t\t\t\t\\\n\t} while (0)\n\nbn_word\nbn_uadd_words_seq(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbn_word t, c = 0;\n\n#define bn_uadd_words_seq_inner1(i)\t\t\t\\\n\t\tbn_addc_word(r[i], a[i], b[i], t, c);\n\tbn_add_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_uadd_words_seq_inner1);\n\treturn c;\n}\n\nbn_word\nbn_uadd_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbn_word t, c = 0;\n\n\tbn_add_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_uadd_words_seq_inner1);\n\treturn c;\n}\n\n#define bn_sub_word(r, a, b, t, c) do {\t\t\\\n\t\tt = a - b;\t\t\t\\\n\t\tc = (a < b) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\n#define bn_subb_word(r, a, b, t, c) do {\t\\\n\t\tt = a - (b + c);\t\t\\\n\t\tc = (!(a) && c) ? 1 : 0;\t\\\n\t\tc |= (a < b) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\nbn_word\nbn_usub_words_seq(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbn_word t, c = 0;\n\n#define bn_usub_words_seq_inner1(i)\t\t\t\\\n\t\tbn_subb_word(r[i], a[i], b[i], t, c);\n\n\tbn_sub_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_usub_words_seq_inner1);\n\treturn c;\n}\n\nbn_word\nbn_usub_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbn_word t, c = 0;\n\n\tbn_sub_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_usub_words_seq_inner1);\n\treturn c;\n}\n\n/*\n * Add/subtract better suited for AMD's VLIW architecture\n */\nbn_word\nbn_uadd_words_vliw(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n#define bn_uadd_words_vliw_inner1(i)\t\t\\\n\t\tx.d[i] = a[i] + b[i];\n\n#define bn_uadd_words_vliw_inner2(i)\t\t\t\\\n\t\tc |= (a[i] > x.d[i]) ? (1 << i) : 0;\t\\\n\t\tcp |= (!~x.d[i]) ? (1 << i) : 0;\n\n#define bn_uadd_words_vliw_inner3(i)\t\t\\\n\t\tr[i] = x.d[i] + ((c >> i) & 1);\n\n\tbn_unroll(bn_uadd_words_vliw_inner1);\n\tbn_unroll(bn_uadd_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_uadd_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_uadd_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n\tbn_unroll(bn_uadd_words_vliw_inner1);\n\tbn_unroll(bn_uadd_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_uadd_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_usub_words_vliw(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n#define bn_usub_words_vliw_inner1(i)\t\t\\\n\t\tx.d[i] = a[i] - b[i];\n\n#define bn_usub_words_vliw_inner2(i)\t\t\t\\\n\t\tc |= (a[i] < b[i]) ? (1 << i) : 0;\t\\\n\t\tcp |= (!x.d[i]) ? (1 << i) : 0;\n\n#define bn_usub_words_vliw_inner3(i)\t\t\\\n\t\tr[i] = x.d[i] - ((c >> i) & 1);\n\n\tbn_unroll(bn_usub_words_vliw_inner1);\n\tbn_unroll(bn_usub_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_usub_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_usub_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n\tbn_unroll(bn_usub_words_vliw_inner1);\n\tbn_unroll(bn_usub_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_usub_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\n\n#if defined(DEEP_VLIW)\n#define bn_uadd_words bn_uadd_words_vliw\n#define bn_uadd_words_c bn_uadd_words_c_vliw\n#define bn_usub_words bn_usub_words_vliw\n#define bn_usub_words_c bn_usub_words_c_vliw\n#else\n#define bn_uadd_words bn_uadd_words_seq\n#define bn_uadd_words_c bn_uadd_words_c_seq\n#define bn_usub_words bn_usub_words_seq\n#define bn_usub_words_c bn_usub_words_c_seq\n#endif\n\n#define bn_uadd(r, a, b) bn_uadd_words((r)->d, (a)->d, (b)->d)\n#define bn_uadd_c(r, a, b) bn_uadd_words_c((r)->d, (a)->d, b)\n#define bn_usub(r, a, b) bn_usub_words((r)->d, (a)->d, (b)->d)\n#define bn_usub_c(r, a, b) bn_usub_words_c((r)->d, (a)->d, b)\n\n/*\n * Modular add/sub\n */\n\nvoid\nbn_mod_add(bignum *r, bignum *a, bignum *b)\n{\n\tif (bn_uadd(r, a, b) ||\n\t    (bn_ucmp_ge_c(r, modulus)))\n\t\tbn_usub_c(r, r, modulus);\n}\n\nvoid\nbn_mod_sub(bignum *r, bignum *a, bignum *b)\n{\n\tif (bn_usub(r, a, b))\n\t\tbn_uadd_c(r, r, modulus);\n}\n\nvoid\nbn_mod_lshift1(bignum *bn)\n{\n\tbn_word c = (bn->d[BN_NWORDS-1] & 0x80000000);\n\tbn_lshift1(bn);\n\tif (c || (bn_ucmp_ge_c(bn, modulus)))\n\t\tbn_usub_c(bn, bn, modulus);\n}\n\n/*\n * Montgomery multiplication\n *\n * This includes normal multiplication of two \"Montgomeryized\"\n * bignums, and bn_from_mont for de-Montgomeryizing a bignum.\n */\n\n#define bn_mul_word(r, a, w, c, p, s) do { \\\n\t\tr = (a * w) + c;\t   \\\n\t\tp = mul_hi(a, w);\t   \\\n\t\tc = (r < c) ? p + 1 : p;   \\\n\t} while (0)\n\n#define bn_mul_add_word(r, a, w, c, p, s) do {\t\\\n\t\ts = r + c;\t\t\t\\\n\t\tp = mul_hi(a, w);\t\t\\\n\t\tr = (a * w) + s;\t\t\\\n\t\tc = (s < c) ? p + 1 : p;\t\\\n\t\tif (r < s) c++;\t\t\t\\\n\t} while (0)\nvoid\nbn_mul_mont(bignum *r, bignum *a, bignum *b)\n{\n\tbignum t;\n\tbn_word tea, teb, c, p, s, m;\n\n#if !defined(VERY_EXPENSIVE_BRANCHES)\n\tint q;\n#endif\n\n\tc = 0;\n#define bn_mul_mont_inner1(j)\t\t\t\t\t\\\n\t\tbn_mul_word(t.d[j], a->d[j], b->d[0], c, p, s);\n\tbn_unroll(bn_mul_mont_inner1);\n\ttea = c;\n\tteb = 0;\n\n\tc = 0;\n\tm = t.d[0] * mont_n0[0];\n\tbn_mul_add_word(t.d[0], modulus[0], m, c, p, s);\n#define bn_mul_mont_inner2(j)\t\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], modulus[j], m, c, p, s);\t\\\n\t\tt.d[j-1] = t.d[j];\n\tbn_unroll_sf(bn_mul_mont_inner2);\n\tt.d[BN_NWORDS-1] = tea + c;\n\ttea = teb + ((t.d[BN_NWORDS-1] < c) ? 1 : 0);\n\n#define bn_mul_mont_inner3_1(i, j)\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], a->d[j], b->d[i], c, p, s);\n#define bn_mul_mont_inner3_2(i, j)\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], modulus[j], m, c, p, s);\t\\\n\t\tt.d[j-1] = t.d[j];\n#define bn_mul_mont_inner3(i)\t\t\t\t \\\n\tc = 0;\t\t\t\t\t\t \\\n\tbn_unroll_arg(bn_mul_mont_inner3_1, i);\t\t \\\n\ttea += c;\t\t\t\t\t \\\n\tteb = ((tea < c) ? 1 : 0);\t\t\t \\\n\tc = 0;\t\t\t\t\t\t \\\n\tm = t.d[0] * mont_n0[0];\t\t\t \\\n\tbn_mul_add_word(t.d[0], modulus[0], m, c, p, s); \\\n\tbn_unroll_arg_sf(bn_mul_mont_inner3_2, i);\t \\\n\tt.d[BN_NWORDS-1] = tea + c;\t\t\t \\\n\ttea = teb + ((t.d[BN_NWORDS-1] < c) ? 1 : 0);\n\n\t/*\n\t * The outer loop here is quite long, and we won't unroll it\n\t * unless VERY_EXPENSIVE_BRANCHES is set.\n\t */\n#if defined(VERY_EXPENSIVE_BRANCHES)\n\tbn_unroll_sf(bn_mul_mont_inner3);\n\tc = tea | !bn_usub_c(r, &t, modulus);\n\tif (!c)\n\t\t*r = t;\n\n#else\n\tfor (q = 1; q < BN_NWORDS; q++) {\n\t\tbn_mul_mont_inner3(q);\n\t}\n\tc = tea || (t.d[BN_NWORDS-1] >= modulus[BN_NWORDS-1]);\n\tif (c) {\n\t\tc = tea | !bn_usub_c(r, &t, modulus);\n\t\tif (c)\n\t\t\treturn;\n\t}\n\t*r = t;\n#endif\n}\n\nvoid\nbn_from_mont(bignum *rb, bignum *b)\n{\n#define WORKSIZE ((2*BN_NWORDS) + 1)\n\tbn_word r[WORKSIZE];\n\tbn_word m, c, p, s;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n\t/* Copy the input to the working area */\n\t/* Zero the upper words */\n#define bn_from_mont_inner1(i)\t\t\t\\\n\tr[i] = b->d[i];\n#define bn_from_mont_inner2(i)\t\t\t\\\n\tr[BN_NWORDS+i] = 0;\n\n\tbn_unroll(bn_from_mont_inner1);\n\tbn_unroll(bn_from_mont_inner2);\n\tr[WORKSIZE-1] = 0;\n\n\t/* Multiply (long) by modulus */\n#define bn_from_mont_inner3_1(i, j) \\\n\tbn_mul_add_word(r[i+j], modulus[j], m, c, p, s);\n\n#if !defined(VERY_EXPENSIVE_BRANCHES)\n#define bn_from_mont_inner3_2(i)\t\t\\\n\tif (r[BN_NWORDS + i] < c)\t\t\\\n\t\tr[BN_NWORDS + i + 1] += 1;\n#else\n#define bn_from_mont_inner3_2(i)\t\t\t\t\\\n\tr[BN_NWORDS + i + 1] += (r[BN_NWORDS + i] < c) ? 1 : 0;\n#endif\n\n#define bn_from_mont_inner3(i)\t\t\t \\\n\tm = r[i] * mont_n0[0];\t\t\t \\\n\tc = 0;\t\t\t\t\t \\\n\tbn_unroll_arg(bn_from_mont_inner3_1, i); \\\n\tr[BN_NWORDS + i] += c;\t\t\t \\\n\tbn_from_mont_inner3_2(i)\n\n\t/*\n\t * The outer loop here is not very long, so we will unroll\n\t * it by default.  However, it's just complicated enough to\n\t * cause NVIDIA's compiler to take unreasonably long to compile\n\t * it, unless we use pragma unroll.\n\t */\n#if !defined(PRAGMA_UNROLL)\n\tbn_iter(bn_from_mont_inner3);\n#else\n#pragma unroll 8\n\tfor (i = 0; i < BN_NWORDS; i++) { bn_from_mont_inner3(i) }\n#endif\n\n\t/*\n\t * Make sure the result is less than the modulus.\n\t * Subtracting is not much more expensive than compare, so\n\t * subtract always and assign based on the carry out value.\n\t */\n\tc = bn_usub_words_c(rb->d, &r[BN_NWORDS], modulus);\n\tif (c) {\n#define bn_from_mont_inner4(i)\t\t\t\t\\\n\t\t\trb->d[i] = r[BN_NWORDS + i];\n\t\tbn_unroll(bn_from_mont_inner4);\n\t}\n}\n\n/*\n * Modular inversion\n */\n\nvoid\nbn_mod_inverse(bignum *r, bignum *n)\n{\n\tbignum a, b, x, y;\n\tint shift;\n\tbn_word xc, yc;\n\tfor (shift = 0; shift < BN_NWORDS; shift++) {\n\t\ta.d[shift] = modulus[shift];\n\t\tx.d[shift] = 0;\n\t\ty.d[shift] = 0;\n\t}\n\tb = *n;\n\tx.d[0] = 1;\n\txc = 0;\n\tyc = 0;\n\twhile (!bn_is_zero(b)) {\n\t\tshift = 0;\n\t\twhile (!bn_is_odd(b)) {\n\t\t\tif (bn_is_odd(x))\n\t\t\t\txc += bn_uadd_c(&x, &x, modulus);\n\t\t\tbn_rshift1_2(&x, &b);\n\t\t\tx.d[7] |= (xc << 31);\n\t\t\txc >>= 1;\n\t\t}\n\n\t\twhile (!bn_is_odd(a)) {\n\t\t\tif (bn_is_odd(y))\n\t\t\t\tyc += bn_uadd_c(&y, &y, modulus);\n\t\t\tbn_rshift1_2(&y, &a);\n\t\t\ty.d[7] |= (yc << 31);\n\t\t\tyc >>= 1;\n\t\t}\n\n\t\tif (bn_ucmp_ge(&b, &a)) {\n\t\t\txc += yc + bn_uadd(&x, &x, &y);\n\t\t\tbn_usub(&b, &b, &a);\n\t\t} else {\n\t\t\tyc += xc + bn_uadd(&y, &y, &x);\n\t\t\tbn_usub(&a, &a, &b);\n\t\t}\n\t}\n\n\tif (!bn_is_one(a)) {\n\t\t/* no modular inverse */\n\t\t*r = bn_zero;\n\t} else {\n\t\t/* Compute y % m as cheaply as possible */\n\t\twhile (yc < 0x80000000)\n\t\t\tyc -= bn_usub_c(&y, &y, modulus);\n\t\tbn_neg(&y);\n\t\t*r = y;\n\t}\n}\n\n/*\n * HASH FUNCTIONS\n *\n * BYTE ORDER NOTE: None of the hash functions below deal with byte\n * order.  The caller is expected to be aware of this when it stuffs\n * data into in the native integer.\n *\n * NOTE #2: Endianness of the OpenCL device makes no difference here.\n */\n\n#define hash256_unroll(a) unroll_8(a)\n#define hash160_unroll(a) unroll_5(a)\n#define hash256_iter(a) iter_8(a)\n#define hash160_iter(a) iter_5(a)\n\n\n/*\n * SHA-2 256\n *\n * CAUTION: Input buffer will be overwritten/mangled.\n * Data expected in big-endian format.\n * This implementation is designed for space efficiency more than\n * raw speed.\n */\n\n__constant uint sha2_init[8] = {\n\t0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n\t0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n};\n\n__constant uint sha2_k[64] = {\n\t0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n\t0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n\t0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n\t0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n\t0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n\t0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n\t0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n\t0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n\t0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n\t0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n\t0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n\t0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n\t0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n\t0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n\t0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n\t0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n};\n\nvoid\nsha2_256_init(uint *out)\n{\n#define sha2_256_init_inner_1(i) \\\n\tout[i] = sha2_init[i];\n\n\thash256_unroll(sha2_256_init_inner_1);\n}\n\n/* The state variable remapping is really contorted */\n#define sha2_stvar(vals, i, v) vals[(64+v-i) % 8]\n#define sha2_s0(a) (rotate(a, 30U) ^ rotate(a, 19U) ^ rotate(a, 10U))\n#define sha2_s1(a) (rotate(a, 26U) ^ rotate(a, 21U) ^ rotate(a, 7U))\n#if defined(AMD_BFI_INT)\n#pragma OPENCL EXTENSION cl_amd_media_ops : enable\n#define sha2_ch(a, b, c) amd_bytealign(a, b, c)\n#define sha2_ma(a, b, c) amd_bytealign((a^c), b, a)\n#else\n#define sha2_ch(a, b, c) (c ^ (a & (b ^ c)))\n#define sha2_ma(a, b, c) ((a & c) | (b & (a | c)))\n#endif\n\nvoid\nsha2_256_block(uint *out, uint *in)\n{\n\tuint state[8], t1, t2;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n#define sha2_256_block_inner_1(i) \\\n\tstate[i] = out[i];\n\thash256_unroll(sha2_256_block_inner_1);\n\n#define sha2_256_block_inner_2(i) \\\n\tif (i >= 16) {\t\t\t\t\t\t\t\\\n\t\tt1 = in[(i + 1) % 16];\t\t\t\t\t\\\n\t\tt2 = in[(i + 14) % 16];\t\t\t\t\t\\\n\t\tin[i % 16] += (in[(i + 9) % 16] +\t\t\t\\\n\t\t       (rotate(t1, 25U) ^ rotate(t1, 14U) ^ (t1 >> 3)) + \\\n\t\t       (rotate(t2, 15U) ^ rotate(t2, 13U) ^ (t2 >> 10))); \\\n\t}\t\t\t\t\t\t\t\t\\\n\tt1 = (sha2_stvar(state, i, 7) +\t\t\t\t\t\\\n\t      sha2_s1(sha2_stvar(state, i, 4)) +\t\t\t\\\n\t      sha2_ch(sha2_stvar(state, i, 4),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 5),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 6)) +\t\t\t\\\n\t      sha2_k[i] +\t\t\t\t\t\t\\\n\t      in[i % 16]);\t\t\t\t\t\t\\\n\tt2 = (sha2_s0(sha2_stvar(state, i, 0)) +\t\t\t\\\n\t      sha2_ma(sha2_stvar(state, i, 0),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 1),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 2)));\t\t\t\\\n\tsha2_stvar(state, i, 3) += t1;\t\t\t\t\t\\\n\tsha2_stvar(state, i, 7) = t1 + t2;\t\t\t\t\\\n\n#if !defined(PRAGMA_UNROLL)\n\titer_64(sha2_256_block_inner_2);\n#else\n#pragma unroll 64\n\tfor (i = 0; i < 64; i++) { sha2_256_block_inner_2(i) }\n#endif\n\n#define sha2_256_block_inner_3(i) \\\n\tout[i] += state[i];\n\n\thash256_unroll(sha2_256_block_inner_3);\n}\n\n\n/*\n * RIPEMD160\n *\n * Data expected in little-endian format.\n */\n\n__constant uint ripemd160_iv[] = {\n\t0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 };\n__constant uint ripemd160_k[] = {\n\t0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E };\n__constant uint ripemd160_kp[] = {\n\t0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000 };\n__constant uchar ripemd160_ws[] = {\n\t0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13,\n};\n__constant uchar ripemd160_wsp[] = {\n\t5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n};\n__constant uchar ripemd160_rl[] = {\n\t11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6,\n};\n__constant uchar ripemd160_rlp[] = {\n\t8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n};\n\n#define ripemd160_val(v, i, n) (v)[(80+(n)-(i)) % 5]\n#define ripemd160_valp(v, i, n) (v)[5 + ((80+(n)-(i)) % 5)]\n#if defined(AMD_BFI_INT)\n#define ripemd160_f0(x, y, z) (x ^ y ^ z)\n#define ripemd160_f1(x, y, z) amd_bytealign(x, y, z)\n#define ripemd160_f2(x, y, z) (z ^ (x | ~y))\n#define ripemd160_f3(x, y, z) amd_bytealign(z, x, y)\n#define ripemd160_f4(x, y, z) (x ^ (y | ~z))\n#else\n#define ripemd160_f0(x, y, z) (x ^ y ^ z)\n#define ripemd160_f1(x, y, z) ((x & y) | (~x & z))\n#define ripemd160_f2(x, y, z) (z ^ (x | ~y))\n#define ripemd160_f3(x, y, z) ((x & z) | (y & ~z))\n#define ripemd160_f4(x, y, z) (x ^ (y | ~z))\n#endif\n#define ripemd160_round(i, in, vals, f, fp, t) do {\t\t\t\\\n\t\tripemd160_val(vals, i, 0) =\t\t\t\t\\\n\t\t\trotate(ripemd160_val(vals, i, 0) +\t\t\\\n\t\t\t       f(ripemd160_val(vals, i, 1),\t\t\\\n\t\t\t\t ripemd160_val(vals, i, 2),\t\t\\\n\t\t\t\t ripemd160_val(vals, i, 3)) +\t\t\\\n\t\t\t       in[ripemd160_ws[i]] +\t\t\t\\\n\t\t\t       ripemd160_k[i / 16],\t\t\t\\\n\t\t\t       (uint)ripemd160_rl[i]) +\t\t\t\\\n\t\t\tripemd160_val(vals, i, 4);\t\t\t\\\n\t\tripemd160_val(vals, i, 2) =\t\t\t\t\\\n\t\t\trotate(ripemd160_val(vals, i, 2), 10U);\t\t\\\n\t\tripemd160_valp(vals, i, 0) =\t\t\t\t\\\n\t\t\trotate(ripemd160_valp(vals, i, 0) +\t\t\\\n\t\t\t       fp(ripemd160_valp(vals, i, 1),\t\t\\\n\t\t\t\t  ripemd160_valp(vals, i, 2),\t\t\\\n\t\t\t\t  ripemd160_valp(vals, i, 3)) +\t\t\\\n\t\t\t       in[ripemd160_wsp[i]] +\t\t\t\\\n\t\t\t       ripemd160_kp[i / 16],\t\t\t\\\n\t\t\t       (uint)ripemd160_rlp[i]) +\t\t\\\n\t\t\tripemd160_valp(vals, i, 4);\t\t\t\\\n\t\tripemd160_valp(vals, i, 2) =\t\t\t\t\\\n\t\t\trotate(ripemd160_valp(vals, i, 2), 10U);\t\\\n\t} while (0)\n\nvoid\nripemd160_init(uint *out)\n{\n#define ripemd160_init_inner_1(i) \\\n\tout[i] = ripemd160_iv[i];\n\n\thash160_unroll(ripemd160_init_inner_1);\n}\n\nvoid\nripemd160_block(uint *out, uint *in)\n{\n\tuint vals[10], t;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n#define ripemd160_block_inner_1(i) \\\n\tvals[i] = vals[i + 5] = out[i];\n\n\thash160_unroll(ripemd160_block_inner_1);\n\n#define ripemd160_block_inner_p0(i)\t\t\\\n\tripemd160_round(i, in, vals, \\\n\t\t\tripemd160_f0, ripemd160_f4, t);\n#define ripemd160_block_inner_p1(i)\t\t\\\n\tripemd160_round((16 + i), in, vals,\t\t\\\n\t\t\tripemd160_f1, ripemd160_f3, t);\n#define ripemd160_block_inner_p2(i)\t\t\\\n\tripemd160_round((32 + i), in, vals,\t\t\\\n\t\t\tripemd160_f2, ripemd160_f2, t);\n#define ripemd160_block_inner_p3(i)\t\t\\\n\tripemd160_round((48 + i), in, vals,\t\t\\\n\t\t\tripemd160_f3, ripemd160_f1, t);\n#define ripemd160_block_inner_p4(i)\t\t\\\n\tripemd160_round((64 + i), in, vals,\t\t\\\n\t\t\tripemd160_f4, ripemd160_f0, t);\n\n#if !defined(PRAGMA_UNROLL)\n\titer_16(ripemd160_block_inner_p0);\n\titer_16(ripemd160_block_inner_p1);\n\titer_16(ripemd160_block_inner_p2);\n\titer_16(ripemd160_block_inner_p3);\n\titer_16(ripemd160_block_inner_p4);\n#else\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p0(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p1(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p2(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p3(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p4(i); }\n#endif\n\n\tt = out[1] + vals[2] + vals[8];\n\tout[1] = out[2] + vals[3] + vals[9];\n\tout[2] = out[3] + vals[4] + vals[5];\n\tout[3] = out[4] + vals[0] + vals[6];\n\tout[4] = out[0] + vals[1] + vals[7];\n\tout[0] = t;\n}\n\n\n#ifdef TEST_KERNELS\n/*\n * Test kernels\n */\n\n/* Montgomery multiplication test kernel */\n__kernel void\ntest_mul_mont(__global bignum *products_out, __global bignum *nums_in)\n{\n\tbignum a, b, c;\n\tint o;\n\to = get_global_id(0);\n\tnums_in += (2*o);\n\n\ta = nums_in[0];\n\tb = nums_in[1];\n\tbn_mul_mont(&c, &a, &b);\n\tproducts_out[o] = c;\n}\n\n/* modular inversion test kernel */\n__kernel void\ntest_mod_inverse(__global bignum *inv_out, __global bignum *nums_in,\n\t\t int count)\n{\n\tbignum x, xp;\n\tint i, o;\n\to = get_global_id(0) * count;\n\tfor (i = 0; i < count; i++) {\n\t\tx = nums_in[o];\n\t\tbn_mod_inverse(&xp, &x);\n\t\tinv_out[o++] = xp;\n\t}\n}\n#endif  /* TEST_KERNELS */\n\n\n#define ACCESS_BUNDLE 1024\n#define ACCESS_STRIDE (ACCESS_BUNDLE/BN_NWORDS)\n\n__kernel void\nec_add_grid(__global bn_word *points_out, __global bn_word *z_heap, \n\t    __global bn_word *row_in, __global bignum *col_in)\n{\n\tbignum rx, ry;\n\tbignum x1, y1, a, b, c, d, e, z;\n\tbn_word cy;\n\tint i, cell, start;\n\n\t/* Load the row increment point */\n\ti = 2 * get_global_id(1);\n\trx = col_in[i];\n\try = col_in[i+1];\n\n\tcell = get_global_id(0);\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\n#define ec_add_grid_inner_1(i) \\\n\tx1.d[i] = row_in[start + (i*ACCESS_STRIDE)];\n\n\tbn_unroll(ec_add_grid_inner_1);\n\tstart += (ACCESS_STRIDE/2);\n\n#define ec_add_grid_inner_2(i) \\\n\ty1.d[i] = row_in[start + (i*ACCESS_STRIDE)];\n\n\tbn_unroll(ec_add_grid_inner_2);\n\n\tbn_mod_sub(&z, &x1, &rx);\n\n\tcell += (get_global_id(1) * get_global_size(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\n#define ec_add_grid_inner_3(i) \\\n\tz_heap[start + (i*ACCESS_STRIDE)] = z.d[i];\n\n\tbn_unroll(ec_add_grid_inner_3);\n\n\tbn_mod_sub(&b, &y1, &ry);\n\tbn_mod_add(&c, &x1, &rx);\n\tbn_mod_add(&d, &y1, &ry);\n\tbn_mul_mont(&y1, &b, &b);\n\tbn_mul_mont(&x1, &z, &z);\n\tbn_mul_mont(&e, &c, &x1);\n\tbn_mod_sub(&y1, &y1, &e);\n\n\t/*\n\t * This disgusting code caters to the global memory unit on\n\t * various GPUs, by giving it a nice contiguous patch to write\n\t * per warp/wavefront.\n\t */\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\n#define ec_add_grid_inner_4(i) \\\n\tpoints_out[start + (i*ACCESS_STRIDE)] = y1.d[i];\n\n\tbn_unroll(ec_add_grid_inner_4);\n\n\tbn_mod_lshift1(&y1);\n\tbn_mod_sub(&y1, &e, &y1);\n\tbn_mul_mont(&y1, &y1, &b);\n\tbn_mul_mont(&a, &x1, &z);\n\tbn_mul_mont(&c, &d, &a);\n\tbn_mod_sub(&y1, &y1, &c);\n\tcy = 0;\n\tif (bn_is_odd(y1))\n\t\tcy = bn_uadd_c(&y1, &y1, modulus);\n\tbn_rshift1(&y1);\n\ty1.d[BN_NWORDS-1] |= (cy ? 0x80000000 : 0);\n\n\tstart += (ACCESS_STRIDE/2);\n\n\tbn_unroll(ec_add_grid_inner_4);\n}\n\n__kernel void\nheap_invert(__global bn_word *z_heap, int batch)\n{\n\tbignum a, b, c, z;\n\tint i, off, lcell, hcell, start;\n\n#define heap_invert_inner_load_a(j)\t\t\t\t\\\n\t\ta.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_load_b(j)\t\t\t\t\\\n\t\tb.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_load_z(j)\t\t\t\t\\\n\t\tz.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_store_z(j)\t\t\t\t\\\n\t\tz_heap[start + j*ACCESS_STRIDE] = z.d[j];\n#define heap_invert_inner_store_c(j)\t\t\t\t\\\n\t\tz_heap[start + j*ACCESS_STRIDE] = c.d[j];\n\n\toff = get_global_size(0);\n\tlcell = get_global_id(0);\n\thcell = (off * batch) + lcell;\n\tfor (i = 0; i < (batch-1); i++) {\n\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_load_a);\n\n\t\tlcell += off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_load_b);\n\n\t\tbn_mul_mont(&z, &a, &b);\n\n\t\tstart = (((hcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (hcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_store_z);\n\n\t\tlcell += off;\n\t\thcell += off;\n\t}\n\n\t/* Invert the root, fix up 1/ZR -> R/Z */\n\tbn_mod_inverse(&z, &z);\n\n#define heap_invert_inner_1(i)\t\t\t\\\n\ta.d[i] = mont_rr[i];\n\n\tbn_unroll(heap_invert_inner_1);\n\n\tbn_mul_mont(&z, &z, &a);\n\tbn_mul_mont(&z, &z, &a);\n\n\t/* Unroll the first iteration to avoid a load/store on the root */\n\tlcell -= (off << 1);\n\thcell -= (off << 1);\n\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_load_a);\n\n\tlcell += off;\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_load_b);\n\n\tbn_mul_mont(&c, &a, &z);\n\n\tbn_unroll(heap_invert_inner_store_c);\n\n\tbn_mul_mont(&c, &b, &z);\n\n\tlcell -= off;\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_store_c);\n\n\tlcell -= (off << 1);\n\n\tfor (i = 0; i < (batch-2); i++) {\n\t\tstart = (((hcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (hcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_z);\n\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_a);\n\n\t\tlcell += off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_b);\n\n\t\tbn_mul_mont(&c, &a, &z);\n\n\t\tbn_unroll(heap_invert_inner_store_c);\n\n\t\tbn_mul_mont(&c, &b, &z);\n\n\t\tlcell -= off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_store_c);\n\n\t\tlcell -= (off << 1);\n\t\thcell -= off;\n\t}\n}\n\nvoid\nhash_ec_point(uint *hash_out, __global bn_word *xy, __global bn_word *zip)\n{\n\tuint hash1[16], hash2[16];\n\tbignum c, zi, zzi;\n\tbn_word wh, wl;\n\n\t/*\n\t * Multiply the coordinates by the inverted Z values.\n\t * Stash the coordinates in the hash buffer.\n\t * SHA-2 requires big endian, and our intended hash input\n\t * is big-endian, so swapping is unnecessary, but\n\t * inserting the format byte in front causes a headache.\n\t */\n#define hash_ec_point_inner_1(i)\t\t\\\n\tzi.d[i] = zip[i*ACCESS_STRIDE];\n\n\tbn_unroll(hash_ec_point_inner_1);\n\n\tbn_mul_mont(&zzi, &zi, &zi);  /* 1 / Z^2 */\n\n#define hash_ec_point_inner_2(i)\t\t\\\n\tc.d[i] = xy[i*ACCESS_STRIDE];\n\n\tbn_unroll(hash_ec_point_inner_2);\n\n\tbn_mul_mont(&c, &c, &zzi);  /* X / Z^2 */\n\tbn_from_mont(&c, &c);\n\n\twh = 0x00000004;  /* POINT_CONVERSION_UNCOMPRESSED */\n\n#define hash_ec_point_inner_3(i)\t\t\\\n\twl = wh;\t\t\t\t\\\n\twh = c.d[(BN_NWORDS - 1) - i];\t\t\\\n\thash1[i] = (wl << 24) | (wh >> 8);\n\n\tbn_unroll(hash_ec_point_inner_3);\n\n\tbn_mul_mont(&zzi, &zzi, &zi);  /* 1 / Z^3 */\n\n#define hash_ec_point_inner_4(i)\t\t\t\t\\\n\tc.d[i] = xy[(ACCESS_STRIDE/2) + i*ACCESS_STRIDE];\n\n\tbn_unroll(hash_ec_point_inner_4);\n\n\tbn_mul_mont(&c, &c, &zzi);  /* Y / Z^3 */\n\tbn_from_mont(&c, &c);\n\n#define hash_ec_point_inner_5(i)\t\t\t\\\n\twl = wh;\t\t\t\t\t\\\n\twh = c.d[(BN_NWORDS - 1) - i];\t\t\t\\\n\thash1[BN_NWORDS + i] = (wl << 24) | (wh >> 8);\n\n\tbn_unroll(hash_ec_point_inner_5);\n\n\t/*\n\t * Hash the first 64 bytes of the buffer\n\t */\n\tsha2_256_init(hash2);\n\tsha2_256_block(hash2, hash1);\n\n\t/*\n\t * Hash the last byte of the buffer + SHA-2 padding\n\t */\n\thash1[0] = wh << 24 | 0x800000;\n\thash1[1] = 0;\n\thash1[2] = 0;\n\thash1[3] = 0;\n\thash1[4] = 0;\n\thash1[5] = 0;\n\thash1[6] = 0;\n\thash1[7] = 0;\n\thash1[8] = 0;\n\thash1[9] = 0;\n\thash1[10] = 0;\n\thash1[11] = 0;\n\thash1[12] = 0;\n\thash1[13] = 0;\n\thash1[14] = 0;\n\thash1[15] = 65 * 8;\n\tsha2_256_block(hash2, hash1);\n\n\t/*\n\t * Hash the SHA-2 result with RIPEMD160\n\t * Unfortunately, SHA-2 outputs big-endian, but\n\t * RIPEMD160 expects little-endian.  Need to swap!\n\t */\n\n#define hash_ec_point_inner_6(i)\t\t\\\n\thash2[i] = bswap32(hash2[i]);\n\n\thash256_unroll(hash_ec_point_inner_6);\n\n\thash2[8] = bswap32(0x80000000);\n\thash2[9] = 0;\n\thash2[10] = 0;\n\thash2[11] = 0;\n\thash2[12] = 0;\n\thash2[13] = 0;\n\thash2[14] = 32 * 8;\n\thash2[15] = 0;\n\tripemd160_init(hash_out);\n\tripemd160_block(hash_out, hash2);\n}\n\n\n__kernel void\nhash_ec_point_get(__global uint *hashes_out,\n\t\t  __global bn_word *points_in, __global bn_word *z_heap)\n{\n\tuint hash[5];\n\tint i, p, cell, start;\n\n\tcell = ((get_global_id(1) * get_global_size(0)) + get_global_id(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\tz_heap += start;\n\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\tpoints_in += start;\n\n\t/* Complete the coordinates and hash */\n\thash_ec_point(hash, points_in, z_heap);\n\n\tp = get_global_size(0);\n\ti = p * get_global_id(1);\n\thashes_out += 5 * (i + get_global_id(0));\n\n\t/* Output the hash in proper byte-order */\n#define hash_ec_point_get_inner_1(i)\t\t\\\n\thashes_out[i] = load_le32(hash[i]);\n\n\thash160_unroll(hash_ec_point_get_inner_1);\n}\n\n/*\n * Normally this would be one function that compared two hash160s.\n * This one compares a hash160 with an upper and lower bound in one\n * function to work around a problem with AMD's OpenCL compiler.\n */\nint\nhash160_ucmp_g(uint *a, __global uint *bound)\n{\n\tuint gv;\n\n#define hash160_ucmp_g_inner_1(i) \t\t\\\n\t\tgv = load_be32(bound[i]);\t\\\n\t\tif (a[i] < gv) return -1;\t\\\n\t\tif (a[i] > gv) break;\n\n\thash160_iter(hash160_ucmp_g_inner_1);\n\n#define hash160_ucmp_g_inner_2(i)   \t\t\\\n\t\tgv = load_be32(bound[5+i]);\t\\\n\t\tif (a[i] < gv) return 0;\t\\\n\t\tif (a[i] > gv) return 1;\n\n\thash160_iter(hash160_ucmp_g_inner_2);\n\treturn 0;\n}\n\n__kernel void\nhash_ec_point_search_prefix(__global uint *found,\n\t\t\t    __global bn_word *points_in,\n\t\t\t    __global bn_word *z_heap,\n\t\t\t    __global uint *target_table, int ntargets)\n{\n\tuint hash[5];\n\tint i, high, low, p, cell, start;\n\n\tcell = ((get_global_id(1) * get_global_size(0)) + get_global_id(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\tz_heap += start;\n\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\tpoints_in += start;\n\n\t/* Complete the coordinates and hash */\n\thash_ec_point(hash, points_in, z_heap);\n\n\t/*\n\t * Unconditionally byteswap the hash result, because:\n\t * - The byte-level convention of RIPEMD160 is little-endian\n\t * - We are comparing it in big-endian order\n\t */\n#define hash_ec_point_search_prefix_inner_1(i)\t\\\n\thash[i] = bswap32(hash[i]);\n\n\thash160_unroll(hash_ec_point_search_prefix_inner_1);\n\n\t/* Binary-search the target table for the hash we just computed */\n\tfor (high = ntargets - 1, low = 0, i = high >> 1;\n\t     high >= low;\n\t     i = low + ((high - low) >> 1)) {\n\t\tp = hash160_ucmp_g(hash, &target_table[10*i]);\n\t\tlow = (p > 0) ? (i + 1) : low;\n\t\thigh = (p < 0) ? (i - 1) : high;\n\t\tif (p == 0) {\n\t\t\t/* For debugging purposes, write the hash value */\n\t\t\tfound[0] = ((get_global_id(1) * get_global_size(0)) +\n\t\t\t\t    get_global_id(0));\n\t\t\tfound[1] = i;\n\n#define hash_ec_point_search_prefix_inner_2(i)\t\\\n\t\t\tfound[i+2] = load_be32(hash[i]);\n\n\t\t\thash160_unroll(hash_ec_point_search_prefix_inner_2);\n\t\t\thigh = -1;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/main/resources/unused/gpu.cl",
    "content": "/*\n * OCLExplorer bitcoin addresses brute-force tool\n * Copyright (C) 2017 Stanislav V. Tretyakov <svtrostov@yandex.ru>\n * \n * Based on OpenCL script:\n * Vanitygen, vanity bitcoin address generator\n * Copyright (C) 2011 <samr7@cs.washington.edu>\n * \n * This file contains an OpenCL kernel for performing certain parts of\n * the bitcoin address calculation process.\n */\n\n/* Byte-swapping and endianness */\n#define bswap32(v)\t\t\t\t\t\\\n\t(((v) >> 24) | (((v) >> 8) & 0xff00) |\t\t\\\n\t (((v) << 8) & 0xff0000) | ((v) << 24))\n\n#if __ENDIAN_LITTLE__ != 1\n#define load_le32(v) bswap32(v)\n#define load_be32(v) (v)\n#else\n#define load_le32(v) (v)\n#define load_be32(v) bswap32(v)\n#endif\n\n/*\n * Loop unrolling macros\n *\n * In most cases, preprocessor unrolling works best.\n * The exception is NVIDIA's compiler, which seems to take unreasonably\n * long to compile a loop with a larger iteration count, or a loop with\n * a body of >50 PTX instructions, with preprocessor unrolling.\n * However, it does not seem to take as long with pragma unroll, and\n * produces good output.\n */\n\n/* Explicit loop unrolling */\n#define unroll_5(a) do { a(0) a(1) a(2) a(3) a(4) } while (0)\n#define unroll_8(a) do { a(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7) } while (0)\n#define unroll_1_7(a) do { a(1) a(2) a(3) a(4) a(5) a(6) a(7) } while (0)\n#define unroll_7(a) do { a(0) a(1) a(2) a(3) a(4) a(5) a(6) } while (0)\n#define unroll_7_0(a) do { a(7) a(6) a(5) a(4) a(3) a(2) a(1) a(0) } while (0)\n#define unroll_7_1(a) do { a(7) a(6) a(5) a(4) a(3) a(2) a(1) } while (0)\n#define unroll_16(a) do {\t\t\t\t\\\n\ta(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7)\t\t\\\n\ta(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15)\t\\\n\t} while (0)\n#define unroll_64(a) do {\t\t\t\t\\\n\ta(0) a(1) a(2) a(3) a(4) a(5) a(6) a(7)\t\t\\\n\ta(8) a(9) a(10) a(11) a(12) a(13) a(14) a(15)\t\\\n\ta(16) a(17) a(18) a(19) a(20) a(21) a(22) a(23) \\\n\ta(24) a(25) a(26) a(27) a(28) a(29) a(30) a(31)\t\\\n\ta(32) a(33) a(34) a(35) a(36) a(37) a(38) a(39) \\\n\ta(40) a(41) a(42) a(43) a(44) a(45) a(46) a(47) \\\n\ta(48) a(49) a(50) a(51) a(52) a(53) a(54) a(55) \\\n\ta(56) a(57) a(58) a(59) a(60) a(61) a(62) a(63) \\\n\t} while (0)\n\n/* Conditional loop unrolling */\n#if defined(DEEP_PREPROC_UNROLL)\n#define iter_5(a) unroll_5(a)\n#define iter_8(a) unroll_8(a)\n#define iter_16(a) unroll_16(a)\n#define iter_64(a) unroll_64(a)\n#else\n#define iter_5(a) do {int _i; for (_i = 0; _i < 5; _i++) { a(_i) }} while (0)\n#define iter_8(a) do {int _i; for (_i = 0; _i < 8; _i++) { a(_i) }} while (0)\n#define iter_16(a) do {int _i; for (_i = 0; _i < 16; _i++) { a(_i) }} while (0)\n#define iter_64(a) do {int _i; for (_i = 0; _i < 64; _i++) { a(_i) }} while (0)\n#endif\n\n/*\n * BIGNUM mini-library\n * This module deals with fixed-size 256-bit bignums.\n * Where modular arithmetic is performed, the SECP256k1 prime\n * modulus (below) is assumed.\n *\n * Methods include:\n * - bn_is_zero/bn_is_one/bn_is_odd/bn_is_even/bn_is_bit_set\n * - bn_rshift[1]/bn_lshift[1]\n * - bn_neg\n * - bn_uadd/bn_uadd_p\n * - bn_usub/bn_usub_p\n */\n\ntypedef uint bn_word;\n#define BN_NBITS 256\n#define BN_WSHIFT 5\n#define BN_WBITS (1 << BN_WSHIFT)\n#define BN_NWORDS ((BN_NBITS/8) / sizeof(bn_word))\n#define BN_WORDMAX 0xffffffff\n\n#define MODULUS_BYTES \\\n\t0xfffffc2f, 0xfffffffe, 0xffffffff, 0xffffffff, \\\n\t0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff\n\ntypedef struct {\n\tbn_word d[BN_NWORDS];\n} bignum;\n\n__constant bn_word modulus[] = { MODULUS_BYTES };\n__constant bignum bn_zero = {{0}};\n\n__constant bn_word mont_rr[BN_NWORDS] = { 0xe90a1, 0x7a2, 0x1, 0, };\n__constant bn_word mont_n0[2] = { 0xd2253531, 0xd838091d };\n\n\n#define bn_is_odd(bn)\t\t(bn.d[0] & 1)\n#define bn_is_even(bn) \t\t(!bn_is_odd(bn))\n#define bn_is_zero(bn) \t\t(!bn.d[0] && !bn.d[1] && !bn.d[2] && \\\n\t\t\t\t !bn.d[3] && !bn.d[4] && !bn.d[5] && \\\n\t\t\t\t !bn.d[6] && !bn.d[7])\n#define bn_is_one(bn) \t\t((bn.d[0] == 1) && !bn.d[1] && !bn.d[2] && \\\n\t\t\t\t !bn.d[3] && !bn.d[4] && !bn.d[5] && \\\n\t\t\t\t !bn.d[6] && !bn.d[7])\n#define bn_is_bit_set(bn, n) \\\n\t((((bn_word*)&bn)[n >> BN_WSHIFT]) & (1 << (n & (BN_WBITS-1))))\n\n#define bn_unroll(e) unroll_8(e)\n#define bn_unroll_sf(e)\tunroll_1_7(e)\n#define bn_unroll_sl(e)\tunroll_7(e)\n#define bn_unroll_reverse(e) unroll_7_0(e)\n#define bn_unroll_reverse_sl(e) unroll_7_1(e)\n\n#define bn_unroll_arg(e, arg)\t\t\t\t\\\n\te(arg, 0) e(arg, 1) e(arg, 2) e(arg, 3)\t\\\n\te(arg, 4) e(arg, 5) e(arg, 6) e(arg, 7)\n#define bn_unroll_arg_sf(e, arg)\t\t\t\\\n\te(arg, 1) e(arg, 2) e(arg, 3)\t\t\\\n\te(arg, 4) e(arg, 5) e(arg, 6) e(arg, 7)\n\n#define bn_iter(e) iter_8(e)\n\n\n/*\n * Bitwise shift\n */\n\nvoid\nbn_lshift1(bignum *bn)\n{\n#define bn_lshift1_inner1(i)\t\t\t\t\t\t\\\n\t\tbn->d[i] = (bn->d[i] << 1) | (bn->d[i-1] >> 31);\n\tbn_unroll_reverse_sl(bn_lshift1_inner1);\n\tbn->d[0] <<= 1;\n}\n\nvoid\nbn_rshift(bignum *bn, int shift)\n{\n\tint wd, iws, iwr;\n\tbn_word ihw, ilw;\n\tiws = (shift & (BN_WBITS-1));\n\tiwr = BN_WBITS - iws;\n\twd = (shift >> BN_WSHIFT);\n\tihw = (wd < BN_WBITS) ? bn->d[wd] : 0;\n\n#define bn_rshift_inner1(i)\t\t\t\t\\\n\t\twd++;\t\t\t\t\t\\\n\t\tilw = ihw;\t\t\t\t\\\n\t\tihw = (wd < BN_WBITS) ? bn->d[wd] : 0;\t\\\n\t\tbn->d[i] = (ilw >> iws) | (ihw << iwr);\n\tbn_unroll_sl(bn_rshift_inner1);\n\tbn->d[BN_NWORDS-1] = (ihw >> iws);\n}\n\nvoid\nbn_rshift1(bignum *bn)\n{\n#define bn_rshift1_inner1(i)\t\t\t\t\t\t\\\n\t\tbn->d[i] = (bn->d[i+1] << 31) | (bn->d[i] >> 1);\n\tbn_unroll_sl(bn_rshift1_inner1);\n\tbn->d[BN_NWORDS-1] >>= 1;\n}\n\nvoid\nbn_rshift1_2(bignum *bna, bignum *bnb)\n{\n#define bn_rshift1_2_inner1(i)\t\t\t\t\t\t\\\n\t\tbna->d[i] = (bna->d[i+1] << 31) | (bna->d[i] >> 1);\t\\\n\t\tbnb->d[i] = (bnb->d[i+1] << 31) | (bnb->d[i] >> 1);\n\tbn_unroll_sl(bn_rshift1_2_inner1);\n\tbna->d[BN_NWORDS-1] >>= 1;\n\tbnb->d[BN_NWORDS-1] >>= 1;\n}\n\n\n/*\n * Unsigned comparison\n */\n\nint\nbn_ucmp_ge(bignum *a, bignum *b)\n{\n\tint l = 0, g = 0;\n\n#define bn_ucmp_ge_inner1(i)\t\t\t\t\\\n\t\tif (a->d[i] < b->d[i]) l |= (1 << i);\t\\\n\t\tif (a->d[i] > b->d[i]) g |= (1 << i);\n\tbn_unroll_reverse(bn_ucmp_ge_inner1);\n\treturn (l > g) ? 0 : 1;\n}\n\nint\nbn_ucmp_ge_c(bignum *a, __constant bn_word *b)\n{\n\tint l = 0, g = 0;\n\n#define bn_ucmp_ge_c_inner1(i)\t\t\t\t\\\n\t\tif (a->d[i] < b[i]) l |= (1 << i);\t\\\n\t\tif (a->d[i] > b[i]) g |= (1 << i);\n\tbn_unroll_reverse(bn_ucmp_ge_c_inner1);\n\treturn (l > g) ? 0 : 1;\n}\n\n/*\n * Negate\n */\n\nvoid\nbn_neg(bignum *n)\n{\n\tint c = 1;\n\n#define bn_neg_inner1(i)\t\t\t\t\\\n\t\tc = (n->d[i] = (~n->d[i]) + c) ? 0 : c;\n\tbn_unroll(bn_neg_inner1);\n}\n\n/*\n * Add/subtract\n */\n\n#define bn_add_word(r, a, b, t, c) do {\t\t\\\n\t\tt = a + b;\t\t\t\\\n\t\tc = (t < a) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\n#define bn_addc_word(r, a, b, t, c) do {\t\t\t\\\n\t\tt = a + b + c;\t\t\t\t\t\\\n\t\tc = (t < a) ? 1 : ((c & (t == a)) ? 1 : 0);\t\\\n\t\tr = t;\t\t\t\t\t\t\\\n\t} while (0)\n\nbn_word\nbn_uadd_words_seq(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbn_word t, c = 0;\n\n#define bn_uadd_words_seq_inner1(i)\t\t\t\\\n\t\tbn_addc_word(r[i], a[i], b[i], t, c);\n\tbn_add_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_uadd_words_seq_inner1);\n\treturn c;\n}\n\nbn_word\nbn_uadd_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbn_word t, c = 0;\n\n\tbn_add_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_uadd_words_seq_inner1);\n\treturn c;\n}\n\n#define bn_sub_word(r, a, b, t, c) do {\t\t\\\n\t\tt = a - b;\t\t\t\\\n\t\tc = (a < b) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\n#define bn_subb_word(r, a, b, t, c) do {\t\\\n\t\tt = a - (b + c);\t\t\\\n\t\tc = (!(a) && c) ? 1 : 0;\t\\\n\t\tc |= (a < b) ? 1 : 0;\t\t\\\n\t\tr = t;\t\t\t\t\\\n\t} while (0)\n\nbn_word\nbn_usub_words_seq(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbn_word t, c = 0;\n\n#define bn_usub_words_seq_inner1(i)\t\t\t\\\n\t\tbn_subb_word(r[i], a[i], b[i], t, c);\n\n\tbn_sub_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_usub_words_seq_inner1);\n\treturn c;\n}\n\nbn_word\nbn_usub_words_c_seq(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbn_word t, c = 0;\n\n\tbn_sub_word(r[0], a[0], b[0], t, c);\n\tbn_unroll_sf(bn_usub_words_seq_inner1);\n\treturn c;\n}\n\n/*\n * Add/subtract better suited for AMD's VLIW architecture\n */\nbn_word\nbn_uadd_words_vliw(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n#define bn_uadd_words_vliw_inner1(i)\t\t\\\n\t\tx.d[i] = a[i] + b[i];\n\n#define bn_uadd_words_vliw_inner2(i)\t\t\t\\\n\t\tc |= (a[i] > x.d[i]) ? (1 << i) : 0;\t\\\n\t\tcp |= (!~x.d[i]) ? (1 << i) : 0;\n\n#define bn_uadd_words_vliw_inner3(i)\t\t\\\n\t\tr[i] = x.d[i] + ((c >> i) & 1);\n\n\tbn_unroll(bn_uadd_words_vliw_inner1);\n\tbn_unroll(bn_uadd_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_uadd_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_uadd_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n\tbn_unroll(bn_uadd_words_vliw_inner1);\n\tbn_unroll(bn_uadd_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_uadd_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_usub_words_vliw(bn_word *r, bn_word *a, bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n#define bn_usub_words_vliw_inner1(i)\t\t\\\n\t\tx.d[i] = a[i] - b[i];\n\n#define bn_usub_words_vliw_inner2(i)\t\t\t\\\n\t\tc |= (a[i] < b[i]) ? (1 << i) : 0;\t\\\n\t\tcp |= (!x.d[i]) ? (1 << i) : 0;\n\n#define bn_usub_words_vliw_inner3(i)\t\t\\\n\t\tr[i] = x.d[i] - ((c >> i) & 1);\n\n\tbn_unroll(bn_usub_words_vliw_inner1);\n\tbn_unroll(bn_usub_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_usub_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\nbn_word\nbn_usub_words_c_vliw(bn_word *r, bn_word *a, __constant bn_word *b)\n{\n\tbignum x;\n\tbn_word c = 0, cp = 0;\n\n\tbn_unroll(bn_usub_words_vliw_inner1);\n\tbn_unroll(bn_usub_words_vliw_inner2);\n\tc = ((cp + (c << 1)) ^ cp);\n\tr[0] = x.d[0];\n\tbn_unroll_sf(bn_usub_words_vliw_inner3);\n\treturn c >> BN_NWORDS;\n}\n\n\n#if defined(DEEP_VLIW)\n#define bn_uadd_words bn_uadd_words_vliw\n#define bn_uadd_words_c bn_uadd_words_c_vliw\n#define bn_usub_words bn_usub_words_vliw\n#define bn_usub_words_c bn_usub_words_c_vliw\n#else\n#define bn_uadd_words bn_uadd_words_seq\n#define bn_uadd_words_c bn_uadd_words_c_seq\n#define bn_usub_words bn_usub_words_seq\n#define bn_usub_words_c bn_usub_words_c_seq\n#endif\n\n#define bn_uadd(r, a, b) bn_uadd_words((r)->d, (a)->d, (b)->d)\n#define bn_uadd_c(r, a, b) bn_uadd_words_c((r)->d, (a)->d, b)\n#define bn_usub(r, a, b) bn_usub_words((r)->d, (a)->d, (b)->d)\n#define bn_usub_c(r, a, b) bn_usub_words_c((r)->d, (a)->d, b)\n\n\n/*\n * Modular add/sub\n */\n\nvoid\nbn_mod_add(bignum *r, bignum *a, bignum *b)\n{\n\tif (bn_uadd(r, a, b) ||\n\t    (bn_ucmp_ge_c(r, modulus)))\n\t\tbn_usub_c(r, r, modulus);\n}\n\nvoid\nbn_mod_sub(bignum *r, bignum *a, bignum *b)\n{\n\tif (bn_usub(r, a, b))\n\t\tbn_uadd_c(r, r, modulus);\n}\n\nvoid\nbn_mod_lshift1(bignum *bn)\n{\n\tbn_word c = (bn->d[BN_NWORDS-1] & 0x80000000);\n\tbn_lshift1(bn);\n\tif (c || (bn_ucmp_ge_c(bn, modulus)))\n\t\tbn_usub_c(bn, bn, modulus);\n}\n\n/*\n * Montgomery multiplication\n *\n * This includes normal multiplication of two \"Montgomeryized\"\n * bignums, and bn_from_mont for de-Montgomeryizing a bignum.\n */\n\n#define bn_mul_word(r, a, w, c, p, s) do { \\\n\t\tr = (a * w) + c;\t   \\\n\t\tp = mul_hi(a, w);\t   \\\n\t\tc = (r < c) ? p + 1 : p;   \\\n\t} while (0)\n\n#define bn_mul_add_word(r, a, w, c, p, s) do {\t\\\n\t\ts = r + c;\t\t\t\\\n\t\tp = mul_hi(a, w);\t\t\\\n\t\tr = (a * w) + s;\t\t\\\n\t\tc = (s < c) ? p + 1 : p;\t\\\n\t\tif (r < s) c++;\t\t\t\\\n\t} while (0)\nvoid\nbn_mul_mont(bignum *r, bignum *a, bignum *b)\n{\n\tbignum t;\n\tbn_word tea, teb, c, p, s, m;\n\n#if !defined(VERY_EXPENSIVE_BRANCHES)\n\tint q;\n#endif\n\n\tc = 0;\n#define bn_mul_mont_inner1(j)\t\t\t\t\t\\\n\t\tbn_mul_word(t.d[j], a->d[j], b->d[0], c, p, s);\n\tbn_unroll(bn_mul_mont_inner1);\n\ttea = c;\n\tteb = 0;\n\n\tc = 0;\n\tm = t.d[0] * mont_n0[0];\n\tbn_mul_add_word(t.d[0], modulus[0], m, c, p, s);\n#define bn_mul_mont_inner2(j)\t\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], modulus[j], m, c, p, s);\t\\\n\t\tt.d[j-1] = t.d[j];\n\tbn_unroll_sf(bn_mul_mont_inner2);\n\tt.d[BN_NWORDS-1] = tea + c;\n\ttea = teb + ((t.d[BN_NWORDS-1] < c) ? 1 : 0);\n\n#define bn_mul_mont_inner3_1(i, j)\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], a->d[j], b->d[i], c, p, s);\n#define bn_mul_mont_inner3_2(i, j)\t\t\t\t\t\\\n\t\tbn_mul_add_word(t.d[j], modulus[j], m, c, p, s);\t\\\n\t\tt.d[j-1] = t.d[j];\n#define bn_mul_mont_inner3(i)\t\t\t\t \\\n\tc = 0;\t\t\t\t\t\t \\\n\tbn_unroll_arg(bn_mul_mont_inner3_1, i);\t\t \\\n\ttea += c;\t\t\t\t\t \\\n\tteb = ((tea < c) ? 1 : 0);\t\t\t \\\n\tc = 0;\t\t\t\t\t\t \\\n\tm = t.d[0] * mont_n0[0];\t\t\t \\\n\tbn_mul_add_word(t.d[0], modulus[0], m, c, p, s); \\\n\tbn_unroll_arg_sf(bn_mul_mont_inner3_2, i);\t \\\n\tt.d[BN_NWORDS-1] = tea + c;\t\t\t \\\n\ttea = teb + ((t.d[BN_NWORDS-1] < c) ? 1 : 0);\n\n\t/*\n\t * The outer loop here is quite long, and we won't unroll it\n\t * unless VERY_EXPENSIVE_BRANCHES is set.\n\t */\n#if defined(VERY_EXPENSIVE_BRANCHES)\n\tbn_unroll_sf(bn_mul_mont_inner3);\n\tc = tea | !bn_usub_c(r, &t, modulus);\n\tif (!c)\n\t\t*r = t;\n\n#else\n\tfor (q = 1; q < BN_NWORDS; q++) {\n\t\tbn_mul_mont_inner3(q);\n\t}\n\tc = tea || (t.d[BN_NWORDS-1] >= modulus[BN_NWORDS-1]);\n\tif (c) {\n\t\tc = tea | !bn_usub_c(r, &t, modulus);\n\t\tif (c)\n\t\t\treturn;\n\t}\n\t*r = t;\n#endif\n}\n\nvoid\nbn_from_mont(bignum *rb, bignum *b)\n{\n#define WORKSIZE ((2*BN_NWORDS) + 1)\n\tbn_word r[WORKSIZE];\n\tbn_word m, c, p, s;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n\t/* Copy the input to the working area */\n\t/* Zero the upper words */\n#define bn_from_mont_inner1(i)\t\t\t\\\n\tr[i] = b->d[i];\n#define bn_from_mont_inner2(i)\t\t\t\\\n\tr[BN_NWORDS+i] = 0;\n\n\tbn_unroll(bn_from_mont_inner1);\n\tbn_unroll(bn_from_mont_inner2);\n\tr[WORKSIZE-1] = 0;\n\n\t/* Multiply (long) by modulus */\n#define bn_from_mont_inner3_1(i, j) \\\n\tbn_mul_add_word(r[i+j], modulus[j], m, c, p, s);\n\n#if !defined(VERY_EXPENSIVE_BRANCHES)\n#define bn_from_mont_inner3_2(i)\t\t\\\n\tif (r[BN_NWORDS + i] < c)\t\t\\\n\t\tr[BN_NWORDS + i + 1] += 1;\n#else\n#define bn_from_mont_inner3_2(i)\t\t\t\t\\\n\tr[BN_NWORDS + i + 1] += (r[BN_NWORDS + i] < c) ? 1 : 0;\n#endif\n\n#define bn_from_mont_inner3(i)\t\t\t \\\n\tm = r[i] * mont_n0[0];\t\t\t \\\n\tc = 0;\t\t\t\t\t \\\n\tbn_unroll_arg(bn_from_mont_inner3_1, i); \\\n\tr[BN_NWORDS + i] += c;\t\t\t \\\n\tbn_from_mont_inner3_2(i)\n\n\t/*\n\t * The outer loop here is not very long, so we will unroll\n\t * it by default.  However, it's just complicated enough to\n\t * cause NVIDIA's compiler to take unreasonably long to compile\n\t * it, unless we use pragma unroll.\n\t */\n#if !defined(PRAGMA_UNROLL)\n\tbn_iter(bn_from_mont_inner3);\n#else\n#pragma unroll 8\n\tfor (i = 0; i < BN_NWORDS; i++) { bn_from_mont_inner3(i) }\n#endif\n\n\t/*\n\t * Make sure the result is less than the modulus.\n\t * Subtracting is not much more expensive than compare, so\n\t * subtract always and assign based on the carry out value.\n\t */\n\tc = bn_usub_words_c(rb->d, &r[BN_NWORDS], modulus);\n\tif (c) {\n#define bn_from_mont_inner4(i)\t\t\t\t\\\n\t\t\trb->d[i] = r[BN_NWORDS + i];\n\t\tbn_unroll(bn_from_mont_inner4);\n\t}\n}\n\n/*\n * Modular inversion\n */\n\nvoid\nbn_mod_inverse(bignum *r, bignum *n)\n{\n\tbignum a, b, x, y;\n\tint shift;\n\tbn_word xc, yc;\n\tfor (shift = 0; shift < BN_NWORDS; shift++) {\n\t\ta.d[shift] = modulus[shift];\n\t\tx.d[shift] = 0;\n\t\ty.d[shift] = 0;\n\t}\n\tb = *n;\n\tx.d[0] = 1;\n\txc = 0;\n\tyc = 0;\n\twhile (!bn_is_zero(b)) {\n\t\tshift = 0;\n\t\twhile (!bn_is_odd(b)) {\n\t\t\tif (bn_is_odd(x))\n\t\t\t\txc += bn_uadd_c(&x, &x, modulus);\n\t\t\tbn_rshift1_2(&x, &b);\n\t\t\tx.d[7] |= (xc << 31);\n\t\t\txc >>= 1;\n\t\t}\n\n\t\twhile (!bn_is_odd(a)) {\n\t\t\tif (bn_is_odd(y))\n\t\t\t\tyc += bn_uadd_c(&y, &y, modulus);\n\t\t\tbn_rshift1_2(&y, &a);\n\t\t\ty.d[7] |= (yc << 31);\n\t\t\tyc >>= 1;\n\t\t}\n\n\t\tif (bn_ucmp_ge(&b, &a)) {\n\t\t\txc += yc + bn_uadd(&x, &x, &y);\n\t\t\tbn_usub(&b, &b, &a);\n\t\t} else {\n\t\t\tyc += xc + bn_uadd(&y, &y, &x);\n\t\t\tbn_usub(&a, &a, &b);\n\t\t}\n\t}\n\n\tif (!bn_is_one(a)) {\n\t\t/* no modular inverse */\n\t\t*r = bn_zero;\n\t} else {\n\t\t/* Compute y % m as cheaply as possible */\n\t\twhile (yc < 0x80000000)\n\t\t\tyc -= bn_usub_c(&y, &y, modulus);\n\t\tbn_neg(&y);\n\t\t*r = y;\n\t}\n}\n\n/*\n * HASH FUNCTIONS\n *\n * BYTE ORDER NOTE: None of the hash functions below deal with byte\n * order.  The caller is expected to be aware of this when it stuffs\n * data into in the native integer.\n *\n * NOTE #2: Endianness of the OpenCL device makes no difference here.\n */\n\n#define hash256_unroll(a) unroll_8(a)\n#define hash160_unroll(a) unroll_5(a)\n#define hash256_iter(a) iter_8(a)\n#define hash160_iter(a) iter_5(a)\n\n\n/*\n * SHA-2 256\n *\n * CAUTION: Input buffer will be overwritten/mangled.\n * Data expected in big-endian format.\n * This implementation is designed for space efficiency more than\n * raw speed.\n */\n\n__constant uint sha2_init[8] = {\n\t0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n\t0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n};\n\n__constant uint sha2_k[64] = {\n\t0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n\t0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n\t0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n\t0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n\t0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n\t0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n\t0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n\t0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n\t0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n\t0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n\t0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n\t0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n\t0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n\t0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n\t0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n\t0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n};\n\nvoid\nsha2_256_init(uint *out)\n{\n#define sha2_256_init_inner_1(i) \\\n\tout[i] = sha2_init[i];\n\n\thash256_unroll(sha2_256_init_inner_1);\n}\n\n/* The state variable remapping is really contorted */\n#define sha2_stvar(vals, i, v) vals[(64+v-i) % 8]\n#define sha2_s0(a) (rotate(a, 30U) ^ rotate(a, 19U) ^ rotate(a, 10U))\n#define sha2_s1(a) (rotate(a, 26U) ^ rotate(a, 21U) ^ rotate(a, 7U))\n#if defined(AMD_BFI_INT)\n#pragma OPENCL EXTENSION cl_amd_media_ops : enable\n#define sha2_ch(a, b, c) amd_bytealign(a, b, c)\n#define sha2_ma(a, b, c) amd_bytealign((a^c), b, a)\n#else\n#define sha2_ch(a, b, c) (c ^ (a & (b ^ c)))\n#define sha2_ma(a, b, c) ((a & c) | (b & (a | c)))\n#endif\n\nvoid\nsha2_256_block(uint *out, uint *in)\n{\n\tuint state[8], t1, t2;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n#define sha2_256_block_inner_1(i) \\\n\tstate[i] = out[i];\n\thash256_unroll(sha2_256_block_inner_1);\n\n#define sha2_256_block_inner_2(i) \\\n\tif (i >= 16) {\t\t\t\t\t\t\t\\\n\t\tt1 = in[(i + 1) % 16];\t\t\t\t\t\\\n\t\tt2 = in[(i + 14) % 16];\t\t\t\t\t\\\n\t\tin[i % 16] += (in[(i + 9) % 16] +\t\t\t\\\n\t\t       (rotate(t1, 25U) ^ rotate(t1, 14U) ^ (t1 >> 3)) + \\\n\t\t       (rotate(t2, 15U) ^ rotate(t2, 13U) ^ (t2 >> 10))); \\\n\t}\t\t\t\t\t\t\t\t\\\n\tt1 = (sha2_stvar(state, i, 7) +\t\t\t\t\t\\\n\t      sha2_s1(sha2_stvar(state, i, 4)) +\t\t\t\\\n\t      sha2_ch(sha2_stvar(state, i, 4),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 5),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 6)) +\t\t\t\\\n\t      sha2_k[i] +\t\t\t\t\t\t\\\n\t      in[i % 16]);\t\t\t\t\t\t\\\n\tt2 = (sha2_s0(sha2_stvar(state, i, 0)) +\t\t\t\\\n\t      sha2_ma(sha2_stvar(state, i, 0),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 1),\t\t\t\t\\\n\t\t      sha2_stvar(state, i, 2)));\t\t\t\\\n\tsha2_stvar(state, i, 3) += t1;\t\t\t\t\t\\\n\tsha2_stvar(state, i, 7) = t1 + t2;\t\t\t\t\\\n\n#if !defined(PRAGMA_UNROLL)\n\titer_64(sha2_256_block_inner_2);\n#else\n#pragma unroll 64\n\tfor (i = 0; i < 64; i++) { sha2_256_block_inner_2(i) }\n#endif\n\n#define sha2_256_block_inner_3(i) \\\n\tout[i] += state[i];\n\n\thash256_unroll(sha2_256_block_inner_3);\n}\n\n\n/*\n * RIPEMD160\n *\n * Data expected in little-endian format.\n */\n\n__constant uint ripemd160_iv[] = {\n\t0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 };\n__constant uint ripemd160_k[] = {\n\t0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E };\n__constant uint ripemd160_kp[] = {\n\t0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000 };\n__constant uchar ripemd160_ws[] = {\n\t0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13,\n};\n__constant uchar ripemd160_wsp[] = {\n\t5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n};\n__constant uchar ripemd160_rl[] = {\n\t11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6,\n};\n__constant uchar ripemd160_rlp[] = {\n\t8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n};\n\n#define ripemd160_val(v, i, n) (v)[(80+(n)-(i)) % 5]\n#define ripemd160_valp(v, i, n) (v)[5 + ((80+(n)-(i)) % 5)]\n#if defined(AMD_BFI_INT)\n#define ripemd160_f0(x, y, z) (x ^ y ^ z)\n#define ripemd160_f1(x, y, z) amd_bytealign(x, y, z)\n#define ripemd160_f2(x, y, z) (z ^ (x | ~y))\n#define ripemd160_f3(x, y, z) amd_bytealign(z, x, y)\n#define ripemd160_f4(x, y, z) (x ^ (y | ~z))\n#else\n#define ripemd160_f0(x, y, z) (x ^ y ^ z)\n#define ripemd160_f1(x, y, z) ((x & y) | (~x & z))\n#define ripemd160_f2(x, y, z) (z ^ (x | ~y))\n#define ripemd160_f3(x, y, z) ((x & z) | (y & ~z))\n#define ripemd160_f4(x, y, z) (x ^ (y | ~z))\n#endif\n#define ripemd160_round(i, in, vals, f, fp, t) do {\t\t\t\\\n\t\tripemd160_val(vals, i, 0) =\t\t\t\t\\\n\t\t\trotate(ripemd160_val(vals, i, 0) +\t\t\\\n\t\t\t       f(ripemd160_val(vals, i, 1),\t\t\\\n\t\t\t\t ripemd160_val(vals, i, 2),\t\t\\\n\t\t\t\t ripemd160_val(vals, i, 3)) +\t\t\\\n\t\t\t       in[ripemd160_ws[i]] +\t\t\t\\\n\t\t\t       ripemd160_k[i / 16],\t\t\t\\\n\t\t\t       (uint)ripemd160_rl[i]) +\t\t\t\\\n\t\t\tripemd160_val(vals, i, 4);\t\t\t\\\n\t\tripemd160_val(vals, i, 2) =\t\t\t\t\\\n\t\t\trotate(ripemd160_val(vals, i, 2), 10U);\t\t\\\n\t\tripemd160_valp(vals, i, 0) =\t\t\t\t\\\n\t\t\trotate(ripemd160_valp(vals, i, 0) +\t\t\\\n\t\t\t       fp(ripemd160_valp(vals, i, 1),\t\t\\\n\t\t\t\t  ripemd160_valp(vals, i, 2),\t\t\\\n\t\t\t\t  ripemd160_valp(vals, i, 3)) +\t\t\\\n\t\t\t       in[ripemd160_wsp[i]] +\t\t\t\\\n\t\t\t       ripemd160_kp[i / 16],\t\t\t\\\n\t\t\t       (uint)ripemd160_rlp[i]) +\t\t\\\n\t\t\tripemd160_valp(vals, i, 4);\t\t\t\\\n\t\tripemd160_valp(vals, i, 2) =\t\t\t\t\\\n\t\t\trotate(ripemd160_valp(vals, i, 2), 10U);\t\\\n\t} while (0)\n\nvoid\nripemd160_init(uint *out)\n{\n#define ripemd160_init_inner_1(i) \\\n\tout[i] = ripemd160_iv[i];\n\n\thash160_unroll(ripemd160_init_inner_1);\n}\n\nvoid\nripemd160_block(uint *out, uint *in)\n{\n\tuint vals[10], t;\n#if defined(PRAGMA_UNROLL)\n\tint i;\n#endif\n\n#define ripemd160_block_inner_1(i) \\\n\tvals[i] = vals[i + 5] = out[i];\n\n\thash160_unroll(ripemd160_block_inner_1);\n\n#define ripemd160_block_inner_p0(i)\t\t\\\n\tripemd160_round(i, in, vals, \\\n\t\t\tripemd160_f0, ripemd160_f4, t);\n#define ripemd160_block_inner_p1(i)\t\t\\\n\tripemd160_round((16 + i), in, vals,\t\t\\\n\t\t\tripemd160_f1, ripemd160_f3, t);\n#define ripemd160_block_inner_p2(i)\t\t\\\n\tripemd160_round((32 + i), in, vals,\t\t\\\n\t\t\tripemd160_f2, ripemd160_f2, t);\n#define ripemd160_block_inner_p3(i)\t\t\\\n\tripemd160_round((48 + i), in, vals,\t\t\\\n\t\t\tripemd160_f3, ripemd160_f1, t);\n#define ripemd160_block_inner_p4(i)\t\t\\\n\tripemd160_round((64 + i), in, vals,\t\t\\\n\t\t\tripemd160_f4, ripemd160_f0, t);\n\n#if !defined(PRAGMA_UNROLL)\n\titer_16(ripemd160_block_inner_p0);\n\titer_16(ripemd160_block_inner_p1);\n\titer_16(ripemd160_block_inner_p2);\n\titer_16(ripemd160_block_inner_p3);\n\titer_16(ripemd160_block_inner_p4);\n#else\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p0(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p1(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p2(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p3(i); }\n#pragma unroll 16\n\tfor (i = 0; i < 16; i++) { ripemd160_block_inner_p4(i); }\n#endif\n\n\tt = out[1] + vals[2] + vals[8];\n\tout[1] = out[2] + vals[3] + vals[9];\n\tout[2] = out[3] + vals[4] + vals[5];\n\tout[3] = out[4] + vals[0] + vals[6];\n\tout[4] = out[0] + vals[1] + vals[7];\n\tout[0] = t;\n}\n\n\n\n#define ACCESS_BUNDLE 1024\n#define ACCESS_STRIDE (ACCESS_BUNDLE/BN_NWORDS)\n\n__kernel void\nec_add_grid(__global bn_word *points_out, __global bn_word *z_heap, \n\t    __global bn_word *row_in, __global bignum *col_in)\n{\n\tbignum rx, ry;\n\tbignum x1, y1, a, b, c, d, e, z;\n\tbn_word cy;\n\tint i, cell, start;\n\n\t/* Load the row increment point */\n\ti = 2 * get_global_id(1);\n\trx = col_in[i];\n\try = col_in[i+1];\n\n\tcell = get_global_id(0);\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\n#define ec_add_grid_inner_1(i) \\\n\tx1.d[i] = row_in[start + (i*ACCESS_STRIDE)];\n\n\tbn_unroll(ec_add_grid_inner_1);\n\tstart += (ACCESS_STRIDE/2);\n\n#define ec_add_grid_inner_2(i) \\\n\ty1.d[i] = row_in[start + (i*ACCESS_STRIDE)];\n\n\tbn_unroll(ec_add_grid_inner_2);\n\n\tbn_mod_sub(&z, &x1, &rx);\n\n\tcell += (get_global_id(1) * get_global_size(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\n#define ec_add_grid_inner_3(i) \\\n\tz_heap[start + (i*ACCESS_STRIDE)] = z.d[i];\n\n\tbn_unroll(ec_add_grid_inner_3);\n\n\tbn_mod_sub(&b, &y1, &ry);\n\tbn_mod_add(&c, &x1, &rx);\n\tbn_mod_add(&d, &y1, &ry);\n\tbn_mul_mont(&y1, &b, &b);\n\tbn_mul_mont(&x1, &z, &z);\n\tbn_mul_mont(&e, &c, &x1);\n\tbn_mod_sub(&y1, &y1, &e);\n\n\t/*\n\t * This disgusting code caters to the global memory unit on\n\t * various GPUs, by giving it a nice contiguous patch to write\n\t * per warp/wavefront.\n\t */\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\n#define ec_add_grid_inner_4(i) \\\n\tpoints_out[start + (i*ACCESS_STRIDE)] = y1.d[i];\n\n\tbn_unroll(ec_add_grid_inner_4);\n\n\tbn_mod_lshift1(&y1);\n\tbn_mod_sub(&y1, &e, &y1);\n\tbn_mul_mont(&y1, &y1, &b);\n\tbn_mul_mont(&a, &x1, &z);\n\tbn_mul_mont(&c, &d, &a);\n\tbn_mod_sub(&y1, &y1, &c);\n\tcy = 0;\n\tif (bn_is_odd(y1))\n\t\tcy = bn_uadd_c(&y1, &y1, modulus);\n\tbn_rshift1(&y1);\n\ty1.d[BN_NWORDS-1] |= (cy ? 0x80000000 : 0);\n\n\tstart += (ACCESS_STRIDE/2);\n\n\tbn_unroll(ec_add_grid_inner_4);\n}\n\n__kernel void\nheap_invert(__global bn_word *z_heap, int batch)\n{\n\tbignum a, b, c, z;\n\tint i, off, lcell, hcell, start;\n\n#define heap_invert_inner_load_a(j)\t\t\t\t\\\n\t\ta.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_load_b(j)\t\t\t\t\\\n\t\tb.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_load_z(j)\t\t\t\t\\\n\t\tz.d[j] = z_heap[start + j*ACCESS_STRIDE];\n#define heap_invert_inner_store_z(j)\t\t\t\t\\\n\t\tz_heap[start + j*ACCESS_STRIDE] = z.d[j];\n#define heap_invert_inner_store_c(j)\t\t\t\t\\\n\t\tz_heap[start + j*ACCESS_STRIDE] = c.d[j];\n\n\toff = get_global_size(0);\n\tlcell = get_global_id(0);\n\thcell = (off * batch) + lcell;\n\tfor (i = 0; i < (batch-1); i++) {\n\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_load_a);\n\n\t\tlcell += off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_load_b);\n\n\t\tbn_mul_mont(&z, &a, &b);\n\n\t\tstart = (((hcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (hcell % ACCESS_STRIDE));\n\n\t\tbn_unroll(heap_invert_inner_store_z);\n\n\t\tlcell += off;\n\t\thcell += off;\n\t}\n\n\t/* Invert the root, fix up 1/ZR -> R/Z */\n\tbn_mod_inverse(&z, &z);\n\n#define heap_invert_inner_1(i)\t\t\t\\\n\ta.d[i] = mont_rr[i];\n\n\tbn_unroll(heap_invert_inner_1);\n\n\tbn_mul_mont(&z, &z, &a);\n\tbn_mul_mont(&z, &z, &a);\n\n\t/* Unroll the first iteration to avoid a load/store on the root */\n\tlcell -= (off << 1);\n\thcell -= (off << 1);\n\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_load_a);\n\n\tlcell += off;\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_load_b);\n\n\tbn_mul_mont(&c, &a, &z);\n\n\tbn_unroll(heap_invert_inner_store_c);\n\n\tbn_mul_mont(&c, &b, &z);\n\n\tlcell -= off;\n\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (lcell % ACCESS_STRIDE));\n\tbn_unroll(heap_invert_inner_store_c);\n\n\tlcell -= (off << 1);\n\n\tfor (i = 0; i < (batch-2); i++) {\n\t\tstart = (((hcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (hcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_z);\n\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_a);\n\n\t\tlcell += off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_load_b);\n\n\t\tbn_mul_mont(&c, &a, &z);\n\n\t\tbn_unroll(heap_invert_inner_store_c);\n\n\t\tbn_mul_mont(&c, &b, &z);\n\n\t\tlcell -= off;\n\t\tstart = (((lcell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t\t (lcell % ACCESS_STRIDE));\n\t\tbn_unroll(heap_invert_inner_store_c);\n\n\t\tlcell -= (off << 1);\n\t\thcell -= off;\n\t}\n}\n\n\n\nvoid\nhash_ec_point2(uint *hash_out, bignum *hx, bignum * hy, bn_word wh)\n{\n\tuint hash1[16], hash2[16];\n\n#define hash_ec_point2_inner_1(i)\t\t\t\\\n\thash1[i] = hx->d[i];\t\t\t\t\t\\\n\thash1[BN_NWORDS+i]=hy->d[i];\n\n\tbn_unroll(hash_ec_point2_inner_1);\n\n\t/*\n\t * Hash the first 64 bytes of the buffer\n\t */\n\tsha2_256_init(hash2);\n\tsha2_256_block(hash2, hash1);\n\n\t/*\n\t * Hash the last byte of the buffer + SHA-2 padding\n\t */\n\t\n\thash1[0] = wh << 24 | 0x800000;\n\thash1[1] = 0;\n\thash1[2] = 0;\n\thash1[3] = 0;\n\thash1[4] = 0;\n\thash1[5] = 0;\n\thash1[6] = 0;\n\thash1[7] = 0;\n\thash1[8] = 0;\n\thash1[9] = 0;\n\thash1[10] = 0;\n\thash1[11] = 0;\n\thash1[12] = 0;\n\thash1[13] = 0;\n\thash1[14] = 0;\n\thash1[15] = 65 * 8;\n\tsha2_256_block(hash2, hash1);\n\n\t/*\n\t * Hash the SHA-2 result with RIPEMD160\n\t * Unfortunately, SHA-2 outputs big-endian, but\n\t * RIPEMD160 expects little-endian.  Need to swap!\n\t */\n\n#define hash_ec_point2_inner_2(i)\t\t\\\n\thash2[i] = bswap32(hash2[i]);\n\n\thash256_unroll(hash_ec_point2_inner_2);\n\n\thash2[8] = bswap32(0x80000000);\n\thash2[9] = 0;\n\thash2[10] = 0;\n\thash2[11] = 0;\n\thash2[12] = 0;\n\thash2[13] = 0;\n\thash2[14] = 32 * 8;\n\thash2[15] = 0;\n\tripemd160_init(hash_out);\n\tripemd160_block(hash_out, hash2);\n\t\n}\n\n\nvoid\nhash_ec_point(uint *hash_out, bignum *x, bignum * y){\n\tbignum hx, hy, yn;\n\tbn_word wh, wl;\n\n\twh = 0x00000004;  /* POINT_CONVERSION_UNCOMPRESSED */\n\n#define hash_ec_point_inner_x(i)\t\t\\\n\twl = wh;\t\t\t\t\\\n\twh = x->d[(BN_NWORDS - 1) - i];\t\t\\\n\thx.d[i] = (wl << 24) | (wh >> 8);\n\n\tbn_unroll(hash_ec_point_inner_x);\n\n\n#define hash_ec_point_inner_y(i)\t\t\t\\\n\twl = wh;\t\t\t\t\t\\\n\twh = y->d[(BN_NWORDS - 1) - i];\t\t\t\\\n\thy.d[i] = (wl << 24) | (wh >> 8);\n\n\tbn_unroll(hash_ec_point_inner_y);\n\n\thash_ec_point2(hash_out, &hx, &hy, wh);\n\n}\n\n\n\nvoid\ncheck_hash(__global uint *found, __global uint *tree, uint * hash, uint cell){\n\n\thash[0] = load_be32(bswap32(hash[0]));\n\thash[1] = load_be32(bswap32(hash[1]));\n\thash[2] = load_be32(bswap32(hash[2]));\n\thash[3] = load_be32(bswap32(hash[3]));\n\thash[4] = load_be32(bswap32(hash[4]));\n\n\tuint hpos, pos, pos_next;\n\tuchar a, b, c;\n\tuchar * h = hash;\n\ta = h[0];\n\tb = h[1];\n\tc = h[2];\n\thpos = 1 + (a + b*256 + c*256*256);\n\n\tpos = tree[hpos];\n\tpos_next = pos;\n\twhile(pos_next>0){\n\t\tpos = pos_next;\n\t\tpos_next = (tree[pos + 5]);\n\t\tif((hash[0] == tree[pos] && hash[1] == tree[pos+1] && hash[2] == tree[pos+2] && hash[3] == tree[pos+3] && hash[4] == tree[pos+4])){\n\t\t\tfound[0] = cell;\n\t\t\tfound[1] = pos;\n\t\t\tfound[2] = hpos;\n\n\t\t\tfound[3] = hash[0];\n\t\t\tfound[4] = hash[1];\n\t\t\tfound[5] = hash[2];\n\t\t\tfound[6] = hash[3];\n\t\t\tfound[7] = hash[4];\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n}\n\n\n\n\n\n__kernel void\nhash_and_check(__global uint *found,\n\t\t\t    __global bn_word *xy,\n\t\t\t    __global bn_word *z,\n\t\t\t    __global uint *tree)\n{\n\tuint h[5];\n\tint i, cell, start;\n\tbignum x,y, zi, zzi;\n\n\tcell = ((get_global_id(1) * get_global_size(0)) + get_global_id(0));\n\tstart = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % ACCESS_STRIDE));\n\tz += start;\n\n\tstart = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\n\t\t (cell % (ACCESS_STRIDE/2)));\n\txy += start;\n\n#define processing_inner_z(i)\t\t\\\n\tzi.d[i] = z[i*ACCESS_STRIDE];\n\tbn_unroll(processing_inner_z);\n\n\tbn_mul_mont(&zzi, &zi, &zi);  /* 1 / Z^2 */\n\n#define processing_inner_x(i)\t\t\\\n\tx.d[i] = xy[i*ACCESS_STRIDE];\n\tbn_unroll(processing_inner_x);\n\tbn_mul_mont(&x, &x, &zzi);  /* X / Z^2 */\n\tbn_from_mont(&x, &x);\n\n\n\tbn_mul_mont(&zzi, &zzi, &zi);  /* 1 / Z^3 */\n#define processing_inner_y(i)\t\t\t\t\\\n\ty.d[i] = xy[(ACCESS_STRIDE/2) + i*ACCESS_STRIDE];\n\tbn_unroll(processing_inner_y);\n\n\tbn_mul_mont(&y, &y, &zzi);  /* Y / Z^3 */\n\tbn_from_mont(&y, &y);\n\n\t/* Complete the coordinates and check hash */\n\n\thash_ec_point(h, &x, &y);\n\tcheck_hash(found, tree, h, cell);\n\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AbstractPlaintextFileTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.nio.file.Files;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport org.jspecify.annotations.NonNull;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\nimport org.lmdbjava.LmdbException;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.empty;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.hasSize;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.mockito.Mockito.mock;\r\n\r\npublic class AbstractPlaintextFileTest {\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"readFile\">\r\n    @Test\r\n    public void readFile_emptyFile_processLineNeverCalled() throws IOException {\r\n        // arrange\r\n        File emptyFile = folder.newFile(\"empty.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(emptyFile, readStatistic);\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(sut.processedLines, is(empty()));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_singleLine_processLineCalledOnceWithCorrectContent() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"single.txt\");\r\n        Files.writeString(file.toPath(), \"hello world\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(file, readStatistic);\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(sut.processedLines, hasSize(1));\r\n        assertThat(sut.processedLines.get(0), is(equalTo(\"hello world\")));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_multipleLines_processLineCalledForEachLine() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"multi.txt\");\r\n        Files.writeString(file.toPath(), \"line1\\nline2\\nline3\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(file, readStatistic);\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(sut.processedLines, hasSize(3));\r\n        assertThat(sut.processedLines.get(0), is(equalTo(\"line1\")));\r\n        assertThat(sut.processedLines.get(1), is(equalTo(\"line2\")));\r\n        assertThat(sut.processedLines.get(2), is(equalTo(\"line3\")));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_processLineThrowsRuntimeException_errorAddedToReadStatistic() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"error.txt\");\r\n        Files.writeString(file.toPath(), \"bad line\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        ThrowingPlaintextFile sut = new ThrowingPlaintextFile(file, readStatistic, new RuntimeException(\"parse error\"));\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(readStatistic.errors, hasSize(1));\r\n        assertThat(readStatistic.errors.get(0), is(equalTo(\"bad line\")));\r\n    }\r\n\r\n    @Test(expected = LmdbException.class)\r\n    public void readFile_processLineThrowsLmdbException_exceptionPropagated() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"lmdb.txt\");\r\n        Files.writeString(file.toPath(), \"some line\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        LmdbException mockLmdbException = mock(LmdbException.class);\r\n        ThrowingPlaintextFile sut = new ThrowingPlaintextFile(file, readStatistic, mockLmdbException);\r\n\r\n        // act\r\n        sut.readFile();\r\n    }\r\n\r\n    @Test\r\n    public void readFile_multipleExceptionLines_allErrorsAddedToReadStatistic() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"multierror.txt\");\r\n        Files.writeString(file.toPath(), \"bad1\\nbad2\\nbad3\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        ThrowingPlaintextFile sut = new ThrowingPlaintextFile(file, readStatistic, new RuntimeException(\"error\"));\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(readStatistic.errors, hasSize(3));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"interrupt\">\r\n    @Test\r\n    public void interrupt_calledBeforeReadFile_readFileProcessesNoLines() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"lines.txt\");\r\n        Files.writeString(file.toPath(), \"line1\\nline2\\nline3\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(file, readStatistic);\r\n\r\n        // act\r\n        sut.interrupt();\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(sut.processedLines, is(empty()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"calculateFileProgress\">\r\n    @Test\r\n    public void readFile_singleLineFile_fileProgressIsSetToNonZero() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"progress.txt\");\r\n        Files.writeString(file.toPath(), \"content\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(file, readStatistic);\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(readStatistic.currentFileProgress > 0.0, is(true));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_fileWithContent_fileProgressReachesHundredPercent() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"full.txt\");\r\n        Files.writeString(file.toPath(), \"line1\\nline2\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(file, readStatistic);\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(readStatistic.currentFileProgress, is(equalTo(100.0)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"utf8 encoding\">\r\n    @Test\r\n    public void readFile_asciiContent_contentPreserved() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"ascii.txt\");\r\n        Files.write(file.toPath(), \"simple ascii\".getBytes(StandardCharsets.ISO_8859_1));\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        RecordingPlaintextFile sut = new RecordingPlaintextFile(file, readStatistic);\r\n\r\n        // act\r\n        sut.readFile();\r\n\r\n        // assert\r\n        assertThat(sut.processedLines, hasSize(1));\r\n        assertThat(sut.processedLines.get(0), containsString(\"simple ascii\"));\r\n    }\r\n    // </editor-fold>\r\n\r\n    /**\r\n     * Concrete implementation of {@link AbstractPlaintextFile} for testing. Records all processed lines.\r\n     */\r\n    private static class RecordingPlaintextFile extends AbstractPlaintextFile {\r\n\r\n        final List<String> processedLines = new ArrayList<>();\r\n\r\n        RecordingPlaintextFile(@NonNull File file, @NonNull ReadStatistic readStatistic) {\r\n            super(file, readStatistic);\r\n        }\r\n\r\n        @Override\r\n        protected void processLine(String line) {\r\n            processedLines.add(line);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Concrete implementation of {@link AbstractPlaintextFile} for testing. Always throws the provided exception\r\n     * from {@link #processLine(String)}.\r\n     */\r\n    private static class ThrowingPlaintextFile extends AbstractPlaintextFile {\r\n\r\n        private final RuntimeException exceptionToThrow;\r\n\r\n        ThrowingPlaintextFile(@NonNull File file, @NonNull ReadStatistic readStatistic, RuntimeException exceptionToThrow) {\r\n            super(file, readStatistic);\r\n            this.exceptionToThrow = exceptionToThrow;\r\n        }\r\n\r\n        @Override\r\n        protected void processLine(String line) {\r\n            throw exceptionToThrow;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AbstractProducerTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.util.List;\r\nimport java.util.Random;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducer;\r\nimport org.apache.commons.codec.DecoderException;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.runner.RunWith;\r\nimport org.mockito.ArgumentCaptor;\r\nimport static org.mockito.Mockito.mock;\r\nimport static org.mockito.Mockito.times;\r\nimport static org.mockito.Mockito.verify;\r\nimport static org.mockito.Mockito.when;\r\nimport org.slf4j.Logger;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class AbstractProducerTest {\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final BitHelper bitHelper = new BitHelper();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"initProducer\">\r\n    @Test\r\n    public void initProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        CProducer cProducer = new CProducer();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        verifyInitProducer(abstractProducerTestImpl);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"initProducer\">\r\n    @Test\r\n    public void releaseProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        CProducer cProducer = new CProducer();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        verifyReleaseProducer(abstractProducerTestImpl);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createSecretBase\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_CREATE_SECRET_BASE_LOGGED, location = CommonDataProvider.class)\r\n    public void createSecretBase_secretGiven_bitsKilledAndLogged(String givenSecret, int batchSizeInBits, String expectedSecretBase, String logInfo0, String logTrace0, String logTrace1, String logTrace2, String logTrace3, String logTrace4) throws IOException, InterruptedException, DecoderException {\r\n        // arrange\r\n        CProducer cProducer = new CProducer();\r\n        cProducer.batchSizeInBits = batchSizeInBits;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        Logger logger = mock(Logger.class);\r\n        when(logger.isTraceEnabled()).thenReturn(true);\r\n        abstractProducerTestImpl.setLogger(logger);\r\n\r\n        BigInteger secret = new BigInteger(1, Hex.decodeHex(givenSecret));\r\n        boolean logSecretBase = true;\r\n\r\n        // act\r\n        BigInteger secretBase = abstractProducerTestImpl.createSecretBase(secret, logSecretBase);\r\n\r\n        // assert\r\n        assertThat(keyUtility.bigIntegerToFixedLengthHex(secretBase), is(equalTo(expectedSecretBase)));\r\n\r\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\r\n        verify(logger, times(1)).info(logCaptor.capture());\r\n        verify(logger, times(5)).trace(logCaptor.capture());\r\n        List<String> arguments = logCaptor.getAllValues();\r\n        // assert log secret base\r\n        {\r\n            assertThat(arguments.get(0), is(equalTo(logInfo0)));\r\n        }\r\n        // assert log trace\r\n        {\r\n            assertThat(arguments.get(1), is(equalTo(logTrace0)));\r\n            assertThat(arguments.get(2), is(equalTo(logTrace1)));\r\n            assertThat(arguments.get(3), is(equalTo(logTrace2)));\r\n            assertThat(arguments.get(4), is(equalTo(logTrace3)));\r\n            assertThat(arguments.get(5), is(equalTo(logTrace4)));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    public void createSecretBase_secretGivenAndLogSecretBaseDisabledTraceEnabled_bitsKilledAndLogged() throws IOException, InterruptedException, DecoderException {\r\n        // arrange\r\n        CProducer cProducer = new CProducer();\r\n        cProducer.batchSizeInBits = 2;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        Logger logger = mock(Logger.class);\r\n        when(logger.isTraceEnabled()).thenReturn(true);\r\n        abstractProducerTestImpl.setLogger(logger);\r\n\r\n        BigInteger secret = new BigInteger(Hex.decodeHex(\"ABCDEF\"));\r\n        boolean logSecretBase = false;\r\n\r\n        // act\r\n        abstractProducerTestImpl.createSecretBase(secret, logSecretBase);\r\n\r\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\r\n        // assert\r\n        // assert log secret base\r\n        {\r\n            verify(logger, times(0)).info(logCaptor.capture());\r\n        }\r\n        // assert log trace\r\n        {\r\n            verify(logger, times(5)).trace(logCaptor.capture());\r\n        }\r\n    }\r\n\r\n    @Test\r\n    public void createSecretBase_secretGivenAndLogSecretBaseEnabledTraceDisabled_bitsKilledAndLogged() throws IOException, InterruptedException, DecoderException {\r\n        // arrange\r\n        CProducer cProducer = new CProducer();\r\n        cProducer.batchSizeInBits = 2;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        Logger logger = mock(Logger.class);\r\n        when(logger.isTraceEnabled()).thenReturn(false);\r\n        abstractProducerTestImpl.setLogger(logger);\r\n\r\n        BigInteger secret = new BigInteger(Hex.decodeHex(\"ABCDEF\"));\r\n        boolean logSecretBase = true;\r\n\r\n        // act\r\n        abstractProducerTestImpl.createSecretBase(secret, logSecretBase);\r\n\r\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\r\n        // assert\r\n        // assert log secret base\r\n        {\r\n            verify(logger, times(1)).info(logCaptor.capture());\r\n        }\r\n        // assert log trace\r\n        {\r\n            verify(logger, times(0)).trace(logCaptor.capture());\r\n        }\r\n    }\r\n    // </editor-fold>\r\n\r\n    static void verifyReleaseProducer(AbstractProducer abstractProducer) {\r\n        Logger logger = mock(Logger.class);\r\n        when(logger.isTraceEnabled()).thenReturn(true);\r\n        abstractProducer.setLogger(logger);\r\n        \r\n        abstractProducer.initProducer();\r\n        \r\n        // act\r\n        abstractProducer.releaseProducer();\r\n\r\n        // assert\r\n        assertThat(abstractProducer.state, is(equalTo(ProducerState.INITIALIZED)));\r\n        \r\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\r\n        verify(logger, times(2)).info(logCaptor.capture());\r\n        List<String> arguments = logCaptor.getAllValues();\r\n        // assert log initProducer\r\n        {\r\n            assertThat(arguments.get(1), is(equalTo(\"Release producer.\")));\r\n        }\r\n    }\r\n\r\n    static void verifyInitProducer(AbstractProducer abstractProducer) {\r\n        Logger logger = mock(Logger.class);\r\n        when(logger.isTraceEnabled()).thenReturn(true);\r\n        abstractProducer.setLogger(logger);\r\n        \r\n        // pre-assert\r\n        assertThat(abstractProducer.state, is(equalTo(ProducerState.UNINITIALIZED)));\r\n        \r\n        // act\r\n        abstractProducer.initProducer();\r\n\r\n        // assert\r\n        assertThat(abstractProducer.state, is(equalTo(ProducerState.INITIALIZED)));\r\n        \r\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\r\n        verify(logger, times(1)).info(logCaptor.capture());\r\n        List<String> arguments = logCaptor.getAllValues();\r\n        // assert log initProducer\r\n        {\r\n            assertThat(arguments.get(0), is(equalTo(\"Init producer.\")));\r\n        }\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"run\">\r\n    @Test(expected = IllegalStateException.class)\r\n    public void run_notInitialized_illegalStateExceptionThrown() throws IOException, InterruptedException {\r\n        // arrange\r\n        CProducer cProducer = new CProducer();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        abstractProducerTestImpl.run();\r\n    }\r\n\r\n    @Test\r\n    public void run_interruptedBeforeStarted_stateSetToNotRunning() throws IOException, InterruptedException {\r\n        // arrange\r\n        CProducer cProducer = new CProducer();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        Logger logger = mock(Logger.class);\r\n        abstractProducerTestImpl.setLogger(logger);\r\n        abstractProducerTestImpl.initProducer();\r\n        abstractProducerTestImpl.interrupt();\r\n\r\n        // act\r\n        abstractProducerTestImpl.run();\r\n\r\n        // assert\r\n        assertThat(abstractProducerTestImpl.state, is(equalTo(ProducerState.NOT_RUNNING)));\r\n\r\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\r\n        verify(logger, times(2)).info(logCaptor.capture());\r\n        List<String> arguments = logCaptor.getAllValues();\r\n        assertThat(arguments.get(1), is(equalTo(\"Producer was interrupted before it started running.\")));\r\n    }\r\n\r\n    @Test\r\n    public void run_exceptionInProduceKeys_exceptionCaughtAndLoggedToError() throws IOException, InterruptedException {\r\n        // arrange\r\n        CProducer cProducer = new CProducer();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n\r\n        AbstractProducerTestImpl abstractProducerTestImpl = new AbstractProducerTestImpl(cProducer, mockConsumer, keyUtility, mockKeyProducer, bitHelper) {\r\n            @Override\r\n            public void produceKeys() {\r\n                throw new RuntimeException(\"Test exception\");\r\n            }\r\n        };\r\n\r\n        Logger logger = mock(Logger.class);\r\n        abstractProducerTestImpl.setLogger(logger);\r\n        abstractProducerTestImpl.initProducer();\r\n\r\n        // act\r\n        abstractProducerTestImpl.run();\r\n\r\n        // assert\r\n        assertThat(abstractProducerTestImpl.state, is(equalTo(ProducerState.NOT_RUNNING)));\r\n\r\n        ArgumentCaptor<String> logCaptorMessage = ArgumentCaptor.forClass(String.class);\r\n        ArgumentCaptor<Exception> logCaptorException = ArgumentCaptor.forClass(Exception.class);\r\n        verify(logger, times(1)).error(logCaptorMessage.capture(), logCaptorException.capture());\r\n\r\n        List<String> arguments = logCaptorMessage.getAllValues();\r\n        List<Exception> exceptions = logCaptorException.getAllValues();\r\n\r\n        assertThat(arguments.get(0), is(equalTo(\"Error in produceKeys\")));\r\n        assertThat(exceptions.get(0).getMessage(), is(equalTo(\"Test exception\")));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AbstractProducerTestImpl.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducer;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\n\r\npublic class AbstractProducerTestImpl extends AbstractProducer {\r\n\r\n    public AbstractProducerTestImpl(CProducer cProducer, Consumer consumer, KeyUtility keyUtility, KeyProducer keyProducer, BitHelper bitHelper) {\r\n        super(cProducer, consumer, keyUtility, keyProducer, bitHelper);\r\n    }\r\n\r\n    @Override\r\n    public void produceKeys() {\r\n    }\r\n\r\n    @Override\r\n    public void processSecretBase(BigInteger secretBase) {\r\n    }\r\n\r\n    @Override\r\n    public void processSecrets(BigInteger[] secret) {\r\n    }\r\n    \r\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AddressFileTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2PKH;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2WPKH;\r\nimport org.apache.commons.io.FileUtils;\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\n/**\r\n * Unit tests for {@link AddressFile}.\r\n */\r\npublic class AddressFileTest {\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"processLine\">\r\n    @Test\r\n    public void processLine_validBitcoinAddress_addressConsumerCalledOnce() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<AddressToCoin> addressCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressCapture::add, line -> {});\r\n\r\n        // act\r\n        addressFile.processLine(P2PKH.Bitcoin.getPublicAddress());\r\n\r\n        // assert\r\n        assertThat(addressCapture.size(), is(equalTo(1)));\r\n        assertThat(addressCapture.get(0).type(), is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_validBitcoinAddress_readStatisticSuccessfulIncrements() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressToCoin -> {}, line -> {});\r\n\r\n        // act\r\n        addressFile.processLine(P2PKH.Bitcoin.getPublicAddress());\r\n\r\n        // assert\r\n        assertThat(readStatistic.successful, is(equalTo(1L)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_validSegwitAddress_addressConsumerCalledOnce() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<AddressToCoin> addressCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressCapture::add, line -> {});\r\n\r\n        // act\r\n        addressFile.processLine(P2WPKH.Bitcoin.getPublicAddress());\r\n\r\n        // assert\r\n        assertThat(addressCapture.size(), is(equalTo(1)));\r\n        assertThat(addressCapture.get(0).type(), is(equalTo(AddressType.P2WPKH)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_emptyLine_unsupportedConsumerReceivesEmptyString() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<String> unsupportedCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressToCoin -> {}, unsupportedCapture::add);\r\n\r\n        // act\r\n        addressFile.processLine(\"\");\r\n\r\n        // assert\r\n        assertThat(unsupportedCapture.size(), is(equalTo(1)));\r\n        assertThat(unsupportedCapture.get(0), is(equalTo(\"\")));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_emptyLine_readStatisticUnsupportedIncrements() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressToCoin -> {}, line -> {});\r\n\r\n        // act\r\n        addressFile.processLine(\"\");\r\n\r\n        // assert\r\n        assertThat(readStatistic.getUnsupportedTotal(), is(equalTo(1L)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_commentLine_unsupportedConsumerReceivesCommentString() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<String> unsupportedCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressToCoin -> {}, unsupportedCapture::add);\r\n\r\n        // act\r\n        addressFile.processLine(\"# this is a comment\");\r\n\r\n        // assert\r\n        assertThat(unsupportedCapture.size(), is(equalTo(1)));\r\n        assertThat(unsupportedCapture.get(0), is(equalTo(\"# this is a comment\")));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_addressHeaderLine_unsupportedConsumerReceivesHeaderString() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<String> unsupportedCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressToCoin -> {}, unsupportedCapture::add);\r\n\r\n        // act\r\n        addressFile.processLine(AddressTxtLine.ADDRESS_HEADER);\r\n\r\n        // assert\r\n        assertThat(unsupportedCapture.size(), is(equalTo(1)));\r\n        assertThat(unsupportedCapture.get(0), is(equalTo(AddressTxtLine.ADDRESS_HEADER)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_calledTwiceWithValidAddresses_successfulCountIsTwo() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<AddressToCoin> addressCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressCapture::add, line -> {});\r\n\r\n        // act\r\n        addressFile.processLine(P2PKH.Bitcoin.getPublicAddress());\r\n        addressFile.processLine(P2PKH.Litecoin.getPublicAddress());\r\n\r\n        // assert\r\n        assertThat(readStatistic.successful, is(equalTo(2L)));\r\n        assertThat(addressCapture.size(), is(equalTo(2)));\r\n        assertThat(addressCapture.get(0).type(), is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n        assertThat(addressCapture.get(1).type(), is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"readFile\">\r\n    @Test\r\n    public void readFile_fileWithOneBitcoinAddress_addressConsumerCalledOnce() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        FileUtils.writeStringToFile(file, P2PKH.Bitcoin.getPublicAddress() + \"\\n\", StandardCharsets.UTF_8.name());\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<AddressToCoin> addressCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressCapture::add, line -> {});\r\n\r\n        // act\r\n        addressFile.readFile();\r\n\r\n        // assert\r\n        assertThat(addressCapture.size(), is(equalTo(1)));\r\n        assertThat(addressCapture.get(0).type(), is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n        assertThat(readStatistic.successful, is(equalTo(1L)));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_emptyFile_consumersNeverCalled() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressToCoin -> {}, line -> {});\r\n\r\n        // act\r\n        addressFile.readFile();\r\n\r\n        // assert\r\n        assertThat(readStatistic.successful, is(equalTo(0L)));\r\n        assertThat(readStatistic.getUnsupportedTotal(), is(equalTo(0L)));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_mixedValidAndCommentLines_correctCountsUpdated() throws IOException {\r\n        // arrange\r\n        File file = folder.newFile(\"addresses.txt\");\r\n        String content = P2PKH.Bitcoin.getPublicAddress() + \"\\n\"\r\n                + \"# comment line\\n\"\r\n                + P2PKH.Litecoin.getPublicAddress() + \"\\n\";\r\n        FileUtils.writeStringToFile(file, content, StandardCharsets.UTF_8.name());\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<AddressToCoin> addressCapture = new ArrayList<>();\r\n        List<String> unsupportedCapture = new ArrayList<>();\r\n        AddressFile addressFile = new AddressFile(file, readStatistic, network, addressCapture::add, unsupportedCapture::add);\r\n\r\n        // act\r\n        addressFile.readFile();\r\n\r\n        // assert\r\n        assertThat(addressCapture.size(), is(equalTo(2)));\r\n        assertThat(addressCapture.get(0).type(), is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n        assertThat(addressCapture.get(1).type(), is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n        assertThat(readStatistic.successful, is(equalTo(2L)));\r\n        assertThat(unsupportedCapture.size(), is(equalTo(1)));\r\n        assertThat(unsupportedCapture.get(0), is(equalTo(\"# comment line\")));\r\n        assertThat(readStatistic.getUnsupportedTotal(), is(equalTo(1L)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AddressFilesToLMDBTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.ByteBuffer;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFilesToLMDB;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationWrite;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.Persistence;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.StaticAddressesFiles;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.*;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesFiles;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2PKH;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.bitcoinj.base.LegacyAddress;\r\nimport org.junit.Before;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.*;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\n\r\n/**\r\n * Direct unit tests for {@link AddressFilesToLMDB}.\r\n *\r\n * Tests the run() and interrupt() methods with parameterized test data from existing test providers.\r\n */\r\n@RunWith(DataProviderRunner.class)\r\npublic class AddressFilesToLMDBTest extends LMDBBase {\r\n\r\n    @Before\r\n    public void init() throws IOException {\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void addressFilesToLMDB_addressFileDoesNotExists_throwsIllegalArgumentException() throws IOException {\r\n        // arrange, act\r\n        CAddressFilesToLMDB addressFilesToLMDBConfigurationWrite = new CAddressFilesToLMDB();\r\n        \r\n        addressFilesToLMDBConfigurationWrite.addressesFiles.add(\"thisFileDoesNotExists.txt\");\r\n        addressFilesToLMDBConfigurationWrite.lmdbConfigurationWrite = new CLMDBConfigurationWrite();\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        String lmdbFolderPath = lmdbFolder.getAbsolutePath();\r\n        addressFilesToLMDBConfigurationWrite.lmdbConfigurationWrite.lmdbDirectory = lmdbFolderPath;\r\n        AddressFilesToLMDB addressFilesToLMDB = new AddressFilesToLMDB(addressFilesToLMDBConfigurationWrite);\r\n        addressFilesToLMDB.run();\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT, location = CommonDataProvider.class)\r\n    public void addressFilesToLMDB_createLMDB_containingTestAddressesHashesWithCorrectAmount(boolean compressed, boolean useStaticAmount) throws Exception {\r\n        // arrange, act\r\n        AddressesFiles addressesFiles = new TestAddressesFiles(compressed);\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(useStaticAmount, addressesFiles, false, false)) {\r\n            // assert\r\n            assertThat(persistence.count(), is(equalTo(6L)));\r\n\r\n            Coin[] amounts = new Coin[TestAddressesFiles.NUMBER_OF_ADRESSES];\r\n            String[] base58Adresses = addressesFiles.getTestAddresses().getAsBase58StringList().toArray(new String[0]);\r\n\r\n            for (int i = 0; i < amounts.length; i++) {\r\n                String base58Adresse = base58Adresses[i];\r\n                LegacyAddress fromBase58 = LegacyAddress.fromBase58(base58Adresse, network);\r\n                ByteBuffer hash160 = keyUtility.addressToByteBuffer(fromBase58);\r\n                amounts[i] = persistence.getAmount(hash160);\r\n                if (useStaticAmount) {\r\n                    assertThat(amounts[i], is(equalTo(Coin.ZERO)));\r\n                } else {\r\n                    assertThat(amounts[i], is(equalTo(TestAddressesFiles.AMOUNTS[i])));\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_STATIC_AMOUNT, location = CommonDataProvider.class)\r\n    public void addressFilesToLMDB_createLMDBWithStaticAddresses_containingStaticHashes(boolean useStaticAmount) throws Exception {\r\n        // arrange, act\r\n        StaticAddressesFiles staticAddressesFiles = new StaticAddressesFiles();\r\n\r\n        // assert\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(useStaticAmount, staticAddressesFiles, false, false)) {\r\n            assertThat(persistence.count(), is(equalTo((long)staticAddressesFiles.getSupportedAddresses().size())));\r\n            \r\n            for (P2PKH staticTestAddress : P2PKH.values()) {\r\n                ByteBuffer hash160AsByteBuffer = staticTestAddress.getPublicKeyHashAsByteBuffer();\r\n                boolean contains = persistence.containsAddress(hash160AsByteBuffer);\r\n                assertThat(contains, is(equalTo(Boolean.TRUE)));\r\n            }\r\n        }\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BLOOM_FILTER_ENABLED, location = CommonDataProvider.class)\r\n    public void containsAddress_behavesCorrectly_withOrWithoutBloomFilter(boolean useBloomFilter) throws Exception {\r\n        AddressesFiles addressesFiles = new TestAddressesFiles(true);\r\n\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(false, addressesFiles, false, useBloomFilter)) {\r\n            TestAddresses testAddresses = addressesFiles.getTestAddresses();\r\n            ByteBuffer hash160 = testAddresses.getIndexAsHash160ByteBuffer(0);\r\n\r\n            boolean contains = persistence.containsAddress(hash160);\r\n            assertThat(\"Should find known address\", contains, is(true));\r\n        }\r\n    }\r\n\r\n    /**\r\n     * I got in the past the exception:\r\n     * {@link java.nio.BufferUnderflowException} because zero values are stored with {@code byteBuffer.capacity() == 0}.\r\n     */\r\n    @Test\r\n    public void addressFilesToLMDB_addressWithAmountOfZero_noExceptionThrown() throws Exception {\r\n        // arrange, act\r\n        AddressesFileSpecialUsecases addressesFileSpecialUsecases = new AddressesFileSpecialUsecases();\r\n        //TestAddressesFiles testAddressesFiles = new TestAddressesFiles(true);\r\n\r\n        // assert\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(false, addressesFileSpecialUsecases, false, false)) {\r\n            assertThat(persistence.count(), is(equalTo((long)addressesFileSpecialUsecases.getAllAddresses().size())));\r\n            \r\n            TestAddresses testAddresses = addressesFileSpecialUsecases.getTestAddresses();\r\n            \r\n            for (int i = 0; i < testAddresses.getNumberOfAddresses(); i++) {\r\n                ByteBuffer hash160 = testAddresses.getIndexAsHash160ByteBuffer(i);\r\n                Coin amount = persistence.getAmount(hash160);\r\n                assertThat(amount, is(equalTo(Coin.ZERO)));\r\n                \r\n                boolean contains = persistence.containsAddress(hash160);\r\n                assertThat(contains, is(equalTo(Boolean.TRUE)));\r\n            }\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BLOOM_FILTER_ENABLED, location = CommonDataProvider.class)\r\n    public void containsAddress_returnsFalseForUnknownAddress(boolean useBloomFilter) throws Exception {\r\n        AddressesFiles addressesFiles = new TestAddressesFiles(true);\r\n\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(false, addressesFiles, false, useBloomFilter)) {\r\n            ByteBuffer hash160 = keyUtility.byteBufferUtility().byteArrayToByteBuffer(TestAddressesFiles.NON_EXISTING_ADDRESS);\r\n\r\n            boolean contains = persistence.containsAddress(hash160);\r\n            assertThat(\"containsAddress() must return false for a known non-existing address used for negative testing.\", contains, is(false));\r\n        }\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"interrupt() edge cases\">\r\n\r\n    @Test\r\n    public void interrupt_withNoCurrentFile_doesNotThrow() {\r\n        // arrange\r\n        CAddressFilesToLMDB config = new CAddressFilesToLMDB();\r\n        AddressFilesToLMDB importer = new AddressFilesToLMDB(config);\r\n\r\n        // act - should not throw exception\r\n        importer.interrupt();\r\n\r\n        // assert - method completed without exception\r\n    }\r\n\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AddressFormatNotAcceptedExceptionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.instanceOf;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link AddressFormatNotAcceptedException}.\r\n */\r\npublic class AddressFormatNotAcceptedExceptionTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_withReason_messageContainsReason() {\r\n        // arrange\r\n        String reason = \"address is empty\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(reason));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withReason_messageContainsExpectedPrefix() {\r\n        // arrange\r\n        String reason = \"unsupported format\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"Address format not accepted:\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withReason_messageEqualsExpected() {\r\n        // arrange\r\n        String reason = \"P2TR is not supported\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(\"Address format not accepted: \" + reason)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withReason_isInstanceOfException() {\r\n        // arrange\r\n        String reason = \"address is empty\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n\r\n        // assert\r\n        assertThat(exception, is(instanceOf(Exception.class)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withReason_noCause() {\r\n        // arrange\r\n        String reason = \"address is empty\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getReason\">\r\n    @Test\r\n    public void getReason_withReason_returnsReason() {\r\n        // arrange\r\n        String reason = \"address is null\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n        String actual = exception.getReason();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(reason)));\r\n    }\r\n\r\n    @Test\r\n    public void getReason_withEmptyReason_returnsEmptyString() {\r\n        // arrange\r\n        String reason = \"\";\r\n\r\n        // act\r\n        AddressFormatNotAcceptedException exception = new AddressFormatNotAcceptedException(reason);\r\n        String actual = exception.getReason();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(\"\")));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AddressToCoinTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport org.junit.Test;\n\nimport java.io.IOException;\nimport java.nio.ByteBuffer;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddresses42;\nimport org.bitcoinj.base.Coin;\nimport org.bitcoinj.base.Network;\nimport org.bitcoinj.crypto.ECKey;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\n\npublic class AddressToCoinTest {\n\n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(true));\n    \n    @Test\n    public void createAddressToCoin_publicKeyGiven_ToStringAndEqualsAndHashCode() throws IOException, InterruptedException {\n        // arrange\n        ECKey keyUncompressed = new TestAddresses42(1, false).getECKeys().get(0);\n        ECKey keyCompressed = new TestAddresses42(1, true).getECKeys().get(0);\n        \n        AddressToCoin addressToCoinUncompressed = new AddressToCoin(keyUtility.byteBufferUtility().byteArrayToByteBuffer(keyUncompressed.getPubKeyHash()), Coin.COIN, AddressType.P2PKH_OR_P2SH);\n        AddressToCoin addressToCoinUncompressed2 = new AddressToCoin(keyUtility.byteBufferUtility().byteArrayToByteBuffer(keyUncompressed.getPubKeyHash()), Coin.COIN, AddressType.P2PKH_OR_P2SH);\n        \n        AddressToCoin addressToCoinCompressed = new AddressToCoin(keyUtility.byteBufferUtility().byteArrayToByteBuffer(keyCompressed.getPubKeyHash()), Coin.COIN, AddressType.P2PKH_OR_P2SH);\n        AddressToCoin addressToCoinCompressed2 = new AddressToCoin(keyUtility.byteBufferUtility().byteArrayToByteBuffer(keyCompressed.getPubKeyHash()), Coin.COIN, AddressType.P2PKH_OR_P2SH);\n        \n        // assert\n        EqualHashCodeToStringTestHelper equalHashCodeToStringTestHelper = new EqualHashCodeToStringTestHelper(addressToCoinUncompressed, addressToCoinUncompressed2, addressToCoinCompressed, addressToCoinCompressed2);\n        equalHashCodeToStringTestHelper.assertEqualsHashCodeToStringAIsDifferentToB();\n\n        assertThat(addressToCoinUncompressed.toString(), is(equalTo(\"AddressToCoin{hash160=73d6a3b07f488e12f9175716f95c5e18c265693f, coin=100000000, type=P2PKH_OR_P2SH}\")));\n        assertThat(addressToCoinCompressed.toString(), is(equalTo(\"AddressToCoin{hash160=6970dea35c48e1c78e931117fab833354cddf9b4, coin=100000000, type=P2PKH_OR_P2SH}\")));\n    }\n    \n    @Test(expected = IllegalArgumentException.class)\n    public void createAddressToCoin_invalidAddressSizeGiven_ToStringAndEqualsAndHashCode() throws IOException, InterruptedException {\n        // arrange\n        ByteBuffer byteBuffer32bytes = keyUtility.byteBufferUtility().getByteBufferFromHex(\"0000000000000000000000000000000000000000000000000000000000000000\");\n        // act\n        new AddressToCoin(byteBuffer32bytes, Coin.COIN, AddressType.P2PKH_OR_P2SH);\n        // assert\n    }\n    \n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AddressTxtLineTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport org.apache.commons.codec.DecoderException;\r\nimport org.bitcoinj.base.Base58;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.bouncycastle.util.encoders.Hex;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.StaticKey;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddresses42;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2PKH;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2SH;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2WPKH;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.StaticUnsupportedAddress;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.*;\r\nimport static org.junit.Assert.fail;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class AddressTxtLineTest {\r\n\r\n    private final TestAddresses42 testAddresses = new TestAddresses42(0, false);\r\n\r\n    private final StaticKey staticKey = new StaticKey();\r\n    private final KeyUtility keyUtility = new KeyUtility(testAddresses.network, new ByteBufferUtility(false));\r\n\r\n    private void assertThatDefaultCoinIsSet(AddressToCoin addressToCoin) {\r\n        assertThat(addressToCoin.coin(), is(equalTo(AddressTxtLine.DEFAULT_COIN)));\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"fromLine\">\r\n    @Test\r\n    public void fromLine_addressLineIsEmpty_throwsAddressFormatNotAcceptedException() {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(\"\", keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_EMPTY));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    public void fromLine_addressLineStartsWithIgnoreLineSign_throwsAddressFormatNotAcceptedException() {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(AddressTxtLine.IGNORE_LINE_PREFIX + \" test\", keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_IGNORE_PREFIX));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    public void fromLine_addressLineIsOnlyIgnoreLineSign_throwsAddressFormatNotAcceptedException() {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(AddressTxtLine.IGNORE_LINE_PREFIX, keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_IGNORE_PREFIX));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    public void fromLine_uncompressedBitcoinAddressGiven_returnHash160AndDefaultCoin() throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(staticKey.publicKeyUncompressed, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(addressToCoin.hash160(), is(equalTo(staticKey.byteBufferPublicKeyUncompressed)));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n\r\n    @Test\r\n    public void fromLine_compressedBitcoinAddressGiven_returnHash160AndDefaultCoin() throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(staticKey.publicKeyCompressed, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(addressToCoin.hash160(), is(equalTo(staticKey.byteBufferPublicKeyCompressed)));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\r\n    public void fromLine_uncompressedBitcoinAddressGivenWithValidAmount_returnHash160AndSpecifiedCoin(String addressSeparator) throws AddressFormatNotAcceptedException {\r\n        // arrange\r\n        long coin = 123987L;\r\n\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(staticKey.publicKeyUncompressed + addressSeparator + coin, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(addressToCoin.hash160(), is(equalTo(staticKey.byteBufferPublicKeyUncompressed)));\r\n        assertThat(addressToCoin.coin(), is(equalTo(Coin.valueOf(coin))));\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\r\n    public void fromLine_uncompressedBitcoinAddressGivenWithInvalidAmount_returnHash160AndDefaultCoin(String addressSeparator) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(staticKey.publicKeyUncompressed + addressSeparator + \"XYZ\", keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(addressToCoin.hash160(), is(equalTo(staticKey.byteBufferPublicKeyUncompressed)));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n\r\n    @Test\r\n    public void fromLine_addressLineStartsWithAddressHeader_throwsAddressFormatNotAcceptedException() {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(AddressTxtLine.ADDRESS_HEADER, keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_ADDRESS_HEADER));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_STATIC_UNSUPPORTED_ADDRESSES, location = CommonDataProvider.class)\r\n    public void fromLine_staticUnsupportedAddress_throwsAddressFormatNotAcceptedException(StaticUnsupportedAddress address) {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(address.getPublicAddress(), keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), not(emptyOrNullString()));\r\n        }\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"staticaddresses.enums\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_STATIC_P2PKH_ADDRESSES, location = CommonDataProvider.class)\r\n    public void fromLine_staticP2PKHAddress_returnPublicKeyHash(P2PKH address) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(address.getPublicAddress(), keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(new ByteBufferUtility(true).getHexFromByteBuffer(addressToCoin.hash160()), is(equalTo(address.getPublicKeyHashAsHex())));\r\n        assertThat(addressToCoin.hash160(), is(equalTo(address.getPublicKeyHashAsByteBuffer())));\r\n        assertThat(addressToCoin.type(), is(AddressType.P2PKH_OR_P2SH));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_STATIC_P2SH_ADDRESSES, location = CommonDataProvider.class)\r\n    public void fromLine_staticP2SHAddress_returnScriptHash(P2SH address) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(address.getPublicAddress(), keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(new ByteBufferUtility(true).getHexFromByteBuffer(addressToCoin.hash160()), is(equalTo(address.getScriptHashAsHex())));\r\n        assertThat(addressToCoin.hash160(), is(equalTo(address.getScriptHashAsByteBuffer())));\r\n        assertThat(addressToCoin.type(), is(AddressType.P2PKH_OR_P2SH));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_STATIC_P2WPKH_ADDRESSES, location = CommonDataProvider.class)\r\n    public void fromLine_staticP2WPKHAddress_returnWitnessProgram(P2WPKH address) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(address.getPublicAddress(), keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(new ByteBufferUtility(true).getHexFromByteBuffer(addressToCoin.hash160()), is(equalTo(address.getWitnessProgramAsHex())));\r\n        assertThat(addressToCoin.hash160(), is(equalTo(address.getWitnessProgramAsByteBuffer())));\r\n        assertThat(addressToCoin.type(), is(AddressType.P2WPKH));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_INVALID_P2WPKH_ADDRESSES_VALID_BASE58, location = CommonDataProvider.class)\r\n    public void fromLine_invalidP2WPKHAddressWithValidBase58Given_parseAnyway(String base58, String hash) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(base58, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        assertThat(new ByteBufferUtility(true).getHexFromByteBuffer(addressToCoin.hash160()), is(equalTo(hash)));\r\n        assertThatDefaultCoinIsSet(addressToCoin);\r\n    }\r\n    // </editor-fold>\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_INVALID_BECH32_WITNESS_VERSION_2, location = CommonDataProvider.class)\r\n    public void fromLine_invalidBech32WitnessVersion2_throwsAddressFormatNotAcceptedException(String base58) {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(base58, keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_UNSUPPORTED_WITNESS_VERSION));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_INVALID_BASE58, location = CommonDataProvider.class)\r\n    public void fromLine_invalidP2WPKHAddressWithInvalidBase58Given_throwsAddressFormatNotAcceptedException(String base58) {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(base58, keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_INVALID_BASE58));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BITCOIN_CASH_ADDRESSES_CHECKSUM_INVALID, location = CommonDataProvider.class)\r\n    public void fromLine_bitcoinCashAddressChecksumInvalid_parseAnyway(String base58, String expectedHash160) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(base58, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        String hash160AsHex = keyUtility.byteBufferUtility().getHexFromByteBuffer(addressToCoin.hash160());\r\n        assertThat(hash160AsHex, is(equalTo(expectedHash160)));\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BITCOIN_CASH_ADDRESSES_INTERNAL_PURPOSE, location = CommonDataProvider.class)\r\n    public void fromLine_bitcoinCashAddressInternalPurpose_throwsAddressFormatNotAcceptedException(String base58) {\r\n        // act\r\n        try {\r\n            new AddressTxtLine().fromLine(base58, keyUtility);\r\n            fail(\"Expected AddressFormatNotAcceptedException\");\r\n        } catch (AddressFormatNotAcceptedException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(AddressTxtLine.REASON_P2MS_NOT_SUPPORTED));\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BITCOIN_ADDRESSES_CORRECT_BASE_58, location = CommonDataProvider.class)\r\n    public void fromLine_bitcoinAddressChecksumInvalid_parseAnyway(String base58, String expectedHash160) throws AddressFormatNotAcceptedException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(base58, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        String hash160AsHex = keyUtility.byteBufferUtility().getHexFromByteBuffer(addressToCoin.hash160());\r\n        assertThat(hash160AsHex, is(equalTo(expectedHash160)));\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_CORRECT_BASE_58, location = CommonDataProvider.class)\r\n    public void fromLine_correctBase58_hash160equals(String base58, String expectedHash160) throws AddressFormatNotAcceptedException, DecoderException {\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().fromLine(base58, keyUtility);\r\n\r\n        // pre-assert\r\n        assertThat(addressToCoin, is(notNullValue()));\r\n\r\n        // assert\r\n        String hash160AsHex = keyUtility.byteBufferUtility().getHexFromByteBuffer(addressToCoin.hash160());\r\n        assertThat(hash160AsHex, is(equalTo(expectedHash160)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"parseBase58Address\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_SRC_POS, location = CommonDataProvider.class)\r\n    public void parseBase58Address_correctBase58UseHigherSrcPos_copiedPartial(int versionBytes) throws DecoderException {\r\n        // arrange\r\n        String encoded = Base58.encode(Hex.decode(\"1f\" + \"ffffffffffffffffffffffffffffffffffffffff\"));\r\n\r\n        // act\r\n        AddressToCoin addressToCoin = new AddressTxtLine().parseBase58Address(encoded, versionBytes, AddressTxtLine.CHECKSUM_BYTES_REGULAR, keyUtility);\r\n\r\n        // assert\r\n        byte[] hash160 = keyUtility.byteBufferUtility().byteBufferToBytes(addressToCoin.hash160());\r\n        String hash160AsHex = Hex.toHexString(hash160);\r\n        int expectedLastIndex = 40 - 1 - 2 * versionBytes + 2;\r\n        assertThat(hash160AsHex.lastIndexOf(\"f\"), is(equalTo(expectedLastIndex)));\r\n    }\r\n    // </editor-fold>\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AddressTypeTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link AddressType}.\r\n */\r\npublic class AddressTypeTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"values\">\r\n    @Test\r\n    public void values_allConstants_countIsTwo() {\r\n        // act\r\n        int actual = AddressType.values().length;\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(2)));\r\n    }\r\n\r\n    @Test\r\n    public void values_p2pkhOrP2sh_nameIsExpected() {\r\n        // act\r\n        String actual = AddressType.P2PKH_OR_P2SH.name();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(\"P2PKH_OR_P2SH\")));\r\n    }\r\n\r\n    @Test\r\n    public void values_p2wpkh_nameIsExpected() {\r\n        // act\r\n        String actual = AddressType.P2WPKH.name();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(\"P2WPKH\")));\r\n    }\r\n\r\n    @Test\r\n    public void values_eachConstant_isNotNull() {\r\n        for (AddressType type : AddressType.values()) {\r\n            // assert\r\n            assertThat(type, is(notNullValue()));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"valueOf\">\r\n    @Test\r\n    public void valueOf_p2pkhOrP2sh_returnsExpectedConstant() {\r\n        // act\r\n        AddressType actual = AddressType.valueOf(\"P2PKH_OR_P2SH\");\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(AddressType.P2PKH_OR_P2SH)));\r\n    }\r\n\r\n    @Test\r\n    public void valueOf_p2wpkh_returnsExpectedConstant() {\r\n        // act\r\n        AddressType actual = AddressType.valueOf(\"P2WPKH\");\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(AddressType.P2WPKH)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void valueOf_unknownConstantName_throwsIllegalArgumentException() {\r\n        // act\r\n        AddressType.valueOf(\"UNKNOWN_TYPE\");\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ordinal\">\r\n    @Test\r\n    public void ordinal_p2pkhOrP2sh_isZero() {\r\n        // act\r\n        int actual = AddressType.P2PKH_OR_P2SH.ordinal();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(0)));\r\n    }\r\n\r\n    @Test\r\n    public void ordinal_p2wpkh_isOne() {\r\n        // act\r\n        int actual = AddressType.P2WPKH.ordinal();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(1)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AwaitTimeTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.lang.annotation.ElementType;\r\nimport java.lang.annotation.Retention;\r\nimport java.lang.annotation.RetentionPolicy;\r\nimport java.lang.annotation.Target;\r\n\r\n@Retention(RetentionPolicy.SOURCE)\r\n@Target(ElementType.METHOD)\r\n\r\n/**\r\n * It is an await time test. This tests changes timing durations. Especially for {@link java.util.concurrent.ExecutorService#awaitTermination}.\r\n */\r\npublic @interface AwaitTimeTest {\r\n    \r\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/AwaitTimeTests.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.time.Duration;\r\n\r\npublic class AwaitTimeTests {\r\n    final static Duration AWAIT_DURATION = Duration.ofSeconds(20);\r\n    final static Duration IMPRECISION = Duration.ofSeconds(2);\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/BIP39DataProvider.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.tngtech.java.junit.dataprovider.DataProvider;\nimport java.io.InputStream;\nimport java.util.Iterator;\nimport java.util.Map;\n\npublic class BIP39DataProvider {\n\n    /**\n     * For {@link net.ladenthin.bitcoinaddressfinder.BIP39KeyProducerTest}.\n     */\n    public final static String DATA_PROVIDER_BIP39_TEST_VECTORS = \"bip39TestVectors\";\n    \n    public final static String FILENAME = \"vectors.json\";\n    public final static String PASSPHRASE = \"TREZOR\";\n\n    @DataProvider\n    /**\n     * from https://github.com/trezor/python-mnemonic/blob/master/vectors.json\n     */\n    public static Object[][] bip39TestVectors() throws Exception {\n        InputStream inputStream = BIP39DataProvider.class.getResourceAsStream(\"/\" + FILENAME);\n        if (inputStream == null) {\n            throw new IllegalStateException(FILENAME + \" not found in classpath\");\n        }\n\n        ObjectMapper mapper = new ObjectMapper();\n        JsonNode root = mapper.readTree(inputStream);\n        int totalVectors = 0;\n        for (Iterator<Map.Entry<String, JsonNode>> fields = root.fields(); fields.hasNext();) {\n            Map.Entry<String, JsonNode> entry = fields.next();\n            totalVectors += entry.getValue().size();\n        }\n\n        Object[][] result = new Object[totalVectors][];\n        int index = 0;\n\n        for (Iterator<Map.Entry<String, JsonNode>> fields = root.fields(); fields.hasNext();) {\n            Map.Entry<String, JsonNode> entry = fields.next();\n            String language = entry.getKey();\n            JsonNode vectors = entry.getValue();\n\n            for (JsonNode vectorElement : vectors) {\n                String entropy = vectorElement.get(0).asText();\n                String mnemonic = vectorElement.get(1).asText();\n                String seed = vectorElement.get(2).asText();\n                String xprv = vectorElement.get(3).asText();\n                result[index++] = new Object[]{language, entropy, mnemonic, PASSPHRASE, seed, xprv};\n            }\n        }\n\n        return result;\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/BIP39KeyProducerTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport java.time.Instant;\nimport java.util.List;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport java.text.Normalizer;\nimport java.text.Normalizer.Form;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaBip39;\nimport static org.hamcrest.Matchers.*;\nimport org.apache.commons.codec.binary.Hex;\nimport org.junit.Test;\n\nimport org.bitcoinj.crypto.DeterministicKey;\nimport org.bitcoinj.crypto.HDKeyDerivation;\nimport org.bitcoinj.crypto.MnemonicCode;\nimport org.bitcoinj.params.MainNetParams;\nimport org.bitcoinj.wallet.DeterministicSeed;\nimport static org.junit.Assert.fail;\nimport org.junit.runner.RunWith;\n\n@RunWith(DataProviderRunner.class)\npublic class BIP39KeyProducerTest {\n\n    @Test\n    public void nextKey_givenKnownMnemonic_returnsExpectedPrivateKey() {\n        // arrange\n        String mnemonic = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\";\n        String passphrase = \"\";\n        String bip32Path = CKeyProducerJavaBip39.DEFAULT_BIP32_PATH;\n        Instant creationTime = Instant.ofEpochSecond(0);\n        boolean hardened = false;\n\n        BIP39KeyProducer producer = new BIP39KeyProducer(mnemonic, passphrase, bip32Path, creationTime, hardened);\n\n        // act\n        DeterministicKey key = producer.nextKey(); // M/44H/0H/0H/0/0\n\n        // assert\n        assertThat(key.getPrivateKeyAsHex(), is(\"e284129cc0922579a535bbf4d1a3b25773090d28c909bc0fed73b5e0222cc372\"));\n        assertThat(key.getPathAsString(), endsWith(\"/0\"));\n    }\n\n    @Test\n    public void nextBytes_calledTwice_returnsDeterministicByteArrays() {\n        // arrange\n        String mnemonic = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\";\n        String passphrase = \"\";\n        String bip32Path = CKeyProducerJavaBip39.DEFAULT_BIP32_PATH;\n        Instant creationTime = Instant.ofEpochSecond(0);\n        boolean hardened = false;\n\n        BIP39KeyProducer producer = new BIP39KeyProducer(mnemonic, passphrase, bip32Path, creationTime, hardened);\n\n        byte[] bytes1 = new byte[16];\n        byte[] bytes2 = new byte[16];\n\n        // act\n        producer.nextBytes(bytes1); // from /0\n        producer.nextBytes(bytes2); // from /1\n\n        // assert\n        assertThat(bytes1, is(not(equalTo(bytes2))));\n        assertThat(bytes1.length, is(16));\n        assertThat(bytes2.length, is(16));\n    }\n\n    @Test\n    public void appendPath_givenBasePathAndIndex_returnsExtendedHDPath() {\n        // arrange\n        String path = CKeyProducerJavaBip39.DEFAULT_BIP32_PATH;\n        int index = 5;\n\n        // act\n        var extended = BIP39KeyProducer.append(\n            org.bitcoinj.crypto.HDPath.parsePath(path),\n            new org.bitcoinj.crypto.ChildNumber(index, false)\n        );\n\n        // assert\n        assertThat(extended.size(), is(5));\n        assertThat(extended.get(4).num(), is(index));\n    }\n    \n    @Test\n    public void bip39Vector_givenEnglishMnemonic_returnsExpectedSeedAndXprv() throws Exception {\n        // Arrange\n        String passphrase = \"TREZOR\";\n        String entropyHex = \"00000000000000000000000000000000\";\n        String expectedMnemonic = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\";\n        String expectedSeedHex = \"c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04\";\n        String expectedXprv = \"xprv9s21ZrQH143K3h3fDYiay8mocZ3afhfULfb5GX8kCBdno77K4HiA15Tg23wpbeF1pLfs1c5SPmYHrEpTuuRhxMwvKDwqdKiGJS9XFKzUsAF\";\n\n        byte[] entropy = Hex.decodeHex(entropyHex);\n        List<String> mnemonic = MnemonicCode.INSTANCE.toMnemonic(entropy);\n        assertThat(String.join(\" \", mnemonic), is(expectedMnemonic));\n\n        DeterministicSeed seed = DeterministicSeed.ofMnemonic(expectedMnemonic, passphrase);\n        assertThat(Hex.encodeHexString(seed.getSeedBytes()), is(expectedSeedHex));\n\n        // Act\n        DeterministicKey masterKey = HDKeyDerivation.createMasterPrivateKey(seed.getSeedBytes());\n\n        // Assert\n        assertThat(masterKey.serializePrivB58(MainNetParams.get().network()), is(expectedXprv));\n    }\n    \n    @Test\n    @UseDataProvider(value = BIP39DataProvider.DATA_PROVIDER_BIP39_TEST_VECTORS, location = BIP39DataProvider.class)\n    public void bip39Vector_givenTestVector_returnsExpectedSeedAndXprvForLanguage(String language, String entropyHex, String mnemonicStr, String passphrase, String expectedSeedHex, String expectedXprv) throws Exception {\n        // Arrange\n        byte[] entropy = Hex.decodeHex(entropyHex);\n        \n        final BIP39Wordlist wordList = BIP39Wordlist.fromLanguageName(language);\n        \n        MnemonicCode mnemonicCode = new MnemonicCode(\n            wordList.getWordListStream(),\n            null\n        );\n\n        List<String> mnemonic = mnemonicCode.toMnemonic(entropy);\n        \n        String normalizedMnemonic = Normalizer.normalize(mnemonicStr, Form.NFKD);\n        String normalizedPassphrase = Normalizer.normalize(passphrase, Form.NFKD);\n\n        // Assert mnemonic\n        assertThat(\"Language: \" + language, String.join(wordList.getSeparator(), mnemonic), is(mnemonicStr));\n\n        // Generate seed\n        DeterministicSeed seed = DeterministicSeed.ofMnemonic(normalizedMnemonic, normalizedPassphrase);\n\n        // Assert seed bytes\n        assertThat(\"Language: \" + language, Hex.encodeHexString(seed.getSeedBytes()), is(expectedSeedHex));\n\n        // Generate master key from seed\n        DeterministicKey masterKey = HDKeyDerivation.createMasterPrivateKey(seed.getSeedBytes());\n\n        // Assert xprv\n        assertThat(\"Language: \" + language, masterKey.serializePrivB58(MainNetParams.get().network()), is(expectedXprv));\n    }\n    \n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void nextKey_counterOverflow_throwsException() {\n        // arrange\n        String mnemonic = \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\";\n        String passphrase = \"\";\n        String bip32Path = \"M/44H/0H/0H/0\";\n        boolean hardened = false;\n\n        BIP39KeyProducer producer = new BIP39KeyProducer(mnemonic, passphrase, bip32Path, Instant.ofEpochSecond(0), hardened);\n\n        producer.counter.set(Integer.MAX_VALUE);\n\n        try {\n            // act\n            producer.nextKey();\n        } catch (NoMoreSecretsAvailableException e) {\n            fail(\"Exception thrown too early: \" + e.getMessage());\n        }\n\n        // This call should overflow and throw NoMoreSecretsAvailableException\n        producer.nextKey();\n    }\n    \n    @Test\n    public void testDefaultBip32PathConstant() {\n        assertThat(CKeyProducerJavaBip39.DEFAULT_BIP32_PATH, is(\"M/44H/0H/0H/0\"));\n    }\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/BIP39WordlistTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.InputStream;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link BIP39Wordlist}.\r\n */\r\npublic class BIP39WordlistTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constants\">\r\n    @Test\r\n    public void ideographicSpace_constant_hasCorrectUnicodeValue() {\r\n        // arrange\r\n        String expected = \"\\u3000\";\r\n\r\n        // act\r\n        String actual = BIP39Wordlist.IDEOGRAPHIC_SPACE;\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void normalSpace_constant_hasCorrectValue() {\r\n        // arrange\r\n        String expected = \" \";\r\n\r\n        // act\r\n        String actual = BIP39Wordlist.NORMAL_SPACE;\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void ideographicSpace_constant_isOneCharacter() {\r\n        // act\r\n        String space = BIP39Wordlist.IDEOGRAPHIC_SPACE;\r\n\r\n        // assert\r\n        assertThat(space.length(), is(equalTo(1)));\r\n    }\r\n\r\n    @Test\r\n    public void normalSpace_constant_isOneCharacter() {\r\n        // act\r\n        String space = BIP39Wordlist.NORMAL_SPACE;\r\n\r\n        // assert\r\n        assertThat(space.length(), is(equalTo(1)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getWordListStream\">\r\n    @Test\r\n    public void getWordListStream_englishWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.ENGLISH.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_chineseSimplifiedWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.CHINESE_SIMPLIFIED.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_chineseTraditionalWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.CHINESE_TRADITIONAL.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_czechWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.CZECH.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_frenchWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.FRENCH.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_italianWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.ITALIAN.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_japaneseWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.JAPANESE.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_koreanWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.KOREAN.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_portugueseWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.PORTUGUESE.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_russianWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.RUSSIAN.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_spanishWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.SPANISH.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_turkishWordlist_returnsNonNullStream() {\r\n        // act\r\n        InputStream stream = BIP39Wordlist.TURKISH.getWordListStream();\r\n\r\n        // assert\r\n        assertThat(stream, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getWordListStream_allWordlists_returnNonNullStream() {\r\n        // assert\r\n        for (BIP39Wordlist wordlist : BIP39Wordlist.values()) {\r\n            // act\r\n            InputStream stream = wordlist.getWordListStream();\r\n\r\n            // assert\r\n            assertThat(\"Expected non-null stream for wordlist: \" + wordlist.name(), stream, is(notNullValue()));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"fromLanguageName\">\r\n    @Test\r\n    public void fromLanguageName_lowercaseEnglish_returnsEnglishEnum() {\r\n        // arrange\r\n        String name = \"english\";\r\n\r\n        // act\r\n        BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BIP39Wordlist.ENGLISH)));\r\n    }\r\n\r\n    @Test\r\n    public void fromLanguageName_lowercaseJapanese_returnsJapaneseEnum() {\r\n        // arrange\r\n        String name = \"japanese\";\r\n\r\n        // act\r\n        BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BIP39Wordlist.JAPANESE)));\r\n    }\r\n\r\n    @Test\r\n    public void fromLanguageName_underscoredChineseSimplified_returnsChineseSimplifiedEnum() {\r\n        // arrange\r\n        String name = \"chinese_simplified\";\r\n\r\n        // act\r\n        BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BIP39Wordlist.CHINESE_SIMPLIFIED)));\r\n    }\r\n\r\n    @Test\r\n    public void fromLanguageName_uppercaseEnglish_returnsEnglishEnum() {\r\n        // arrange\r\n        String name = \"ENGLISH\";\r\n\r\n        // act\r\n        BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BIP39Wordlist.ENGLISH)));\r\n    }\r\n\r\n    @Test\r\n    public void fromLanguageName_mixedCaseFrench_returnsFrenchEnum() {\r\n        // arrange\r\n        String name = \"French\";\r\n\r\n        // act\r\n        BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BIP39Wordlist.FRENCH)));\r\n    }\r\n\r\n    @Test\r\n    public void fromLanguageName_hyphenatedChineseSimplified_returnsChineseSimplifiedEnum() {\r\n        // arrange\r\n        // hyphens are converted to underscores by fromLanguageName\r\n        String name = \"chinese-simplified\";\r\n\r\n        // act\r\n        BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BIP39Wordlist.CHINESE_SIMPLIFIED)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void fromLanguageName_unknownLanguage_throwsException() {\r\n        // act\r\n        BIP39Wordlist.fromLanguageName(\"klingon\");\r\n    }\r\n\r\n    @Test\r\n    public void fromLanguageName_allWordlistNames_roundtripSucceeds() {\r\n        // assert - each enum name can be converted back to itself via lower-case\r\n        for (BIP39Wordlist wordlist : BIP39Wordlist.values()) {\r\n            // arrange\r\n            String name = wordlist.name().toLowerCase();\r\n\r\n            // act\r\n            BIP39Wordlist result = BIP39Wordlist.fromLanguageName(name);\r\n\r\n            // assert\r\n            assertThat(result, is(equalTo(wordlist)));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getSeparator\">\r\n    @Test\r\n    public void getSeparator_japaneseWordlist_returnsIdeographicSpace() {\r\n        // act\r\n        String separator = BIP39Wordlist.JAPANESE.getSeparator();\r\n\r\n        // assert\r\n        assertThat(separator, is(equalTo(BIP39Wordlist.IDEOGRAPHIC_SPACE)));\r\n    }\r\n\r\n    @Test\r\n    public void getSeparator_englishWordlist_returnsNormalSpace() {\r\n        // act\r\n        String separator = BIP39Wordlist.ENGLISH.getSeparator();\r\n\r\n        // assert\r\n        assertThat(separator, is(equalTo(BIP39Wordlist.NORMAL_SPACE)));\r\n    }\r\n\r\n    @Test\r\n    public void getSeparator_chineseSimplifiedWordlist_returnsNormalSpace() {\r\n        // act\r\n        String separator = BIP39Wordlist.CHINESE_SIMPLIFIED.getSeparator();\r\n\r\n        // assert\r\n        assertThat(separator, is(equalTo(BIP39Wordlist.NORMAL_SPACE)));\r\n    }\r\n\r\n    @Test\r\n    public void getSeparator_chineseTraditionalWordlist_returnsNormalSpace() {\r\n        // act\r\n        String separator = BIP39Wordlist.CHINESE_TRADITIONAL.getSeparator();\r\n\r\n        // assert\r\n        assertThat(separator, is(equalTo(BIP39Wordlist.NORMAL_SPACE)));\r\n    }\r\n\r\n    @Test\r\n    public void getSeparator_spanishWordlist_returnsNormalSpace() {\r\n        // act\r\n        String separator = BIP39Wordlist.SPANISH.getSeparator();\r\n\r\n        // assert\r\n        assertThat(separator, is(equalTo(BIP39Wordlist.NORMAL_SPACE)));\r\n    }\r\n\r\n    @Test\r\n    public void getSeparator_allNonJapaneseWordlists_returnNormalSpace() {\r\n        // assert\r\n        for (BIP39Wordlist wordlist : BIP39Wordlist.values()) {\r\n            if (wordlist == BIP39Wordlist.JAPANESE) {\r\n                continue;\r\n            }\r\n\r\n            // act\r\n            String separator = wordlist.getSeparator();\r\n\r\n            // assert\r\n            assertThat(\"Expected normal space for wordlist: \" + wordlist.name(), separator, is(equalTo(BIP39Wordlist.NORMAL_SPACE)));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/Base36DecoderTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.math.BigInteger;\nimport java.util.Arrays;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\n\nimport org.junit.Test;\n\npublic class Base36DecoderTest {\n\n    private final Base36Decoder decoder = new Base36Decoder();\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBase36ToFixedLengthBytes - exact length\">\n    @Test\n    public void decodeBase36ToFixedLengthBytes_validInput_exact20Bytes() {\n        // arrange\n        String base36Encoded = new BigInteger(1, new byte[20]).toString(36);\n        int expectedLength = 20;\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, expectedLength);\n\n        // assert\n        assertThat(result.length, is(equalTo(expectedLength)));\n        assertThat(result, is(new byte[20]));\n    }\n\n    @Test\n    public void decodeBase36ToFixedLengthBytes_validInput_exact1Byte() {\n        // arrange\n        byte[] original = {0x7F};\n        String base36Encoded = new BigInteger(1, original).toString(36);\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, 1);\n\n        // assert\n        assertThat(result.length, is(equalTo(1)));\n        assertThat(result[0], is(equalTo((byte) 0x7F)));\n    }\n\n    @Test\n    public void decodeBase36ToFixedLengthBytes_zeroBytes_producesAllZeros() {\n        // arrange\n        String base36Encoded = \"0\";\n        int expectedLength = 20;\n        byte[] expectedAllZeros = new byte[expectedLength];\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, expectedLength);\n\n        // assert\n        assertThat(result, is(expectedAllZeros));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBase36ToFixedLengthBytes - shorter input\">\n    @Test\n    public void decodeBase36ToFixedLengthBytes_validInput_shorterThan20Bytes() {\n        // arrange\n        byte[] original = {0x01, 0x02, 0x03}; // 3 bytes\n        String base36Encoded = new BigInteger(1, original).toString(36);\n        final int expectedLength = 20;\n        final int paddingLength = expectedLength - original.length;\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, expectedLength);\n\n        // assert\n        assertThat(result.length, is(equalTo(expectedLength)));\n        // The original bytes should be right-aligned (at the end)\n        assertThat(Arrays.copyOfRange(result, paddingLength, expectedLength), is(original));\n        // Leading bytes should be padded with zeros\n        byte[] expectedPadding = new byte[paddingLength];\n        assertThat(Arrays.copyOfRange(result, 0, paddingLength), is(expectedPadding));\n    }\n\n    @Test\n    public void decodeBase36ToFixedLengthBytes_singleByteInput_leftPaddedWithZeros() {\n        // arrange\n        byte[] original = {(byte) 0xAB};\n        String base36Encoded = new BigInteger(1, original).toString(36);\n        final int targetLength = 10;\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, targetLength);\n\n        // assert\n        assertThat(result.length, is(equalTo(targetLength)));\n        assertThat(result[targetLength - 1], is(equalTo((byte) 0xAB)));\n        byte[] expectedPadding = new byte[targetLength - 1];\n        assertThat(Arrays.copyOfRange(result, 0, targetLength - 1), is(expectedPadding));\n    }\n\n    @Test\n    public void decodeBase36ToFixedLengthBytes_twoBytesInput_leftPaddedWithZeros() {\n        // arrange\n        byte[] original = {0x12, 0x34};\n        String base36Encoded = new BigInteger(1, original).toString(36);\n        final int targetLength = 5;\n        final int paddingLength = targetLength - original.length;\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, targetLength);\n\n        // assert\n        assertThat(result.length, is(equalTo(targetLength)));\n        assertThat(Arrays.copyOfRange(result, paddingLength, targetLength), is(original));\n        byte[] expectedPadding = new byte[paddingLength];\n        assertThat(Arrays.copyOfRange(result, 0, paddingLength), is(expectedPadding));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBase36ToFixedLengthBytes - longer input\">\n    @Test\n    public void decodeBase36ToFixedLengthBytes_validInput_longerThan20Bytes() {\n        // arrange\n        byte[] longBytes = new byte[25];\n        Arrays.fill(longBytes, (byte) 0x7F);\n        String base36Encoded = new BigInteger(1, longBytes).toString(36);\n        final int targetLength = 20;\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, targetLength);\n\n        // assert\n        assertThat(result.length, is(equalTo(targetLength)));\n        // When input is longer, the least-significant bytes are kept\n        // Verify that result contains expected byte values\n        byte[] expectedContent = new byte[targetLength];\n        Arrays.fill(expectedContent, (byte) 0x7F);\n        assertThat(result, is(expectedContent));\n    }\n\n    @Test\n    public void decodeBase36ToFixedLengthBytes_muchlongerInput_trimsToTargetLength() {\n        // arrange\n        byte[] longBytes = new byte[50];\n        Arrays.fill(longBytes, (byte) 0xFF);\n        String base36Encoded = new BigInteger(1, longBytes).toString(36);\n        final int targetLength = 10;\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, targetLength);\n\n        // assert\n        // Verify both length and that result contains expected values\n        byte[] expectedContent = new byte[targetLength];\n        Arrays.fill(expectedContent, (byte) 0xFF);\n        assertThat(result, is(expectedContent));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBase36ToFixedLengthBytes - boundary values\">\n    @Test\n    public void decodeBase36ToFixedLengthBytes_maxByteValue_decodesCorrectly() {\n        // arrange\n        byte[] original = {(byte) 0xFF};\n        String base36Encoded = new BigInteger(1, original).toString(36);\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, 1);\n\n        // assert\n        assertThat(result.length, is(equalTo(1)));\n        assertThat(result[0], is(equalTo((byte) 0xFF)));\n    }\n\n    @Test\n    public void decodeBase36ToFixedLengthBytes_allMaxBytes_decodesCorrectly() {\n        // arrange\n        byte[] expected = new byte[5];\n        Arrays.fill(expected, (byte) 0xFF);\n        String base36Encoded = new BigInteger(1, expected).toString(36);\n\n        // act\n        byte[] result = decoder.decodeBase36ToFixedLengthBytes(base36Encoded, expected.length);\n\n        // assert\n        assertThat(result, is(expected));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBase36ToFixedLengthBytes - invalid input\">\n    @Test(expected = NumberFormatException.class)\n    public void decodeBase36ToFixedLengthBytes_invalidCharacters_throwsException() {\n        // arrange\n        String invalidBase36 = \"O0I1L$%\"; // invalid characters for BigInteger(36)\n\n        // act\n        decoder.decodeBase36ToFixedLengthBytes(invalidBase36, 20);\n    }\n\n    @Test(expected = NumberFormatException.class)\n    public void decodeBase36ToFixedLengthBytes_emptyString_throwsException() {\n        // arrange\n        String emptyString = \"\";\n\n        // act\n        decoder.decodeBase36ToFixedLengthBytes(emptyString, 20);\n    }\n\n    @Test(expected = NumberFormatException.class)\n    public void decodeBase36ToFixedLengthBytes_invalidCharacterSpace_throwsException() {\n        // arrange\n        String invalidBase36 = \"123 456\"; // space is invalid in base36\n\n        // act\n        decoder.decodeBase36ToFixedLengthBytes(invalidBase36, 20);\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBase36ToFixedLengthBytes - round-trip verification\">\n    @Test\n    public void decodeBase36ToFixedLengthBytes_encodeDecodeRoundTrip_producesOriginalData() {\n        // arrange\n        byte[] original = {0x01, 0x02, 0x03, 0x04, 0x05};\n        String encoded = new BigInteger(1, original).toString(36);\n\n        // act\n        byte[] decoded = decoder.decodeBase36ToFixedLengthBytes(encoded, 5);\n\n        // pre-assert\n        assertThat(decoded, is(original));\n\n        // Re-encode should produce the same base36 string\n        String reencoded = new BigInteger(1, decoded).toString(36);\n\n        // assert\n        assertThat(reencoded, is(equalTo(encoded)));\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/Bech32HelperTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.nio.ByteBuffer;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2PKH;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2WPKH;\r\nimport org.bitcoinj.base.Bech32;\r\nimport org.junit.Test;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.startsWith;\r\n\r\npublic class Bech32HelperTest {\r\n\r\n    private final KeyUtility keyUtility = new KeyUtility(new NetworkParameterFactory().getNetwork(), new ByteBufferUtility(false));\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"decodeBech32CharsetToValues\">\r\n    @Test\r\n    public void decodeBech32CharsetToValues_fullCharset_returnsValuesZeroToThirtyOne() {\r\n        // arrange\r\n        Bech32Helper sut = new Bech32Helper();\r\n        byte[] expected = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};\r\n\r\n        // act\r\n        byte[] result = sut.decodeBech32CharsetToValues(Bech32Helper.CHARSET);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void decodeBech32CharsetToValues_invalidCharacter_throwsException() {\r\n        // arrange\r\n        Bech32Helper sut = new Bech32Helper();\r\n\r\n        // act\r\n        // 'i' is not part of the Bech32 character set (excluded to avoid visual ambiguity with '1')\r\n        sut.decodeBech32CharsetToValues(\"i\");\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"extractPKHFromBitcoinCashAddress\">\r\n    @Test\r\n    public void extractPKHFromBitcoinCashAddress_withoutPrefix_returnsCorrectHash160() throws ReflectiveOperationException {\r\n        // arrange\r\n        P2PKH address = P2PKH.BitcoinCash;\r\n\r\n        // act\r\n        byte[] hash160 = new Bech32Helper().extractPKHFromBitcoinCashAddress(address.getPublicAddress());\r\n\r\n        // assert\r\n        ByteBuffer buffer = keyUtility.byteBufferUtility().byteArrayToByteBuffer(hash160);\r\n        String actualHashHex = keyUtility.byteBufferUtility().getHexFromByteBuffer(buffer);\r\n        assertThat(actualHashHex, is(equalTo(address.getPublicKeyHashAsHex())));\r\n    }\r\n\r\n    @Test\r\n    public void extractPKHFromBitcoinCashAddress_withPrefix_returnsCorrectHash160() throws ReflectiveOperationException {\r\n        // arrange\r\n        P2PKH address = P2PKH.BitcoinCashWithPrefix;\r\n\r\n        // pre-assert\r\n        assertThat(address.getPublicAddress(), startsWith(AddressTxtLine.BITCOIN_CASH_PREFIX));\r\n\r\n        // act\r\n        byte[] hash160 = new Bech32Helper().extractPKHFromBitcoinCashAddress(address.getPublicAddress());\r\n\r\n        // assert\r\n        ByteBuffer buffer = keyUtility.byteBufferUtility().byteArrayToByteBuffer(hash160);\r\n        String actualHashHex = keyUtility.byteBufferUtility().getHexFromByteBuffer(buffer);\r\n        assertThat(actualHashHex, is(equalTo(address.getPublicKeyHashAsHex())));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getWitnessPrograms\">\r\n    @Test\r\n    public void getWitnessPrograms_validBech32Data_returnsWitnessProgram() throws ReflectiveOperationException {\r\n        // arrange\r\n        P2WPKH address = P2WPKH.Bitcoin;\r\n        Bech32.Bech32Data bechData = Bech32.decode(address.getPublicAddress());\r\n        Bech32Helper sut = new Bech32Helper();\r\n\r\n        // act\r\n        byte[] witnessProgram = sut.getWitnessPrograms(bechData);\r\n\r\n        // assert\r\n        assertThat(witnessProgram, is(address.getWitnessProgram()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getWitnessVersion\">\r\n    @Test\r\n    public void getWitnessVersion_validBech32Data_returnsZero() throws ReflectiveOperationException {\r\n        // arrange\r\n        P2WPKH address = P2WPKH.Bitcoin;\r\n        Bech32.Bech32Data bechData = Bech32.decode(address.getPublicAddress());\r\n        Bech32Helper sut = new Bech32Helper();\r\n\r\n        // act\r\n        Short witnessVersion = sut.getWitnessVersion(bechData);\r\n\r\n        // assert\r\n        assertThat(witnessVersion, is((short) 0));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/BitHelperTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class BitHelperTest {\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getKillBits\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_KILL_BITS, location = CommonDataProvider.class)\r\n    public void getKillBits_bitsGiven_killBitsEqualsExpectation(int bits, BigInteger killBits) throws IOException {\r\n        // arrange\r\n        BitHelper bitHelper = new BitHelper();\r\n\r\n        // act, assert\r\n        assertThat(bitHelper.getKillBits(bits), is(equalTo(killBits)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"convertBitsToSize\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BITS_TO_SIZE, location = CommonDataProvider.class)\r\n    public void convertBitsToSize_bitsGiven_sizeEqualsExpectation(int bits, int size) throws IOException {\r\n        // arrange\r\n        BitHelper bitHelper = new BitHelper();\r\n\r\n        // act, assert\r\n        assertThat(bitHelper.convertBitsToSize(bits), is(equalTo(size)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"assertBatchSizeInBitsIsInRange\">\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void assertBatchSizeInBitsIsInRange_bitsGivenBelowMinimum_exceptionThrown() throws IOException {\r\n        // arrange\r\n        BitHelper bitHelper = new BitHelper();\r\n\r\n        // act, assert\r\n        bitHelper.assertBatchSizeInBitsIsInRange(-1);\r\n    }\r\n    \r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void assertBatchSizeInBitsCorrect_bitsGivenOverMaximum_exceptionThrown() throws IOException {\r\n        // arrange\r\n        BitHelper bitHelper = new BitHelper();\r\n\r\n        // act, assert\r\n        bitHelper.assertBatchSizeInBitsIsInRange(PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY + 1);\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX, location = CommonDataProvider.class)\r\n    public void assertBatchSizeInBitsIsInRange_bitsGivenInRange_exceptionThrown(int bits) throws IOException {\r\n        // arrange\r\n        BitHelper bitHelper = new BitHelper();\r\n\r\n        // act, assert\r\n        bitHelper.assertBatchSizeInBitsIsInRange(bits);\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ByteBufferUtilityTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.IOException;\r\nimport java.lang.reflect.Field;\r\nimport java.math.BigInteger;\r\nimport java.nio.BufferOverflowException;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Arrays;\r\nimport org.junit.Before;\r\nimport org.junit.Test;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.*;\r\nimport org.junit.runner.RunWith;\r\nimport jdk.internal.ref.Cleaner;\r\nimport sun.nio.ch.DirectBuffer;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class ByteBufferUtilityTest {\r\n    \r\n    /**\r\n     * It does not matter if the value is true or false.\r\n     */\r\n    private final static boolean ALLOCATE_DIRECT_DOES_NOT_MATTER = false;\r\n    \r\n    @Before\r\n    public void init() throws IOException {\r\n    }\r\n    \r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"freeByteBuffer\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ALLOCATE_DIRECT, location = CommonDataProvider.class)\r\n    public void freeByteBuffer_nullGiven_noExceptionThrown(boolean allocateDirect) throws IOException {\r\n        // arrange\r\n        \r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(allocateDirect);\r\n\r\n        // act\r\n        byteBufferUtility.freeByteBuffer(null);\r\n\r\n        // assert\r\n    }\r\n    \r\n    @Test\r\n    public void freeByteBuffer_cleanerIsNull_noExceptionThrown() throws IOException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException {\r\n        // arrange\r\n        byte[] bytesGiven = createDummyByteArray(7);\r\n        \r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n        \r\n        ByteBuffer bytesAsByteBuffer = byteBufferUtility.byteArrayToByteBuffer(bytesGiven);\r\n        DirectBuffer directBuffer = (DirectBuffer)bytesAsByteBuffer;\r\n        \r\n        ByteBuffer duplicate = bytesAsByteBuffer.duplicate();\r\n        DirectBuffer directBufferDuplicate = (DirectBuffer)duplicate;\r\n\r\n        // pre assert\r\n        assertThat(directBuffer.cleaner(), is(not(nullValue())));\r\n        assertThat(directBufferDuplicate.cleaner(), is(nullValue()));\r\n        \r\n        // act\r\n        byteBufferUtility.freeByteBuffer(bytesAsByteBuffer);\r\n\r\n        // assert\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ALLOCATE_DIRECT, location = CommonDataProvider.class)\r\n    public void freeByteBuffer_freeAGivenByteBuffer_noExceptionThrown(boolean allocateDirect) throws IOException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException {\r\n        // arrange\r\n        byte[] bytesGiven = createDummyByteArray(7);\r\n        \r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(allocateDirect);\r\n        ByteBuffer bytesAsByteBuffer = byteBufferUtility.byteArrayToByteBuffer(bytesGiven);\r\n\r\n        // pre assert\r\n        if (allocateDirect) {\r\n            assertThat(isDirectBufferFreed((DirectBuffer)bytesAsByteBuffer), is(false));\r\n        }\r\n        \r\n        // act\r\n        byteBufferUtility.freeByteBuffer(bytesAsByteBuffer);\r\n\r\n        // assert\r\n        if (allocateDirect) {\r\n            assertThat(isDirectBufferFreed((DirectBuffer)bytesAsByteBuffer), is(true));\r\n        }\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ALLOCATE_DIRECT, location = CommonDataProvider.class)\r\n    public void freeByteBuffer_freeAGivenByteBufferGivenTwice_noExceptionThrown(boolean allocateDirect) throws IOException {\r\n        // arrange\r\n        byte[] bytesGiven = createDummyByteArray(7);\r\n        \r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(allocateDirect);\r\n        ByteBuffer bytesAsByteBuffer = byteBufferUtility.byteArrayToByteBuffer(bytesGiven);\r\n\r\n        // act\r\n        byteBufferUtility.freeByteBuffer(bytesAsByteBuffer);\r\n        byteBufferUtility.freeByteBuffer(bytesAsByteBuffer);\r\n\r\n        // assert\r\n    }\r\n    \r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"helper methods\">\r\n    private ByteBuffer createDummyByteBuffer(int size) {\r\n        ByteBuffer byteBuffer = ByteBuffer.allocate(size);\r\n        for (int i = 0; i < size; i++) {\r\n            byteBuffer.put((byte) i);\r\n        }\r\n        byteBuffer.flip();\r\n        return byteBuffer;\r\n    }\r\n\r\n    private byte[] createDummyByteArray(int size) {\r\n        byte[] bytes = new byte[size];\r\n        for (int i = 0; i < size; i++) {\r\n            bytes[i] = (byte) i;\r\n        }\r\n        return bytes;\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"byteBufferToBytes\">\r\n    @Test\r\n    public void byteBufferToBytes_allBytesEquals() throws IOException {\r\n        // arrange\r\n        ByteBuffer dummy = createDummyByteBuffer(7);\r\n\r\n        // act\r\n        byte[] bytes = new ByteBufferUtility(false).byteBufferToBytes(dummy);\r\n\r\n        // assert\r\n        assertThat(Arrays.toString(bytes), is(equalTo(\"[0, 1, 2, 3, 4, 5, 6]\")));\r\n    }\r\n\r\n    @Test\r\n    public void byteBufferToBytes_idempotence() throws IOException {\r\n        // arrange\r\n        ByteBuffer dummy = createDummyByteBuffer(7);\r\n\r\n        // act\r\n        byte[] bytes1 = new ByteBufferUtility(false).byteBufferToBytes(dummy);\r\n        byte[] bytes2 = new ByteBufferUtility(false).byteBufferToBytes(dummy);\r\n\r\n        // assert\r\n        assertThat(Arrays.toString(bytes2), is(equalTo(Arrays.toString(bytes1))));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"byteArrayToByteBuffer\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ALLOCATE_DIRECT, location = CommonDataProvider.class)\r\n    public void byteArrayToByteBuffer_wrapped_allBytesEquals(boolean allocateDirect) throws IOException {\r\n        // arrange\r\n        byte[] bytes = createDummyByteArray(7);\r\n\r\n        // act\r\n        ByteBuffer byteBuffer = new ByteBufferUtility(allocateDirect).byteArrayToByteBuffer(bytes);\r\n\r\n        // assert\r\n        assertThat(byteBuffer.isDirect(), is(equalTo(allocateDirect)));\r\n        byte[] bytesFromByteBuffer = new ByteBufferUtility(ALLOCATE_DIRECT_DOES_NOT_MATTER).byteBufferToBytes(byteBuffer);\r\n        assertThat(Arrays.toString(bytesFromByteBuffer), is(equalTo(\"[0, 1, 2, 3, 4, 5, 6]\")));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ByteBuffer Hex conversion\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ALLOCATE_DIRECT, location = CommonDataProvider.class)\r\n    public void getHexFromByteBuffer_byteBufferProvided_returnHex(boolean allocateDirect) throws IOException {\r\n        // arrange\r\n        String hexExpected = \"00010203040506\";\r\n        byte[] bytesGiven = createDummyByteArray(7);\r\n        \r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(allocateDirect);\r\n        ByteBuffer bytesAsByteBuffer = byteBufferUtility.byteArrayToByteBuffer(bytesGiven);\r\n\r\n        // act\r\n        String hex = byteBufferUtility.getHexFromByteBuffer(bytesAsByteBuffer);\r\n\r\n        // assert\r\n        assertThat(hex, is(equalTo(hexExpected)));\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ALLOCATE_DIRECT, location = CommonDataProvider.class)\r\n    public void getByteBufferFromHex_HexProvided_returnByteBuffer(boolean allocateDirect) throws IOException {\r\n        // arrange\r\n        String hexGiven = \"00010203040506\";\r\n        byte[] bytesExpected = createDummyByteArray(7);\r\n\r\n        // act\r\n        ByteBuffer byteBuffer = new ByteBufferUtility(allocateDirect).getByteBufferFromHex(hexGiven);\r\n\r\n        // assert\r\n        assertThat(byteBuffer.isDirect(), is(equalTo(allocateDirect)));\r\n        byte[] bytesFromByteBuffer = new ByteBufferUtility(ALLOCATE_DIRECT_DOES_NOT_MATTER).byteBufferToBytes(byteBuffer);\r\n        assertThat(bytesFromByteBuffer, is(equalTo(bytesExpected)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    private long getAddressFromDirectBuffer(DirectBuffer directBuffer) throws IllegalArgumentException, NoSuchFieldException, SecurityException, IllegalAccessException {\r\n        Cleaner cleaner = directBuffer.cleaner();\r\n        Field thunkField = cleaner.getClass().getDeclaredField(\"thunk\");\r\n        thunkField.setAccessible(true);\r\n        Object deallocator = thunkField.get(cleaner);\r\n        \r\n        Field addressField = deallocator.getClass().getDeclaredField(\"address\");\r\n        addressField.setAccessible(true);\r\n        return addressField.getLong(deallocator);\r\n    }\r\n\r\n    private boolean isDirectBufferFreed(DirectBuffer directBuffer) throws IllegalArgumentException, NoSuchFieldException, SecurityException, IllegalAccessException {\r\n        // does not work with newer JVMs (21) anymore\r\n        boolean testWithAddress = false;\r\n        boolean addressTest = true;\r\n        \r\n        Cleaner cleaner = directBuffer.cleaner();\r\n\r\n        Field nextField = cleaner.getClass().getDeclaredField(\"next\");\r\n        nextField.setAccessible(true);\r\n        Object next = nextField.get(cleaner);\r\n\r\n        Field prevField = cleaner.getClass().getDeclaredField(\"prev\");\r\n        prevField.setAccessible(true);\r\n        Object prev = prevField.get(cleaner);\r\n\r\n        if (testWithAddress) {\r\n            long address = getAddressFromDirectBuffer(directBuffer);\r\n            addressTest = address == 0L;\r\n        }\r\n\r\n        return next == prev && addressTest;\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ensureByteBufferCapacityFitsInt\">\r\n    @Test\r\n    public void ensureByteBufferCapacityFitsInt_zeroGiven_returnZero() {\r\n        // arrange\r\n        long capacity = 0L;\r\n\r\n        // act\r\n        int result = ByteBufferUtility.ensureByteBufferCapacityFitsInt(capacity);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(0)));\r\n    }\r\n\r\n    @Test\r\n    public void ensureByteBufferCapacityFitsInt_smallValueGiven_returnAsInt() {\r\n        // arrange\r\n        long capacity = 1234L;\r\n\r\n        // act\r\n        int result = ByteBufferUtility.ensureByteBufferCapacityFitsInt(capacity);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(1234)));\r\n    }\r\n\r\n    @Test\r\n    public void ensureByteBufferCapacityFitsInt_maxIntGiven_returnAsInt() {\r\n        // arrange\r\n        long capacity = Integer.MAX_VALUE;\r\n\r\n        // act\r\n        int result = ByteBufferUtility.ensureByteBufferCapacityFitsInt(capacity);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(Integer.MAX_VALUE)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void ensureByteBufferCapacityFitsInt_valueTooLarge_throwsException() {\r\n        // arrange\r\n        long capacity = (long) Integer.MAX_VALUE + 1L;\r\n\r\n        // act\r\n        ByteBufferUtility.ensureByteBufferCapacityFitsInt(capacity);\r\n\r\n        // assert is handled by exception rule\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void ensureByteBufferCapacityFitsInt_negativeValueGiven_throwsException() {\r\n        // arrange\r\n        long capacity = -1L;\r\n\r\n        // act\r\n        ByteBufferUtility.ensureByteBufferCapacityFitsInt(capacity);\r\n\r\n        // assert is handled by exception rule\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"allocateByteBufferDirectStrict\">\r\n    /**\r\n     * Ensures that a direct ByteBuffer is successfully allocated when configured to allow direct allocation.\r\n     */\r\n    @Test\r\n    public void allocateByteBufferDirectStrict_directAllocationEnabled_returnsDirectBuffer() {\r\n        // arrange\r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n\r\n        // act\r\n        ByteBuffer directBuffer = byteBufferUtility.allocateByteBufferDirectStrict(16);\r\n\r\n        // assert\r\n        assertThat(directBuffer.isDirect(), is(true));\r\n        assertThat(directBuffer.capacity(), is(equalTo(16)));\r\n    }\r\n\r\n    /**\r\n     * Ensures that an exception is thrown when trying to allocate a direct ByteBuffer while direct allocation is disabled.\r\n     */\r\n    @Test(expected = IllegalStateException.class)\r\n    public void allocateByteBufferDirectStrict_directAllocationDisabled_throwsException() {\r\n        // arrange\r\n        final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(false);\r\n\r\n        // act\r\n        byteBufferUtility.allocateByteBufferDirectStrict(16);\r\n\r\n        // assert handled by exception\r\n    }\r\n\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"bigIntegerToBytes\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIG_INTEGER_VARIANTS, location = CommonDataProvider.class)\r\n    public void bigIntegerToBytes_leadingZeroStripped(BigInteger input, int expectedLength, byte expectedFirstByte) {\r\n        // act\r\n        byte[] actualBytes = ByteBufferUtility.bigIntegerToBytes(input);\r\n\r\n        // assert\r\n        assertThat(actualBytes.length, is(equalTo(expectedLength)));\r\n        if (actualBytes.length > 0) {\r\n            assertThat(actualBytes[0], is(equalTo(expectedFirstByte)));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"bigIntegerToBytes\">\r\n    @Test\r\n    public void bigIntegerToBytes_maxPrivateKeyGiven_returnWithoutLeadingZeros() throws IOException {\r\n        // arrange\r\n        BigInteger key = PublicKeyBytes.MAX_TECHNICALLY_PRIVATE_KEY;\r\n        byte[] maxPrivateKey = key.toByteArray();\r\n        assertThat(maxPrivateKey.length, is(equalTo(33)));\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n\r\n        // act\r\n        byte[] keyWithoutLeadingZeros = ByteBufferUtility.bigIntegerToBytes(key);\r\n\r\n        // assert\r\n        assertThat(keyWithoutLeadingZeros.length, is(equalTo(32)));\r\n        \r\n        // copy back\r\n        byte[] arrayWithLeadingZero = new byte[33];\r\n        System.arraycopy(keyWithoutLeadingZeros, 0, arrayWithLeadingZero, 1, 32);\r\n        \r\n        // assert content equals\r\n        assertThat(arrayWithLeadingZero, is(equalTo(maxPrivateKey)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"reverse\">\r\n    @Test\r\n    public void reverse_singleElement_noChange() {\r\n        // arrange\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n        \r\n        byte[] input = { 0x42 };\r\n        byte[] expected = { 0x42 };\r\n\r\n        // act\r\n        byteBufferUtility.reverse(input);\r\n\r\n        // assert\r\n        assertThat(input, is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void reverse_evenLengthArray_correctlyReversed() {\r\n        // arrange\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n        byte[] input = { 0x01, 0x02, 0x03, 0x04 };\r\n        byte[] expected = { 0x04, 0x03, 0x02, 0x01 };\r\n\r\n        // act\r\n        byteBufferUtility.reverse(input);\r\n\r\n        // assert\r\n        assertThat(input, is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void reverse_oddLengthArray_correctlyReversed() {\r\n        // arrange\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n        byte[] input = { 0x01, 0x02, 0x03 };\r\n        byte[] expected = { 0x03, 0x02, 0x01 };\r\n\r\n        // act\r\n        byteBufferUtility.reverse(input);\r\n\r\n        // assert\r\n        assertThat(input, is(equalTo(expected)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"putToByteBuffer\">\r\n    @Test\r\n    public void putToByteBuffer_arraySmallerThanBuffer_writtenCorrectly() {\r\n        ByteBuffer buffer = ByteBuffer.allocate(4);\r\n        byte[] input = { 0x11, 0x22 };\r\n\r\n        ByteBufferUtility.putToByteBuffer(buffer, input);\r\n\r\n        buffer.rewind();\r\n        assertThat(buffer.get(), is((byte) 0x11));\r\n        assertThat(buffer.get(), is((byte) 0x22));\r\n    }\r\n\r\n    @Test\r\n    public void putToByteBuffer_arraySameSizeAsBuffer_writtenCompletely() {\r\n        ByteBuffer buffer = ByteBuffer.allocate(2);\r\n        byte[] input = { 0x11, 0x22 };\r\n\r\n        ByteBufferUtility.putToByteBuffer(buffer, input);\r\n\r\n        buffer.rewind();\r\n        assertThat(buffer.get(), is((byte) 0x11));\r\n        assertThat(buffer.get(), is((byte) 0x22));\r\n    }\r\n\r\n    @Test(expected = BufferOverflowException.class)\r\n    public void putToByteBuffer_arrayLargerThanBuffer_throwsBufferOverflowException() {\r\n       ByteBuffer buffer = ByteBuffer.allocate(1);\r\n       byte[] input = { 0x11, 0x22 };\r\n\r\n       ByteBufferUtility.putToByteBuffer(buffer, input);\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ByteConversionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.IOException;\r\nimport org.apache.commons.codec.DecoderException;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class ByteConversionTest {\r\n\r\n    private final ByteConversion byteConversion = new ByteConversion();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"bytesToMib\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BYTES_TO_MIB, location = CommonDataProvider.class)\r\n    public void bytesToMib_bytesGiven_returnExpectedMib(long bytes, double expectedMib) throws IOException, InterruptedException, DecoderException {\r\n        // act\r\n        double result = byteConversion.bytesToMib(bytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(expectedMib)));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_zeroBytes_returnsZero() {\r\n        // act\r\n        double result = byteConversion.bytesToMib(0L);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(0.0)));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_oneMib_returnsOne() {\r\n        // arrange\r\n        long oneMemInBytes = 1024L * 1024L;\r\n\r\n        // act\r\n        double result = byteConversion.bytesToMib(oneMemInBytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(1.0)));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_twoMib_returnsTwo() {\r\n        // arrange\r\n        long twoMibInBytes = 2L * 1024L * 1024L;\r\n\r\n        // act\r\n        double result = byteConversion.bytesToMib(twoMibInBytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(2.0)));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_largeValue_returnsCorrectMib() {\r\n        // arrange\r\n        long oneThouandMibInBytes = 1000L * 1024L * 1024L;\r\n\r\n        // act\r\n        double result = byteConversion.bytesToMib(oneThouandMibInBytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(1000.0)));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_singleByte_returnsSmallFraction() {\r\n        // act\r\n        double result = byteConversion.bytesToMib(1L);\r\n\r\n        // assert\r\n        assertThat(result > 0.0, is(true));\r\n        assertThat(result < 0.001, is(true));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_maxLongValue_returnsLargeValue() {\r\n        // act\r\n        double result = byteConversion.bytesToMib(Long.MAX_VALUE);\r\n\r\n        // assert\r\n        assertThat(result > 0.0, is(true));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"mibToBytes\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_MIB_TO_BYTES, location = CommonDataProvider.class)\r\n    public void mibToBytes_mibGiven_returnExpectedBytes(long mib, long expectedBytes) throws IOException, InterruptedException, DecoderException {\r\n        // act\r\n        long result = byteConversion.mibToBytes(mib);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(expectedBytes)));\r\n    }\r\n\r\n    @Test\r\n    public void mibToBytes_zeroMib_returnsZeroBytes() {\r\n        // act\r\n        long result = byteConversion.mibToBytes(0L);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(0L)));\r\n    }\r\n\r\n    @Test\r\n    public void mibToBytes_oneMib_returnsOneMibInBytes() {\r\n        // act\r\n        long result = byteConversion.mibToBytes(1L);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(1024L * 1024L)));\r\n    }\r\n\r\n    @Test\r\n    public void mibToBytes_twoMib_returnsTwoMibInBytes() {\r\n        // act\r\n        long result = byteConversion.mibToBytes(2L);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(2L * 1024L * 1024L)));\r\n    }\r\n\r\n    @Test\r\n    public void mibToBytes_largeValue_returnsCorrectBytes() {\r\n        // arrange\r\n        long largeValue = 1000L;\r\n\r\n        // act\r\n        long result = byteConversion.mibToBytes(largeValue);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(1000L * 1024L * 1024L)));\r\n    }\r\n\r\n    @Test\r\n    public void mibToBytes_oneGigabyte_returnsCorrectBytes() {\r\n        // arrange\r\n        long oneGibInMib = 1024L;\r\n\r\n        // act\r\n        long result = byteConversion.mibToBytes(oneGibInMib);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(1024L * 1024L * 1024L)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"round-trip conversion\">\r\n    @Test\r\n    public void mibToBytes_bytesToMib_roundTrip_preservesValue() {\r\n        // arrange\r\n        long originalMib = 512L;\r\n\r\n        // act\r\n        long bytes = byteConversion.mibToBytes(originalMib);\r\n        double resultMib = byteConversion.bytesToMib(bytes);\r\n\r\n        // assert\r\n        assertThat(resultMib, is(equalTo((double) originalMib)));\r\n    }\r\n\r\n    @Test\r\n    public void bytesToMib_mibToBytes_roundTrip_preservesValue() {\r\n        // arrange\r\n        long originalBytes = 10L * 1024L * 1024L;\r\n\r\n        // act\r\n        double mib = byteConversion.bytesToMib(originalBytes);\r\n        long resultBytes = byteConversion.mibToBytes((long) mib);\r\n\r\n        // assert\r\n        assertThat(resultBytes, is(equalTo(originalBytes)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/CommonDataProvider.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProvider;\r\nimport java.math.BigInteger;\r\nimport java.util.Arrays;\r\nimport java.nio.ByteOrder;\r\nimport java.util.ArrayList;\r\nimport java.util.Collections;\r\nimport java.util.List;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.*;\r\n\r\npublic class CommonDataProvider {\r\n    \r\n    /**\r\n     * For {@link #cSecretFormat()}.\r\n     */\r\n    public final static String DATA_PROVIDER_LARGE_SECRETS_AS_HEX = \"largeSecretsAsHex\";\r\n\r\n    /**\r\n    * Provides valid 64-character (32-byte) hex strings representing large unsigned secrets.\r\n    * \r\n    * These values are used to verify correct conversion from hex to BigInteger and back to hex,\r\n    * without losing leading zero bytes — a common issue with BigInteger.toByteArray().\r\n    *\r\n    * ⚠️ Important:\r\n    * - Avoid using {@code new BigInteger(...).toByteArray()} directly, as it may introduce a leading sign byte (0x00)\r\n    *   or drop leading zeros depending on the value.\r\n    * - Instead, use {@code BigInteger.toString(16)} cautiously, or prefer utility methods like\r\n    *   {@code keyUtility.bigIntegerToFixedLengthHex(...)} to ensure fixed-length 64-char hex encoding.\r\n    *\r\n    * These test cases help detect and avoid those pitfalls.\r\n    */\r\n    @DataProvider\r\n    public static Object[][] largeSecretsAsHex() {\r\n        return new Object[][] {\r\n            {\"0000000000000000000000000000000000000000000000000000000000000000\"},\r\n            {\"0000000000000000000000000000000000000000000000000000000000000001\"},\r\n            {\"0000000000000000000000000000000000000000000000400000000000000000\"},\r\n            {\"00000000000000000000000000000000000000000000007fffffffffffffffff\"},\r\n            {\"2c7419465eaba472fd5ff50055a363e55936567a72995be2788aebb4ae74f3ff\"},\r\n            {\"a6eaa2a8fa07686f3ef73736ea4668f5dbcc1f7c178b99afcacdadb64f0ce8bf\"}, // must remain 64 hex chars; don't truncate/pad during conversion\r\n            {PublicKeyBytes.MAX_PRIVATE_KEY_HEX.toLowerCase()},\r\n        };\r\n    }\r\n\r\n    /**\r\n     * For {@link #cSecretFormat()}.\r\n     */\r\n    public final static String DATA_PROVIDER_CSECRET_FORMAT = \"cSecretFormat\";\r\n\r\n    @DataProvider\r\n    public static Object[][] cSecretFormat() {\r\n        return transformFlatToObjectArrayArray(CSecretFormat.values());\r\n    }\r\n    \r\n    /**\r\n     * For {@link EndiannessConverterTest}.\r\n     */\r\n    public static final String DATA_PROVIDER_ENDIANNESS = \"endiannessScenarios\";\r\n\r\n    @DataProvider\r\n    public static Object[][] endiannessScenarios() {\r\n        return new Object[][] {\r\n            {ByteOrder.LITTLE_ENDIAN, ByteOrder.LITTLE_ENDIAN, false},\r\n            {ByteOrder.BIG_ENDIAN, ByteOrder.BIG_ENDIAN, false},\r\n            {ByteOrder.LITTLE_ENDIAN, ByteOrder.BIG_ENDIAN, true},\r\n            {ByteOrder.BIG_ENDIAN, ByteOrder.LITTLE_ENDIAN, true},\r\n        };\r\n    }\r\n    \r\n    public enum KeyProducerTypesLocal {\r\n        KeyProducerJavaBip39,\r\n        KeyProducerJavaIncremental,\r\n        KeyProducerJavaRandom,\r\n        KeyProducerJavaSocket,\r\n        KeyProducerJavaWebSocket,\r\n        KeyProducerJavaZmq\r\n    }\r\n    \r\n    /**\r\n     * For {@link FinderTest}.\r\n     */\r\n    public static final String DATA_PROVIDER_KEY_PRODUCER_TYPES = \"keyProducerTypes\";\r\n\r\n    @DataProvider\r\n    public static Object[][] keyProducerTypes() {\r\n        return Arrays.stream(KeyProducerTypesLocal.values())\r\n            .map(type -> new Object[]{type})\r\n            .toArray(Object[][]::new);\r\n    }\r\n    \r\n    /**\r\n    * For tests validating combinations of key producer types and bit sizes.\r\n    */\r\n   public static final String DATA_PROVIDER_JAVA_KEY_PRODUCER_AND_BIT_SIZE = \"keyProducerTypeAndBitSize\";\r\n\r\n    @DataProvider\r\n    public static Object[][] keyProducerTypeAndBitSize() {\r\n        return mergeMany(\r\n            keyProducerTypes(),    // e.g., Socket, ZMQ, etc.\r\n            bitSizesAtMostMax()     // e.g., 0 – PublicKeyBytes#BIT_COUNT_FOR_MAX_CHUNKS_ARRAY\r\n        );\r\n    }\r\n   \r\n    /**\r\n     * Merges multiple Object[][] data providers into a cartesian product.\r\n     * Each Object[][] must be a 2D array, where each row is a test case argument set.\r\n     *\r\n     * Example:\r\n     * mergeMany(dp1, dp2, dp3) → returns all combinations of dp1 × dp2 × dp3\r\n     */\r\n    public static Object[][] mergeMany(Object[][]... providers) {\r\n        List<Object[]> result = new ArrayList<>();\r\n        mergeRecursive(providers, 0, new ArrayList<>(), result);\r\n        return result.toArray(new Object[0][]);\r\n    }\r\n\r\n    private static void mergeRecursive(Object[][][] providers, int index, List<Object> current, List<Object[]> result) {\r\n        if (index == providers.length) {\r\n            result.add(current.toArray());\r\n            return;\r\n        }\r\n\r\n        for (Object[] row : providers[index]) {\r\n            List<Object> next = new ArrayList<>(current);\r\n            Collections.addAll(next, row);\r\n            mergeRecursive(providers, index + 1, next, result);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * For {@link #bitsToSize()}.\r\n     */\r\n    public final static String DATA_PROVIDER_BITS_TO_SIZE = \"bitsToSize\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bitsToSize() {\r\n        return new Object[][]{\r\n            {0, 1},\r\n            {1, 2},\r\n            {2, 4},\r\n            {3, 8},\r\n            {8, 256},\r\n        };\r\n    }\r\n\r\n    /**\r\n     * For {@link #killBits()}.\r\n     */\r\n    public final static String DATA_PROVIDER_KILL_BITS = \"killBits\";\r\n\r\n    @DataProvider\r\n    public static Object[][] killBits() {\r\n        return new Object[][]{\r\n            {0, BigInteger.valueOf(0L)},\r\n            {1, BigInteger.valueOf(1L)},\r\n            {2, BigInteger.valueOf(3L)},\r\n            {3, BigInteger.valueOf(7L)},\r\n            {8, BigInteger.valueOf(255L)},\r\n        };\r\n    }\r\n\r\n    /**\r\n     * For {@link #bytesToMib()}.\r\n     */\r\n    public final static String DATA_PROVIDER_BYTES_TO_MIB = \"bytesToMib\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bytesToMib() {\r\n        return new Object[][]{\r\n            {1L, 0.00000095367431640625d},\r\n            {1024L * 1024L, 1.0d},\r\n            {1024L * 1024L, 1.0d},\r\n            {1024L * 1024L * 10, 10.0d},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #mibToBytes()}.\r\n     */\r\n    public final static String DATA_PROVIDER_MIB_TO_BYTES = \"mibToBytes\";\r\n\r\n    @DataProvider\r\n    public static Object[][] mibToBytes() {\r\n        return new Object[][]{\r\n            {1L, 1024L*1024L},\r\n            {2L, 1024L*1024L *2L},\r\n            {1024L, 1024L*1024L * 1024L},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #lmdbAmounts()}.\r\n     */\r\n    public final static String DATA_PROVIDER_LMDB_AMOUNTS = \"lmdbAmounts\";\r\n\r\n    @DataProvider\r\n    public static Object[][] lmdbAmounts() {\r\n        long randomAmount = 13371337L;\r\n        return new Object[][]{\r\n            // use static amount\r\n            {true, -1337L, randomAmount, -1337L},\r\n            {true, -7L,    randomAmount, -7L},\r\n            {true, -6L,    randomAmount, -6L},\r\n            {true, -5L,    randomAmount, -5L},\r\n            {true, -4L,    randomAmount, -4L},\r\n            {true, -3L,    randomAmount, -3L},\r\n            {true, -2L,    randomAmount, -2L},\r\n            {true, -1L,    randomAmount, -1L},\r\n            {true, 0L,     randomAmount, 0L},\r\n            {true, 1L,     randomAmount, 1L},\r\n            {true, 2L,     randomAmount, 2L},\r\n            {true, 3L,     randomAmount, 3L},\r\n            {true, 4L,     randomAmount, 4L},\r\n            {true, 5L,     randomAmount, 5L},\r\n            {true, 6L,     randomAmount, 6L},\r\n            {true, 7L,     randomAmount, 7L},\r\n            {true, 1337L,  randomAmount, 1337L},\r\n            // not use static amount\r\n            {false, -1337L, randomAmount, randomAmount},\r\n            {false, -7L,    randomAmount, randomAmount},\r\n            {false, -6L,    randomAmount, randomAmount},\r\n            {false, -5L,    randomAmount, randomAmount},\r\n            {false, -4L,    randomAmount, randomAmount},\r\n            {false, -3L,    randomAmount, randomAmount},\r\n            {false, -2L,    randomAmount, randomAmount},\r\n            {false, -1L,    randomAmount, randomAmount},\r\n            {false, 0L,     randomAmount, randomAmount},\r\n            {false, 1L,     randomAmount, randomAmount},\r\n            {false, 2L,     randomAmount, randomAmount},\r\n            {false, 3L,     randomAmount, randomAmount},\r\n            {false, 4L,     randomAmount, randomAmount},\r\n            {false, 5L,     randomAmount, randomAmount},\r\n            {false, 6L,     randomAmount, randomAmount},\r\n            {false, 7L,     randomAmount, randomAmount},\r\n            {false, 1337L,  randomAmount, randomAmount},\r\n        };\r\n    }\r\n\r\n    /**\r\n     * For {@link #lmdbIncreaseSize()}.\r\n     */\r\n    public final static String DATA_PROVIDER_LMDB_INCREASE_SIZE = \"lmdbIncreaseSize\";\r\n\r\n    @DataProvider\r\n    public static Object[][] lmdbIncreaseSize() {\r\n        return new Object[][]{\r\n            {1024L},\r\n            {2048L},\r\n            {4096L}\r\n        };\r\n    }\r\n\r\n    /**\r\n     * For {@link #bitSizesAtMostMax()}.\r\n     */\r\n    public final static String DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX = \"bitSizesAtMostMax\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bitSizesAtMostMax() {\r\n        final int max = PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY;\r\n\r\n        Object[][] data = new Object[max + 1][1];\r\n        for (int i = 0; i <= max; i++) {\r\n            data[i][0] = i;\r\n        }\r\n\r\n        return data;\r\n    }\r\n    \r\n    /**\r\n     * For {@link #compressedAndStaticAmount()}.\r\n     */\r\n    public final static String DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT = \"compressedAndStaticAmount\";\r\n\r\n    @DataProvider\r\n    public static Object[][] compressedAndStaticAmount() {\r\n        return new Object[][]{\r\n            {true, true},\r\n            {false, true},\r\n            {true, false},\r\n            {false, false}\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #staticAmount()}.\r\n     */\r\n    public final static String DATA_PROVIDER_STATIC_AMOUNT = \"staticAmount\";\r\n\r\n    @DataProvider\r\n    public static Object[][] staticAmount() {\r\n        return new Object[][]{\r\n            {true},\r\n            {false},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #compressed()}.\r\n     */\r\n    public final static String DATA_PROVIDER_COMPRESSED = \"compressed\";\r\n\r\n    @DataProvider\r\n    public static Object[][] compressed() {\r\n        return new Object[][]{\r\n            {true},\r\n            {false},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #addressSeperator()}.\r\n     */\r\n    public final static String DATA_PROVIDER_ADDRESS_SEPARATOR = \"addressSeperator\";\r\n\r\n    @DataProvider\r\n    public static Object[][] addressSeperator() {\r\n            return Arrays.stream(SeparatorFormat.values())\r\n                 .map(format -> new Object[]{format.getSymbol()})\r\n                 .toArray(Object[][]::new);\r\n    }\r\n    \r\n    /**\r\n     * For {@link #invalidP2WPKHAddressesValidBase58()}.\r\n     */\r\n    public final static String DATA_PROVIDER_INVALID_P2WPKH_ADDRESSES_VALID_BASE58 = \"invalidP2WPKHAddressesValidBase58\";\r\n\r\n    @DataProvider\r\n    public static Object[][] invalidP2WPKHAddressesValidBase58() {\r\n        return new Object[][]{\r\n            {\"bc1zqyqsywvzqeeeeeee\", \"5347dec05b6f03de6cc004c1ec33000000000000\"},  // bitcoin\r\n            {\"bc1zqyqsywvzqeeeeeeeee\", \"183a5c6b17b17eced6cd0b3e8443d6b300000000\"},  // bitcoin\r\n            {\"bc1zqyqsywvzqeeeeeeeeeeeeee1\", \"b3d1231a68d6dbb47594deac07a0a9fe8352188e\"},  // bitcoin\r\n            {\"vtc1zqyqsywvzqe\", \"51b9d9757bfedb535b3100000000000000000000\"}, // vertcoin\r\n            {\"dgb1zqyqsywvzqe\", \"edaa0ede31d01c768b3100000000000000000000\"}, // digibyte\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #invalidBech32WitnessVersion2()}.\r\n     */\r\n    public final static String DATA_PROVIDER_INVALID_BECH32_WITNESS_VERSION_2 = \"invalidBech32WitnessVersion2\";\r\n\r\n    @DataProvider\r\n    public static Object[][] invalidBech32WitnessVersion2() {\r\n        return new Object[][]{\r\n            // Not sure where this address comes from, but it has a witness version of 2 and a witness program length of 2\r\n            {\"bc1zqyqsywvzqe\"},  // bitcoin\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #invalidBase58()}.\r\n     */\r\n    public final static String DATA_PROVIDER_INVALID_BASE58 = \"invalidBase58\";\r\n\r\n    @DataProvider\r\n    public static Object[][] invalidBase58() {\r\n        return new Object[][]{\r\n            // P2PKH\r\n            {\"1Wr0ngAddressFormat\"},\r\n            {\"1WrongAddressFormat0\"},\r\n            {\"1WrongIAddressFormat\"},\r\n            {\"1WronglAddressFormat\"},\r\n            // P2WPKH\r\n            // l (small L) is appended and not a valid base58 char\r\n            {\"bc1zqyqsywvzqel\"},  // bitcoin\r\n            {\"vtc1zqyqsywvzqel\"}, // vertcoin\r\n            {\"dgb1zqyqsywvzqel\"}, // digibyte\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #bitcoinAddressesCorrectBase58()}.\r\n     * A correct base58 format should be parsed anyway.\r\n     */\r\n    public final static String DATA_PROVIDER_BITCOIN_ADDRESSES_CORRECT_BASE_58 = \"bitcoinAddressesCorrectBase58\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bitcoinAddressesCorrectBase58() {\r\n        return new Object[][]{\r\n            {\"1WrongAddressFormat\",\"01667b78604490800f88b15c77a5000000000000\"},\r\n            {\"1WrongAddressFormat2\",\"5137f945cf88bd0384f82ef31b63000000000000\"},\r\n            {\"1Wrong1Address2Format3\",\"042b438790b52de2b8235712dbd6e2e400000000\"},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #correctBase58()}.\r\n     * A correct base58 format should be parsed anyway.\r\n     */\r\n    public final static String DATA_PROVIDER_CORRECT_BASE_58 = \"correctBase58\";\r\n\r\n    @DataProvider\r\n    public static Object[][] correctBase58() {\r\n        return new Object[][]{\r\n            {\"1\",\"0000000000000000000000000000000000000000\"},\r\n            {\"15T\",\"0102000000000000000000000000000000000000\"},\r\n            {\"Ldp\",\"0203000000000000000000000000000000000000\"},\r\n            {\"7bWpTW\",\"0203040500000000000000000000000000000000\"},\r\n            {\"t3JZcvsuaXE6ygokL4XUiZSTrQBUoLyYfwu\",\"0000000000000000000000000000000000000000\"},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #srcPos()}.\r\n     */\r\n    public final static String DATA_PROVIDER_SRC_POS = \"srcPos\";\r\n\r\n    @DataProvider\r\n    public static Object[][] srcPos() {\r\n        return new Object[][]{\r\n            {1},\r\n            {2},\r\n            {3},\r\n            {4},\r\n            {5},\r\n            {6},\r\n            {7},\r\n            {8},\r\n            {9},\r\n            {10},\r\n            {11},\r\n            {12},\r\n            {13},\r\n            {14},\r\n            {15},\r\n            {16},\r\n            {17},\r\n            {18},\r\n            {19},\r\n            {20},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #bitcoinCashAddressesChecksumInvalid()}.\r\n     * TODO: I don't know if this is right. It seems like it's a base58 format.\r\n     * I've asked Blockchair and they've answered: \"The addresses you listed are for internal purposes.\".\r\n     */\r\n    public final static String DATA_PROVIDER_BITCOIN_CASH_ADDRESSES_CHECKSUM_INVALID = \"bitcoinCashAddressesChecksumInvalid\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bitcoinCashAddressesChecksumInvalid() {\r\n        return new Object[][]{\r\n            {\"dSn3treXZQfJRktvoApJKM\",\"27225957c54a53b10e4f4e00b2562af400000000\"},\r\n            {\"bq2ZTwe8pt3hyCuy5MudVG\",\"1a0b606a1f1de7a130aae81dc66c665700000000\"},\r\n            {\"W6xvVjvtRobnz9dDdjEugV\",\"ae340f03861fd08558312b97e7926a0000000000\"},\r\n            {\"N1JULkP6RqW3LcbpWvgryV\",\"1aadd1f5457c0f8c08763e55745ff80000000000\"},\r\n            {\"8cE2K6rzN1dVjQXfX3SFcZ\",\"9b072e05be8ff2d1a26e73c694644e0000000000\"},\r\n            {\"kGuKp2vSFzNQ5SJftineWu\",\"5e715d6cc9f93ed922579fd06c47017200000000\"},\r\n            {\"5QmydJKnwKPJb8m1zEQpUV\",\"b661051dd8b1893dd2c10fae9c00de0000000000\"},\r\n            {\"FyXF2p5s8qbonKTuB4MWFr\",\"443ac752c9c5e5445abfe6898dad010000000000\"},\r\n            {\"rWMr7gq4bDKs3T1TgWpTrg\",\"90e9360283cee7ba62e81fe2ef67dcf100000000\"},\r\n            {\"d6qya271t3cYzW8qEEui4E\",\"2459e48a008f3c73c00f9f6e9b24ff0f00000000\"},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #bitcoinCashAddressesInternalPurpose()}.\r\n     * TODO: I don't know if this is right. It seems like it's a hex format.\r\n     * I've asked Blockchair and they've answered: \"The addresses you listed are for internal purposes.\".\r\n     */\r\n    public final static String DATA_PROVIDER_BITCOIN_CASH_ADDRESSES_INTERNAL_PURPOSE = \"bitcoinCashAddressesInternalPurpose\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bitcoinCashAddressesInternalPurpose() {\r\n        return new Object[][]{\r\n            {\"d-32551cbc0d16a34c5995b4057c3f027c\"},\r\n            {\"d-29a0bd5b4cfbb05b493a11e0b69cedcc\"},\r\n            {\"d-732cbc077831c75aba49f95eb629bc32\"},\r\n            {\"d-f92fe84dd1620a12daea311393b37549\"},\r\n            {\"d-ca0cf82e6bd2261f3a648a06090dc815\"},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #createSecretBaseLogged()}.\r\n     */\r\n    public final static String DATA_PROVIDER_CREATE_SECRET_BASE_LOGGED = \"createSecretBaseLogged\";\r\n\r\n    @DataProvider\r\n    public static Object[][] createSecretBaseLogged() {\r\n        return new Object[][]{\r\n            // small key, batchSizeInBits: 2\r\n            {\"ABCDEF\", 2, \"0000000000000000000000000000000000000000000000000000000000abcdec\", \"secretBase: 0000000000000000000000000000000000000000000000000000000000abcdec/2\", \"secret BigInteger: 11259375\", \"secret as byte array: 0000000000000000000000000000000000000000000000000000000000abcdef\", \"killBits: 03\", \"secretBase: 11259372\", \"secretBase as byte array: 0000000000000000000000000000000000000000000000000000000000abcdec\"},\r\n            {\"FEDCBA\", 2, \"0000000000000000000000000000000000000000000000000000000000fedcb8\", \"secretBase: 0000000000000000000000000000000000000000000000000000000000fedcb8/2\", \"secret BigInteger: 16702650\", \"secret as byte array: 0000000000000000000000000000000000000000000000000000000000fedcba\", \"killBits: 03\", \"secretBase: 16702648\", \"secretBase as byte array: 0000000000000000000000000000000000000000000000000000000000fedcb8\"},\r\n            // small key, batchSizeInBits: 21\r\n            {\"ABCDEF\", 21, \"0000000000000000000000000000000000000000000000000000000000a00000\", \"secretBase: 0000000000000000000000000000000000000000000000000000000000a00000/21\", \"secret BigInteger: 11259375\", \"secret as byte array: 0000000000000000000000000000000000000000000000000000000000abcdef\", \"killBits: 1fffff\", \"secretBase: 10485760\", \"secretBase as byte array: 0000000000000000000000000000000000000000000000000000000000a00000\"},\r\n            {\"FEDCBA\", 21, \"0000000000000000000000000000000000000000000000000000000000e00000\", \"secretBase: 0000000000000000000000000000000000000000000000000000000000e00000/21\", \"secret BigInteger: 16702650\", \"secret as byte array: 0000000000000000000000000000000000000000000000000000000000fedcba\", \"killBits: 1fffff\", \"secretBase: 14680064\", \"secretBase as byte array: 0000000000000000000000000000000000000000000000000000000000e00000\"},\r\n            // large key, batchSizeInBits: 21\r\n            {\"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdeff\", 21, \"123456789abcdef0123456789abcdef0123456789abcdef0123456789aa00000\", \"secretBase: 123456789abcdef0123456789abcdef0123456789abcdef0123456789aa00000/21\", \"secret BigInteger: 8234104123542484900769178205574010627627573691361805720124810878238590820095\", \"secret as byte array: 123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdeff\", \"killBits: 1fffff\", \"secretBase: 8234104123542484900769178205574010627627573691361805720124810878238588928000\", \"secretBase as byte array: 123456789abcdef0123456789abcdef0123456789abcdef0123456789aa00000\"},\r\n            // large key with odd number, batchSizeInBits: 21\r\n            {\"00d456789abcdef0123456789abcdef0123456789abcdef0123456789abcdeff\", 21, \"00d456789abcdef0123456789abcdef0123456789abcdef0123456789aa00000\", \"secretBase: 00d456789abcdef0123456789abcdef0123456789abcdef0123456789aa00000/21\", \"secret BigInteger: 375168379408231402782670922269509069226925318059052594399906494889018056447\", \"secret as byte array: 00d456789abcdef0123456789abcdef0123456789abcdef0123456789abcdeff\", \"killBits: 1fffff\", \"secretBase: 375168379408231402782670922269509069226925318059052594399906494889016164352\", \"secretBase as byte array: 00d456789abcdef0123456789abcdef0123456789abcdef0123456789aa00000\"},\r\n            {PublicKeyBytes.MAX_PRIVATE_KEY_HEX.toLowerCase(), 2, \"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140\", \"secretBase: fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140/2\", \"secret BigInteger: 115792089237316195423570985008687907852837564279074904382605163141518161494337\", \"secret as byte array: fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\", \"killBits: 03\", \"secretBase: 115792089237316195423570985008687907852837564279074904382605163141518161494336\", \"secretBase as byte array: fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140\"},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #staticP2PKHAddresses()}.\r\n     */\r\n    public final static String DATA_PROVIDER_STATIC_P2PKH_ADDRESSES = \"staticP2PKHAddresses\";\r\n\r\n    @DataProvider\r\n    public static Object[][] staticP2PKHAddresses() {\r\n        return transformFlatToObjectArrayArray(P2PKH.values());\r\n    }\r\n    \r\n    /**\r\n     * For {@link #staticP2SHAddresses()}.\r\n     */\r\n    public final static String DATA_PROVIDER_STATIC_P2SH_ADDRESSES = \"staticP2SHAddresses\";\r\n\r\n    @DataProvider\r\n    public static Object[][] staticP2SHAddresses() {\r\n        return transformFlatToObjectArrayArray(P2SH.values());\r\n    }\r\n    \r\n    /**\r\n     * For {@link #staticP2SHAddresses()}.\r\n     */\r\n    public final static String DATA_PROVIDER_STATIC_P2WPKH_ADDRESSES = \"staticP2WPKHAddresses\";\r\n\r\n    @DataProvider\r\n    public static Object[][] staticP2WPKHAddresses() {\r\n        return transformFlatToObjectArrayArray(P2WPKH.values());\r\n    }\r\n    \r\n    /**\r\n     * For {@link #staticUnsupportedAddresses()}.\r\n     */\r\n    public final static String DATA_PROVIDER_STATIC_UNSUPPORTED_ADDRESSES = \"staticUnsupportedAddresses\";\r\n\r\n    @DataProvider\r\n    public static Object[][] staticUnsupportedAddresses() {\r\n        return transformFlatToObjectArrayArray(StaticUnsupportedAddress.values());\r\n    }\r\n    \r\n    private static Object[][] transformFlatToObjectArrayArray(Object[] object) {\r\n        Object[][] objectArray = new Object[object.length][1];\r\n        for (int i = 0; i < objectArray.length; i++) {\r\n            objectArray[i][0] = object[i];\r\n        }\r\n        return objectArray;\r\n    }\r\n    \r\n    /**\r\n     * For {@link ByteBufferUtility}.\r\n     * Use allocate direct.\r\n     */\r\n    public final static String DATA_PROVIDER_ALLOCATE_DIRECT = \"allocateDirect\";\r\n\r\n    @DataProvider\r\n    public static Object[][] allocateDirect() {\r\n        return new Object[][]{\r\n            {true},\r\n            {false},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * Data provider for testing with Bloom filter enabled and disabled.\r\n     * <p>\r\n     * Supplies {@code true} (Bloom filter active) and {@code false} (Bloom filter inactive),\r\n     * to verify correctness and performance behavior in both configurations.\r\n     */\r\n    public final static String DATA_PROVIDER_BLOOM_FILTER_ENABLED = \"bloomFilterEnabled\";\r\n\r\n    @DataProvider\r\n    public static Object[][] bloomFilterEnabled() {\r\n        return new Object[][]{\r\n            {true},\r\n            {false},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #largePrivateKeys()}.\r\n     */\r\n    public final static String DATA_PROVIDER_LARGE_PRIVATE_KEYS = \"largePrivateKeys\";\r\n\r\n    @DataProvider\r\n    public static Object[][] largePrivateKeys() {\r\n        return new Object[][]{\r\n            // ⚠️ Important: Do not include keys that are near or equal to the maximum valid private key (e.g., MAX_PRIVATE_KEY + offset).\r\n            // Since we use grid-based key derivation (e.g., k + i), these values can overflow the valid secp256k1 range and cause failures.\r\n            // {PublicKeyBytes.MAX_PRIVATE_KEY},\r\n            //\r\n            // Custom crafted BigIntegers with MSB set (highest bit in first byte = 1)\r\n            // These will be encoded with a leading zero byte (i.e., total of 33 bytes)\r\n            {new BigInteger(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8C00000000\", 16)},\r\n            {new BigInteger(\"F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0\", 16)},\r\n            {new BigInteger(\"F000000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n\r\n            // Additional examples that force 33-byte encoding due to high bit in first byte\r\n            {new BigInteger(\"F000000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(\"8000000000000000000000000000000000000000000000000000000000000000\", 16)}, // Only MSB set\r\n            {new BigInteger(\"C000000000000000000000000000000000000000000000000000000000000000\", 16)}, // First 2 bits set\r\n\r\n            // Variants with slight length differences, still 256-bit aligned or close\r\n            {new BigInteger(\"F000000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger( \"F00000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(  \"F0000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            \r\n            //\r\n            {new BigInteger(\"1000000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger( \"100000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(  \"10000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(   \"1000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(    \"100000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(     \"10000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(      \"1000000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(       \"100000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(        \"10000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(         \"1000000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(          \"100000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(           \"10000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(            \"1000000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(             \"100000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(              \"10000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(               \"1000000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                \"100000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                 \"10000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                  \"1000000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                   \"100000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                    \"10000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                     \"1000000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                      \"100000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                       \"10000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                        \"1000000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                         \"100000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                          \"10000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                           \"1000000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                            \"100000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                             \"10000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                              \"1000000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                               \"100000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                                \"10000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                                 \"1000000000000000000000000000000\", 16)},\r\n            {new BigInteger(                                  \"100000000000000000000000000000\", 16)},\r\n            {new BigInteger(                                   \"10000000000000000000000000000\", 16)},\r\n            {new BigInteger(                                    \"1000000000000000000000000000\", 16)},\r\n            {new BigInteger(                                     \"100000000000000000000000000\", 16)},\r\n            {new BigInteger(                                      \"10000000000000000000000000\", 16)},\r\n            {new BigInteger(                                       \"1000000000000000000000000\", 16)},\r\n            {new BigInteger(                                        \"100000000000000000000000\", 16)},\r\n            {new BigInteger(                                         \"10000000000000000000000\", 16)},\r\n            {new BigInteger(                                          \"1000000000000000000000\", 16)},\r\n            {new BigInteger(                                           \"100000000000000000000\", 16)},\r\n            {new BigInteger(                                            \"10000000000000000000\", 16)},\r\n            {new BigInteger(                                             \"1000000000000000000\", 16)},\r\n            {new BigInteger(                                              \"100000000000000000\", 16)},\r\n            {new BigInteger(                                               \"10000000000000000\", 16)},\r\n            {new BigInteger(                                                \"1000000000000000\", 16)},\r\n            {new BigInteger(                                                 \"100000000000000\", 16)},\r\n            {new BigInteger(                                                  \"10000000000000\", 16)},\r\n            {new BigInteger(                                                   \"1000000000000\", 16)},\r\n            {new BigInteger(                                                    \"100000000000\", 16)},\r\n            {new BigInteger(                                                     \"10000000000\", 16)},\r\n            {new BigInteger(                                                      \"1000000000\", 16)},\r\n            {new BigInteger(                                                       \"100000000\", 16)},\r\n            {new BigInteger(                                                        \"10000000\", 16)},\r\n            \r\n            // Smallest values that still result in 33-byte encoding due to high bit\r\n            {new BigInteger(\"8000000000000000\", 16)},     // 64-bit with MSB set\r\n            {new BigInteger(\"C000000000000000\", 16)},     // 64-bit with top two bits set\r\n            {new BigInteger(\"FF00000000000000\", 16)},     // 64-bit with top byte fully set\r\n            {new BigInteger(\"80000000000000000000000000000000\", 16)}, // 128-bit with MSB set\r\n            {new BigInteger(\"FF000000000000000000000000000000\", 16)}, // 128-bit, top byte set\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #privateKeysTooLargeWithChunkSize()}.\r\n     */\r\n    public final static String DATA_PROVIDER_PRIVATE_KEYS_TOO_LARGE_WITH_CHUNK_SIZE = \"privateKeysTooLargeWithChunkSize\";\r\n\r\n    @DataProvider\r\n    public static Object[][] privateKeysTooLargeWithChunkSize() {\r\n        return new Object[][]{\r\n            {PublicKeyBytes.MAX_TECHNICALLY_PRIVATE_KEY, PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY},\r\n            {PublicKeyBytes.MAX_PRIVATE_KEY, PublicKeyBytes.BIT_COUNT_FOR_MAX_CHUNKS_ARRAY},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #privateKeys32ByteRequiringStrip()}.\r\n     */\r\n    public final static String DATA_PROVIDER_PRIVATE_KEYS_32_BYTE_REQUIRING_STRIP = \"privateKeys32ByteRequiringStrip\";\r\n\r\n    @DataProvider\r\n    public static Object[][] privateKeys32ByteRequiringStrip() {\r\n        return new Object[][]{\r\n            // Custom crafted BigIntegers with MSB set (highest bit in first byte = 1)\r\n            // These will be encoded with a leading zero byte (i.e., total of 33 bytes)\r\n            {new BigInteger(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8C00000000\", 16)},\r\n            {new BigInteger(\"F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0\", 16)},\r\n            {new BigInteger(\"F000000000000000000000000000000000000000000000000000000000000000\", 16)},\r\n        };\r\n    }\r\n    \r\n    /**\r\n     * For {@link #bigIntegerVariants()}.\r\n     */\r\n    public final static String DATA_PROVIDER_BIG_INTEGER_VARIANTS = \"bigIntegerVariants\";\r\n    \r\n    @DataProvider\r\n    public static Object[][] bigIntegerVariants() {\r\n        return new Object[][] {\r\n            { new BigInteger(\"00\", 16), 0, (byte) 0x00 }, // 0-value, empty result\r\n            { new BigInteger(\"01\", 16), 1, (byte) 0x01 },\r\n            { new BigInteger(\"7F\", 16), 1, (byte) 0x7F },\r\n            { new BigInteger(\"FF\", 16), 1, (byte) 0xFF }, // highest byte without sign extension\r\n            { new BigInteger(1, new byte[]{0x00, 0x01}), 1, (byte) 0x01 }, // explicit leading zero\r\n            { new BigInteger(1, new byte[]{0x00, (byte)0x80}), 1, (byte) 0x80 }, // zero removed, keep sign\r\n            { new BigInteger(1, new byte[]{(byte) 0x00, (byte) 0xFF}), 1, (byte) 0xFF }, // zero removed\r\n            { new BigInteger(\"FFFFFFFF\", 16), 4, (byte) 0xFF },\r\n            // Max technically private key (leading 0x00 byte expected)\r\n            { PublicKeyBytes.MAX_TECHNICALLY_PRIVATE_KEY, 32, (byte) 0xFF }\r\n        };\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ConsumerJavaTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport java.io.File;\nimport java.io.IOException;\nimport java.math.BigInteger;\nimport java.nio.ByteBuffer;\nimport java.time.Duration;\nimport java.util.*;\n\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationReadOnly;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJava;\nimport net.ladenthin.bitcoinaddressfinder.persistence.Persistence;\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddresses1337;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddresses42;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesFiles;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesLMDB;\nimport org.apache.commons.codec.DecoderException;\nimport org.apache.commons.codec.binary.Hex;\nimport org.bitcoinj.base.Network;\nimport org.bitcoinj.crypto.ECKey;\nimport org.bitcoinj.crypto.MnemonicException;\nimport static org.hamcrest.CoreMatchers.not;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\nimport static org.hamcrest.core.StringStartsWith.startsWith;\nimport static org.mockito.Mockito.*;\n\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport org.junit.runner.RunWith;\nimport org.mockito.ArgumentCaptor;\nimport org.slf4j.Logger;\n\n@RunWith(DataProviderRunner.class)\npublic class ConsumerJavaTest {\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n    \n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n    private final PersistenceUtils persistenceUtils = new PersistenceUtils(network);\n    private final BitHelper bitHelper = new BitHelper();\n    \n    /**\n     * Returns an example key. <a href=\"https://privatekeys.pw/key/0000000000000000000000000000000000000000000000000000000000000049\">Example key</a>\n     * @return an example key.\n     */\n    public static PublicKeyBytes[] createExamplePublicKeyBytesfromPrivateKey73() {\n        PublicKeyBytes publicKeyBytes = PublicKeyBytes.fromPrivate(BigInteger.valueOf(73));\n        PublicKeyBytes[] publicKeyBytesArray = new PublicKeyBytes[]{publicKeyBytes};\n        return publicKeyBytesArray;\n    }\n\n    @Test(expected = org.lmdbjava.LmdbNativeException.class)\n    public void initLMDB_lmdbNotExisting_noExceptionThrown() throws IOException {\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = folder.newFolder().getAbsolutePath();\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n    }\n    \n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"toString\">\n    @ToStringTest\n    @Test\n    public void toString_whenCalled_containsClassNameAndIdentityHash() throws IOException {\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = folder.newFolder().getAbsolutePath();\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n\n        String toStringOutput = consumerJava.toString();\n\n        assertThat(toStringOutput, not(emptyOrNullString()));\n        assertThat(toStringOutput, matchesPattern(\"ConsumerJava@\\\\p{XDigit}+\"));\n    }\n    // </editor-fold>\n\n    @Test\n    public void startStatisticsTimer_noExceptionThrown() throws IOException, InterruptedException {\n        final int runTimes = 3;\n        \n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n        \n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.printStatisticsEveryNSeconds = 1;\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n        consumerJava.initLMDB();\n\n        // act\n        consumerJava.startStatisticsTimer();\n\n        // sleep close to runTimes+1 cycles to let the tasks run runTimes times\n        Thread.sleep(((long) cConsumerJava.printStatisticsEveryNSeconds * (runTimes +1) * 1000) - 300);\n        \n        // assert\n        consumerJava.interrupt();\n\n        ArgumentCaptor<String> logCaptorInfo = ArgumentCaptor.forClass(String.class);\n        verify(logger, atLeast(runTimes)).info(logCaptorInfo.capture());\n        List<String> arguments = logCaptorInfo.getAllValues();\n\n        assertThat(arguments.get(0), is(equalTo(\"Statistics: [Checked 0 M keys in 0 minutes] [0 k keys/second] [0 M keys/minute] [Times an empty consumer: 0] [Average contains time: 0 ms] [keys queue size: 0] [Hits: 0]\")));\n    }\n\n    @Test(expected = IllegalArgumentException.class)\n    public void startStatisticsTimer_invalidparameter_throwsException() throws IOException {\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.printStatisticsEveryNSeconds = 0;\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.startStatisticsTimer();\n    }\n    \n    @AwaitTimeTest\n    @Test\n    public void interrupt_keysQueueNotEmpty_consumerNotRunningWaitedInternallyForTheDuration() throws IOException, InterruptedException, MnemonicException.MnemonicLengthException {\n        // Change await duration\n        ConsumerJava.AWAIT_DURATION_QUEUE_EMPTY = AwaitTimeTests.AWAIT_DURATION;\n        \n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n        \n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n        consumerJava.initLMDB();\n        \n        // add keys\n        consumerJava.consumeKeys(createExamplePublicKeyBytesfromPrivateKey73());\n\n        // pre-assert, assert the keys queue is not empty\n        assertThat(consumerJava.keysQueueSize(), is(equalTo(1)));\n        assertThat(consumerJava.shouldRun.get(), is(equalTo(Boolean.TRUE)));\n        \n        // add a pseudo thread to the executor to test its eecution duration\n        consumerJava.consumeKeysExecutorService.submit(() -> {\n            try {\n                Thread.sleep(ConsumerJava.AWAIT_DURATION_QUEUE_EMPTY);\n            } catch (InterruptedException e) {\n                throw new RuntimeException(e);\n            }\n        });\n        // act\n        long beforeAct = System.currentTimeMillis();\n        // the consume is not running and the interrupt must wait and release nevertheless\n        consumerJava.interrupt();\n        \n        // assert\n        assertThat(consumerJava.shouldRun.get(), is(equalTo(Boolean.FALSE)));\n        \n        long afterAct = System.currentTimeMillis();\n        Duration waitTime = Duration.ofMillis(afterAct-beforeAct);\n        \n        // assert the waiting time is over, substract imprecision\n        assertThat(waitTime, is(greaterThan(ConsumerJava.AWAIT_DURATION_QUEUE_EMPTY.minus(AwaitTimeTests.IMPRECISION))));\n    }\n    \n    @Test\n    public void interrupt_statisticsTimerStarted_executerServiceShutdown() throws IOException, InterruptedException {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n        \n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.printStatisticsEveryNSeconds = 1;\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        \n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n        consumerJava.initLMDB();\n        // pre-assert\n        assertThat(consumerJava.scheduledExecutorService.isShutdown(), is(equalTo(Boolean.FALSE)));\n        \n        consumerJava.startStatisticsTimer();\n        // wait till the scheduled TimerTask is completed\n        Thread.sleep(Duration.ofSeconds(1L));\n        \n        // pre-assert\n        assertThat(consumerJava.scheduledExecutorService.isShutdown(), is(equalTo(Boolean.FALSE)));\n        assertThat(consumerJava.consumeKeysExecutorService.isShutdown(), is(equalTo(Boolean.FALSE)));\n\n        // act\n        consumerJava.interrupt();\n\n        // assert\n        assertThat(consumerJava.scheduledExecutorService.isShutdown(), is(equalTo(Boolean.TRUE)));\n        assertThat(consumerJava.consumeKeysExecutorService.isShutdown(), is(equalTo(Boolean.TRUE)));\n    }\n\n    @Test\n    public void initLMDB_initialize_databaseOpened() throws IOException, InterruptedException, DecoderException, MnemonicException.MnemonicLengthException {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        \n        // pre-assert\n        assertThat(consumerJava.persistence, is(nullValue()));\n        \n        // act\n        consumerJava.initLMDB();\n        \n        // assert\n        Persistence persistence = Objects.requireNonNull(consumerJava.persistence);\n        assertThat(persistence.isClosed(), is(equalTo(Boolean.FALSE)));\n    }\n    \n    @Test\n    public void interrupt_consumerInitialized_databaseClosed() throws IOException, InterruptedException, DecoderException, MnemonicException.MnemonicLengthException {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n        Persistence persistence = Objects.requireNonNull(consumerJava.persistence);\n\n        // pre-assert\n        assertThat(persistence.isClosed(), is(equalTo(Boolean.FALSE)));\n        \n        // act\n        consumerJava.interrupt();\n        \n        // assert\n        assertThat(persistence.isClosed(), is(equalTo(Boolean.TRUE)));\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT, location = CommonDataProvider.class)\n    public void runProber_testAddressGiven_hitExpected(boolean compressed, boolean useStaticAmount) throws Exception {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(compressed);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, useStaticAmount, false);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.runtimePublicKeyCalculationCheck = ManualDebugConstants.ENABLE_RUNTIME_PUBLIC_KEY_CALCULATION_CHECK;\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n\n        Random randomForProducer = new Random(TestAddresses42.RANDOM_SEED);\n        \n        CProducerJava cProducerJava = new CProducerJava();\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, randomForProducer);\n        ProducerJava producerJava = new ProducerJava(cProducerJava, consumerJava, keyUtility, mockKeyProducer, bitHelper);\n\n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n        producerJava.produceKeys();\n        consumerJava.consumeKeys(createHash160ByteBuffer());\n\n        // assert\n        assertThat(consumerJava.hits.get(), is(equalTo(1L)));\n        assertThat(consumerJava.vanityHits.get(), is(equalTo(0L)));\n        ArgumentCaptor<String> logCaptorInfo = ArgumentCaptor.forClass(String.class);\n        verify(logger, times(6)).info(logCaptorInfo.capture());\n\n        List<String> arguments = logCaptorInfo.getAllValues();\n\n        ECKey key = new TestAddresses42(1, compressed).getECKeys().get(0);\n        \n        PublicKeyBytes publicKeyBytes = PublicKeyBytes.fromPrivate(key.getPrivKey());\n        \n        // to prevent any exception in further hit message creation and a possible missing hit message, log the secret alone first that a recovery is possible\n        String hitMessageSecretKey = ConsumerJava.HIT_SAFE_PREFIX + \"publicKeyBytes.getSecretKey(): \" + key.getPrivKey();\n        assertThat(arguments.get(0), is(equalTo(hitMessageSecretKey)));\n        \n        String hitMessagePublicKeyBytesUncompressed = ConsumerJava.HIT_SAFE_PREFIX + \"publicKeyBytes.getUncompressed(): \" + Hex.encodeHexString(publicKeyBytes.getUncompressed());\n        assertThat(arguments.get(1), is(equalTo(hitMessagePublicKeyBytesUncompressed)));\n        \n        String hitMessagePublicKeyBytesCompressed = ConsumerJava.HIT_SAFE_PREFIX + \"publicKeyBytes.getCompressed(): \" + Hex.encodeHexString(publicKeyBytes.getCompressed());\n        assertThat(arguments.get(2), is(equalTo(hitMessagePublicKeyBytesCompressed)));\n        \n        String hitMessageHash160Uncompressed = ConsumerJava.HIT_SAFE_PREFIX + \"hash160Uncompressed: \" + Hex.encodeHexString(publicKeyBytes.getUncompressedKeyHash());\n        assertThat(arguments.get(3), is(equalTo(hitMessageHash160Uncompressed)));\n        \n        String hitMessageHash160Compressed = ConsumerJava.HIT_SAFE_PREFIX + \"hash160Compressed: \" + Hex.encodeHexString(publicKeyBytes.getCompressedKeyHash());\n        assertThat(arguments.get(4), is(equalTo(hitMessageHash160Compressed)));\n        \n        String hitMessageFull = ConsumerJava.HIT_PREFIX + keyUtility.createKeyDetails(key);\n        assertThat(arguments.get(5), is(equalTo(hitMessageFull)));\n    }\n\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT, location = CommonDataProvider.class)\n    public void runProber_unknownAddressGiven_missExpectedAndLogMessagesInDebugAndTrace(boolean compressed, boolean useStaticAmount) throws Exception {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(compressed);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, useStaticAmount, false);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.runtimePublicKeyCalculationCheck = ManualDebugConstants.ENABLE_RUNTIME_PUBLIC_KEY_CALCULATION_CHECK;\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n\n        Random randomForProducer = new Random(TestAddresses1337.RANDOM_SEED);\n        \n        CProducerJava cProducerJava = new CProducerJava();\n        cProducerJava.batchSizeInBits = 0;\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, randomForProducer);\n        ProducerJava producerJava = new ProducerJava(cProducerJava, consumerJava, keyUtility, mockKeyProducer, bitHelper);\n\n        Logger logger = mock(Logger.class);\n        when(logger.isDebugEnabled()).thenReturn(true);\n        when(logger.isTraceEnabled()).thenReturn(true);\n        consumerJava.setLogger(logger);\n        producerJava.produceKeys();\n        \n        consumerJava.consumeKeys(createHash160ByteBuffer());\n\n        // assert\n        assertThat(consumerJava.hits.get(), is(equalTo(0L)));\n        assertThat(consumerJava.vanityHits.get(), is(equalTo(0L)));\n        ArgumentCaptor<String> logCaptorDebug = ArgumentCaptor.forClass(String.class);\n        ArgumentCaptor<String> logCaptorTrace = ArgumentCaptor.forClass(String.class);\n        verify(logger, times(2)).debug(logCaptorDebug.capture());\n        verify(logger, times(9)).trace(logCaptorTrace.capture());\n\n        List<String> argumentsDebug = logCaptorDebug.getAllValues();\n        List<String> argumentsTrace = logCaptorTrace.getAllValues();\n\n        ECKey unknownKeyUncompressed = new TestAddresses1337(1, false).getECKeys().get(0);\n        ECKey unknownKeyCompressed = new TestAddresses1337(1, true).getECKeys().get(0);\n        String missMessageUncompressed = ConsumerJava.MISS_PREFIX + keyUtility.createKeyDetails(unknownKeyUncompressed);\n        String missMessageCompressed = ConsumerJava.MISS_PREFIX + keyUtility.createKeyDetails(unknownKeyCompressed);\n        \n        assertThat(argumentsDebug.get(0), startsWith(\"keysQueue.put(publicKeyBytes) with length: 1\"));\n        assertThat(argumentsDebug.get(1), startsWith(\"keysQueue.size(): 1\"));\n        \n        assertThat(argumentsTrace.get(0), startsWith(\"consumeKeys\"));\n        assertThat(argumentsTrace.get(1), startsWith(\"Time before persistence.containsAddress: \"));\n        assertThat(argumentsTrace.get(2), startsWith(\"Time after persistence.containsAddress: \"));\n        assertThat(argumentsTrace.get(3), startsWith(\"Time delta: \"));\n        assertThat(argumentsTrace.get(4), startsWith(\"Time before persistence.containsAddress: \"));\n        assertThat(argumentsTrace.get(5), startsWith(\"Time after persistence.containsAddress: \"));\n        assertThat(argumentsTrace.get(6), startsWith(\"Time delta: \"));\n        \n        // assert for expected miss messages\n        assertThat(argumentsTrace.get(7), is(equalTo(missMessageUncompressed)));\n        assertThat(argumentsTrace.get(8), is(equalTo(missMessageCompressed)));\n    }\n\n    @Test\n    public void consumeKeys_invalidSecretGiven_continueExpectedAndNoExceptionThrown() throws IOException, InterruptedException, DecoderException, MnemonicException.MnemonicLengthException {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.runtimePublicKeyCalculationCheck = ManualDebugConstants.ENABLE_RUNTIME_PUBLIC_KEY_CALCULATION_CHECK;\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n\n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n\n        PublicKeyBytes invalidPublicKeyBytes = PublicKeyBytes.INVALID_KEY_ONE;\n        PublicKeyBytes[] publicKeyBytesArray = new PublicKeyBytes[]{invalidPublicKeyBytes};\n        consumerJava.consumeKeys(publicKeyBytesArray);\n        consumerJava.consumeKeys(createHash160ByteBuffer());\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED, location = CommonDataProvider.class)\n    public void consumeKeys_withRuntimeKeyCalculationEnabled_logsError_whenPublicKeyHashIsInvalid(boolean compressed) throws IOException, InterruptedException, DecoderException, MnemonicException.MnemonicLengthException {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.runtimePublicKeyCalculationCheck = true;\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n\n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n\n        PublicKeyBytes invalidPublicKeyBytes = PublicKeyBytes.fromPrivate(BigInteger.valueOf(1337));\n        // invalidate compressed or uncompressed\n        if (compressed) {\n            invalidPublicKeyBytes.getCompressed()[7] = 0;\n        } else {\n            invalidPublicKeyBytes.getUncompressed()[7] = 0;\n        }\n        PublicKeyBytes[] publicKeyBytesArray = new PublicKeyBytes[]{invalidPublicKeyBytes};\n        consumerJava.consumeKeys(publicKeyBytesArray);\n        consumerJava.consumeKeys(createHash160ByteBuffer());\n        \n        // assert\n        assertThat(consumerJava.hits.get(), is(equalTo(0L)));\n        assertThat(consumerJava.vanityHits.get(), is(equalTo(0L)));\n        ArgumentCaptor<String> logCaptorError = ArgumentCaptor.forClass(String.class);\n        verify(logger, times(6)).error(logCaptorError.capture());\n        \n        List<String> arguments = logCaptorError.getAllValues();\n        \n        if (compressed) {\n            assertThat(arguments.get(0), is(equalTo(\"fromPrivateCompressed.getPubKeyHash() != hash160Compressed\")));\n            assertThat(arguments.get(1), is(equalTo(\"getSecretKey: 1337\")));\n            assertThat(arguments.get(2), is(equalTo(\"pubKeyCompressed: 02db0c51cc634a0096374b0b895584a3ca2fb3bea4fd0ee2361f8db63a650fcee6\")));\n            assertThat(arguments.get(3), is(equalTo(\"pubKeyCompressedFromEcKey: 02db0c51cc634a4096374b0b895584a3ca2fb3bea4fd0ee2361f8db63a650fcee6\")));\n            assertThat(arguments.get(4), is(equalTo(\"hash160Compressed: a1039a5001eaccd75abb339b446b83b1ecf54ef7\")));\n            assertThat(arguments.get(5), is(equalTo(\"hash160CompressedFromEcKey: 879f5696d90c1c280fa3c7d77723ebc59d7ac108\")));\n        } else {\n            assertThat(arguments.get(0), is(equalTo(\"fromPrivateUncompressed.getPubKeyHash() != hash160Uncompressed\")));\n            assertThat(arguments.get(1), is(equalTo(\"getSecretKey: 1337\")));\n            assertThat(arguments.get(2), is(equalTo(\"pubKeyUncompressed: 04db0c51cc634a0096374b0b895584a3ca2fb3bea4fd0ee2361f8db63a650fcee67ec0bd2baea1ae184bd16fd397b0e64d5d28257f85836486367fe33cc5b6e6a0\")));\n            assertThat(arguments.get(3), is(equalTo(\"pubKeyUncompressedFromEcKey: 04db0c51cc634a4096374b0b895584a3ca2fb3bea4fd0ee2361f8db63a650fcee67ec0bd2baea1ae184bd16fd397b0e64d5d28257f85836486367fe33cc5b6e6a0\")));\n            assertThat(arguments.get(4), is(equalTo(\"hash160Uncompressed: 1a69285cb42032d77801a15a30357d510b247100\")));\n            assertThat(arguments.get(5), is(equalTo(\"hash160UncompressedFromEcKey: e02e1cae178d3a2f84a5d897ee8b7ed6c0e2bbc4\")));\n        }\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED, location = CommonDataProvider.class)\n    public void consumeKeys_testVanityPattern_patternMatches(boolean compressed) throws IOException, InterruptedException, DecoderException, MnemonicException.MnemonicLengthException {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        cConsumerJava.enableVanity = true;\n        if (compressed) {\n            // 1JYHzX3ndZEcnjrWSQ9VC7324TJ9BAoGy4\n            cConsumerJava.vanityPattern = \"1JYH.*\";\n        } else {\n            // 14sNbmEhgiGX6BZe9Q5PCgTQT3576mniZt\n            cConsumerJava.vanityPattern = \"14sN.*\";\n        }\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n\n        Logger logger = mock(Logger.class);\n        consumerJava.setLogger(logger);\n        \n        consumerJava.consumeKeys(createExamplePublicKeyBytesfromPrivateKey73());\n        consumerJava.consumeKeys(createHash160ByteBuffer());\n        \n        // assert\n        assertThat(consumerJava.hits.get(), is(equalTo(0L)));\n        assertThat(consumerJava.vanityHits.get(), is(equalTo(1L)));\n        ArgumentCaptor<String> logCaptorInfo = ArgumentCaptor.forClass(String.class);\n        verify(logger, times(6)).info(logCaptorInfo.capture());\n        \n        List<String> arguments = logCaptorInfo.getAllValues();\n        \n        BigInteger secret = BigInteger.valueOf(73);\n        ECKey ecKey = keyUtility.createECKey(secret, true);\n        String mnemonics = keyUtility.createMnemonics(ecKey.getPrivKeyBytes());\n        \n        Map<BIP39Wordlist, String> map = new HashMap<>();\n        map.put(BIP39Wordlist.CHINESE_SIMPLIFIED, \"的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 这 铁\");\n        map.put(BIP39Wordlist.CHINESE_TRADITIONAL, \"的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 這 鐵\");\n        map.put(BIP39Wordlist.CZECH, \"abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace ananas internet\");\n        map.put(BIP39Wordlist.ENGLISH, \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abuse differ\");\n        map.put(BIP39Wordlist.FRENCH, \"abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abreuver cylindre\");\n        map.put(BIP39Wordlist.ITALIAN, \"abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco accenno disposto\");\n        // attention: japanese has a special separator\n        map.put(BIP39Wordlist.JAPANESE, \"あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あさい　くなん\");\n        map.put(BIP39Wordlist.KOREAN, \"가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가슴 목걸이\");\n        map.put(BIP39Wordlist.PORTUGUESE, \"abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abranger conectar\");\n        map.put(BIP39Wordlist.RUSSIAN, \"абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац агитация завтра\");\n        map.put(BIP39Wordlist.SPANISH, \"ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco abuelo cuota\");\n        map.put(BIP39Wordlist.TURKISH, \"abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur absürt fason\");\n        \n        assertThat(map.size(), is(BIP39Wordlist.values().length));\n       \n        for (Map.Entry<BIP39Wordlist, String> entry : map.entrySet()) {\n            BIP39Wordlist bip39Wordlist = entry.getKey();\n            String expectedMnemonic = entry.getValue();\n            assertThat(mnemonics, containsString(expectedMnemonic));\n        }\n        \n        assertThat(arguments.get(0), is(equalTo(\"hit: safe log: publicKeyBytes.getSecretKey(): 73\")));\n        assertThat(arguments.get(1), is(equalTo(\"hit: safe log: publicKeyBytes.getUncompressed(): 04af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\")));\n        assertThat(arguments.get(2), is(equalTo(\"hit: safe log: publicKeyBytes.getCompressed(): 02af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\")));\n        assertThat(arguments.get(3), is(equalTo(\"hit: safe log: hash160Uncompressed: 2a6f34a72c181bdd4e6d91ffa69e84fd6c49b207\")));\n        assertThat(arguments.get(4), is(equalTo(\"hit: safe log: hash160Compressed: c065379323a549fc3547bcb1937d5dcb48df2396\")));\n        \n        final String privateKeyBytes = \"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73]\";\n        final String privateKeyHex = \"0000000000000000000000000000000000000000000000000000000000000049\";\n        final String wif;\n        final String publicKeyAsHex;\n        final String publicKeyHash160Hex;\n        final String publicKeyHash160Base58;\n        \n        if (compressed) {\n            wif = \"KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7fj3itoEY\";\n            publicKeyAsHex = \"02af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\";\n            publicKeyHash160Hex = \"c065379323a549fc3547bcb1937d5dcb48df2396\";\n            publicKeyHash160Base58 = \"1JYHzX3ndZEcnjrWSQ9VC7324TJ9BAoGy4\";\n        } else {\n            wif = \"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreJwwNRRr\";\n            publicKeyAsHex = \"04af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\";\n            publicKeyHash160Hex = \"2a6f34a72c181bdd4e6d91ffa69e84fd6c49b207\";\n            publicKeyHash160Base58 = \"14sNbmEhgiGX6BZe9Q5PCgTQT3576mniZt\";\n        }\n        \n        String expectedMessage = \"vanity pattern match: privateKeyBigInteger: [73] privateKeyBytes: [\"+privateKeyBytes+\"] privateKeyHex: [\"+privateKeyHex+\"] WiF: [\" + wif +\"] publicKeyAsHex: [\"+publicKeyAsHex+\"] publicKeyHash160Hex: [\"+publicKeyHash160Hex+\"] publicKeyHash160Base58: [\"+publicKeyHash160Base58+\"] Compressed: [\"+compressed+\"] \"+ mnemonics;\n        assertThat(arguments.get(5), is(equalTo(expectedMessage)));\n    }\n\n\n    @Test(expected = RuntimeException.class)\n    public void interrupt_persistenceCloseThrowsException_runtimeExceptionThrown() throws Exception {\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, true);\n\n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\n        consumerJava.initLMDB();\n\n        // Mock the persistence to throw an exception on close\n        Persistence mockPersistence = mock(Persistence.class);\n        when(mockPersistence.isClosed()).thenReturn(false);\n        doThrow(new RuntimeException(\"Simulated close failure\")).when(mockPersistence).close();\n        consumerJava.persistence = mockPersistence;\n\n        // act - should throw RuntimeException\n        consumerJava.interrupt();\n    }\n\n    private ByteBuffer createHash160ByteBuffer() {\n        ByteBuffer threadLocalReuseableByteBuffer = ByteBuffer.allocateDirect(PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES);\n        return threadLocalReuseableByteBuffer;\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/EndiannessConverterTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport static org.mockito.Mockito.*;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.is;\n\nimport java.nio.ByteOrder;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\n@RunWith(DataProviderRunner.class)\npublic class EndiannessConverterTest {\n\n    private final ByteBufferUtility byteBufferUtility = mock(ByteBufferUtility.class);\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"mustConvert\">\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ENDIANNESS, location = CommonDataProvider.class)\n    public void mustConvertTest(ByteOrder sourceOrder, ByteOrder targetOrder, boolean expectedMustConvert) {\n        // arrange\n        EndiannessConverter converter = new EndiannessConverter(sourceOrder, targetOrder, byteBufferUtility);\n\n        // act\n        boolean result = converter.mustConvert();\n\n        // assert\n        assertThat(result, is(expectedMustConvert));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"convertEndian\">\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ENDIANNESS, location = CommonDataProvider.class)\n    public void convertEndianTest(ByteOrder sourceOrder, ByteOrder targetOrder, boolean mustConvert) {\n        // arrange\n        EndiannessConverter converter = new EndiannessConverter(sourceOrder, targetOrder, byteBufferUtility);\n        byte[] array = {1, 2, 3};\n\n        // act\n        converter.convertEndian(array);\n\n        // assert\n        if (mustConvert) {\n            verify(byteBufferUtility).reverse(array);\n        } else {\n            verify(byteBufferUtility, never()).reverse(array);\n        }\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"source/target getters\">\n    @Test\n    public void getSourceOrder_returnsCorrectSourceOrder() {\n        // arrange\n        EndiannessConverter converter = new EndiannessConverter(ByteOrder.BIG_ENDIAN, ByteOrder.LITTLE_ENDIAN, byteBufferUtility);\n\n        // act\n        ByteOrder source = converter.getSourceOrder();\n\n        // assert\n        assertThat(source, is(ByteOrder.BIG_ENDIAN));\n    }\n\n    @Test\n    public void getTargetOrder_returnsCorrectTargetOrder() {\n        // arrange\n        EndiannessConverter converter = new EndiannessConverter(ByteOrder.BIG_ENDIAN, ByteOrder.LITTLE_ENDIAN, byteBufferUtility);\n\n        // act\n        ByteOrder target = converter.getTargetOrder();\n\n        // assert\n        assertThat(target, is(ByteOrder.LITTLE_ENDIAN));\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/EqualHashCodeToStringTestHelper.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2021 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport org.junit.Assert;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.not;\r\n\r\npublic class EqualHashCodeToStringTestHelper {\r\n    \r\n    private final Object instanceA;\r\n    private final Object instanceADifferentReference;\r\n    \r\n    private final Object instanceB;\r\n    private final Object instanceBDifferentReference;\r\n\r\n    public EqualHashCodeToStringTestHelper(Object instanceA, Object instanceADifferentReference, Object instanceB, Object instanceBDifferentReference) {\r\n        this.instanceA = instanceA;\r\n        this.instanceADifferentReference = instanceADifferentReference;\r\n        this.instanceB = instanceB;\r\n        this.instanceBDifferentReference = instanceBDifferentReference;\r\n    }\r\n    \r\n    public void assertEqualsHashCodeToStringAIsDifferentToB() {\r\n        assertDifferenceReference();\r\n        \r\n        // equals\r\n        assertThat(instanceA, is(equalTo(instanceADifferentReference)));\r\n        assertThat(instanceB, is(equalTo(instanceBDifferentReference)));\r\n        assertThat(instanceA, is(not(equalTo(instanceB))));\r\n        assertThat(instanceA, is(not(equalTo(instanceBDifferentReference))));\r\n        assertThat(instanceADifferentReference, is(not(equalTo(instanceBDifferentReference))));\r\n        \r\n        // hashCode\r\n        assertThat(instanceA.hashCode(), is(equalTo(instanceADifferentReference.hashCode())));\r\n        assertThat(instanceB.hashCode(), is(equalTo(instanceBDifferentReference.hashCode())));\r\n        assertThat(instanceA.hashCode(), is(not(equalTo(instanceB.hashCode()))));\r\n        assertThat(instanceA.hashCode(), is(not(equalTo(instanceBDifferentReference.hashCode()))));\r\n        assertThat(instanceADifferentReference.hashCode(), is(not(equalTo(instanceBDifferentReference.hashCode()))));\r\n        \r\n        // toString\r\n        assertThat(instanceA.toString(), is(equalTo(instanceADifferentReference.toString())));\r\n        assertThat(instanceB.toString(), is(equalTo(instanceBDifferentReference.toString())));\r\n        assertThat(instanceA.toString(), is(not(equalTo(instanceB.toString()))));\r\n        assertThat(instanceA.toString(), is(not(equalTo(instanceBDifferentReference.toString()))));\r\n        assertThat(instanceADifferentReference.toString(), is(not(equalTo(instanceBDifferentReference.toString()))));\r\n    }\r\n    \r\n    public void assertEqualsHashCodeToStringAIsEqualToB() {\r\n        assertDifferenceReference();\r\n        \r\n        // equals\r\n        assertThat(instanceA, is(equalTo(instanceADifferentReference)));\r\n        assertThat(instanceB, is(equalTo(instanceBDifferentReference)));\r\n        assertThat(instanceA, is(equalTo(instanceB)));\r\n        \r\n        // hashCode\r\n        assertThat(instanceA.hashCode(), is(equalTo(instanceADifferentReference.hashCode())));\r\n        assertThat(instanceB.hashCode(), is(equalTo(instanceBDifferentReference.hashCode())));\r\n        assertThat(instanceA.hashCode(), is(equalTo(instanceB.hashCode())));\r\n        \r\n        // toString\r\n        assertThat(instanceA.toString(), is(equalTo(instanceADifferentReference.toString())));\r\n        assertThat(instanceB.toString(), is(equalTo(instanceBDifferentReference.toString())));\r\n        assertThat(instanceA.toString(), is(equalTo(instanceB.toString())));\r\n    }\r\n\r\n    private void assertDifferenceReference() {\r\n        Assert.assertNotSame(instanceA, instanceADifferentReference);\r\n        Assert.assertNotSame(instanceA, instanceB);\r\n        Assert.assertNotSame(instanceA, instanceBDifferentReference);\r\n\r\n        Assert.assertNotSame(instanceB, instanceBDifferentReference);\r\n        Assert.assertNotSame(instanceB, instanceA);\r\n        Assert.assertNotSame(instanceB, instanceADifferentReference);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/FileHelperTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.Arrays;\r\nimport java.util.Collections;\r\nimport java.util.List;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.empty;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.hasSize;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.junit.Assert.fail;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\npublic class FileHelperTest {\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    private final FileHelper fileHelper = new FileHelper();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"stringsToFiles\">\r\n    @Test\r\n    public void stringsToFiles_emptyList_returnsEmptyList() {\r\n        // act\r\n        List<File> result = fileHelper.stringsToFiles(Collections.emptyList());\r\n\r\n        // assert\r\n        assertThat(result, is(empty()));\r\n    }\r\n\r\n    @Test\r\n    public void stringsToFiles_singlePath_returnsFileWithSamePath() {\r\n        // arrange\r\n        String path = \"/some/path/to/file.txt\";\r\n\r\n        // act\r\n        List<File> result = fileHelper.stringsToFiles(Collections.singletonList(path));\r\n\r\n        // assert\r\n        assertThat(result, hasSize(1));\r\n        assertThat(result.get(0), is(equalTo(new File(path))));\r\n    }\r\n\r\n    @Test\r\n    public void stringsToFiles_multiplePaths_returnsFilesInSameOrder() {\r\n        // arrange\r\n        List<String> paths = Arrays.asList(\"/first/file.txt\", \"/second/file.txt\", \"/third/file.txt\");\r\n\r\n        // act\r\n        List<File> result = fileHelper.stringsToFiles(paths);\r\n\r\n        // assert\r\n        assertThat(result, hasSize(3));\r\n        assertThat(result.get(0), is(equalTo(new File(paths.get(0)))));\r\n        assertThat(result.get(1), is(equalTo(new File(paths.get(1)))));\r\n        assertThat(result.get(2), is(equalTo(new File(paths.get(2)))));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"assertFilesExists\">\r\n    @Test\r\n    public void assertFilesExists_emptyList_noExceptionThrown() {\r\n        // act\r\n        fileHelper.assertFilesExists(Collections.emptyList());\r\n\r\n        // assert\r\n    }\r\n\r\n    @Test\r\n    public void assertFilesExists_existingFile_noExceptionThrown() throws IOException {\r\n        // arrange\r\n        File tempFile = folder.newFile(\"filehelper_test.tmp\");\r\n\r\n        // act\r\n        fileHelper.assertFilesExists(Collections.singletonList(tempFile));\r\n\r\n        // assert\r\n    }\r\n\r\n    @Test\r\n    public void assertFilesExists_multipleExistingFiles_noExceptionThrown() throws IOException {\r\n        // arrange\r\n        File tempFile1 = folder.newFile(\"filehelper_test_a.tmp\");\r\n        File tempFile2 = folder.newFile(\"filehelper_test_b.tmp\");\r\n\r\n        // act\r\n        fileHelper.assertFilesExists(Arrays.asList(tempFile1, tempFile2));\r\n\r\n        // assert\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void assertFilesExists_missingFile_throwsIllegalArgumentException() {\r\n        // arrange\r\n        File nonExistentFile = new File(\"/this/path/does/not/exist/file.txt\");\r\n\r\n        // act\r\n        fileHelper.assertFilesExists(Collections.singletonList(nonExistentFile));\r\n    }\r\n\r\n    @Test\r\n    public void assertFilesExists_missingFile_exceptionMessageContainsFilePath() {\r\n        // arrange\r\n        File nonExistentFile = new File(\"/this/path/does/not/exist/file.txt\");\r\n\r\n        // act\r\n        try {\r\n            fileHelper.assertFilesExists(Collections.singletonList(nonExistentFile));\r\n            fail(\"Expected IllegalArgumentException was not thrown\");\r\n        } catch (IllegalArgumentException e) {\r\n            // assert\r\n            assertThat(e.getMessage(), containsString(nonExistentFile.toString()));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/FinderTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport java.io.File;\n\nimport org.jspecify.annotations.Nullable;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport static org.hamcrest.Matchers.*;\nimport static org.hamcrest.MatcherAssert.assertThat;\n\nimport java.io.IOException;\nimport java.time.Duration;\nimport java.util.List;\nimport java.util.Objects;\n\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CFinder;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaBip39;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaIncremental;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandom;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandomInstance;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaSocket;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaWebSocket;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaZmq;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationReadOnly;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJava;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJavaSecretsFiles;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.*;\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaRandom;\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaSocketTest;\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducerJavaZmqTest;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesFiles;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesLMDB;\nimport org.junit.runner.RunWith;\nimport org.slf4j.Logger;\n\n@RunWith(DataProviderRunner.class)\npublic class FinderTest {\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"interrupt\">\n    @Test\n    public void interrupt_noProducersSet_noExceptionThrown() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        Finder finder = new Finder(cFinder);\n        // act\n        finder.interrupt();\n        // assert\n    }\n    \n    @Test\n    public void interrupt_producersSetAndNotInitialized_noExceptionThrown() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        configureProducerWithExamples(cFinder);\n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        finder.startKeyProducer();\n        finder.startConsumer();\n        finder.configureProducer();\n        // act\n        finder.interrupt();\n        // assert\n    }\n    \n    @Test\n    public void interrupt_consumerStarted_consumerNotStopped() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        configureProducerWithExamples(cFinder);\n        \n        // consumer java configuration\n        configureConsumerJava(cFinder);\n        \n        Finder finder = new Finder(cFinder);\n        finder.startConsumer();\n        // act\n        finder.interrupt();\n        // assert\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"shutdownAndAwaitTermination\">\n    @Test\n    public void shutdownAndAwaitTermination_noProducersSet_shutdownCalled() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        Finder finder = new Finder(cFinder);\n        // pre-assert\n        assertThat(finder.producerExecutorService.isTerminated(), is(equalTo(Boolean.FALSE)));\n        // act\n        finder.shutdownAndAwaitTermination();\n        // assert\n        assertThat(finder.producerExecutorService.isTerminated(), is(equalTo(Boolean.TRUE)));\n    }\n    \n    @Test\n    public void shutdownAndAwaitTermination_producersSetAndNotInitialized_shutdownCalled() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        configureProducerWithExamples(cFinder);\n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        finder.startKeyProducer();\n        finder.startConsumer();\n        finder.configureProducer();\n        // act\n        finder.shutdownAndAwaitTermination();\n        // assert\n        assertThat(finder.producerExecutorService.isTerminated(), is(equalTo(Boolean.TRUE)));\n    }\n    \n    @AwaitTimeTest\n    @Test\n    public void shutdownAndAwaitTermination_producersSetAndInitialized_shutdownCalledAndAwaitTermination() throws IOException {\n        // Change await duration\n        Finder.AWAIT_DURATION_TERMINATE = AwaitTimeTests.AWAIT_DURATION;\n        \n        // Attention: During the long duration, this test produce a lot of debug and warn output, prevent it by set the log details\n        new LogLevelChange().turnOff();\n        \n        // arrange\n        CFinder cFinder = new CFinder();\n        String keyProducerId = \"exampleId\";\n        final CProducerJava cProducerJava = new CProducerJava();\n        cProducerJava.keyProducerId = keyProducerId;\n        cProducerJava.runOnce = false;\n        cFinder.producerJava.add(cProducerJava);\n        configureKeyProducerJavaRandom(keyProducerId, cFinder);\n        \n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        finder.startKeyProducer();\n        finder.startConsumer();\n        finder.configureProducer();\n        finder.initProducer();\n        finder.startProducer();\n\n        // act\n        long beforeAct = System.currentTimeMillis();\n        finder.shutdownAndAwaitTermination();\n        \n        // assert\n        long afterAct = System.currentTimeMillis();\n        Duration waitTime = Duration.ofMillis(afterAct-beforeAct);\n        \n        // assert the waiting time is over, substract imprecision\n        assertThat(waitTime, is(greaterThan(Finder.AWAIT_DURATION_TERMINATE.minus(AwaitTimeTests.IMPRECISION))));\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"getAllProducers\">\n    @Test\n    public void getAllProducers_noProducersSet_returnEmptyList() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        Finder finder = new Finder(cFinder);\n        // act\n        List<Producer> allProducers = finder.getAllProducers();\n        // assert\n        assertThat(allProducers, is(empty()));\n    }\n    \n    @Test\n    public void getAllProducers_producersSetAndNotInitialized_returnList() throws IOException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        configureProducerWithExamples(cFinder);\n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        finder.startKeyProducer();\n        finder.startConsumer();\n        finder.configureProducer();\n        // act\n        List<Producer> allProducers = finder.getAllProducers();\n        // assert\n        assertThat(allProducers, hasSize(3));\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"startKeyProducer\">\n    @Test(expected = KeyProducerIdNullException.class)\n    public void startKeyProducer_keyProducerIdIsNull_ExceptionThrown() throws IOException, InterruptedException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        configureKeyProducerJavaRandom(null, cFinder);\n        \n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        // act\n        finder.startKeyProducer();\n    }\n    \n    @Test(expected = KeyProducerIdIsNotUniqueException.class)\n    public void startKeyProducer_keyProducerIdIsNotUnique_ExceptionThrown() throws IOException, InterruptedException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        String sameIdTwice = \"123\";\n        configureKeyProducerJavaRandom(sameIdTwice, cFinder);\n        configureKeyProducerJavaRandom(sameIdTwice, cFinder);\n        \n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        // act\n        finder.startKeyProducer();\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"configureProducer\">\n    @Test(expected = KeyProducerIdUnknownException.class)\n    public void configureProducer_keyProducerIdIsUnknown_ExceptionThrown() throws IOException, InterruptedException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        final CProducerJava cProducerJava = new CProducerJava();\n        cProducerJava.runOnce = false;\n        // null is not valid or will find any other id\n        cProducerJava.keyProducerId = null;\n        cFinder.producerJava.add(cProducerJava);\n        configureKeyProducerJavaRandom(\"unknownId\", cFinder);\n        configureConsumerJava(cFinder);\n\n        Finder finder = new Finder(cFinder);\n\n        finder.startConsumer();\n        finder.startKeyProducer();\n        \n        // act\n        finder.configureProducer();\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"testFullCycle\">\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_KEY_PRODUCER_TYPES, location = CommonDataProvider.class)\n    public void testFullCycle_keyProducerJavaSetAndInitialized_statesCorrect(CommonDataProvider.KeyProducerTypesLocal keyProducerType) throws IOException, InterruptedException {\n        // arrange\n        CFinder cFinder = new CFinder();\n        String keyProducerId = \"exampleId\";\n        final CProducerJava cProducerJava = new CProducerJava();\n        cProducerJava.keyProducerId = keyProducerId;\n        cProducerJava.runOnce = false;\n        cFinder.producerJava.add(cProducerJava);\n        final Class keyProducerClass;\n        switch (keyProducerType) {\n            case KeyProducerJavaRandom:\n                keyProducerClass = KeyProducerJavaRandom.class;\n                configureKeyProducerJavaRandom(keyProducerId, cFinder);\n                break;\n            case KeyProducerJavaIncremental:\n                keyProducerClass = KeyProducerJavaIncremental.class;\n                configureKeyProducerJavaIncremental(keyProducerId, cFinder);\n                break;\n            case KeyProducerJavaBip39:\n                keyProducerClass = KeyProducerJavaBip39.class;\n                configureKeyProducerJavaBip39(keyProducerId, cFinder);\n                break;\n            case KeyProducerJavaSocket:\n                keyProducerClass = KeyProducerJavaSocket.class;\n                configureKeyProducerJavaSocket(keyProducerId, cFinder);\n                break;\n            case KeyProducerJavaWebSocket:\n                keyProducerClass = KeyProducerJavaWebSocket.class;\n                configureKeyProducerJavaWebSocket(keyProducerId, cFinder);\n                break;\n            case KeyProducerJavaZmq:\n                keyProducerClass = KeyProducerJavaZmq.class;\n                configureKeyProducerJavaZmq(keyProducerId, cFinder);\n                break;\n            default:\n                throw new IllegalArgumentException(\"Unknown KeyProducerType: \" + keyProducerType);\n        }\n        \n        configureConsumerJava(cFinder);\n        Finder finder = new Finder(cFinder);\n        // act and assert the full cycle\n        {\n            // pre-assert\n            assertThat(finder.getKeyProducers().keySet(), hasSize(0));\n            // act\n            finder.startKeyProducer();\n            // assert\n            assertThat(finder.getKeyProducers().keySet(), hasSize(1));\n        }\n        // assert logger is correctly bound to the concrete class\n        {\n            KeyProducer keyProducer = Objects.requireNonNull(finder.getKeyProducers().get(keyProducerId));\n            Logger logger = keyProducer.getLogger();\n\n            // Verify logger name matches the fully qualified class name\n            assertThat(logger.getName(), is(keyProducerClass.getCanonicalName()));\n        }\n        {\n            // pre-assert\n            assertThat(finder.getAllConsumers(), hasSize(0));\n            // act\n            finder.startConsumer();\n            // assert\n            assertThat(finder.getAllConsumers(), hasSize(1));\n        }\n        \n        {\n            // pre-assert\n            assertThat(finder.getAllProducers(), hasSize(0));\n            // act\n            finder.configureProducer();\n            // assert\n            assertThat(finder.getAllProducers(), hasSize(1));\n            assertProducerState(finder.getAllProducers(), ProducerState.UNINITIALIZED);\n        }\n        \n        {\n            // act\n            finder.initProducer();\n            // assert\n            assertProducerState(finder.getAllProducers(), ProducerState.INITIALIZED);\n        }\n        // catch the reference, it is not possible to get the reference afterwards the interrupt\n        final List<Producer> allProducers = finder.getAllProducers();\n        {\n            // act\n            finder.startProducer();\n            // wait\n            Thread.sleep(Duration.ofSeconds(1L));\n        \n            // assert\n            assertProducerState(allProducers, ProducerState.RUNNING);\n        }\n        {\n            // act\n            finder.interrupt();\n            // assert\n            assertThat(finder.getAllProducers(), hasSize(0));\n            assertProducerState(allProducers, ProducerState.NOT_RUNNING);\n        }\n        \n        {\n            // pre-assert\n            assertThat(finder.getAllConsumers(), hasSize(1));\n            // act\n            finder.shutdownAndAwaitTermination();\n            // assert\n            assertThat(finder.getAllConsumers(), hasSize(0));\n        }\n    }\n    // </editor-fold>\n    \n    @Test\n    public void startKeyProducer_allConfiguredKeyProducerTypes_haveInstances() throws IOException {\n        // Arrange\n        CFinder cFinder = new CFinder();\n\n        // Configure one instance for each KeyProducer type\n        // 1. JavaRandom\n        CKeyProducerJavaRandom javaRandom = new CKeyProducerJavaRandom();\n        javaRandom.keyProducerId = \"randomId\";\n        javaRandom.keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED;\n        javaRandom.customSeed = 123L;\n        cFinder.keyProducerJavaRandom.add(javaRandom);\n\n        // 2. JavaBip39\n        CKeyProducerJavaBip39 bip39 = new CKeyProducerJavaBip39();\n        bip39.keyProducerId = \"bip39Id\";\n        bip39.mnemonic = CKeyProducerJavaBip39.DEFAULT_MNEMONIC;\n        cFinder.keyProducerJavaBip39.add(bip39);\n\n        // 3. JavaIncremental\n        CKeyProducerJavaIncremental incremental = new CKeyProducerJavaIncremental();\n        incremental.keyProducerId = \"incrementalId\";\n        cFinder.keyProducerJavaIncremental.add(incremental);\n\n        // 4. JavaSocket\n        CKeyProducerJavaSocket socket = new CKeyProducerJavaSocket();\n        socket.keyProducerId = \"socketId\";\n        socket.port = KeyProducerJavaSocketTest.findFreePort();\n        cFinder.keyProducerJavaSocket.add(socket);\n\n        // 5. JavaWebSocket\n        CKeyProducerJavaWebSocket webSocket = new CKeyProducerJavaWebSocket();\n        webSocket.keyProducerId = \"webSocketId\";\n        webSocket.port = KeyProducerJavaSocketTest.findFreePort();\n        cFinder.keyProducerJavaWebSocket.add(webSocket);\n\n        // 6. JavaZmq\n        CKeyProducerJavaZmq zmq = new CKeyProducerJavaZmq();\n        zmq.keyProducerId = \"zmqId\";\n        zmq.address = KeyProducerJavaZmqTest.findFreeZmqAddress();\n        cFinder.keyProducerJavaZmq.add(zmq);\n\n        Finder finder = new Finder(cFinder);\n\n        // Act\n        finder.startKeyProducer();\n\n        // Assert\n        assertThat(finder.getKeyProducers().keySet(), hasItems(\"randomId\", \"bip39Id\", \"incrementalId\", \"socketId\", \"webSocketId\", \"zmqId\"));\n\n        // Additionally assert each instance is of expected class type\n        assertThat(finder.getKeyProducers().get(\"randomId\"), instanceOf(KeyProducerJavaRandom.class));\n        assertThat(finder.getKeyProducers().get(\"bip39Id\"), instanceOf(KeyProducerJavaBip39.class));\n        assertThat(finder.getKeyProducers().get(\"incrementalId\"), instanceOf(KeyProducerJavaIncremental.class));\n        assertThat(finder.getKeyProducers().get(\"socketId\"), instanceOf(KeyProducerJavaSocket.class));\n        assertThat(finder.getKeyProducers().get(\"webSocketId\"), instanceOf(KeyProducerJavaWebSocket.class));\n        assertThat(finder.getKeyProducers().get(\"zmqId\"), instanceOf(KeyProducerJavaZmq.class));\n        \n        // Interrupt and free producers\n        finder.interrupt();\n\n        // Assert keyProducers map is empty after interrupt\n        assertThat(finder.getKeyProducers().keySet(), is(empty()));\n    }\n    \n    private void configureProducerWithExamples(CFinder cFinder) {\n        String keyProducerId_producerJava = \"exampleId_producerJava\";\n        String keyProducerId_producerJavaSecretsFiles = \"exampleId_producerJavaSecretsFiles\";\n        String keyProducerId_producerOpenCL = \"exampleId_producerOpenCL\";\n        CProducerJava cProducerJava = new CProducerJava();\n        cProducerJava.keyProducerId = keyProducerId_producerJava;\n        cFinder.producerJava.add(cProducerJava);\n        CProducerJavaSecretsFiles cProducerJavaSecretsFiles = new CProducerJavaSecretsFiles();\n        cProducerJavaSecretsFiles.keyProducerId = keyProducerId_producerJavaSecretsFiles;\n        cFinder.producerJavaSecretsFiles.add(cProducerJavaSecretsFiles);\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\n        cProducerOpenCL.keyProducerId = keyProducerId_producerOpenCL;\n        cFinder.producerOpenCL.add(cProducerOpenCL);\n        configureKeyProducerJavaRandom(keyProducerId_producerJava, cFinder);\n        configureKeyProducerJavaRandom(keyProducerId_producerJavaSecretsFiles, cFinder);\n        configureKeyProducerJavaRandom(keyProducerId_producerOpenCL, cFinder);\n    }\n    \n    private void configureKeyProducerJavaRandom(@Nullable String keyProducerId, CFinder cFinder) {\n        CKeyProducerJavaRandom cKeyProducerJavaRandom = new CKeyProducerJavaRandom();\n        cKeyProducerJavaRandom.keyProducerId = keyProducerId;\n        cKeyProducerJavaRandom.keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED;\n        cKeyProducerJavaRandom.customSeed = 0L;\n        cFinder.keyProducerJavaRandom.add(cKeyProducerJavaRandom);\n    }\n    \n    private void configureKeyProducerJavaIncremental(String keyProducerId, CFinder cFinder) {\n        CKeyProducerJavaIncremental incremental = new CKeyProducerJavaIncremental();\n        incremental.keyProducerId = keyProducerId;\n        cFinder.keyProducerJavaIncremental.add(incremental);\n    }\n    \n    private void configureKeyProducerJavaBip39(String keyProducerId, CFinder cFinder) {\n        CKeyProducerJavaBip39 bip39 = new CKeyProducerJavaBip39();\n        bip39.keyProducerId = keyProducerId;\n        bip39.mnemonic = CKeyProducerJavaBip39.DEFAULT_MNEMONIC;\n        cFinder.keyProducerJavaBip39.add(bip39);\n    }\n    \n    private void configureKeyProducerJavaSocket(String keyProducerId, CFinder cFinder) {\n        CKeyProducerJavaSocket socket = new CKeyProducerJavaSocket();\n        socket.port = KeyProducerJavaSocketTest.findFreePort();\n        socket.timeout = KeyProducerJavaTest.TIMEOUT_FOR_TERMINATE;\n        socket.keyProducerId = keyProducerId;\n        cFinder.keyProducerJavaSocket.add(socket);\n    }\n    \n    private void configureKeyProducerJavaWebSocket(String keyProducerId, CFinder cFinder) {\n        CKeyProducerJavaWebSocket socket = new CKeyProducerJavaWebSocket();\n        socket.port = KeyProducerJavaSocketTest.findFreePort();\n        socket.timeout = KeyProducerJavaTest.TIMEOUT_FOR_TERMINATE;\n        socket.keyProducerId = keyProducerId;\n        cFinder.keyProducerJavaWebSocket.add(socket);\n    }\n    \n    private void configureKeyProducerJavaZmq(String keyProducerId, CFinder cFinder) {\n        CKeyProducerJavaZmq zmq = new CKeyProducerJavaZmq();\n        zmq.address = KeyProducerJavaZmqTest.findFreeZmqAddress();\n        zmq.timeout = KeyProducerJavaTest.TIMEOUT_FOR_TERMINATE;\n        zmq.keyProducerId = keyProducerId;\n        cFinder.keyProducerJavaZmq.add(zmq);\n    }\n    \n    private void configureConsumerJava(CFinder cFinder) throws IOException {\n        boolean compressed = false;\n        boolean useStaticAmount = true;\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\n        \n        TestAddressesFiles testAddresses = new TestAddressesFiles(compressed);\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, useStaticAmount, false);\n        \n        CConsumerJava cConsumerJava = new CConsumerJava();\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\n        \n        cFinder.consumerJava = cConsumerJava;\n    }\n\n    private static void assertProducerState(List<Producer> producerStateProviders, ProducerState expectedProducerState) {\n        for (ProducerStateProvider producerStateProvider : producerStateProviders) {\n            assertThat(producerStateProvider.getState(), is(equalTo(expectedProducerState)));\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/HexEncodeTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.is;\r\n\r\nimport org.junit.Test;\r\n\r\npublic class HexEncodeTest {\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"compare BouncyCastle vs Apache Commons Hex encoding\">\r\n    @Test\r\n    public void encodeHexString_bouncyCastleAndApacheCommons_resultMustMatch() {\r\n        // arrange\r\n        byte[] data = {(byte) 0x8F, (byte) 0xC2, (byte) 0xAB, (byte) 0xDE};\r\n\r\n        // act\r\n        String hexBc = org.bouncycastle.util.encoders.Hex.toHexString(data);\r\n        String hexApache = org.apache.commons.codec.binary.Hex.encodeHexString(data);\r\n\r\n        // assert\r\n        assertThat(\"Hex encodings from BouncyCastle and Apache Commons must match\", hexBc, is(hexApache));\r\n    }\r\n    // </editor-fold>\r\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/KeyUtilityTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Arrays;\r\nimport java.util.Random;\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.StaticKey;\r\nimport org.bitcoinj.base.LegacyAddress;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport org.bitcoinj.crypto.MnemonicException;\r\nimport org.junit.Ignore;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.*;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class KeyUtilityTest {\r\n\r\n    private final StaticKey staticKey = new StaticKey();\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createECKey\">\r\n    @Test\r\n    public void createECKey_uncompressedKey_returnsCorrectPublicKeyHash() throws IOException {\r\n        // arrange\r\n        BigInteger bigIntegerFromHex = new BigInteger(staticKey.privateKeyHex, 16);\r\n\r\n        // act\r\n        ECKey key = new KeyUtility(network, new ByteBufferUtility(false)).createECKey(bigIntegerFromHex, false);\r\n\r\n        // assert\r\n        byte[] hash160 = key.getPubKeyHash();\r\n        ByteBuffer hash160AsByteBuffer = new ByteBufferUtility(false).byteArrayToByteBuffer(hash160);\r\n        assertThat(key.isCompressed(), is(equalTo(Boolean.FALSE)));\r\n        assertThat(hash160AsByteBuffer, is(equalTo(staticKey.byteBufferPublicKeyUncompressed)));\r\n    }\r\n\r\n    @Test\r\n    public void createECKey_compressedKey_returnsCorrectPublicKeyHash() throws IOException {\r\n        // arrange\r\n        BigInteger bigIntegerFromHex = new BigInteger(staticKey.privateKeyHex, 16);\r\n\r\n        // act\r\n        ECKey key = new KeyUtility(network, new ByteBufferUtility(false)).createECKey(bigIntegerFromHex, true);\r\n\r\n        // assert\r\n        byte[] hash160 = key.getPubKeyHash();\r\n        ByteBuffer hash160AsByteBuffer = new ByteBufferUtility(false).byteArrayToByteBuffer(hash160);\r\n        assertThat(key.isCompressed(), is(equalTo(Boolean.TRUE)));\r\n        assertThat(hash160AsByteBuffer, is(equalTo(staticKey.byteBufferPublicKeyCompressed)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getHash160ByteBufferFromBase58String\">\r\n    @Test\r\n    public void getHash160ByteBufferFromBase58String_uncompressedPublicKeyAddress_returnsExpectedByteBuffer() throws IOException {\r\n        // act\r\n        ByteBuffer byteBufferPublicKeyUncompressed = new KeyUtility(network, new ByteBufferUtility(false)).getHash160ByteBufferFromBase58String(staticKey.publicKeyUncompressed);\r\n\r\n        // assert\r\n        assertThat(byteBufferPublicKeyUncompressed, is(equalTo(staticKey.byteBufferPublicKeyUncompressed)));\r\n    }\r\n\r\n    @Test\r\n    public void getHash160ByteBufferFromBase58String_compressedPublicKeyAddress_returnsExpectedByteBuffer() throws IOException {\r\n        // act\r\n        ByteBuffer byteBufferPublicKeyCompressed = new KeyUtility(network, new ByteBufferUtility(false)).getHash160ByteBufferFromBase58String(staticKey.publicKeyCompressed);\r\n\r\n        // assert\r\n        assertThat(byteBufferPublicKeyCompressed, is(equalTo(staticKey.byteBufferPublicKeyCompressed)));\r\n    }\r\n\r\n    @Test\r\n    public void byteBufferToAddress_isInverseOf_getHash160ByteBufferFromBase58String() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        String originalBase58 = staticKey.publicKeyUncompressed;\r\n\r\n        // act\r\n        ByteBuffer hash160Buffer = keyUtility.getHash160ByteBufferFromBase58String(originalBase58);\r\n        String backToBase58 = keyUtility.byteBufferToAddress(hash160Buffer).toBase58();\r\n\r\n        // assert\r\n        assertThat(backToBase58, is(equalTo(originalBase58)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getHexFromByteBuffer\">\r\n    @Test\r\n    public void getHexFromByteBuffer_uncompressedPublicKeyHash_returnsExpectedHex() throws IOException {\r\n        // act\r\n        String hexPublicKeyUncompressed = new ByteBufferUtility(false).getHexFromByteBuffer(staticKey.byteBufferPublicKeyUncompressed);\r\n\r\n        // assert\r\n        assertThat(hexPublicKeyUncompressed, is(equalTo(staticKey.publicKeyUncompressedHash160Hex)));\r\n    }\r\n\r\n    @Test\r\n    public void getHexFromByteBuffer_compressedPublicKeyHash_returnsExpectedHex() throws IOException {\r\n        // act\r\n        String hexPublicKeyCompressed = new ByteBufferUtility(false).getHexFromByteBuffer(staticKey.byteBufferPublicKeyCompressed);\r\n\r\n        // assert\r\n        assertThat(hexPublicKeyCompressed, is(equalTo(staticKey.publicKeyCompressedHash160Hex)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getByteBufferFromHex\">\r\n    @Test\r\n    public void getByteBufferFromHex_uncompressedPublicKeyHashHex_returnsExpectedByteBuffer() throws IOException {\r\n        // act\r\n        ByteBuffer byteBufferPublicKeyUncompressed = new ByteBufferUtility(false).getByteBufferFromHex(staticKey.publicKeyUncompressedHash160Hex);\r\n\r\n        // assert\r\n        assertThat(byteBufferPublicKeyUncompressed, is(equalTo(staticKey.byteBufferPublicKeyUncompressed)));\r\n    }\r\n\r\n    @Test\r\n    public void getByteBufferFromHex_compressedPublicKeyHashHex_returnsExpectedByteBuffer() throws IOException {\r\n        // act\r\n        ByteBuffer byteBufferPublicKeyCompressed = new ByteBufferUtility(false).getByteBufferFromHex(staticKey.publicKeyCompressedHash160Hex);\r\n\r\n        // assert\r\n        assertThat(byteBufferPublicKeyCompressed, is(equalTo(staticKey.byteBufferPublicKeyCompressed)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createSecret\">\r\n    @Test\r\n    public void createSecret_maxBitLength_returnsNonEmptySecret() throws IOException {\r\n        // act\r\n        BigInteger secret = new KeyUtility(network, new ByteBufferUtility(false)).createSecret(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS, new Random(42));\r\n\r\n        // assert\r\n        assertThat(secret.toString(), is(not(equalTo(\"\"))));\r\n    }\r\n\r\n    @Test\r\n    public void createSecret_zeroBits_returnsZero() {\r\n        // act\r\n        BigInteger secret = new KeyUtility(network, new ByteBufferUtility(false)).createSecret(0, new Random(123));\r\n\r\n        // assert\r\n        assertThat(secret, is(equalTo(BigInteger.ZERO)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createKeyDetails\">\r\n    @Test\r\n    public void createKeyDetails_uncompressedKey_returnsExpectedDetails() throws IOException, MnemonicException.MnemonicLengthException {\r\n        // arrange\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(false);\r\n        KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n\r\n        BigInteger secret = new BigInteger(staticKey.privateKeyHex, 16);\r\n        ECKey ecKey = keyUtility.createECKey(secret, false);\r\n\r\n        // act\r\n        String keyDetails = keyUtility.createKeyDetails(ecKey);\r\n\r\n        // assert\r\n        String mnemonics = keyUtility.createMnemonics(ecKey.getPrivKeyBytes());\r\n        assertThat(keyDetails, is(equalTo(\"privateKeyBigInteger: [\" + staticKey.privateKeyBigInteger + \"] privateKeyBytes: [\" + Arrays.toString(staticKey.privateKeyBytes) + \"] privateKeyHex: [\" + staticKey.privateKeyHex + \"] WiF: [\" + staticKey.privateKeyWiFUncompressed + \"] publicKeyAsHex: [\" + staticKey.publicKeyUncompressedHex + \"] publicKeyHash160Hex: [\" + staticKey.publicKeyUncompressedHash160Hex + \"] publicKeyHash160Base58: [\" + staticKey.publicKeyUncompressed + \"] Compressed: [false] \" + mnemonics)));\r\n    }\r\n\r\n    @Test\r\n    public void createKeyDetails_compressedKey_returnsExpectedDetails() throws IOException, MnemonicException.MnemonicLengthException {\r\n        // arrange\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(false);\r\n        KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n\r\n        BigInteger secret = new BigInteger(staticKey.privateKeyHex, 16);\r\n        ECKey ecKey = keyUtility.createECKey(secret, true);\r\n\r\n        // act\r\n        String keyDetails = keyUtility.createKeyDetails(ecKey);\r\n\r\n        // assert\r\n        String mnemonics = keyUtility.createMnemonics(ecKey.getPrivKeyBytes());\r\n        assertThat(keyDetails, is(equalTo(\"privateKeyBigInteger: [\" + staticKey.privateKeyBigInteger + \"] privateKeyBytes: [\" + Arrays.toString(staticKey.privateKeyBytes) + \"] privateKeyHex: [\" + staticKey.privateKeyHex + \"] WiF: [\" + staticKey.privateKeyWiFCompressed + \"] publicKeyAsHex: [\" + staticKey.publicKeyCompressedHex + \"] publicKeyHash160Hex: [\" + staticKey.publicKeyCompressedHash160Hex + \"] publicKeyHash160Base58: [\" + staticKey.publicKeyCompressed + \"] Compressed: [true] \" + mnemonics)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"killBits\">\r\n    @Test\r\n    public void killBits_valueWithAllBitsSetGiven_bitsKilled() throws IOException {\r\n        // act\r\n        BigInteger secret = new KeyUtility(network, new ByteBufferUtility(false)).killBits(BigInteger.valueOf(63L), BigInteger.valueOf(5L));\r\n\r\n        // assert\r\n        assertThat(secret, is(equalTo(BigInteger.valueOf(58))));\r\n    }\r\n\r\n    @Test\r\n    public void killBits_valueWithNotAllBitsSetGiven_bitsKilled() throws IOException {\r\n        // act\r\n        BigInteger secret = new KeyUtility(network, new ByteBufferUtility(false)).killBits(BigInteger.valueOf(62L), BigInteger.valueOf(5L));\r\n\r\n        // assert\r\n        assertThat(secret, is(equalTo(BigInteger.valueOf(58))));\r\n    }\r\n    // </editor-fold>\r\n\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"ECKey.fromPrivate: boundaries\">\r\n    @Test\r\n    public void ecKey_fromPrivate_randomValidInRange_succeeds() {\r\n        // arrange\r\n        BigInteger randomValidKey = PublicKeyBytes.MIN_VALID_PRIVATE_KEY.add(BigInteger.valueOf(123456));\r\n\r\n        // act\r\n        ECKey ecKey = ECKey.fromPrivate(randomValidKey, false);\r\n\r\n        // assert\r\n        assertThat(ecKey.getPrivKey(), is(equalTo(randomValidKey)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void ecKey_fromPrivate_minPrivateKey_throwsException() {\r\n        // act\r\n        ECKey.fromPrivate(PublicKeyBytes.MIN_PRIVATE_KEY, false);\r\n    }\r\n\r\n    @Ignore(\"bitcoinj.ECKey.fromPrivate(...) accepts values > MAX_PRIVATE_KEY without throwing an exception. \" +\r\n       \"Test ignored because the library does not enforce the upper bound.\")\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void ecKey_fromPrivate_maxPrivateKeyPlusOne_throwsException() {\r\n        // act\r\n        ECKey.fromPrivate(PublicKeyBytes.MAX_PRIVATE_KEY.add(BigInteger.ONE), false);\r\n    }\r\n\r\n    @Test\r\n    public void ecKey_fromPrivate_minValidPrivateKey_noExceptionThrown() {\r\n        // act\r\n        ECKey ecKey = ECKey.fromPrivate(PublicKeyBytes.MIN_VALID_PRIVATE_KEY, false);\r\n\r\n        // assert\r\n        assertThat(ecKey.getPrivKey(), is(equalTo(PublicKeyBytes.MIN_VALID_PRIVATE_KEY)));\r\n    }\r\n\r\n    @Test\r\n    public void ecKey_fromPrivate_maxPrivateKey_noExceptionThrown() {\r\n        // act\r\n        ECKey ecKey = ECKey.fromPrivate(PublicKeyBytes.MAX_PRIVATE_KEY, false);\r\n\r\n        // assert\r\n        assertThat(ecKey.getPrivKey(), is(equalTo(PublicKeyBytes.MAX_PRIVATE_KEY)));\r\n    }\r\n    // </editor-fold>\r\n\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"intToByteArray\">\r\n    @Test\r\n    public void intToByteArray_zero_returnsFourZeroBytes() {\r\n        // arrange\r\n        byte[] expected = new byte[4];\r\n\r\n        // act\r\n        byte[] result = KeyUtility.intToByteArray(0);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_knownValue_returnsExpectedBigEndianBytes() {\r\n        // arrange\r\n        byte[] expected = {0x12, 0x34, 0x56, 0x78};\r\n\r\n        // act\r\n        byte[] result = KeyUtility.intToByteArray(0x12345678);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_minusOne_returnsAllFfBytes() {\r\n        // arrange\r\n        byte[] expected = {(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};\r\n\r\n        // act\r\n        byte[] result = KeyUtility.intToByteArray(-1);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_intMaxValue_returnsExpectedBytes() {\r\n        // arrange\r\n        byte[] expected = {0x7F, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};\r\n\r\n        // act\r\n        byte[] result = KeyUtility.intToByteArray(Integer.MAX_VALUE);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_intMinValue_returnsExpectedBytes() {\r\n        // arrange\r\n        byte[] expected = {(byte) 0x80, 0x00, 0x00, 0x00};\r\n\r\n        // act\r\n        byte[] result = KeyUtility.intToByteArray(Integer.MIN_VALUE);\r\n\r\n        // assert\r\n        assertThat(result, is(expected));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_withOffset_writesExpectedBytesAtCorrectPosition() {\r\n        // arrange\r\n        final int value = 0xCAFEBABE;\r\n        final int bufferLength = 8;\r\n        final int offset = 2;\r\n        final int intByteLength = 4;\r\n        byte[] buffer = new byte[bufferLength];\r\n        byte[] expectedWritten = {(byte) 0xCA, (byte) 0xFE, (byte) 0xBA, (byte) 0xBE};\r\n\r\n        // act\r\n        KeyUtility.intToByteArray(value, buffer, offset);\r\n\r\n        // assert\r\n        assertThat(Arrays.copyOfRange(buffer, offset, offset + intByteLength), is(expectedWritten));\r\n        assertThat(Arrays.copyOfRange(buffer, 0, offset), is(new byte[offset]));\r\n        assertThat(Arrays.copyOfRange(buffer, offset + intByteLength, bufferLength), is(new byte[bufferLength - offset - intByteLength]));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"byteArrayToInt\">\r\n    @Test\r\n    public void byteArrayToInt_allZeroBytes_returnsZero() {\r\n        // arrange\r\n        byte[] input = new byte[4];\r\n\r\n        // act\r\n        int result = KeyUtility.byteArrayToInt(input);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(0)));\r\n    }\r\n\r\n    @Test\r\n    public void byteArrayToInt_knownBytes_returnsExpectedInt() {\r\n        // arrange\r\n        byte[] input = {0x12, 0x34, 0x56, 0x78};\r\n\r\n        // act\r\n        int result = KeyUtility.byteArrayToInt(input);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(0x12345678)));\r\n    }\r\n\r\n    @Test\r\n    public void byteArrayToInt_allFfBytes_returnsMinusOne() {\r\n        // arrange\r\n        byte[] input = {(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};\r\n\r\n        // act\r\n        int result = KeyUtility.byteArrayToInt(input);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(-1)));\r\n    }\r\n\r\n    @Test\r\n    public void byteArrayToInt_maxIntBytes_returnsMaxInt() {\r\n        // arrange\r\n        byte[] input = {0x7F, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};\r\n\r\n        // act\r\n        int result = KeyUtility.byteArrayToInt(input);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(Integer.MAX_VALUE)));\r\n    }\r\n\r\n    @Test\r\n    public void byteArrayToInt_withOffset_readsExpectedInt() {\r\n        // arrange\r\n        final int original = 0xCAFEBABE;\r\n        final int offset = 2;\r\n        byte[] buffer = new byte[8];\r\n        KeyUtility.intToByteArray(original, buffer, offset);\r\n\r\n        // act\r\n        int result = KeyUtility.byteArrayToInt(buffer, offset);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(original)));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_byteArrayToInt_roundTrip_zero_preservesValue() {\r\n        // arrange\r\n        final int original = 0;\r\n\r\n        // act\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int result = KeyUtility.byteArrayToInt(bytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(original)));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_byteArrayToInt_roundTrip_intMaxValue_preservesValue() {\r\n        // arrange\r\n        final int original = Integer.MAX_VALUE;\r\n\r\n        // act\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int result = KeyUtility.byteArrayToInt(bytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(original)));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_byteArrayToInt_roundTrip_intMinValue_preservesValue() {\r\n        // arrange\r\n        final int original = Integer.MIN_VALUE;\r\n\r\n        // act\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int result = KeyUtility.byteArrayToInt(bytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(original)));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_byteArrayToInt_roundTrip_minusOne_preservesValue() {\r\n        // arrange\r\n        final int original = -1;\r\n\r\n        // act\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int result = KeyUtility.byteArrayToInt(bytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(original)));\r\n    }\r\n\r\n    @Test\r\n    public void intToByteArray_byteArrayToInt_roundTrip_knownValue_preservesValue() {\r\n        // arrange\r\n        final int original = 0x12345678;\r\n\r\n        // act\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int result = KeyUtility.byteArrayToInt(bytes);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(original)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"byteArrayToIntArray\">\r\n    @Test\r\n    public void byteArrayToIntArray_knownBytes_populatesIntAtOffset() {\r\n        // arrange\r\n        final int original = 0x0A0B0C0D;\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int[] result = new int[1];\r\n\r\n        // act\r\n        KeyUtility.byteArrayToIntArray(bytes, 0, result, 0);\r\n\r\n        // assert\r\n        assertThat(result[0], is(equalTo(original)));\r\n    }\r\n\r\n    @Test\r\n    public void byteArrayToIntArray_withNonZeroIntArrayOffset_populatesCorrectSlot() {\r\n        // arrange\r\n        final int original = 0x0A0B0C0D;\r\n        byte[] bytes = KeyUtility.intToByteArray(original);\r\n        int[] result = new int[3];\r\n        final int intOffset = 2;\r\n\r\n        // act\r\n        KeyUtility.byteArrayToIntArray(bytes, 0, result, intOffset);\r\n\r\n        // assert\r\n        assertThat(result[intOffset], is(equalTo(original)));\r\n        assertThat(result[0], is(equalTo(0)));\r\n        assertThat(result[1], is(equalTo(0)));\r\n    }\r\n\r\n    @Test\r\n    public void byteArrayToIntArray_withNonZeroByteArrayOffset_readsFromCorrectPosition() {\r\n        // arrange\r\n        final int original = 0x0A0B0C0D;\r\n        final int byteOffset = 4;\r\n        byte[] bytes = new byte[8];\r\n        KeyUtility.intToByteArray(original, bytes, byteOffset);\r\n        int[] result = new int[1];\r\n\r\n        // act\r\n        KeyUtility.byteArrayToIntArray(bytes, byteOffset, result, 0);\r\n\r\n        // assert\r\n        assertThat(result[0], is(equalTo(original)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createSecrets\">\r\n    @Test\r\n    public void createSecrets_returnStartSecretOnlyTrue_returnsOneSecret() throws NoMoreSecretsAvailableException {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        int privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\r\n        Random random = new Random(123);\r\n        SecretSupplier randomSupplier = new RandomSecretSupplier(random);\r\n        int overallWorkSize = 10;\r\n        boolean returnStartSecretOnly = true;\r\n\r\n        // act\r\n        BigInteger[] secrets = keyUtility.createSecrets(overallWorkSize, returnStartSecretOnly, privateKeyMaxNumBits, randomSupplier);\r\n\r\n        // assert\r\n        assertThat(secrets.length, is(1));\r\n        assertThat(secrets[0], is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void createSecrets_returnStartSecretOnlyFalse_returnsAllSecrets() throws NoMoreSecretsAvailableException {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        int privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\r\n        Random random = new Random(123);\r\n        SecretSupplier randomSupplier = new RandomSecretSupplier(random);\r\n        int overallWorkSize = 5;\r\n        boolean returnStartSecretOnly = false;\r\n\r\n        // act\r\n        BigInteger[] secrets = keyUtility.createSecrets(overallWorkSize, returnStartSecretOnly, privateKeyMaxNumBits, randomSupplier);\r\n\r\n        // assert\r\n        assertThat(secrets.length, is(overallWorkSize));\r\n        assertThat(Arrays.asList(secrets), everyItem(is(notNullValue())));\r\n    }\r\n\r\n    @Test(expected = NoMoreSecretsAvailableException.class)\r\n    public void createSecrets_zeroLength_throwsException() throws NoMoreSecretsAvailableException {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        int privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\r\n        Random random = new Random() {\r\n            @Override\r\n            public void nextBytes(byte[] bytes) {\r\n                throw new NoMoreSecretsAvailableException();\r\n            }\r\n        };\r\n        SecretSupplier randomSupplier = new RandomSecretSupplier(random);\r\n        int overallWorkSize = 1;\r\n        boolean returnStartSecretOnly = false;\r\n\r\n        // act\r\n        keyUtility.createSecrets(overallWorkSize, returnStartSecretOnly, privateKeyMaxNumBits, randomSupplier);\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"bigIntegerToFixedLengthHex\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_LARGE_SECRETS_AS_HEX, location = CommonDataProvider.class)\r\n    public void bigIntegerToFixedLengthHex_knownBigInteger_correctHex(String largeSecretsAsHex) {\r\n        // arrange\r\n        BigInteger input = new BigInteger(largeSecretsAsHex, 16);\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n\r\n        // act\r\n        String result = keyUtility.bigIntegerToFixedLengthHex(input);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(largeSecretsAsHex)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"bigIntegerFromUnsignedByteArray\">\r\n    @Test\r\n    public void bigIntegerFromUnsignedByteArray_exact32Bytes_constructsCorrectly() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        byte[] buffer = new byte[32];\r\n        buffer[30] = 0x12;\r\n        buffer[31] = 0x34;\r\n        BigInteger expected = new BigInteger(\"1234\", 16);\r\n\r\n        // act\r\n        BigInteger result = keyUtility.bigIntegerFromUnsignedByteArray(buffer);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(expected)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void bigIntegerFromUnsignedByteArray_wrongLength_throwsException() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        byte[] invalid = new byte[31];\r\n\r\n        // act\r\n        keyUtility.bigIntegerFromUnsignedByteArray(invalid);\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toBase58\">\r\n    @Test\r\n    public void toBase58_knownHash160_returnsExpectedBase58Address() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n        byte[] hash160 = new ByteBufferUtility(false).byteBufferToBytes(key.byteBufferPublicKeyUncompressed);\r\n\r\n        // act\r\n        String result = keyUtility.toBase58(hash160);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(key.publicKeyUncompressed)));\r\n    }\r\n\r\n    @Test\r\n    public void toBase58_compressedHash160_returnsExpectedBase58Address() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n        byte[] hash160 = new ByteBufferUtility(false).byteBufferToBytes(key.byteBufferPublicKeyCompressed);\r\n\r\n        // act\r\n        String result = keyUtility.toBase58(hash160);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(key.publicKeyCompressed)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"addressToByteBuffer\">\r\n    @Test\r\n    public void addressToByteBuffer_validAddress_returnsCorrectByteBuffer() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n        LegacyAddress address = LegacyAddress.fromBase58(key.publicKeyUncompressed, network);\r\n\r\n        // act\r\n        ByteBuffer result = keyUtility.addressToByteBuffer(address);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(key.byteBufferPublicKeyUncompressed)));\r\n    }\r\n\r\n    @Test\r\n    public void addressToByteBuffer_roundTripWithByteBufferToAddress_returnsOriginalAddress() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n        LegacyAddress originalAddress = LegacyAddress.fromBase58(key.publicKeyCompressed, network);\r\n\r\n        // act\r\n        ByteBuffer buffer = keyUtility.addressToByteBuffer(originalAddress);\r\n        LegacyAddress roundTripped = keyUtility.byteBufferToAddress(buffer);\r\n\r\n        // assert\r\n        assertThat(roundTripped, is(equalTo(originalAddress)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"byteBufferToAddress\">\r\n    @Test\r\n    public void byteBufferToAddress_validBuffer_returnsCorrectAddress() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n\r\n        // act\r\n        LegacyAddress result = keyUtility.byteBufferToAddress(key.byteBufferPublicKeyCompressed);\r\n\r\n        // assert\r\n        assertThat(result.toBase58(), is(equalTo(key.publicKeyCompressed)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createMnemonics\">\r\n    @Test\r\n    public void createMnemonics_validPrivateKeyBytes_returnsNonEmptyMnemonicString() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n\r\n        // act\r\n        String result = keyUtility.createMnemonics(key.privateKeyBytes);\r\n\r\n        // assert\r\n        assertThat(result, not(emptyOrNullString()));\r\n        assertThat(result, containsString(\"Mnemonic:\"));\r\n    }\r\n\r\n    @Test\r\n    public void createMnemonics_validPrivateKeyBytes_containsAllWordLists() {\r\n        // arrange\r\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n        StaticKey key = new StaticKey();\r\n\r\n        // act\r\n        String result = keyUtility.createMnemonics(key.privateKeyBytes);\r\n\r\n        // assert\r\n        for (BIP39Wordlist wordList : BIP39Wordlist.values()) {\r\n            assertThat(result, containsString(wordList.name()));\r\n        }\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/LMDBBase.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationReadOnly;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.Persistence;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.lmdb.LMDBPersistence;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.AddressesFiles;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesLMDB;\r\nimport org.bitcoinj.base.Network;\r\nimport org.junit.Rule;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\npublic class LMDBBase {\r\n    \r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n    \r\n    protected final Network network = new NetworkParameterFactory().getNetwork();\r\n    protected final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(true));\r\n    \r\n    protected Persistence createAndFillAndOpenLMDB(boolean useStaticAmount, AddressesFiles addressesFiles, boolean addInvalidAddresses, boolean useBloomFilter) throws IOException {\r\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\r\n\r\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, addressesFiles, useStaticAmount, addInvalidAddresses);\r\n\r\n        CLMDBConfigurationReadOnly lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\r\n        lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\r\n        lmdbConfigurationReadOnly.useBloomFilter = useBloomFilter;\r\n        PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n        Persistence persistence = new LMDBPersistence(lmdbConfigurationReadOnly, persistenceUtils);\r\n        persistence.init();\r\n        return persistence;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/LMDBPersistencePerformanceTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport ch.qos.logback.classic.Level;\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.ThreadPoolExecutor;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationReadOnly;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesFiles;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesLMDB;\r\nimport org.bitcoinj.base.Network;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\nimport org.junit.runner.RunWith;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class LMDBPersistencePerformanceTest {\r\n    \r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n    \r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n    \r\n    private final static int ARRAY_SIZE = 1024*8;\r\n    private final static BigInteger PRIVATE_KEY = BigInteger.valueOf(1337);\r\n    private final static int CONSUMER_THREADS = 32;\r\n    private final static int TEST_TIME_IN_SECONDS = 4;\r\n    \r\n    private final static int KEYS_QUEUE_SIZE = CONSUMER_THREADS*2;\r\n    private final static int PRODUCER_THREADS = KEYS_QUEUE_SIZE;\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BLOOM_FILTER_ENABLED, location = CommonDataProvider.class)\r\n    public void runProber_performanceTest(boolean useBloomFilter) throws IOException, InterruptedException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException {\r\n        new LMDBPlatformAssume().assumeLMDBExecution();\r\n        TestAddressesLMDB testAddressesLMDB = new TestAddressesLMDB();\r\n\r\n        TestAddressesFiles testAddresses = new TestAddressesFiles(false);\r\n        File lmdbFolderPath = testAddressesLMDB.createTestLMDB(folder, testAddresses, true, false);\r\n\r\n        CConsumerJava cConsumerJava = new CConsumerJava();\r\n        cConsumerJava.threads = CONSUMER_THREADS;\r\n        cConsumerJava.queueSize = KEYS_QUEUE_SIZE;\r\n        cConsumerJava.printStatisticsEveryNSeconds = 1;\r\n        cConsumerJava.delayEmptyConsumer = 1;\r\n        cConsumerJava.lmdbConfigurationReadOnly = new CLMDBConfigurationReadOnly();\r\n        cConsumerJava.lmdbConfigurationReadOnly.lmdbDirectory = lmdbFolderPath.getAbsolutePath();\r\n        cConsumerJava.lmdbConfigurationReadOnly.useBloomFilter = useBloomFilter;\r\n        cConsumerJava.runtimePublicKeyCalculationCheck = ManualDebugConstants.ENABLE_RUNTIME_PUBLIC_KEY_CALCULATION_CHECK;\r\n        \r\n        ConsumerJava consumerJava = new ConsumerJava(cConsumerJava, keyUtility, persistenceUtils);\r\n        ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) consumerJava.getLogger();\r\n        logger.setLevel(Level.INFO);\r\n        \r\n        consumerJava.initLMDB();\r\n        \r\n        // create producer\r\n        PublicKeyBytes[] publicKeyByteses = createPublicKeyBytesArray();\r\n        ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(PRODUCER_THREADS);\r\n        AtomicBoolean producerShouldRun = new AtomicBoolean(true);\r\n        createProducerThreads(threadPoolExecutor, consumerJava, publicKeyByteses, producerShouldRun);\r\n        \r\n        // act\r\n        consumerJava.startConsumer();\r\n        consumerJava.startStatisticsTimer();\r\n        \r\n        Thread.sleep(TEST_TIME_IN_SECONDS * Statistics.ONE_SECOND_IN_MILLISECONDS);\r\n        // Signal all producer threads to stop by setting the shared flag to false.\r\n        // Each producer thread will check this flag in its loop and exit cleanly.\r\n        producerShouldRun.set(false);\r\n        // Gracefully stop consumer threads and release all resources\r\n        consumerJava.interrupt();\r\n\r\n        assertThat(consumerJava.persistence, is(nullValue()));\r\n        assertThat(consumerJava.shouldRun.get(), is(false ));\r\n        assertThat(consumerJava.scheduledExecutorService.isShutdown(), is(true));\r\n        assertThat(consumerJava.scheduledExecutorService.isTerminated(), is(true));\r\n        assertThat(consumerJava.consumeKeysExecutorService.isShutdown(), is(true));\r\n        assertThat(consumerJava.consumeKeysExecutorService.isTerminated(), is(true));\r\n\r\n    }\r\n\r\n    private void createProducerThreads(ThreadPoolExecutor threadPoolExecutor, ConsumerJava consumerJava, PublicKeyBytes[] publicKeyByteses, AtomicBoolean producerShouldRun) {\r\n        for (int i = 0; i < PRODUCER_THREADS; i++) {\r\n            threadPoolExecutor.submit(() ->{\r\n                while(producerShouldRun.get()) {\r\n                    try {\r\n                        consumerJava.consumeKeys(publicKeyByteses);\r\n                    } catch (InterruptedException e) {\r\n                        throw new RuntimeException(e);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    private PublicKeyBytes[] createPublicKeyBytesArray() {\r\n        PublicKeyBytes publicKeyBytes = PublicKeyBytes.fromPrivate(PRIVATE_KEY);\r\n        PublicKeyBytes[] publicKeyByteses = new PublicKeyBytes[ARRAY_SIZE];\r\n        for (int i = 0; i < publicKeyByteses.length; i++) {\r\n            publicKeyByteses[i] = publicKeyBytes;\r\n        }\r\n        return publicKeyByteses;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/LMDBPersistenceTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Random;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationWrite;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.PersistenceUtils;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.lmdb.LMDBPersistence;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.*;\r\nimport org.junit.rules.TemporaryFolder;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class LMDBPersistenceTest {\r\n    \r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n    \r\n    private final Random random = new Random(1337);\r\n    \r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n    private final KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n    private final PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n    \r\n    /**\r\n     * The increase should happen a few times. See {@link #TOO_MUCH_KEYS_EXPECTED_1MiB_INCREASES}.\r\n     */\r\n    private final static int TOO_MUCH_KEYS_FOR_1MiB = 1024*128;\r\n    \r\n    /**\r\n     * See {@link #TOO_MUCH_KEYS_FOR_1MiB}.\r\n     */\r\n    private final static int TOO_MUCH_KEYS_EXPECTED_1MiB_INCREASES = 5;\r\n    \r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"use static amount\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_LMDB_AMOUNTS, location = CommonDataProvider.class)\r\n    public void putNewAmount_putNewAmount_correctAmountStored(boolean useStaticAmount, long staticAmount, long amount, long expectedAmount) throws IOException {\r\n        // arrange\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        \r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        cLMDBConfigurationWrite.useStaticAmount = useStaticAmount;\r\n        cLMDBConfigurationWrite.staticAmount = staticAmount;\r\n        \r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n        \r\n        // create key\r\n        BigInteger secret = keyUtility.createSecret(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS, random);\r\n        ECKey ecKey = keyUtility.createECKey(secret, true);\r\n        byte[] hash160 = ecKey.getPubKeyHash();\r\n        ByteBuffer hash160ByteBuffer = byteBufferUtility.byteArrayToByteBuffer(hash160);\r\n        \r\n        // act\r\n        lmdbPersistence.putNewAmount(hash160ByteBuffer, Coin.valueOf(amount));\r\n        \r\n        // assert\r\n        Coin amountInLmdb = lmdbPersistence.getAmount(hash160ByteBuffer);\r\n        assertThat(amountInLmdb.getValue(), is(equalTo(expectedAmount)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getDatabaseSize initial and filled\">\r\n    @Test\r\n    public void getDatabaseSize_initialLMDBSetTo1MiB_returnInitialDatabaseSize() throws IOException {\r\n        // arrange\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        \r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        \r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n        \r\n        // act\r\n        long databaseSize = lmdbPersistence.getDatabaseSize();\r\n        \r\n        // assert\r\n        assertThat(databaseSize, is(equalTo(new ByteConversion().mibToBytes(1L))));\r\n    }\r\n    \r\n    @Test\r\n    public void getDatabaseSize_valuesAdded_returnInitialDatabaseSize() throws IOException {\r\n        // arrange\r\n        int keysToAdd = 1024*16;\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        \r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        \r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n        \r\n        fillWithRandomKeys(keysToAdd, lmdbPersistence);\r\n        \r\n        // act\r\n        long databaseSize = lmdbPersistence.getDatabaseSize();\r\n        \r\n        // assert\r\n        assertThat(databaseSize, is(equalTo(new ByteConversion().mibToBytes(1L))));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getDatabaseSize increaseDatabaseSize and filled\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_LMDB_INCREASE_SIZE, location = CommonDataProvider.class)\r\n    public void getDatabaseSize_initialLMDBSetTo1MiB_increaseDatabaseSize_returnResizedDatabaseSize(long increaseSize) throws IOException {\r\n        // arrange\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        \r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        \r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n        \r\n        // act\r\n        lmdbPersistence.increaseDatabaseSize(increaseSize);\r\n        \r\n        // assert\r\n        long databaseSize = lmdbPersistence.getDatabaseSize();\r\n        assertThat(databaseSize, is(equalTo(new ByteConversion().mibToBytes(1L)+increaseSize)));\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_LMDB_INCREASE_SIZE, location = CommonDataProvider.class)\r\n    public void getDatabaseSize_valuesAdded_increaseDatabaseSize_returnResizedDatabaseSize(long increaseSize) throws IOException {\r\n        // arrange\r\n        int keysToAdd = 1024*16;\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        \r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        \r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n        \r\n        fillWithRandomKeys(keysToAdd, lmdbPersistence);\r\n        \r\n        // act\r\n        lmdbPersistence.increaseDatabaseSize(increaseSize);\r\n        \r\n        // assert\r\n        long databaseSize = lmdbPersistence.getDatabaseSize();\r\n        assertThat(databaseSize, is(equalTo(new ByteConversion().mibToBytes(1L)+increaseSize)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"increaseDatabaseSize\">\r\n    @Test(expected = org.lmdbjava.Env.MapFullException.class)\r\n    public void putNewAmount_initialLMDBSetTo1MiB_fillWithTooMuchValues_exceptionThrown() throws IOException {\r\n        // arrange\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        \r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        cLMDBConfigurationWrite.increaseMapAutomatically = false;\r\n        cLMDBConfigurationWrite.increaseSizeInMiB = 1;\r\n        \r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n        \r\n        // pre assert\r\n        assertThat(lmdbPersistence.getDatabaseSize(), is(equalTo(new ByteConversion().mibToBytes(1L))));\r\n        assertThat(lmdbPersistence.getIncreasedCounter(), is(equalTo(new ByteConversion().mibToBytes(0L))));\r\n        assertThat(lmdbPersistence.getIncreasedSum(), is(equalTo(new ByteConversion().mibToBytes(0L))));\r\n        \r\n        // act, assert\r\n        fillWithRandomKeys(TOO_MUCH_KEYS_FOR_1MiB, lmdbPersistence);\r\n    }\r\n\r\n    @Test\r\n    public void putNewAmount_initialLMDBSetTo1MiB_fillWithTooMuchValues_increaseDatabaseSizeAndNoExceptionThrown() throws IOException {\r\n        // arrange\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n\r\n        CLMDBConfigurationWrite cLMDBConfigurationWrite = new CLMDBConfigurationWrite();\r\n        cLMDBConfigurationWrite.initialMapSizeInMiB = 1;\r\n        cLMDBConfigurationWrite.lmdbDirectory = lmdbFolder.getAbsolutePath();\r\n        cLMDBConfigurationWrite.increaseMapAutomatically = true;\r\n        cLMDBConfigurationWrite.increaseSizeInMiB = 1;\r\n\r\n        LMDBPersistence lmdbPersistence = new LMDBPersistence(cLMDBConfigurationWrite, persistenceUtils);\r\n        lmdbPersistence.init();\r\n\r\n        // pre assert\r\n        assertThat(lmdbPersistence.getDatabaseSize(), is(equalTo(new ByteConversion().mibToBytes(1L))));\r\n        assertThat(lmdbPersistence.getIncreasedCounter(), is(equalTo(new ByteConversion().mibToBytes(0L))));\r\n        assertThat(lmdbPersistence.getIncreasedSum(), is(equalTo(new ByteConversion().mibToBytes(0L))));\r\n\r\n        // act\r\n        fillWithRandomKeys(TOO_MUCH_KEYS_FOR_1MiB, lmdbPersistence);\r\n\r\n        // post assert\r\n        assertThat(lmdbPersistence.getDatabaseSize(), is(equalTo(new ByteConversion().mibToBytes(1L) + (new ByteConversion().mibToBytes(cLMDBConfigurationWrite.increaseSizeInMiB)) * TOO_MUCH_KEYS_EXPECTED_1MiB_INCREASES)));\r\n        assertThat(lmdbPersistence.getIncreasedCounter(), is(equalTo((long) TOO_MUCH_KEYS_EXPECTED_1MiB_INCREASES)));\r\n        assertThat(lmdbPersistence.getIncreasedSum(), is(equalTo(new ByteConversion().mibToBytes(cLMDBConfigurationWrite.increaseSizeInMiB * TOO_MUCH_KEYS_EXPECTED_1MiB_INCREASES))));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    private void fillWithRandomKeys(int keysToAdd, LMDBPersistence lmdbPersistence) {\r\n        // arrange - fill\r\n        for (int i = 0; i < keysToAdd; i++) {\r\n            BigInteger secret = keyUtility.createSecret(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS, random);\r\n            ECKey ecKey = keyUtility.createECKey(secret, true);\r\n            byte[] hash160 = ecKey.getPubKeyHash();\r\n            ByteBuffer hash160ByteBuffer = byteBufferUtility.byteArrayToByteBuffer(hash160);\r\n            \r\n            lmdbPersistence.putNewAmount(hash160ByteBuffer, Coin.SATOSHI);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/LMDBPlatformAssume.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport static java.lang.Boolean.FALSE;\nimport static org.hamcrest.Matchers.is;\nimport org.junit.Assume;\n\n/**\n * Platform assumption for conditionally running LMDB tests.\n * Enabled by default, can be disabled with the system property: -DdisableLMDBTest\n */\npublic class LMDBPlatformAssume implements PlatformAssume {\n\n    public void assumeLMDBExecution() {\n        // If the system property is set, disable LMDB tests\n        boolean disableLMDB = Boolean.getBoolean(\"net.ladenthin.bitcoinaddressfinder.disableLMDBTest\");\n        Assume.assumeThat(\"LMDB tests are disabled via -DdisableLMDBTest\", disableLMDB, is(FALSE));\n    }\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/LMDBToAddressFileTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.HashSet;\r\nimport java.util.List;\r\nimport java.util.Set;\r\nimport java.util.concurrent.atomic.AtomicBoolean;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFileOutputFormat;\r\nimport net.ladenthin.bitcoinaddressfinder.persistence.Persistence;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddressesFiles;\r\nimport org.apache.commons.io.FileUtils;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Before;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class LMDBToAddressFileTest extends LMDBBase {\r\n\r\n    @Before\r\n    public void init() throws IOException {\r\n    }\r\n\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT, location = CommonDataProvider.class)\r\n    public void writeAllAmountsToAddressFileAsDynamicWidthBase58BitcoinAddressWithAmount(boolean compressed, boolean useStaticAmount) throws Exception {\r\n        // arrange\r\n        AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n        TestAddressesFiles testAddressesFiles = new TestAddressesFiles(compressed);\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(useStaticAmount, testAddressesFiles, false, false)) {\r\n            // act\r\n            File file = folder.newFile();\r\n            persistence.writeAllAmountsToAddressFile(file, CAddressFileOutputFormat.DynamicWidthBase58BitcoinAddressWithAmount, shouldRun);\r\n\r\n            // assert\r\n            List<String> contents = FileUtils.readLines(file, StandardCharsets.UTF_8);\r\n\r\n            // set/sort the result because the list might not have the same order for different test executions\r\n            Set<String> contentsAsSet = new HashSet<>(contents);\r\n\r\n            final Set<String> expected;\r\n            if (compressed && useStaticAmount) {\r\n                expected = TestAddressesFiles.compressedTestAddressesWithStaticAmountAsDynamicWidthBase58BitcoinAddressWithAmount;\r\n            } else if(compressed) {\r\n                expected = TestAddressesFiles.compressedTestAddressesAsDynamicWidthBase58BitcoinAddressWithAmount;\r\n            } else if(useStaticAmount) {\r\n                expected = TestAddressesFiles.uncompressedTestAddressesWithStaticAmountAsDynamicWidthBase58BitcoinAddressWithAmount;\r\n            } else {\r\n                expected = TestAddressesFiles.uncompressedTestAddressesAsDynamicWidthBase58BitcoinAddressWithAmount;\r\n            }\r\n\r\n            assertThat(contentsAsSet, is(equalTo(expected)));\r\n            \r\n        }\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT, location = CommonDataProvider.class)\r\n    public void writeAllAmountsToAddressFileAsFixedWidthBase58BitcoinAddress(boolean compressed, boolean useStaticAmount) throws Exception {\r\n        // arrange\r\n        AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n        TestAddressesFiles testAddressesFiles = new TestAddressesFiles(compressed);\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(useStaticAmount, testAddressesFiles, false, false)) {\r\n\r\n            // act\r\n            File file = folder.newFile();\r\n            persistence.writeAllAmountsToAddressFile(file, CAddressFileOutputFormat.FixedWidthBase58BitcoinAddress, shouldRun);\r\n\r\n            // assert\r\n            List<String> contents = FileUtils.readLines(file, StandardCharsets.UTF_8);\r\n\r\n            // set/sort the result because the list might not have the same order for different test executions\r\n            Set<String> contentsAsSet = new HashSet<>(contents);\r\n\r\n            final Set<String> expected;\r\n            if (compressed && useStaticAmount) {\r\n                expected = TestAddressesFiles.compressedTestAddressesWithStaticAmountAsFixedWidthBase58BitcoinAddress;\r\n            } else if(compressed) {\r\n                expected = TestAddressesFiles.compressedTestAddressesAsFixedWidthBase58BitcoinAddress;\r\n            } else if(useStaticAmount) {\r\n                expected = TestAddressesFiles.uncompressedTestAddressesWithStaticAmountAsFixedWidthBase58BitcoinAddress;\r\n            } else {\r\n                expected = TestAddressesFiles.uncompressedTestAddressesAsFixedWidthBase58BitcoinAddress;\r\n            }\r\n\r\n            assertThat(contentsAsSet, is(equalTo(expected)));\r\n        }\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_COMPRESSED_AND_STATIC_AMOUNT, location = CommonDataProvider.class)\r\n    public void writeAllAmountsToAddressFileAsHexHash(boolean compressed, boolean useStaticAmount) throws Exception {\r\n        // arrange\r\n        AtomicBoolean shouldRun = new AtomicBoolean(true);\r\n        TestAddressesFiles testAddressesFiles = new TestAddressesFiles(compressed);\r\n        try (Persistence persistence = createAndFillAndOpenLMDB(useStaticAmount, testAddressesFiles, false, false)) {\r\n            // act\r\n            File file = folder.newFile();\r\n            persistence.writeAllAmountsToAddressFile(file, CAddressFileOutputFormat.HexHash, shouldRun);\r\n\r\n            // assert\r\n            List<String> contents = FileUtils.readLines(file, StandardCharsets.UTF_8);\r\n\r\n            // set/sort the result because the list might not have the same order for different test executions\r\n            Set<String> contentsAsSet = new HashSet<>(contents);\r\n\r\n            final Set<String> expected;\r\n            if (compressed && useStaticAmount) {\r\n                expected = TestAddressesFiles.compressedTestAddressesWithStaticAmountAsHexHash;\r\n            } else if(compressed) {\r\n                expected = TestAddressesFiles.compressedTestAddressesAsHexHash;\r\n            } else if(useStaticAmount) {\r\n                expected = TestAddressesFiles.uncompressedTestAddressesWithStaticAmountAsHexHash;\r\n            } else {\r\n                expected = TestAddressesFiles.uncompressedTestAddressesAsHexHash;\r\n            }\r\n\r\n            assertThat(contentsAsSet, is(equalTo(expected)));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/LogLevelChange.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport ch.qos.logback.classic.Level;\r\nimport ch.qos.logback.classic.Logger;\r\nimport org.slf4j.LoggerFactory;\r\n\r\npublic class LogLevelChange {\r\n    public void turnOff() {\r\n        final Logger logger = (Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);\r\n        logger.setLevel(Level.OFF);\r\n    }\r\n    public void setLevel(Level newLevel) {\r\n        final Logger logger = (Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);\r\n        logger.setLevel(newLevel);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/MainTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport ch.qos.logback.classic.Level;\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.List;\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.ScheduledExecutorService;\nimport java.util.concurrent.TimeUnit;\nimport net.ladenthin.bitcoinaddressfinder.cli.Main;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CCommand;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CConfiguration;\n\nimport static net.ladenthin.bitcoinaddressfinder.cli.Main.printAllStackTracesWithDelay;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\nimport static org.hamcrest.Matchers.notNullValue;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport org.mockito.ArgumentCaptor;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.times;\nimport static org.mockito.Mockito.verify;\nimport static org.mockito.Mockito.when;\nimport org.slf4j.Logger;\n\npublic class MainTest {\n\n    @Rule\n    public TemporaryFolder folder = new TemporaryFolder();\n    \n    private final Path resourceDirectory = Path.of(\"src\",\"test\",\"resources\");\n    private final Path testRoundtripDirectory = resourceDirectory.resolve(\"testRoundtrip\");\n    private final Path testOpenCLInfoDirectory = resourceDirectory.resolve(\"testOpenCLInfo\");\n    \n    private final Path config_AddressFilesToLMDB_json = testRoundtripDirectory.resolve(\"config_AddressFilesToLMDB.json\");\n    private final Path config_LMDBToAddressFile_json = testRoundtripDirectory.resolve(\"config_LMDBToAddressFile.json\");\n    private final Path config_Find_SecretsFile_json = testRoundtripDirectory.resolve(\"config_Find_SecretsFile.json\");\n    \n    private final Path config_Find_1OpenCLDevice_json = testRoundtripDirectory.resolve(\"config_Find_1OpenCLDevice.json\");\n    \n    private final Path config_OpenCLInfo_json = testOpenCLInfoDirectory.resolve(\"config_OpenCLInfo.json\");\n    private final Path config_OpenCLInfo_yaml = testOpenCLInfoDirectory.resolve(\"config_OpenCLInfo.yaml\");\n    private final Path config_OpenCLInfo_yml = testOpenCLInfoDirectory.resolve(\"config_OpenCLInfo.yml\");\n    private final Path config_OpenCLInfo_js = testOpenCLInfoDirectory.resolve(\"config_OpenCLInfo.js\");\n\n    /** Minimal JSON string representing an OpenCLInfo configuration for unit tests. */\n    private static final String OPEN_CL_INFO_JSON_STRING = \"{\\\"command\\\":\\\"OpenCLInfo\\\"}\";\n    /** Minimal YAML string representing an OpenCLInfo configuration for unit tests. */\n    private static final String OPEN_CL_INFO_YAML_STRING = \"command: OpenCLInfo\\n\";\n\n    private static final long DEFAULT_INTERRUPT_DELAY_SECONDS = 10;\n    \n    private void interruptAfterDelay(Main main, long delaySeconds) {\n        ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();\n        executor.schedule(() -> {\n            main.interrupt();\n        }, delaySeconds, TimeUnit.SECONDS);\n    }\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"testRoundtrip\">\n    @Test\n    public void testRoundtrip_configurationsGiven_lmdbCreatedExportedAndRunFindSecretsFile() throws IOException, InterruptedException {\n        // arrange, act, assert\n        Main.main(new String[]{config_AddressFilesToLMDB_json.toAbsolutePath().toString()});\n        Main.main(new String[]{config_LMDBToAddressFile_json.toAbsolutePath().toString()});\n        Main.main(new String[]{config_Find_SecretsFile_json.toAbsolutePath().toString()});\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"testRoundtrip OpenCL producer\">\n    @Test\n    @OpenCLTest\n    public void testRoundtripOpenCLProducer_configurationsGiven_lmdbCreatedAndRunFindOpenCLDevice() throws IOException, InterruptedException {\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n        // arrange\n        Main mainAddressFilesToLMDB = new Main(Main.fromJson(Main.readString(config_AddressFilesToLMDB_json)));\n        mainAddressFilesToLMDB.logConfigurationTransformation();\n        mainAddressFilesToLMDB.run();\n        \n        new LogLevelChange().setLevel(Level.DEBUG);\n        \n        Main mainFind_1OpenCLDevice = new Main(Main.fromJson(Main.readString(config_Find_1OpenCLDevice_json)));\n        \n        // interrupt the act after 10 seconds\n        interruptAfterDelay(mainFind_1OpenCLDevice, DEFAULT_INTERRUPT_DELAY_SECONDS);\n        \n        // act\n        mainFind_1OpenCLDevice.logConfigurationTransformation();\n        mainFind_1OpenCLDevice.run();\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"testRoundtrip\">\n    @Test\n    @OpenCLTest\n    public void testOpenCLInfo_configurationGiven_noExceptionThrown() throws IOException, InterruptedException {\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n        // arrange\n        Main mainFind_SecretsFile = new Main(Main.fromJson(Main.readString(config_OpenCLInfo_json)));\n        mainFind_SecretsFile.logConfigurationTransformation();\n        mainFind_SecretsFile.run();\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"invalidArgument\">\n    @Test\n    public void main_noArgumentGiven_errorLogged() throws IOException, InterruptedException {\n        // arrange\n        Logger logger = mock(Logger.class);\n        when(logger.isTraceEnabled()).thenReturn(true);\n        Main.logger = logger;\n        \n        // act\n        Main.main(new String[0]);\n        \n        // assert\n        ArgumentCaptor<String> logCaptor = ArgumentCaptor.forClass(String.class);\n        verify(logger, times(1)).error(logCaptor.capture());\n        List<String> arguments = logCaptor.getAllValues();\n        assertThat(arguments.get(0), is(equalTo(\"Invalid arguments. Pass path to configuration as first argument.\")));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"printAllStackTracesWithDelay\">\n    @Test\n    public void printAllStackTracesWithDelay_includeDaemonsTrue_noExceptionThrown() {\n        // act\n        printAllStackTracesWithDelay(0, true);\n    }\n\n    @Test\n    public void printAllStackTracesWithDelay_includeDaemonsFalse_noExceptionThrown() {\n        // act\n        printAllStackTracesWithDelay(0, false);\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"fromJson\">\n    @Test\n    public void fromJson_validJsonString_returnsExpectedConfiguration() {\n        // act\n        CConfiguration configuration = Main.fromJson(OPEN_CL_INFO_JSON_STRING);\n\n        // pre-assert\n        assertThat(configuration, is(notNullValue()));\n\n        // assert\n        assertThat(configuration.command, is(equalTo(CCommand.OpenCLInfo)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"fromYaml\">\n    @Test\n    public void fromYaml_validYamlString_returnsExpectedConfiguration() {\n        // act\n        CConfiguration configuration = Main.fromYaml(OPEN_CL_INFO_YAML_STRING);\n\n        // pre-assert\n        assertThat(configuration, is(notNullValue()));\n\n        // assert\n        assertThat(configuration.command, is(equalTo(CCommand.OpenCLInfo)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"main format detection\">\n    @Test\n    @OpenCLTest\n    public void main_jsonExtensionPath_parsesAndRunsConfiguration() {\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n        // act\n        Main.main(new String[]{config_OpenCLInfo_json.toAbsolutePath().toString()});\n    }\n\n    @Test\n    @OpenCLTest\n    public void main_jsExtensionPath_parsesAndRunsConfiguration() {\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n        // act\n        Main.main(new String[]{config_OpenCLInfo_js.toAbsolutePath().toString()});\n    }\n\n    @Test\n    @OpenCLTest\n    public void main_yamlExtensionPath_parsesAndRunsConfiguration() {\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n        // act\n        Main.main(new String[]{config_OpenCLInfo_yaml.toAbsolutePath().toString()});\n    }\n\n    @Test\n    @OpenCLTest\n    public void main_ymlExtensionPath_parsesAndRunsConfiguration() {\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\n        // act\n        Main.main(new String[]{config_OpenCLInfo_yml.toAbsolutePath().toString()});\n    }\n\n    @Test(expected = IllegalArgumentException.class)\n    public void main_unknownExtensionPath_throwsIllegalArgumentException() throws IOException {\n        // arrange\n        File tempFile = folder.newFile(\"config.txt\");\n        Files.writeString(tempFile.toPath(), OPEN_CL_INFO_JSON_STRING, StandardCharsets.UTF_8);\n\n        // act\n        Main.main(new String[]{tempFile.getAbsolutePath()});\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ManualDebugConstants.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\n/**\n * Constants used exclusively for manual debugging and verification.\n */\npublic final class ManualDebugConstants {\n\n    private ManualDebugConstants() {\n        // Utility class – no instantiation allowed\n    }\n\n    /**\n     * Enables runtime validation of public key generation logic.\n     * \n     * Intended only for debugging purposes such as verifying OpenCL results or testing hardware correctness.\n     * \n     * <p><b>Performance impact:</b> Enabling this drastically reduces throughput.</p>\n     * \n     * @see net.ladenthin.bitcoinaddressfinder.configuration.CConsumerJava#runtimePublicKeyCalculationCheck\n     */\n    public static final boolean ENABLE_RUNTIME_PUBLIC_KEY_CALCULATION_CHECK = false;\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/MockConsumer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class MockConsumer implements Consumer {\r\n    \r\n    public List<PublicKeyBytes[]> publicKeyBytesArrayList = new ArrayList<>();\r\n\r\n    @Override\r\n    public void consumeKeys(PublicKeyBytes[] publicKeyBytes) throws InterruptedException {\r\n        publicKeyBytesArrayList.add(publicKeyBytes);\r\n    }\r\n\r\n    @Override\r\n    public void startConsumer() {\r\n    }\r\n\r\n    @Override\r\n    public void interrupt() {\r\n    }\r\n    \r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/MockKeyProducer.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\r\nimport java.math.BigInteger;\r\nimport java.util.Random;\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.KeyProducer;\r\nimport static org.mockito.Mockito.mock;\r\nimport org.slf4j.Logger;\r\n\r\npublic class MockKeyProducer implements KeyProducer {\r\n\r\n    private final KeyUtility keyUtility;\r\n    private final Random random;\r\n    private final int maximumBitLength;\r\n    private final Logger mockLogger;\r\n    \r\n    MockKeyProducer(KeyUtility keyUtility, Random random, int maximumBitLength) {\r\n        this.keyUtility = keyUtility;\r\n        this.random = random;\r\n        this.maximumBitLength = maximumBitLength;\r\n        mockLogger = mock(Logger.class);\r\n    }\r\n    \r\n    MockKeyProducer(KeyUtility keyUtility, Random random) {\r\n        this(keyUtility, random, PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS);\r\n    }\r\n\r\n    @Override\r\n    public BigInteger[] createSecrets(int overallWorkSize, boolean returnStartSecretOnly) throws NoMoreSecretsAvailableException {\r\n        int length = returnStartSecretOnly ? 1 : overallWorkSize;\r\n        BigInteger[] secrets = new BigInteger[length];\r\n        for (int i = 0; i < secrets.length; i++) {\r\n            secrets[i] = keyUtility.createSecret(maximumBitLength, random);\r\n        }\r\n        return secrets;\r\n    }\r\n\r\n    @Override\r\n    public void interrupt() {\r\n    }\r\n\r\n    @Override\r\n    public Logger getLogger() {\r\n        return mockLogger;\r\n    }\r\n    \r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/MockKeyProducerTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport net.ladenthin.bitcoinaddressfinder.keyproducer.NoMoreSecretsAvailableException;\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.util.Random;\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class MockKeyProducerTest {\r\n    \r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final BitHelper bitHelper = new BitHelper();\r\n    /**\r\n     * This random is fine to produce with lower private key bits: 1; 0; 1; 0\r\n     */\r\n    private final Random random = new Random(1);\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createSecrets ReturnStartSecretOnlyIsTrue\">\r\n    @Test\r\n    public void createSecrets_maximumBitLengthIs1BatchSizeIs0ReturnStartSecretOnlyIsTrue_returnMinPrivateKey() throws IOException, NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int maximumBitLength = 1;\r\n        int batchSizeInBits = 0;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, true);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(1)));\r\n        assertThat(createSecrets[0], is(equalTo(PublicKeyBytes.MIN_PRIVATE_KEY)));\r\n    }\r\n    \r\n    @Test\r\n    public void createSecrets_maximumBitLengthIs1BatchSizeIs1ReturnStartSecretOnlyIsTrue_returnMinPrivateKey() throws IOException, NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int maximumBitLength = 1;\r\n        int batchSizeInBits = 1;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, true);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(1)));\r\n        assertThat(createSecrets[0], is(equalTo(PublicKeyBytes.MIN_PRIVATE_KEY)));\r\n    }\r\n    \r\n    @Test\r\n    public void createSecrets_maximumBitLengthIs1BatchSizeIs2ReturnStartSecretOnlyIsTrue_returnMinPrivateKey() throws IOException, NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int maximumBitLength = 1;\r\n        int batchSizeInBits = 2;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, true);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(1)));\r\n        assertThat(createSecrets[0], is(equalTo(PublicKeyBytes.MIN_PRIVATE_KEY)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createSecrets ReturnStartSecretOnlyIsFalse\">\r\n    @Test\r\n    public void createSecrets_maximumBitLengthIs1BatchSizeIs0ReturnStartSecretOnlyIsFalse_returnMinPrivateKey() throws IOException, NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int maximumBitLength = 1;\r\n        int batchSizeInBits = 0;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, false);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(overallWorkSize)));\r\n        assertThat(createSecrets[0], is(equalTo(PublicKeyBytes.MIN_PRIVATE_KEY)));\r\n    }\r\n    \r\n    @Test\r\n    public void createSecrets_maximumBitLengthIs1BatchSizeIs1ReturnStartSecretOnlyIsFalse_returnMinPrivateKey() throws IOException, NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int maximumBitLength = 1;\r\n        int batchSizeInBits = 1;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, false);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(overallWorkSize)));\r\n        assertThat(createSecrets[0], is(equalTo(BigInteger.ONE)));\r\n        assertThat(createSecrets[1], is(equalTo(BigInteger.ZERO)));\r\n    }\r\n    \r\n    @Test\r\n    public void createSecrets_maximumBitLengthIs1BatchSizeIs2ReturnStartSecretOnlyIsFalse_returnMinPrivateKey() throws IOException, NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int maximumBitLength = 1;\r\n        int batchSizeInBits = 2;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, false);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(overallWorkSize)));\r\n        assertThat(createSecrets[0], is(equalTo(BigInteger.ONE)));\r\n        assertThat(createSecrets[1], is(equalTo(BigInteger.ZERO)));\r\n        assertThat(createSecrets[2], is(equalTo(BigInteger.ONE)));\r\n        assertThat(createSecrets[3], is(equalTo(BigInteger.ZERO)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createStatisticsMessage\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX, location = CommonDataProvider.class)\r\n    public void createSecrets_parameterBatchSizeInBitsFromDataProviderAndReturnStartSecretOnlyTrue_returnExpectedSecrets(int maximumBitLength) throws NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int batchSizeInBits = 2;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, true);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(1)));\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX, location = CommonDataProvider.class)\r\n    public void createSecrets_parameterBatchSizeInBitsFromDataProviderAndReturnStartSecretOnlyFalse_returnExpectedSecrets(int maximumBitLength) throws NoMoreSecretsAvailableException {\r\n        // arrange\r\n        int batchSizeInBits = 2;\r\n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        \r\n        // act\r\n        BigInteger[] createSecrets = mockKeyProducer.createSecrets(overallWorkSize, false);\r\n        \r\n        // assert\r\n        assertThat(createSecrets.length, is(equalTo(overallWorkSize)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/NetworkParameterFactoryTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link NetworkParameterFactory}.\r\n */\r\npublic class NetworkParameterFactoryTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getNetwork\">\r\n    @Test\r\n    public void getNetwork_noArguments_returnsNonNull() {\r\n        // arrange\r\n        NetworkParameterFactory factory = new NetworkParameterFactory();\r\n\r\n        // act\r\n        Network network = factory.getNetwork();\r\n\r\n        // assert\r\n        assertThat(network, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void getNetwork_calledTwice_returnsSameNetworkId() {\r\n        // arrange\r\n        NetworkParameterFactory factory = new NetworkParameterFactory();\r\n\r\n        // act\r\n        Network first = factory.getNetwork();\r\n        Network second = factory.getNetwork();\r\n\r\n        // assert\r\n        assertThat(first.id(), is(equalTo(second.id())));\r\n    }\r\n\r\n    @Test\r\n    public void getNetwork_differentFactoryInstances_returnSameNetworkId() {\r\n        // arrange\r\n        NetworkParameterFactory factory1 = new NetworkParameterFactory();\r\n        NetworkParameterFactory factory2 = new NetworkParameterFactory();\r\n\r\n        // act\r\n        Network network1 = factory1.getNetwork();\r\n        Network network2 = factory2.getNetwork();\r\n\r\n        // assert\r\n        assertThat(network1.id(), is(equalTo(network2.id())));\r\n    }\r\n\r\n    @Test\r\n    public void getNetwork_noArguments_returnsMainNet() {\r\n        // arrange\r\n        NetworkParameterFactory factory = new NetworkParameterFactory();\r\n\r\n        // act\r\n        Network network = factory.getNetwork();\r\n\r\n        // assert\r\n        assertThat(network.id(), is(equalTo(\"org.bitcoin.production\")));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLBuilderTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLBuilder;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDevice;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.greaterThan;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Test;\r\n\r\npublic class OpenCLBuilderTest {\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"build\">\r\n    @Test\r\n    @OpenCLTest\r\n    public void build_openCLDeviceExisting_platformsAndDevicesReturned() throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadable();\r\n        // arrange\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        OpenCLBuilder openCLBuilder = new OpenCLBuilder();\r\n        \r\n        // act\r\n        List<OpenCLPlatform> openCLPlatforms = openCLBuilder.build();\r\n        \r\n        // assert\r\n        assertThat(openCLPlatforms.size(),is(greaterThan(Integer.valueOf(0))));\r\n        assertThat(openCLPlatforms.getFirst().openCLDevices().size(),is(greaterThan(Integer.valueOf(0))));\r\n        System.out.println(openCLPlatforms);\r\n        System.out.println(\"isOpenCLnativeLibraryLoadable: \" + OpenCLBuilder.isOpenCLnativeLibraryLoadable());\r\n        System.out.println(\"isOneOpenCL2DeviceAvailable: \" + OpenCLBuilder.isOneOpenCL2_0OrGreaterDeviceAvailable(openCLPlatforms));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    @Test\r\n    public void isOpenCL2_0OrGreater_OpenCLVersion1_2Given_ReturnFalse() throws IOException {\r\n        OpenCLBuilder openCLBuilder = new OpenCLBuilder();\r\n        assertThat(OpenCLBuilder.isOpenCL2_0OrGreater(OpenCLDevice.getComparableVersionFromDeviceVersion(\"OpenCL 1.2\")), is(equalTo(Boolean.FALSE)));\r\n    }\r\n    \r\n    @Test\r\n    public void isOpenCL2_0OrGreater_OpenCLVersion3_0_CUDA_Given_ReturnFalse() throws IOException {\r\n        OpenCLBuilder openCLBuilder = new OpenCLBuilder();\r\n        assertThat(OpenCLBuilder.isOpenCL2_0OrGreater(OpenCLDevice.getComparableVersionFromDeviceVersion(\"OpenCL 3.0 CUDA\")), is(equalTo(Boolean.TRUE)));\r\n    }\r\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLContextTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.IOException;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\r\nimport org.junit.Test;\r\nimport org.slf4j.Logger;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.*;\r\nimport static org.mockito.Mockito.*;\r\n\r\npublic class OpenCLContextTest {\r\n\r\n    private final BitHelper bitHelper = new BitHelper();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_defaultConstructor_noExceptionThrown() {\r\n        // arrange\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        // act\r\n        OpenCLContext openCLContext = new OpenCLContext(cProducerOpenCL, bitHelper);\r\n\r\n        // assert\r\n        assertThat(openCLContext, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_mockLoggerGiven_noExceptionThrown() {\r\n        // arrange\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n        Logger mockLogger = mock(Logger.class);\r\n\r\n        // act\r\n        OpenCLContext openCLContext = new OpenCLContext(cProducerOpenCL, bitHelper, mockLogger);\r\n\r\n        // assert\r\n        assertThat(openCLContext, is(notNullValue()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"init\">\r\n    @OpenCLTest\r\n    @Test\r\n    public void init_defaultConfiguration_logsSelectedDeviceInfo() throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        // arrange\r\n        Logger mockLogger = mock(Logger.class);\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n        OpenCLContext openCLContext = new OpenCLContext(cProducerOpenCL, bitHelper, mockLogger);\r\n\r\n        try {\r\n            // act\r\n            openCLContext.init();\r\n\r\n            // assert\r\n            verify(mockLogger, times(1)).info(eq(\"Selected OpenCL device:\\n{}\"), argThat(\r\n                (String s) -> s.contains(\"--- Info for OpenCL device:\")\r\n            ));\r\n        } finally {\r\n            openCLContext.close();\r\n        }\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLDeviceTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.IOException;\r\nimport java.nio.ByteOrder;\r\nimport java.util.ArrayList;\r\nimport java.util.Collections;\r\nimport java.util.List;\r\n\r\nimport com.google.common.collect.ImmutableList;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLBuilder;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDevice;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\r\nimport org.apache.maven.artifact.versioning.ComparableVersion;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.emptyOrNullString;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.not;\r\nimport org.junit.Test;\r\nimport org.jocl.CL;\r\nimport org.jocl.cl_device_id;\r\n\r\npublic class OpenCLDeviceTest {\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getByteOrder\">\r\n    @Test\r\n    public void getByteOrder_endianLittleTrue_returnsLittleEndian() {\r\n        // arrange\r\n        OpenCLDevice device = createTestDeviceWithEndianness(true);\r\n\r\n        // act\r\n        ByteOrder result = device.getByteOrder();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(ByteOrder.LITTLE_ENDIAN)));\r\n    }\r\n\r\n    @Test\r\n    public void getByteOrder_endianLittleFalse_returnsBigEndian() {\r\n        // arrange\r\n        OpenCLDevice device = createTestDeviceWithEndianness(false);\r\n\r\n        // act\r\n        ByteOrder result = device.getByteOrder();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(ByteOrder.BIG_ENDIAN)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toStringPretty\">\r\n    @Test\r\n    @OpenCLTest\r\n    @ToStringTest\r\n    public void toStringPretty_openCLDeviceExisting_stringCreated() throws IOException {\r\n        // arrange\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        \r\n        OpenCLBuilder openCLBuilder = new OpenCLBuilder();\r\n        List<OpenCLPlatform> openCLPlatforms = openCLBuilder.build();\r\n        final OpenCLDevice openCLDevice = openCLPlatforms.getFirst().openCLDevices().getFirst();\r\n        \r\n        // act\r\n        final String toStringPretty = openCLDevice.toStringPretty();\r\n        \r\n        // assert\r\n        assertThat(toStringPretty, not(emptyOrNullString()));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toStringPretty (static sample)\">\r\n    @Test\r\n    @OpenCLTest\r\n    @ToStringTest\r\n    public void toStringPretty_staticDeviceData_stringCreated() {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadable();\r\n        // arrange\r\n        OpenCLDevice device = new OpenCLDevice(\r\n            new cl_device_id(),\r\n            \"NVIDIA GeForce RTX 3070 Laptop GPU\",\r\n            \"NVIDIA Corporation\",\r\n            \"561.19\",\r\n            \"FULL_PROFILE\",\r\n            \"OpenCL 3.0 CUDA\",\r\n            \"cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_win32 cl_khr_external_memory_win32\",\r\n            CL.CL_DEVICE_TYPE_GPU,\r\n            true,\r\n            40,\r\n            3,\r\n            ImmutableList.copyOf(List.of(1024L, 1024L, 64L)),\r\n            1024,\r\n            1290,\r\n            64,\r\n            2047L * 1024 * 1024,\r\n            8191L * 1024 * 1024,\r\n            0,\r\n            CL.CL_LOCAL,\r\n            48L * 1024,\r\n            64L * 1024,\r\n            CL.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL.CL_QUEUE_PROFILING_ENABLE,\r\n            1,\r\n            256,\r\n            32,\r\n            CL.CL_FP_DENORM | CL.CL_FP_INF_NAN | CL.CL_FP_ROUND_TO_NEAREST | CL.CL_FP_ROUND_TO_ZERO | CL.CL_FP_ROUND_TO_INF | CL.CL_FP_FMA | CL.CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT,\r\n            32768,\r\n            32768,\r\n            16384,\r\n            16384,\r\n            16384,\r\n            1,\r\n            1,\r\n            1,\r\n            1,\r\n            1,\r\n            1\r\n        );\r\n\r\n        // act\r\n        String output = device.toStringPretty();\r\n\r\n        // assert\r\n        final String expectedString =\r\n            \"\"\"\r\n            --- Info for OpenCL device: NVIDIA GeForce RTX 3070 Laptop GPU ---\r\n            cl_device_id:                          cl_device_id[0x0]\r\n            CL_DEVICE_NAME:                        NVIDIA GeForce RTX 3070 Laptop GPU\r\n            CL_DEVICE_VENDOR:                      NVIDIA Corporation\r\n            CL_DRIVER_VERSION:                     561.19\r\n            CL_DEVICE_PROFILE:                     FULL_PROFILE\r\n            CL_DEVICE_VERSION:                     OpenCL 3.0 CUDA\r\n            CL_DEVICE_EXTENSIONS:                  cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_win32 cl_khr_external_memory_win32\r\n            CL_DEVICE_TYPE:                        CL_DEVICE_TYPE_GPU \r\n            CL_DEVICE_ENDIAN_LITTLE:               true\r\n            CL_DEVICE_MAX_COMPUTE_UNITS:           40\r\n            CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:    3\r\n            CL_DEVICE_MAX_WORK_ITEM_SIZES:         1024 / 1024 / 64\r\n            CL_DEVICE_MAX_WORK_GROUP_SIZE:         1024\r\n            CL_DEVICE_MAX_CLOCK_FREQUENCY:         1290 MHz\r\n            CL_DEVICE_ADDRESS_BITS:                64\r\n            CL_DEVICE_MAX_MEM_ALLOC_SIZE:          2047 MByte\r\n            CL_DEVICE_GLOBAL_MEM_SIZE:             8191 MByte\r\n            CL_DEVICE_ERROR_CORRECTION_SUPPORT:    no\r\n            CL_DEVICE_LOCAL_MEM_TYPE:              CL_LOCAL\r\n            CL_DEVICE_LOCAL_MEM_SIZE:              48 KByte\r\n            CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:    64 KByte\r\n            CL_DEVICE_QUEUE_PROPERTIES:            CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE CL_QUEUE_PROFILING_ENABLE \r\n            CL_DEVICE_IMAGE_SUPPORT:               1\r\n            CL_DEVICE_MAX_READ_IMAGE_ARGS:         256\r\n            CL_DEVICE_MAX_WRITE_IMAGE_ARGS:        32\r\n            CL_DEVICE_SINGLE_FP_CONFIG:            CL_FP_DENORM CL_FP_INF_NAN CL_FP_ROUND_TO_NEAREST CL_FP_ROUND_TO_ZERO CL_FP_ROUND_TO_INF CL_FP_FMA CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT \r\n            CL_DEVICE_IMAGE2D_MAX_WIDTH:           32768\r\n            CL_DEVICE_IMAGE2D_MAX_HEIGHT:          32768\r\n            CL_DEVICE_IMAGE3D_MAX_WIDTH:           16384\r\n            CL_DEVICE_IMAGE3D_MAX_HEIGHT:          16384\r\n            CL_DEVICE_IMAGE3D_MAX_DEPTH:           16384\r\n            CL_DEVICE_PREFERRED_VECTOR_WIDTHS:     CHAR 1, SHORT 1, INT 1, LONG 1, FLOAT 1, DOUBLE 1\r\n            \"\"\";\r\n    \r\n        assertThat(output, not(emptyOrNullString()));\r\n        \r\n        List<String> outputLines = output.lines().map(String::stripTrailing).toList();\r\n        List<String> expectedLines = expectedString.lines().map(String::stripTrailing).toList();\r\n        \r\n        assertThat(outputLines, is(equalTo(expectedLines)));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"formatWorkItemSizes\">\r\n    @Test\r\n    public void formatWorkItemSizes_emptyInput_returnsNone() {\r\n        // arrange\r\n        List<Long> input = Collections.emptyList();\r\n\r\n        // act\r\n        String result = OpenCLDevice.formatWorkItemSizes(input);\r\n\r\n        // assert\r\n        assertThat(result, is(\"(none)\"));\r\n    }\r\n\r\n    @Test\r\n    public void formatWorkItemSizes_singleElement_returnsElement() {\r\n        // arrange\r\n        List<Long> input = List.of(42L);\r\n\r\n        // act\r\n        String result = OpenCLDevice.formatWorkItemSizes(input);\r\n\r\n        // assert\r\n        assertThat(result, is(\"42\"));\r\n    }\r\n\r\n    @Test\r\n    public void formatWorkItemSizes_threeElements_returnsFormattedString() {\r\n        // arrange\r\n        List<Long> input = List.of(64L, 128L, 256L);\r\n\r\n        // act\r\n        String result = OpenCLDevice.formatWorkItemSizes(input);\r\n\r\n        // assert\r\n        assertThat(result, is(\"64 / 128 / 256\"));\r\n    }\r\n\r\n    @Test\r\n    public void formatWorkItemSizes_fiveElements_returnsFormattedString() {\r\n        // arrange\r\n        List<Long> input = List.of(1L, 2L, 3L, 4L, 5L);\r\n\r\n        // act\r\n        String result = OpenCLDevice.formatWorkItemSizes(input);\r\n\r\n        // assert\r\n        assertThat(result, is(\"1 / 2 / 3 / 4 / 5\"));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getComparableVersionFromDeviceVersion\">\r\n\r\n    @Test\r\n    public void getComparableVersionFromDeviceVersion_openCLPrefix_removedCorrectly() {\r\n        // arrange\r\n        String input = \"OpenCL 3.0 CUDA\";\r\n        \r\n        // act\r\n        ComparableVersion version = OpenCLDevice.getComparableVersionFromDeviceVersion(input);\r\n        \r\n        // assert\r\n        assertThat(version.toString(), equalTo(\"3.0\"));\r\n    }\r\n\r\n    @Test\r\n    public void getComparableVersionFromDeviceVersion_cudaSuffix_removedCorrectly() {\r\n        // arrange\r\n        String input = \"3.0 CUDA\";\r\n        \r\n        // act\r\n        ComparableVersion version = OpenCLDevice.getComparableVersionFromDeviceVersion(input);\r\n        \r\n        // assert\r\n        assertThat(version.toString(), equalTo(\"3.0\"));\r\n    }\r\n\r\n    @Test\r\n    public void getComparableVersionFromDeviceVersion_noPrefixOrSuffix_versionUnchanged() {\r\n        // arrange\r\n        String input = \"2.1\";\r\n        \r\n        // act\r\n        ComparableVersion version = OpenCLDevice.getComparableVersionFromDeviceVersion(input);\r\n        \r\n        // assert\r\n        assertThat(version.toString(), equalTo(\"2.1\"));\r\n    }\r\n\r\n    @Test\r\n    public void getComparableVersionFromDeviceVersion_emptyString_returnsEmptyVersion() {\r\n        // arrange\r\n        String input = \"\";\r\n        \r\n        // act\r\n        ComparableVersion version = OpenCLDevice.getComparableVersionFromDeviceVersion(input);\r\n        \r\n        // assert\r\n        assertThat(version.toString(), equalTo(\"\"));\r\n    }\r\n    \r\n    @Test\r\n    public void getComparableVersionFromDeviceVersion_trailingWhitespace_trimmedCorrectly() {\r\n        // arrange\r\n        String input = \"3.0 \";\r\n\r\n        // act\r\n        ComparableVersion version = OpenCLDevice.getComparableVersionFromDeviceVersion(input);\r\n\r\n        // assert\r\n        assertThat(version.toString(), equalTo(\"3.0\"));\r\n    }\r\n\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"helper\">\r\n    // CL_DEVICE_TYPE_GPU = (1 << 2) = 4, used as a plain literal to avoid native library loading\r\n    private static final long DEVICE_TYPE_GPU = 4L;\r\n\r\n    private static OpenCLDevice createTestDeviceWithEndianness(boolean endianLittle) {\r\n        return new OpenCLDevice(\r\n            new cl_device_id(), \"TestDevice\", \"TestVendor\", \"1.0\",\r\n            \"FULL_PROFILE\", \"OpenCL 2.0\", \"\", DEVICE_TYPE_GPU,\r\n            endianLittle, 1, 1L, ImmutableList.of(64L), 64L, 1000L, 32,\r\n            1024L * 1024L, 1024L * 1024L * 1024L, 0L, 1,\r\n            32L * 1024L, 64L * 1024L, 0L,\r\n            1, 128, 8, 0L,\r\n            4096L, 4096L, 2048L, 2048L, 2048L,\r\n            1, 1, 1, 1, 1, 1\r\n        );\r\n    }\r\n    // </editor-fold>\r\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLGridResultTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link OpenCLGridResult}.\r\n */\r\npublic class OpenCLGridResultTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getSecretKeyBase\">\r\n    @Test\r\n    public void getSecretKeyBase_validInput_returnsExpectedValue() {\r\n        // arrange\r\n        BigInteger secretKeyBase = BigInteger.valueOf(12345678L);\r\n        int workSize = 1;\r\n        ByteBuffer result = ByteBuffer.allocate(PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * workSize);\r\n        OpenCLGridResult gridResult = new OpenCLGridResult(secretKeyBase, workSize, result);\r\n\r\n        // act\r\n        BigInteger actual = gridResult.getSecretKeyBase();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(secretKeyBase)));\r\n    }\r\n\r\n    @Test\r\n    public void getSecretKeyBase_zeroBigInteger_returnsZero() {\r\n        // arrange\r\n        BigInteger secretKeyBase = BigInteger.ZERO;\r\n        int workSize = 1;\r\n        ByteBuffer result = ByteBuffer.allocate(PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * workSize);\r\n        OpenCLGridResult gridResult = new OpenCLGridResult(secretKeyBase, workSize, result);\r\n\r\n        // act\r\n        BigInteger actual = gridResult.getSecretKeyBase();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(BigInteger.ZERO)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getWorkSize\">\r\n    @Test\r\n    public void getWorkSize_validInput_returnsExpectedValue() {\r\n        // arrange\r\n        BigInteger secretKeyBase = BigInteger.ONE;\r\n        int workSize = 64;\r\n        ByteBuffer result = ByteBuffer.allocate(PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * workSize);\r\n        OpenCLGridResult gridResult = new OpenCLGridResult(secretKeyBase, workSize, result);\r\n\r\n        // act\r\n        int actual = gridResult.getWorkSize();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(workSize)));\r\n    }\r\n\r\n    @Test\r\n    public void getWorkSize_workSizeOne_returnsOne() {\r\n        // arrange\r\n        BigInteger secretKeyBase = BigInteger.ONE;\r\n        int workSize = 1;\r\n        ByteBuffer result = ByteBuffer.allocate(PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * workSize);\r\n        OpenCLGridResult gridResult = new OpenCLGridResult(secretKeyBase, workSize, result);\r\n\r\n        // act\r\n        int actual = gridResult.getWorkSize();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(1)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getResult\">\r\n    @Test\r\n    public void getResult_validInput_returnsExpectedBuffer() {\r\n        // arrange\r\n        BigInteger secretKeyBase = BigInteger.ONE;\r\n        int workSize = 1;\r\n        ByteBuffer expectedBuffer = ByteBuffer.allocate(PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * workSize);\r\n        OpenCLGridResult gridResult = new OpenCLGridResult(secretKeyBase, workSize, expectedBuffer);\r\n\r\n        // act\r\n        ByteBuffer actual = gridResult.getResult();\r\n\r\n        // assert\r\n        assertThat(actual, is(notNullValue()));\r\n        assertThat(actual, is(equalTo(expectedBuffer)));\r\n    }\r\n\r\n    @Test\r\n    public void getResult_validInput_returnsSameBufferReference() {\r\n        // arrange\r\n        BigInteger secretKeyBase = BigInteger.ONE;\r\n        int workSize = 1;\r\n        ByteBuffer buffer = ByteBuffer.allocate(PublicKeyBytes.CHUNK_SIZE_NUM_BYTES * workSize);\r\n        OpenCLGridResult gridResult = new OpenCLGridResult(secretKeyBase, workSize, buffer);\r\n\r\n        // act\r\n        ByteBuffer actual = gridResult.getResult();\r\n\r\n        // assert\r\n        assertThat(actual == buffer, is(true));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"trimU32PrefixBytes\">\r\n    @Test\r\n    public void trimU32PrefixBytes_sevenByteArray_returnsFourBytes() {\r\n        // arrange\r\n        byte[] input = {0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04};\r\n\r\n        // act\r\n        byte[] result = OpenCLGridResult.trimU32PrefixBytes(input);\r\n\r\n        // assert\r\n        assertThat(result.length, is(equalTo(4)));\r\n    }\r\n\r\n    @Test\r\n    public void trimU32PrefixBytes_sevenByteArray_returnsLastFourBytes() {\r\n        // arrange\r\n        byte[] input = {0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04};\r\n\r\n        // act\r\n        byte[] result = OpenCLGridResult.trimU32PrefixBytes(input);\r\n\r\n        // assert\r\n        assertThat(result[0], is(equalTo((byte) 0x01)));\r\n        assertThat(result[1], is(equalTo((byte) 0x02)));\r\n        assertThat(result[2], is(equalTo((byte) 0x03)));\r\n        assertThat(result[3], is(equalTo((byte) 0x04)));\r\n    }\r\n\r\n    @Test\r\n    public void trimU32PrefixBytes_exactlyThreeBytes_returnsEmptyArray() {\r\n        // arrange\r\n        byte[] input = {0x00, 0x00, 0x00};\r\n\r\n        // act\r\n        byte[] result = OpenCLGridResult.trimU32PrefixBytes(input);\r\n\r\n        // assert\r\n        assertThat(result.length, is(equalTo(0)));\r\n    }\r\n\r\n    @Test\r\n    public void trimU32PrefixBytes_fourByteArray_returnsOneByteArray() {\r\n        // arrange\r\n        byte[] input = {0x00, 0x00, 0x00, (byte) 0xFF};\r\n\r\n        // act\r\n        byte[] result = OpenCLGridResult.trimU32PrefixBytes(input);\r\n\r\n        // assert\r\n        assertThat(result.length, is(equalTo(1)));\r\n        assertThat(result[0], is(equalTo((byte) 0xFF)));\r\n    }\r\n\r\n    @Test\r\n    public void trimU32PrefixBytes_largeArray_returnsCorrectLength() {\r\n        // arrange\r\n        byte[] input = new byte[35]; // 35 - 3 = 32 expected bytes\r\n        input[3] = (byte) 0xAB;\r\n\r\n        // act\r\n        byte[] result = OpenCLGridResult.trimU32PrefixBytes(input);\r\n\r\n        // assert\r\n        assertThat(result.length, is(equalTo(32)));\r\n        assertThat(result[0], is(equalTo((byte) 0xAB)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLPlatformAssume.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2022 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport static java.lang.Boolean.TRUE;\r\nimport java.util.List;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLBuilder;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\r\nimport org.junit.Assume;\r\nimport static org.hamcrest.Matchers.is;\r\n\r\npublic class OpenCLPlatformAssume implements PlatformAssume {\r\n    \r\n    public void assumeOpenCLLibraryLoadable() {\r\n        Assume.assumeThat(\"OpenCL library loadable\", OpenCLBuilder.isOpenCLnativeLibraryLoadable(), is(TRUE));\r\n    }\r\n    \r\n    public void assumeOneOpenCL2_0OrGreaterDeviceAvailable(List<OpenCLPlatform> openCLPlatforms) {\r\n        Assume.assumeThat(\"One OpenCL 2.0 or greater device available\", OpenCLBuilder.isOneOpenCL2_0OrGreaterDeviceAvailable(openCLPlatforms), is(TRUE));\r\n    }\r\n    \r\n    public void assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable() {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadable();\r\n        OpenCLBuilder openCLBuilder = new OpenCLBuilder();\r\n        List<OpenCLPlatform> openCLPlatforms = openCLBuilder.build();\r\n        new OpenCLPlatformAssume().assumeOneOpenCL2_0OrGreaterDeviceAvailable(openCLPlatforms);\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLPlatformSelectorTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.util.Collections;\r\nimport java.util.List;\r\nimport com.google.common.collect.ImmutableList;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDevice;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDeviceSelection;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\r\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatformSelector;\r\nimport org.jocl.cl_context_properties;\r\nimport org.jocl.cl_device_id;\r\nimport org.junit.Test;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\n\r\npublic class OpenCLPlatformSelectorTest {\r\n\r\n    // CL_DEVICE_TYPE_CPU = (1 << 1) = 2, CL_DEVICE_TYPE_GPU = (1 << 2) = 4\r\n    private static final long DEVICE_TYPE_CPU = 2L;\r\n    private static final long DEVICE_TYPE_GPU = 4L;\r\n\r\n    private final OpenCLPlatformSelector platformSelector = new OpenCLPlatformSelector();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"select\">\r\n    @Test\r\n    public void select_validPlatformAndDeviceIndex_returnsExpectedSelection() {\r\n        // arrange\r\n        OpenCLDevice gpuDevice = createTestDevice(DEVICE_TYPE_GPU);\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", gpuDevice);\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        OpenCLDeviceSelection result = platformSelector.select(platforms, 0, DEVICE_TYPE_GPU, 0);\r\n\r\n        // assert\r\n        assertThat(result, is(notNullValue()));\r\n        assertThat(result.platform(), is(equalTo(platform)));\r\n        assertThat(result.device(), is(equalTo(gpuDevice)));\r\n    }\r\n\r\n    @Test\r\n    public void select_deviceTypeFilter_onlyMatchingDeviceSelected() {\r\n        // arrange\r\n        OpenCLDevice cpuDevice = createTestDevice(DEVICE_TYPE_CPU);\r\n        OpenCLDevice gpuDevice = createTestDevice(DEVICE_TYPE_GPU);\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", cpuDevice, gpuDevice);\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        OpenCLDeviceSelection result = platformSelector.select(platforms, 0, DEVICE_TYPE_GPU, 0);\r\n\r\n        // assert\r\n        assertThat(result.device(), is(equalTo(gpuDevice)));\r\n    }\r\n\r\n    @Test\r\n    public void select_secondPlatformSelected_returnsDeviceFromSecondPlatform() {\r\n        // arrange\r\n        OpenCLDevice firstDevice = createTestDevice(DEVICE_TYPE_GPU);\r\n        OpenCLDevice secondDevice = createTestDevice(DEVICE_TYPE_GPU);\r\n        OpenCLPlatform firstPlatform = createTestPlatform(\"Platform0\", firstDevice);\r\n        OpenCLPlatform secondPlatform = createTestPlatform(\"Platform1\", secondDevice);\r\n        List<OpenCLPlatform> platforms = List.of(firstPlatform, secondPlatform);\r\n\r\n        // act\r\n        OpenCLDeviceSelection result = platformSelector.select(platforms, 1, DEVICE_TYPE_GPU, 0);\r\n\r\n        // assert\r\n        assertThat(result.platform(), is(equalTo(secondPlatform)));\r\n        assertThat(result.device(), is(equalTo(secondDevice)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void select_negativePlatformIndex_throwsIllegalArgumentException() {\r\n        // arrange\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", createTestDevice(DEVICE_TYPE_GPU));\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        platformSelector.select(platforms, -1, DEVICE_TYPE_GPU, 0);\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void select_platformIndexTooLarge_throwsIllegalArgumentException() {\r\n        // arrange\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", createTestDevice(DEVICE_TYPE_GPU));\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        platformSelector.select(platforms, 1, DEVICE_TYPE_GPU, 0);\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void select_emptyPlatformList_throwsIllegalArgumentException() {\r\n        // arrange\r\n        List<OpenCLPlatform> platforms = Collections.emptyList();\r\n\r\n        // act\r\n        platformSelector.select(platforms, 0, DEVICE_TYPE_GPU, 0);\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void select_negativeDeviceIndex_throwsIllegalArgumentException() {\r\n        // arrange\r\n        OpenCLDevice gpuDevice = createTestDevice(DEVICE_TYPE_GPU);\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", gpuDevice);\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        platformSelector.select(platforms, 0, DEVICE_TYPE_GPU, -1);\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void select_deviceIndexTooLarge_throwsIllegalArgumentException() {\r\n        // arrange\r\n        OpenCLDevice gpuDevice = createTestDevice(DEVICE_TYPE_GPU);\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", gpuDevice);\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        platformSelector.select(platforms, 0, DEVICE_TYPE_GPU, 1);\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void select_noDeviceMatchingType_throwsIllegalArgumentException() {\r\n        // arrange\r\n        OpenCLDevice cpuDevice = createTestDevice(DEVICE_TYPE_CPU);\r\n        OpenCLPlatform platform = createTestPlatform(\"Platform0\", cpuDevice);\r\n        List<OpenCLPlatform> platforms = List.of(platform);\r\n\r\n        // act\r\n        platformSelector.select(platforms, 0, DEVICE_TYPE_GPU, 0);\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"helper\">\r\n    private static OpenCLPlatform createTestPlatform(String name, OpenCLDevice... devices) {\r\n        return new OpenCLPlatform(name, new cl_context_properties(), ImmutableList.copyOf(devices));\r\n    }\r\n\r\n    private static OpenCLDevice createTestDevice(long deviceType) {\r\n        return new OpenCLDevice(\r\n            new cl_device_id(), \"TestDevice\", \"TestVendor\", \"1.0\",\r\n            \"FULL_PROFILE\", \"OpenCL 2.0\", \"\", deviceType,\r\n            true, 1, 1L, ImmutableList.of(64L), 64L, 1000L, 32,\r\n            1024L * 1024L, 1024L * 1024L * 1024L, 0L, 1,\r\n            32L * 1024L, 64L * 1024L, 0L,\r\n            1, 128, 8, 0L,\r\n            4096L, 4096L, 2048L, 2048L, 2048L,\r\n            1, 1, 1, 1, 1, 1\r\n        );\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLPlatformTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport com.google.common.collect.ImmutableList;\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLDevice;\nimport net.ladenthin.bitcoinaddressfinder.opencl.OpenCLPlatform;\nimport org.jspecify.annotations.NonNull;\nimport org.junit.Test;\nimport java.util.Collections;\nimport java.util.List;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.emptyOrNullString;\nimport static org.hamcrest.Matchers.is;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.*;\nimport static org.hamcrest.Matchers.not;\nimport org.jocl.cl_context_properties;\n\npublic class OpenCLPlatformTest {\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor and getters\">\n    @Test\n    public void constructor_validArguments_returnsPlatform() {\n        // arrange\n        String platformName = \"Test Platform\";\n        ImmutableList<@NonNull OpenCLDevice> devices = ImmutableList.<OpenCLDevice>builder().build();\n\n        // act\n        OpenCLPlatform platform = new OpenCLPlatform(platformName, new cl_context_properties(), devices);\n\n        // assert\n        assertThat(platform, is(notNullValue()));\n        assertThat(platform.platformName(), is(equalTo(platformName)));\n        assertThat(platform.openCLDevices(), is(devices));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toString\">\n    @Test\n    @ToStringTest\n    public void toString_containsPlatformName() {\n        // arrange\n        String platformName = \"Platform A\";\n        OpenCLPlatform platform = new OpenCLPlatform(platformName, new cl_context_properties(), ImmutableList.<OpenCLDevice>builder().build());\n\n        // act\n        String result = platform.toString();\n\n        // assert\n        assertThat(result, not(emptyOrNullString()));\n        assertThat(result, containsString(platformName));\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/OpenCLTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2022 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.lang.annotation.ElementType;\r\nimport java.lang.annotation.Retention;\r\nimport java.lang.annotation.RetentionPolicy;\r\nimport java.lang.annotation.Target;\r\n\r\n@Retention(RetentionPolicy.SOURCE)\r\n@Target(ElementType.METHOD)\r\npublic @interface OpenCLTest {\r\n    \r\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/PlatformAssume.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\n/**\n * Marker interface for platform-specific test assumptions.\n * <p>\n * Classes implementing this interface group checks that determine whether\n * tests should be conditionally executed depending on the runtime environment\n * (e.g., required native libraries or hardware support).\n * </p>\n *\n * @see org.junit.Assume\n */\npublic interface PlatformAssume {\n    \n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/PrivateKeyTooLargeExceptionTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.math.BigInteger;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.containsString;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.instanceOf;\nimport static org.hamcrest.Matchers.is;\nimport static org.hamcrest.Matchers.nullValue;\nimport org.junit.Test;\n\n/**\n * Unit tests for {@link PrivateKeyTooLargeException}.\n */\npublic class PrivateKeyTooLargeExceptionTest {\n\n    private static final BigInteger PROVIDED_KEY = new BigInteger(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\", 16);\n    private static final BigInteger MAX_ALLOWED_KEY = PublicKeyBytes.MAX_PRIVATE_KEY.subtract(BigInteger.TWO);\n    private static final int BATCH_SIZE_IN_BITS = 10;\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\n    @Test\n    public void constructor_validArguments_messageContainsProvidedKey() {\n        // act\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // assert\n        assertThat(exception.getMessage(), containsString(\"0x\" + PROVIDED_KEY.toString(16)));\n    }\n\n    @Test\n    public void constructor_validArguments_messageContainsMaxAllowedKey() {\n        // act\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // assert\n        assertThat(exception.getMessage(), containsString(\"0x\" + MAX_ALLOWED_KEY.toString(16)));\n    }\n\n    @Test\n    public void constructor_validArguments_messageContainsBatchSizeInBits() {\n        // act\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // assert\n        assertThat(exception.getMessage(), containsString(\"batchSizeInBits = \" + BATCH_SIZE_IN_BITS));\n    }\n\n    @Test\n    public void constructor_validArguments_messageContainsReference() {\n        // act\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // assert\n        assertThat(exception.getMessage(), containsString(\"PublicKeyBytes.MAX_PRIVATE_KEY\"));\n    }\n\n    @Test\n    public void constructor_validArguments_isInstanceOfIllegalArgumentException() {\n        // act\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // assert\n        assertThat(exception, is(instanceOf(IllegalArgumentException.class)));\n    }\n\n    @Test\n    public void constructor_validArguments_noCause() {\n        // act\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // assert\n        assertThat(exception.getCause(), is(nullValue()));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getProvidedKey\">\n    @Test\n    public void getProvidedKey_validArguments_returnsProvidedKey() {\n        // arrange\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // act\n        BigInteger actual = exception.getProvidedKey();\n\n        // assert\n        assertThat(actual, is(equalTo(PROVIDED_KEY)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getMaxAllowedKey\">\n    @Test\n    public void getMaxAllowedKey_validArguments_returnsMaxAllowedKey() {\n        // arrange\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // act\n        BigInteger actual = exception.getMaxAllowedKey();\n\n        // assert\n        assertThat(actual, is(equalTo(MAX_ALLOWED_KEY)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getBatchSizeInBits\">\n    @Test\n    public void getBatchSizeInBits_validArguments_returnsBatchSizeInBits() {\n        // arrange\n        PrivateKeyTooLargeException exception = new PrivateKeyTooLargeException(PROVIDED_KEY, MAX_ALLOWED_KEY, BATCH_SIZE_IN_BITS);\n\n        // act\n        int actual = exception.getBatchSizeInBits();\n\n        // assert\n        assertThat(actual, is(equalTo(BATCH_SIZE_IN_BITS)));\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/PrivateKeyValidatorTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport org.junit.Test;\r\nimport org.junit.runner.RunWith;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.*;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class PrivateKeyValidatorTest {\r\n\r\n    private final PrivateKeyValidator validator = new PrivateKeyValidator();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getMaxPrivateKeyForBatchSize\">\r\n    @Test\r\n    public void getMaxPrivateKeyForBatchSize_batchSize0_returnsMaxPrivateKey() {\r\n        // arrange\r\n        int batchSizeInBits = 0;\r\n\r\n        // act\r\n        BigInteger result = validator.getMaxPrivateKeyForBatchSize(batchSizeInBits);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.MAX_PRIVATE_KEY)));\r\n    }\r\n\r\n    @Test\r\n    public void getMaxPrivateKeyForBatchSize_batchSize1_returnsMaxMinus1() {\r\n        // arrange\r\n        int batchSizeInBits = 1;\r\n\r\n        // act\r\n        BigInteger result = validator.getMaxPrivateKeyForBatchSize(batchSizeInBits);\r\n\r\n        // assert\r\n        assertThat(result.add(BigInteger.ONE), is(equalTo(PublicKeyBytes.MAX_PRIVATE_KEY)));\r\n    }\r\n\r\n    @Test\r\n    public void getMaxPrivateKeyForBatchSize_maxAllowedBitSize_returnsMinimumSafeKey() {\r\n        // arrange\r\n        int batchSizeInBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS - 1;\r\n\r\n        // act\r\n        BigInteger result = validator.getMaxPrivateKeyForBatchSize(batchSizeInBits);\r\n\r\n        // assert\r\n        BigInteger offset = BigInteger.ONE.shiftLeft(batchSizeInBits);\r\n        BigInteger expected = PublicKeyBytes.MAX_PRIVATE_KEY.subtract(offset).add(BigInteger.ONE);\r\n        assertThat(result, is(equalTo(expected)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void getMaxPrivateKeyForBatchSize_bitSizeNegative_throwsException() {\r\n        // act\r\n        validator.getMaxPrivateKeyForBatchSize(-1);\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void getMaxPrivateKeyForBatchSize_bitSizeTooLarge_throwsException() {\r\n        // act\r\n        validator.getMaxPrivateKeyForBatchSize(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS + 1);\r\n    }\r\n\r\n    @Test(expected = IllegalStateException.class)\r\n    public void getMaxPrivateKeyForBatchSize_tooLarge_throwsException() {\r\n        // arrange\r\n        int batchSizeInBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\r\n\r\n        // act\r\n        validator.getMaxPrivateKeyForBatchSize(batchSizeInBits);\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"isInvalidWithBatchSize\">\r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_PRIVATE_KEYS_TOO_LARGE_WITH_CHUNK_SIZE, location = CommonDataProvider.class)\r\n    public void isInvalidWithBatchSize_keyTooLarge_returnsTrue(BigInteger privateKey, int batchSizeInBits) {\r\n        // arrange\r\n        BigInteger maxAllowed = validator.getMaxPrivateKeyForBatchSize(batchSizeInBits);\r\n\r\n        // act\r\n        boolean isInvalid = validator.isInvalidWithBatchSize(privateKey, maxAllowed);\r\n\r\n        // assert\r\n        assertThat(isInvalid, is(true));\r\n    }\r\n\r\n    @Test\r\n    public void isInvalidWithBatchSize_keyWithinLimit_returnsFalse() {\r\n        // arrange\r\n        int batchSizeInBits = 2;\r\n        BigInteger maxAllowed = validator.getMaxPrivateKeyForBatchSize(batchSizeInBits);\r\n        BigInteger validKey = maxAllowed.subtract(BigInteger.ONE);\r\n\r\n        // act\r\n        boolean isInvalid = validator.isInvalidWithBatchSize(validKey, maxAllowed);\r\n\r\n        // assert\r\n        assertThat(isInvalid, is(false));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"isOutsidePrivateKeyRange\">\r\n    @Test\r\n    public void isOutsidePrivateKeyRange_minPrivateKey_returnsTrue() {\r\n        // act\r\n        boolean result = validator.isOutsidePrivateKeyRange(PublicKeyBytes.MIN_PRIVATE_KEY);\r\n\r\n        // assert\r\n        assertThat(result, is(true));\r\n    }\r\n\r\n    @Test\r\n    public void isOutsidePrivateKeyRange_minValidPrivateKey_returnsFalse() {\r\n        // act\r\n        boolean result = validator.isOutsidePrivateKeyRange(PublicKeyBytes.MIN_VALID_PRIVATE_KEY);\r\n\r\n        // assert\r\n        assertThat(result, is(false));\r\n    }\r\n\r\n    @Test\r\n    public void isOutsidePrivateKeyRange_maxPrivateKey_returnsFalse() {\r\n        // act\r\n        boolean result = validator.isOutsidePrivateKeyRange(PublicKeyBytes.MAX_PRIVATE_KEY);\r\n\r\n        // assert\r\n        assertThat(result, is(false));\r\n    }\r\n\r\n    @Test\r\n    public void isOutsidePrivateKeyRange_zero_returnsTrue() {\r\n        // act\r\n        boolean result = validator.isOutsidePrivateKeyRange(BigInteger.ZERO);\r\n\r\n        // assert\r\n        assertThat(result, is(true));\r\n    }\r\n\r\n    @Test\r\n    public void isOutsidePrivateKeyRange_belowMin_returnsTrue() {\r\n        // arrange\r\n        BigInteger invalidKey = PublicKeyBytes.MIN_PRIVATE_KEY.subtract(BigInteger.ONE);\r\n\r\n        // act\r\n        boolean result = validator.isOutsidePrivateKeyRange(invalidKey);\r\n\r\n        // assert\r\n        assertThat(result, is(true));\r\n    }\r\n\r\n    @Test\r\n    public void isOutsidePrivateKeyRange_aboveMax_returnsTrue() {\r\n        // arrange\r\n        BigInteger invalidKey = PublicKeyBytes.MAX_PRIVATE_KEY.add(BigInteger.ONE);\r\n\r\n        // act\r\n        boolean result = validator.isOutsidePrivateKeyRange(invalidKey);\r\n\r\n        // assert\r\n        assertThat(result, is(true));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"returnValidPrivateKey\">\r\n    @Test\r\n    public void returnValidPrivateKey_validKey_returnsSameKey() {\r\n        // arrange\r\n        BigInteger valid = PublicKeyBytes.MIN_PRIVATE_KEY.add(BigInteger.ONE);\r\n\r\n        // act\r\n        BigInteger result = validator.returnValidPrivateKey(valid);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(valid)));\r\n    }\r\n\r\n    @Test\r\n    public void returnValidPrivateKey_tooSmall_returnsReplacement() {\r\n        // arrange\r\n        BigInteger tooSmall = PublicKeyBytes.MIN_PRIVATE_KEY.subtract(BigInteger.ONE);\r\n\r\n        // act\r\n        BigInteger result = validator.returnValidPrivateKey(tooSmall);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n    }\r\n\r\n    @Test\r\n    public void returnValidPrivateKey_tooLarge_returnsReplacement() {\r\n        // arrange\r\n        BigInteger tooLarge = PublicKeyBytes.MAX_PRIVATE_KEY.add(BigInteger.ONE);\r\n\r\n        // act\r\n        BigInteger result = validator.returnValidPrivateKey(tooLarge);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"replaceInvalidPrivateKeys\">\r\n    @Test\r\n    public void replaceInvalidPrivateKeys_mixedArray_replacesInvalids() {\r\n        // arrange\r\n        BigInteger[] secrets = new BigInteger[]{\r\n            PublicKeyBytes.MIN_VALID_PRIVATE_KEY,                      // valid\r\n            PublicKeyBytes.MAX_PRIVATE_KEY.add(BigInteger.ONE),        // invalid\r\n            BigInteger.ZERO                                            // invalid\r\n        };\r\n\r\n        // act\r\n        validator.replaceInvalidPrivateKeys(secrets);\r\n\r\n        // assert\r\n        assertThat(secrets[0], is(equalTo(PublicKeyBytes.MIN_VALID_PRIVATE_KEY)));\r\n        assertThat(secrets[1], is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n        assertThat(secrets[2], is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n    }\r\n\r\n    @Test\r\n    public void replaceInvalidPrivateKeys_allValidKeys_keepsOriginalValues() {\r\n        // arrange\r\n        BigInteger[] secrets = new BigInteger[]{\r\n            PublicKeyBytes.MIN_VALID_PRIVATE_KEY,\r\n            PublicKeyBytes.MAX_PRIVATE_KEY,\r\n            PublicKeyBytes.MIN_VALID_PRIVATE_KEY.add(BigInteger.ONE)\r\n        };\r\n        BigInteger[] expectedCopy = secrets.clone();\r\n\r\n        // act\r\n        validator.replaceInvalidPrivateKeys(secrets);\r\n\r\n        // assert\r\n        assertThat(secrets, is(equalTo(expectedCopy)));\r\n    }\r\n\r\n    @Test\r\n    public void replaceInvalidPrivateKeys_allInvalidKeys_replacesAll() {\r\n        // arrange\r\n        BigInteger[] secrets = new BigInteger[]{\r\n            BigInteger.ZERO,\r\n            BigInteger.ONE.negate(),\r\n            PublicKeyBytes.MAX_PRIVATE_KEY.add(BigInteger.ONE)\r\n        };\r\n\r\n        // act\r\n        validator.replaceInvalidPrivateKeys(secrets);\r\n\r\n        // assert\r\n        assertThat(secrets[0], is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n        assertThat(secrets[1], is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n        assertThat(secrets[2], is(equalTo(PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ProbeAddressesOpenCLTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.io.Resources;\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.net.URL;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.ByteOrder;\r\nimport java.nio.charset.StandardCharsets;\r\nimport org.apache.commons.io.FileUtils;\r\nimport org.junit.Before;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\nimport static org.jocl.CL.*;\r\n\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.Random;\r\nimport java.util.stream.Collectors;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddresses42;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.hasItem;\r\nimport static org.hamcrest.Matchers.everyItem;\r\nimport static org.mockito.Mockito.mock;\r\n\r\nimport org.jocl.*;\r\nimport org.junit.Ignore;\r\nimport org.junit.runner.RunWith;\r\nimport org.slf4j.Logger;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class ProbeAddressesOpenCLTest {\r\n\r\n    public static final String ADDRESSES_CSV = \"addresses.csv\";\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n    \r\n    private static final TestAddresses42 testAddresses = new TestAddresses42(1024, false);\r\n    \r\n    /**\r\n     * 22:  256Mb: executed in: 1253ms, read in:  74ms\r\n     * 23:  512Mb: executed in: 2346ms, read in: 148ms\r\n     * 24: 1024Mb: executed in: 4622ms, read in: 302ms\r\n    */\r\n    private final static int BITS_FOR_BATCH = 8;\r\n    private final static int LOOP_COUNT = BITS_FOR_BATCH >> 1;\r\n    \r\n    private final BitHelper bitHelper = new BitHelper();\r\n\r\n    @Rule\r\n    public TemporaryFolder tempFolder = new TemporaryFolder();\r\n\r\n    @Before\r\n    public void init() throws IOException {\r\n        createTemporaryAddressesFile();\r\n    }\r\n\r\n    public void fillAddressesFiles(File file) throws IOException {\r\n        FileUtils.writeStringToFile(file, testAddresses.getAsBase58Strings(), StandardCharsets.UTF_8.name());\r\n    }\r\n\r\n    public void createTemporaryAddressesFile() throws IOException {\r\n        File tempAddressesFile = tempFolder.newFile(ADDRESSES_CSV);\r\n        fillAddressesFiles(tempAddressesFile);\r\n    }\r\n\r\n    @Test\r\n    @OpenCLTest\r\n    public void joclTest() {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n\r\n        /**\r\n         * The source code of the OpenCL program to execute\r\n         */\r\n        String programSource\r\n                = \"__kernel void \"\r\n                + \"sampleKernel(__global const float *a,\"\r\n                + \"             __global const float *b,\"\r\n                + \"             __global float *c)\"\r\n                + \"{\"\r\n                + \"    int gid = get_global_id(0);\"\r\n                + \"    c[gid] = a[gid] * b[gid];\"\r\n                + \"}\";\r\n\r\n        // Create input- and output data \r\n        int n = 10;\r\n        float[] srcArrayA = new float[n];\r\n        float[] srcArrayB = new float[n];\r\n        float[] dstArray = new float[n];\r\n        for (int i = 0; i < n; i++) {\r\n            srcArrayA[i] = i;\r\n            srcArrayB[i] = i;\r\n        }\r\n        Pointer srcA = Pointer.to(srcArrayA);\r\n        Pointer srcB = Pointer.to(srcArrayB);\r\n        Pointer dst = Pointer.to(dstArray);\r\n\r\n        // The platform, device type and device number\r\n        // that will be used\r\n        final int platformIndex = 0;\r\n        final long deviceType = CL_DEVICE_TYPE_ALL;\r\n        final int deviceIndex = 0;\r\n\r\n        // Enable exceptions and subsequently omit error checks in this sample\r\n        CL.setExceptionsEnabled(true);\r\n\r\n        // Obtain the number of platforms\r\n        int[] numPlatformsArray = new int[1];\r\n        clGetPlatformIDs(0, null, numPlatformsArray);\r\n        int numPlatforms = numPlatformsArray[0];\r\n\r\n        // Obtain a platform ID\r\n        cl_platform_id[] platforms = new cl_platform_id[numPlatforms];\r\n        clGetPlatformIDs(platforms.length, platforms, null);\r\n        cl_platform_id platform = platforms[platformIndex];\r\n\r\n        // Initialize the context properties\r\n        cl_context_properties contextProperties = new cl_context_properties();\r\n        contextProperties.addProperty(CL_CONTEXT_PLATFORM, platform);\r\n\r\n        // Obtain the number of devices for the platform\r\n        int[] numDevicesArray = new int[1];\r\n        clGetDeviceIDs(platform, deviceType, 0, null, numDevicesArray);\r\n        int numDevices = numDevicesArray[0];\r\n\r\n        // Obtain a device ID \r\n        cl_device_id[] devices = new cl_device_id[numDevices];\r\n        clGetDeviceIDs(platform, deviceType, numDevices, devices, null);\r\n        cl_device_id device = devices[deviceIndex];\r\n\r\n        // Create a context for the selected device\r\n        cl_context context = clCreateContext(\r\n                contextProperties, 1, new cl_device_id[]{device},\r\n                null, null, null);\r\n\r\n        // Create a command-queue for the selected device\r\n        cl_queue_properties properties = new cl_queue_properties();\r\n        cl_command_queue commandQueue = clCreateCommandQueueWithProperties(\r\n                context, device, properties, null);\r\n\r\n        // Allocate the memory objects for the input- and output data\r\n        cl_mem srcMemA = clCreateBuffer(context,\r\n                CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,\r\n                (long)Sizeof.cl_float * n, srcA, null);\r\n        cl_mem srcMemB = clCreateBuffer(context,\r\n                CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,\r\n                (long)Sizeof.cl_float * n, srcB, null);\r\n        cl_mem dstMem = clCreateBuffer(context,\r\n                CL_MEM_READ_WRITE,\r\n                (long)Sizeof.cl_float * n, null, null);\r\n\r\n        // Create the program from the source code\r\n        cl_program program = clCreateProgramWithSource(context,\r\n                1, new String[]{programSource}, null, null);\r\n\r\n        // Build the program\r\n        clBuildProgram(program, 0, null, null, null, null);\r\n\r\n        // Create the kernel\r\n        cl_kernel kernel = clCreateKernel(program, \"sampleKernel\", null);\r\n\r\n        // Set the arguments for the kernel\r\n        int a = 0;\r\n        clSetKernelArg(kernel, a++, Sizeof.cl_mem, Pointer.to(srcMemA));\r\n        clSetKernelArg(kernel, a++, Sizeof.cl_mem, Pointer.to(srcMemB));\r\n        clSetKernelArg(kernel, a++, Sizeof.cl_mem, Pointer.to(dstMem));\r\n\r\n        // Set the work-item dimensions\r\n        long[] global_work_size = new long[]{n};\r\n\r\n        // Execute the kernel\r\n        clEnqueueNDRangeKernel(commandQueue, kernel, 1, null,\r\n                global_work_size, null, 0, null, null);\r\n\r\n        // Read the output data\r\n        long cb = (long) n * Sizeof.cl_float;\r\n        clEnqueueReadBuffer(commandQueue, dstMem, CL_TRUE, 0,\r\n                cb, dst, 0, null, null);\r\n\r\n        // Release kernel, program, and memory objects\r\n        clReleaseMemObject(srcMemA);\r\n        clReleaseMemObject(srcMemB);\r\n        clReleaseMemObject(dstMem);\r\n        clReleaseKernel(kernel);\r\n        clReleaseProgram(program);\r\n        clReleaseCommandQueue(commandQueue);\r\n        clReleaseContext(context);\r\n\r\n        // Verify the result\r\n        boolean passed = true;\r\n        final float epsilon = 1e-7f;\r\n        for (int i = 0; i < n; i++) {\r\n            float x = dstArray[i];\r\n            float y = srcArrayA[i] * srcArrayB[i];\r\n            boolean epsilonEqual = Math.abs(x - y) <= epsilon * Math.abs(x);\r\n            if (!epsilonEqual) {\r\n                passed = false;\r\n                break;\r\n            }\r\n        }\r\n\r\n        assertThat(passed, is(equalTo(Boolean.TRUE)));\r\n    }\r\n\r\n    \r\n    public static int BN_NBITS = 256;\r\n    public static int BN_WSHIFT = 5;\r\n    public static int BN_WBITS = (1 << BN_WSHIFT);\r\n    public static int BN_NWORDS = ((BN_NBITS/8) / 4); // 4 == sizeof(bn_word)\r\n\r\n    public static int ACCESS_BUNDLE = 1024;\r\n    public static int ACCESS_STRIDE = (ACCESS_BUNDLE/BN_NWORDS);\r\n    \r\n    @Test\r\n    @Ignore\r\n    public void reverseEngineering_startPoints() {\r\n        int GLOBAL_SIZE = 1024;\r\n        for (int j = 0; j < 1024; j++) {\r\n            for (int k = 0; k < 64; k++) {\r\n                        int i, cell, start;\r\n                        System.out.println(\"========================================\");\r\n                        /* Load the row increment point */\r\n                        i = 2 * j;\r\n                        System.out.println(\"i: \" + i);\r\n\r\n                        cell = i;\r\n                        System.out.println(\"cell: \" + cell);\r\n                        start = ((((2 * cell) / ACCESS_STRIDE) * ACCESS_BUNDLE) +\r\n                                 (cell % (ACCESS_STRIDE/2)));\r\n                        System.out.println(\"start: \" + start);\r\n\r\n                        int row_in_access_1 = start + (i*ACCESS_STRIDE);\r\n                        System.out.println(\"row_in_access_1: \" + row_in_access_1);\r\n\r\n                        start += (ACCESS_STRIDE/2);\r\n                        System.out.println(\"start: \" + start);\r\n\r\n                        int row_in_access_2 = start + (i*ACCESS_STRIDE);\r\n                        System.out.println(\"row_in_access_2: \" + row_in_access_2);\r\n\r\n                        cell += (k * GLOBAL_SIZE);\r\n                        System.out.println(\"cell: \" + cell);\r\n                        start = (((cell / ACCESS_STRIDE) * ACCESS_BUNDLE) +\r\n                                 (cell % ACCESS_STRIDE));\r\n                        System.out.println(\"start: \" + start);\r\n                        System.out.println(\"========================================\");\r\n            }\r\n        }\r\n    }\r\n\r\n    @Test\r\n    @Ignore\r\n    public void calcAddrsFixZeroCl_loadWithoutErrors() throws IOException {\r\n        // ATTENTION: BLDEBUG\r\n        \r\n        \r\n        \r\n        int CELLS = 64;\r\n        int ROW_SIZE = 2; // x1, y1\r\n        int COL_SIZE = 2; // rx, ry\r\n        \r\n        \r\n        String calcAddrsFixZeroClFileName = \"calc_addrs.cl\";\r\n        URL url = Resources.getResource(calcAddrsFixZeroClFileName);\r\n        String calcAddrsFixZeroCl = Resources.toString(url, StandardCharsets.UTF_8);\r\n\r\n        \r\n        // Create input- and output data\r\n        // out:\r\n        int[] src_points_out = new int[ACCESS_BUNDLE];\r\n        int[] src_z_heap = new int[ACCESS_BUNDLE];\r\n        // in:\r\n        int[] src_row_in = new int[ACCESS_BUNDLE * ACCESS_STRIDE * ROW_SIZE];\r\n        int[] src_col_in = new int[ACCESS_BUNDLE * COL_SIZE];\r\n\r\n        Pointer pointsOut = Pointer.to(src_points_out);\r\n        Pointer zHeap = Pointer.to(src_z_heap);\r\n        Pointer rowIn = Pointer.to(src_row_in);\r\n        Pointer colIn = Pointer.to(src_col_in);\r\n        \r\n        // The platform, device type and device number\r\n        // that will be used\r\n        final int platformIndex = 0;\r\n        final long deviceType = CL_DEVICE_TYPE_ALL;\r\n        final int deviceIndex = 0;\r\n\r\n        // Enable exceptions and subsequently omit error checks in this sample\r\n        CL.setExceptionsEnabled(true);\r\n\r\n        // Obtain the number of platforms\r\n        int[] numPlatformsArray = new int[1];\r\n        clGetPlatformIDs(0, null, numPlatformsArray);\r\n        int numPlatforms = numPlatformsArray[0];\r\n\r\n        // Obtain a platform ID\r\n        cl_platform_id[] platforms = new cl_platform_id[numPlatforms];\r\n        clGetPlatformIDs(platforms.length, platforms, null);\r\n        cl_platform_id platform = platforms[platformIndex];\r\n\r\n        // Initialize the context properties\r\n        cl_context_properties contextProperties = new cl_context_properties();\r\n        contextProperties.addProperty(CL_CONTEXT_PLATFORM, platform);\r\n\r\n        // Obtain the number of devices for the platform\r\n        int[] numDevicesArray = new int[1];\r\n        clGetDeviceIDs(platform, deviceType, 0, null, numDevicesArray);\r\n        int numDevices = numDevicesArray[0];\r\n\r\n        // Obtain a device ID \r\n        cl_device_id[] devices = new cl_device_id[numDevices];\r\n        clGetDeviceIDs(platform, deviceType, numDevices, devices, null);\r\n        cl_device_id device = devices[deviceIndex];\r\n\r\n        // Create a context for the selected device\r\n        cl_context context = clCreateContext(\r\n                contextProperties, 1, new cl_device_id[]{device},\r\n                null, null, null);\r\n\r\n        // Create a command-queue for the selected device\r\n        cl_queue_properties properties = new cl_queue_properties();\r\n        cl_command_queue commandQueue = clCreateCommandQueueWithProperties(\r\n                context, device, properties, null);\r\n\r\n        // Allocate the memory objects for the input- and output data\r\n        cl_mem pointsOutMem = clCreateBuffer(context,\r\n                CL_MEM_READ_WRITE,\r\n                (long)Sizeof.cl_int * src_points_out.length,\r\n                pointsOut, null);\r\n        cl_mem zHeapMem = clCreateBuffer(context,\r\n                CL_MEM_READ_WRITE,\r\n                (long)Sizeof.cl_int * src_z_heap.length,\r\n                zHeap, null);\r\n        cl_mem rowInMem = clCreateBuffer(context,\r\n                CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,\r\n                (long)Sizeof.cl_int * src_row_in.length,\r\n                null, null);\r\n        cl_mem colInMem = clCreateBuffer(context,\r\n                CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,\r\n                (long)Sizeof.cl_int * src_col_in.length,\r\n                null, null);\r\n        \r\n        // Create the program from the source code\r\n        cl_program program = clCreateProgramWithSource(context,\r\n                1, new String[]{calcAddrsFixZeroCl}, null, null);\r\n\r\n        // Build the program\r\n        clBuildProgram(program, 0, null, null, null, null);\r\n\r\n        // Create the kernel\r\n        cl_kernel kernel_ec_add_grid = clCreateKernel(program, \"ec_add_grid\", null);\r\n        cl_kernel kernel_heap_invert = clCreateKernel(program, \"heap_invert\", null);\r\n        cl_kernel kernel_hash_ec_point_get = clCreateKernel(program, \"hash_ec_point_get\", null);\r\n\r\n        // Set the arguments for the kernel\r\n        int a = 0;\r\n        clSetKernelArg(kernel_ec_add_grid, a++, Sizeof.cl_mem, Pointer.to(pointsOutMem));\r\n        clSetKernelArg(kernel_ec_add_grid, a++, Sizeof.cl_mem, Pointer.to(zHeapMem));\r\n        clSetKernelArg(kernel_ec_add_grid, a++, Sizeof.cl_mem, Pointer.to(rowInMem));\r\n        clSetKernelArg(kernel_ec_add_grid, a++, Sizeof.cl_mem, Pointer.to(colInMem));\r\n\r\n        \r\n        \r\n        // Set the work-item dimensions\r\n        long[] global_work_size = new long[]{ACCESS_BUNDLE, };\r\n\r\n        // Execute the kernel\r\n        clEnqueueNDRangeKernel(commandQueue, kernel_ec_add_grid, 1, null,\r\n                global_work_size, null, 0, null, null);\r\n    }\r\n\r\n    @Test\r\n    @OpenCLTest\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX, location = CommonDataProvider.class)\r\n    public void createKeys_bitsLowerThan25_use32BitNevertheless(int bitSize) throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n\r\n        KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n\r\n        // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n        CProducerOpenCL producerOpenCL = new CProducerOpenCL();\r\n        producerOpenCL.batchSizeInBits = bitSize;\r\n        try (OpenCLContext openCLContext = new OpenCLContext(producerOpenCL, bitHelper)) {\r\n        openCLContext.init();\r\n            Random sr = new Random(1337);\r\n            BigInteger secret = keyUtility.createSecret(bitSize, sr);\r\n            BigInteger secretBase = keyUtility.killBits(secret, bitHelper.getKillBits(producerOpenCL.batchSizeInBits));\r\n\r\n            openCLContext.createKeys(secretBase);\r\n        }\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void createKeys_bitsLowerThanGridSize_useMoreNevertheless() throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n        \r\n        // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n        CProducerOpenCL producerOpenCL = new CProducerOpenCL();\r\n        producerOpenCL.batchSizeInBits = BITS_FOR_BATCH;\r\n        producerOpenCL.loopCount = LOOP_COUNT;\r\n        try (OpenCLContext openCLContext = new OpenCLContext(producerOpenCL, bitHelper)) {\r\n        openCLContext.init();\r\n            Random sr = new Random(1337);\r\n            BigInteger secret = keyUtility.createSecret(BITS_FOR_BATCH-1, sr);\r\n            BigInteger secretBase = keyUtility.killBits(secret, bitHelper.getKillBits(producerOpenCL.batchSizeInBits));\r\n\r\n            openCLContext.createKeys(secretBase);\r\n       }\r\n    }\r\n    \r\n    /**\r\n    * Verifies that at least one test input triggers BigInteger encoding with a leading zero byte (sign bit = 1).\r\n    * This is a prerequisite for testing OpenCL buffer serialization of such keys.\r\n    */\r\n    @Test\r\n    public void dataProvider_largePrivateKeys_containsAtLeastOneEncodingWithLeadingZeroByte() {\r\n        List<Integer> lengths = Arrays.stream(CommonDataProvider.largePrivateKeys())\r\n            .map(data -> ((BigInteger) data[0]).toByteArray().length)\r\n            .collect(Collectors.toList());\r\n\r\n        assertThat(\r\n            \"Expected at least one BigInteger with 33-byte encoding (sign-preserving leading zero)\",\r\n            lengths,\r\n            hasItem(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES + 1)\r\n        );\r\n    }\r\n    \r\n    /**\r\n    * Verifies that all test inputs in largePrivate32ByteKeys() produce a 33-byte encoding\r\n    * due to the high bit being set (i.e., sign-preserving leading zero is required).\r\n    */\r\n   @Test\r\n   public void dataProvider_largePrivateKeys_allHaveLeadingZeroEncoding() {\r\n       List<Integer> lengths = Arrays.stream(CommonDataProvider.privateKeys32ByteRequiringStrip())\r\n           .map(data -> ((BigInteger) data[0]).toByteArray().length)\r\n           .collect(Collectors.toList());\r\n\r\n       assertThat(\r\n           \"Expected all BigIntegers to be encoded with 33 bytes (sign bit set → leading zero required)\",\r\n           lengths,\r\n           everyItem(is(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES + 1))\r\n       );\r\n   }\r\n   \r\n    @OpenCLTest\r\n    @Test(expected = PrivateKeyTooLargeException.class)\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_PRIVATE_KEYS_TOO_LARGE_WITH_CHUNK_SIZE, location = CommonDataProvider.class)\r\n    public void setSrcPrivateKeyChunk_privateKeyTooLarge_throwsException(BigInteger privateKey, int chunkSize) throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        \r\n        CProducerOpenCL producerOpenCL = new CProducerOpenCL();\r\n        producerOpenCL.batchSizeInBits = chunkSize;\r\n        try (OpenCLContext openCLContext = new OpenCLContext(producerOpenCL, bitHelper)) {\r\n            openCLContext.init();\r\n            OpenClTask openClTask = Objects.requireNonNull(openCLContext.getOpenClTask());\r\n\r\n            // Force a key that exceeds the limit\r\n            openClTask.setSrcPrivateKeyChunk(privateKey);\r\n       }\r\n    }\r\n\r\n    @Test\r\n    @OpenCLTest\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_PRIVATE_KEYS_32_BYTE_REQUIRING_STRIP, location = CommonDataProvider.class)\r\n    public void setSrcPrivateKeyChunk_handlesLeadingZero_correctlySerializesTo32Bytes(BigInteger privateKey) throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n\r\n        CProducerOpenCL producerOpenCL = new CProducerOpenCL();\r\n        producerOpenCL.batchSizeInBits = BITS_FOR_BATCH;\r\n        producerOpenCL.loopCount = LOOP_COUNT;\r\n        try (OpenCLContext openCLContext = new OpenCLContext(producerOpenCL, bitHelper)) {\r\n            openCLContext.init();\r\n            byte[] encoded = privateKey.toByteArray();\r\n            assertThat(\"Encoded must hold exactly 33 bytes\", encoded.length, is(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES + 1));\r\n            byte[] expectedStripped = Arrays.copyOfRange(encoded, 1, encoded.length);\r\n            assertThat(\"ExpectedStripped must hold exactly 32 bytes\", expectedStripped.length, is(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES));\r\n\r\n            // Perform the actual OpenCL buffer population\r\n            OpenClTask openClTask = Objects.requireNonNull(openCLContext.getOpenClTask());\r\n            openClTask.setSrcPrivateKeyChunk(privateKey);\r\n\r\n            ByteBuffer buffer = openClTask.getPrivateKeySourceArgument().getByteBuffer();\r\n            assertThat(\"Buffer must hold exactly 32 bytes\", buffer.capacity(), is(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES));\r\n\r\n            byte[] openClEndianBytes = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\r\n            buffer.rewind();\r\n            buffer.get(openClEndianBytes);\r\n\r\n            // Reconstruct BigInteger from OpenCL buffer for validation\r\n            byte[] bigEndianBytes = openClEndianBytes.clone();\r\n\r\n            // OpenCL provides the bytes in device-specific endianness (could be little-endian or big-endian).\r\n            // BigInteger(byte[]) always expects a Big-Endian (MSB-first) format.\r\n            // Therefore, we convert the device-endian buffer to Big-Endian before creating the BigInteger.\r\n            EndiannessConverter endiannessConverter = new EndiannessConverter(ByteOrder.LITTLE_ENDIAN, ByteOrder.BIG_ENDIAN, byteBufferUtility);\r\n            endiannessConverter.convertEndian(bigEndianBytes);\r\n\r\n            BigInteger result = new BigInteger(1, bigEndianBytes);\r\n\r\n            // Validate that the OpenCL buffer correctly represents the original private key\r\n            assertThat(\"bigEndianBytes content must match stripped BigInteger encoding\", bigEndianBytes, is(equalTo(expectedStripped)));\r\n            assertThat(\"Reconstructed BigInteger must match original private key\", result, is(equalTo(privateKey)));\r\n\r\n       }\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_LARGE_PRIVATE_KEYS, location = CommonDataProvider.class)\r\n    public void createKeys_fromLargePrivateKey_generatesValidPublicKeys(BigInteger privateKey) throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        \r\n        KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n        \r\n        CProducerOpenCL producerOpenCL = new CProducerOpenCL();\r\n        producerOpenCL.batchSizeInBits = BITS_FOR_BATCH;\r\n        producerOpenCL.loopCount = LOOP_COUNT;\r\n        try (OpenCLContext openCLContext = new OpenCLContext(producerOpenCL, bitHelper)) {\r\n            openCLContext.init();\r\n            // Perform the actual OpenCL buffer population\r\n            OpenClTask openClTask = Objects.requireNonNull(openCLContext.getOpenClTask());\r\n\r\n            openClTask.setSrcPrivateKeyChunk(privateKey);\r\n\r\n            BigInteger secretBase = keyUtility.killBits(privateKey, bitHelper.getKillBits(producerOpenCL.batchSizeInBits));\r\n\r\n            OpenCLGridResult createKeys = openCLContext.createKeys(secretBase);\r\n            PublicKeyBytes[] publicKeys = createKeys.getPublicKeyBytes();\r\n\r\n            final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n            byteBufferUtility.freeByteBuffer(createKeys.getResult());\r\n\r\n            final boolean souts = false;\r\n            assertPublicKeyBytesCalculatedCorrect(publicKeys, secretBase, souts, keyUtility);\r\n       }\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void createKeys_fromRandomPrivateKey_correctlyHashesAndVerifiesResults() throws IOException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        \r\n        KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\r\n        \r\n        // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n        CProducerOpenCL producerOpenCL = new CProducerOpenCL();\r\n        producerOpenCL.batchSizeInBits = BITS_FOR_BATCH;\r\n        producerOpenCL.loopCount = LOOP_COUNT;\r\n        try (OpenCLContext openCLContext = new OpenCLContext(producerOpenCL, bitHelper)) {\r\n            openCLContext.init();\r\n            Random random = new Random(1337);\r\n            BigInteger secretKeyBase = keyUtility.createSecret(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS, random);\r\n\r\n            BigInteger secretBase = keyUtility.killBits(secretKeyBase, bitHelper.getKillBits(producerOpenCL.batchSizeInBits));\r\n\r\n            OpenCLGridResult createKeys = openCLContext.createKeys(secretBase);\r\n            PublicKeyBytes[] publicKeys = createKeys.getPublicKeyBytes();\r\n\r\n            final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n            byteBufferUtility.freeByteBuffer(createKeys.getResult());\r\n\r\n            final boolean souts = false;\r\n            hashPublicKeys(publicKeys, souts); // just for performance tests\r\n            hashPublicKeysFast(publicKeys, souts); // just for performance tests\r\n\r\n            assertPublicKeyBytesCalculatedCorrect(publicKeys, secretBase, souts, keyUtility);\r\n       }\r\n    }\r\n\r\n    private static void assertAllRuntimePublicKeyCalculationsValid(PublicKeyBytes[] publicKeys, Logger logger) {\r\n        for (int i = 0; i < publicKeys.length; i++) {\r\n            assertRuntimePublicKeyCalculationValid(publicKeys[i], logger);\r\n        }\r\n    }\r\n\r\n    private static void assertRuntimePublicKeyCalculationValid(PublicKeyBytes publicKeyBytes, Logger logger) {\r\n        boolean valid = publicKeyBytes.runtimePublicKeyCalculationCheck(logger);\r\n        assertThat(\"runtimePublicKeyCalculationCheck failed for secretKey: \" + publicKeyBytes.getSecretKey(), valid, is(true));\r\n    }\r\n\r\n    private static void assertPublicKeyBytesCalculatedCorrect(PublicKeyBytes[] publicKeys, BigInteger secretBase, final boolean souts, KeyUtility keyUtility) {\r\n        Logger logger = mock(Logger.class);\r\n        assertAllRuntimePublicKeyCalculationsValid(publicKeys, logger);\r\n        \r\n        for (int i = 0; i < publicKeys.length; i++) {\r\n            if (i%10_000 == 0) {\r\n                if(souts) System.out.println(\"progress: \" + i);\r\n            }\r\n            BigInteger privateKey = AbstractProducer.calculateSecretKey(secretBase, i);\r\n            byte[] privateKeyAsByteArray = privateKey.toByteArray();\r\n            \r\n            if(souts) System.out.println(\"privateKey: \" + Arrays.toString(privateKeyAsByteArray));\r\n            \r\n            PublicKeyBytes publicKeyBytes = publicKeys[i];\r\n            \r\n            ECKey resultOpenCLKeyCompressed = ECKey.fromPrivateAndPrecalculatedPublic(privateKeyAsByteArray, publicKeyBytes.getCompressed());\r\n            ECKey resultOpenCLKeyUncompressed = ECKey.fromPrivateAndPrecalculatedPublic(privateKeyAsByteArray, publicKeyBytes.getUncompressed());\r\n            byte[] resultOpenCLKeyCompressedPubKey = resultOpenCLKeyCompressed.getPubKey();\r\n            byte[] resultOpenCLKeyCompressedPubKeyHash = resultOpenCLKeyCompressed.getPubKeyHash();\r\n            byte[] resultOpenCLKeyUncompressedPubKey = resultOpenCLKeyUncompressed.getPubKey();\r\n            byte[] resultOpenCLKeyUncompressedPubKeyHash = resultOpenCLKeyUncompressed.getPubKeyHash();\r\n            \r\n            if (souts) {\r\n                System.out.println(\"publicKeyBytes.compressed: \" + Arrays.toString(publicKeyBytes.getCompressed()));\r\n                System.out.println(\"publicKeyBytes.uncompressed: \" + Arrays.toString(publicKeyBytes.getUncompressed()));\r\n                System.out.println(\"resultOpenCLKeyCompressedPubKey: \" + Arrays.toString(resultOpenCLKeyCompressedPubKey));\r\n                System.out.println(\"resultOpenCLKeyCompressedPubKeyHash: \" + Arrays.toString(resultOpenCLKeyCompressedPubKeyHash));\r\n                System.out.println(\"resultOpenCLKeyUncompressedPubKey: \" + Arrays.toString(resultOpenCLKeyUncompressedPubKey));\r\n                System.out.println(\"resultOpenCLKeyUncompressedPubKeyHash: \" + Arrays.toString(resultOpenCLKeyUncompressedPubKeyHash));\r\n            }\r\n            \r\n            String resultOpenCLKeyCompressedPubKeyHashBase58 = keyUtility.toBase58(resultOpenCLKeyCompressed.getPubKeyHash());\r\n            String resultOpenCLKeyUncompressedPubKeyHashBase58 = keyUtility.toBase58(resultOpenCLKeyUncompressed.getPubKeyHash());\r\n            \r\n            if (souts) {\r\n                System.out.println(\"resultOpenCLKeyCompressedPubKeyHashBase58: \" + resultOpenCLKeyCompressedPubKeyHashBase58);\r\n                System.out.println(\"resultOpenCLKeyUncompressedPubKeyHashBase58: \" + resultOpenCLKeyUncompressedPubKeyHashBase58);\r\n                \r\n                System.out.println(\"publicKeyBytes.getCompressedKeyHash(): \" + Arrays.toString(publicKeyBytes.getCompressedKeyHash()));\r\n                System.out.println(\"publicKeyBytes.getUncompressedKeyHash(): \" + Arrays.toString(publicKeyBytes.getUncompressedKeyHash()));\r\n                \r\n                System.out.println(\"publicKeyBytes.getCompressedKeyHashAsBase58(keyUtility): \" + publicKeyBytes.getCompressedKeyHashAsBase58(keyUtility));\r\n                System.out.println(\"publicKeyBytes.getUncompressedKeyHashAsBase58(keyUtility): \" + publicKeyBytes.getUncompressedKeyHashAsBase58(keyUtility));\r\n            }\r\n            ECKey expectedUncompressedKey = ECKey.fromPrivate(privateKey, false);\r\n            BigInteger expectedPrivateKeyBigInteger = expectedUncompressedKey.getPrivKey();\r\n            ECKey expectedCompressedKey = ECKey.fromPrivate(privateKey, true);\r\n            \r\n            byte[] expectedCompressedPublicKeyBytes = expectedCompressedKey.getPubKey();\r\n            byte[] expectedUncompressedPublicKeyBytes = expectedUncompressedKey.getPubKey();\r\n\r\n            if (souts) {\r\n                System.out.println(\"expectedPrivateKeyBigInteger: \" + expectedPrivateKeyBigInteger);\r\n                System.out.println(\"expectedCompressedPublicKeyBytes: \" + Arrays.toString(expectedCompressedPublicKeyBytes));\r\n                System.out.println(\"expectedUncompressedPublicKeyBytes: \" + Arrays.toString(expectedUncompressedPublicKeyBytes));\r\n            }\r\n            \r\n            String expectedCompressedPublicKeyHashBase58 = keyUtility.toBase58(expectedCompressedKey.getPubKeyHash());\r\n            String expectedUncompressedPublicKeyHashBase58 = keyUtility.toBase58(expectedUncompressedKey.getPubKeyHash());\r\n            \r\n            assertThat(resultOpenCLKeyCompressedPubKey, is(equalTo(expectedCompressedPublicKeyBytes)));\r\n            assertThat(resultOpenCLKeyUncompressedPubKey, is(equalTo(expectedUncompressedPublicKeyBytes)));\r\n\r\n            assertThat(publicKeyBytes.getCompressedKeyHashAsBase58(keyUtility), is(equalTo(expectedCompressedPublicKeyHashBase58)));\r\n            assertThat(publicKeyBytes.getUncompressedKeyHashAsBase58(keyUtility), is(equalTo(expectedUncompressedPublicKeyHashBase58)));\r\n            \r\n        }\r\n    }\r\n\r\n    private static void hashPublicKeysFast(PublicKeyBytes[] publicKeys, final boolean souts) {\r\n        if (souts) System.out.println(\"execute hash fast ...\");\r\n        long beforeHash = System.currentTimeMillis();\r\n        for (int i = 0; i < publicKeys.length; i++) {\r\n            byte[] compressedKeyHashFast = publicKeys[i].getCompressedKeyHash();\r\n            byte[] uncompressedKeyHashFast = publicKeys[i].getUncompressedKeyHash();\r\n            \r\n            //assertThat(compressedKeyHash, is(equalTo(compressedKeyHashFast)));\r\n            //assertThat(uncompressedKeyHash, is(equalTo(uncompressedKeyHashFast)));\r\n            \r\n            if (souts) System.out.println(\"publicKeys[\"+i+\"].compressedKeyHashFast: \" + Arrays.toString(compressedKeyHashFast));\r\n            if (souts) System.out.println(\"publicKeys[\"+i+\"].uncompressedKeyHashFast: \" + Arrays.toString(uncompressedKeyHashFast));\r\n        }\r\n        long afterHash = System.currentTimeMillis();\r\n        if (souts) System.out.println(\"... hashed fast in: \" + (afterHash - beforeHash) + \"ms\");\r\n    }\r\n\r\n    private static void hashPublicKeys(PublicKeyBytes[] publicKeys, final boolean souts) {\r\n        if (souts) System.out.println(\"execute hash ...\");\r\n        long beforeHash = System.currentTimeMillis();\r\n        for (int i = 0; i < publicKeys.length; i++) {\r\n            byte[] compressedKeyHash = publicKeys[i].getCompressedKeyHash();\r\n            byte[] uncompressedKeyHash = publicKeys[i].getUncompressedKeyHash();\r\n            \r\n            //assertThat(compressedKeyHash, is(equalTo(compressedKeyHashFast)));\r\n            //assertThat(uncompressedKeyHash, is(equalTo(uncompressedKeyHashFast)));\r\n            \r\n            if (souts) System.out.println(\"publicKeys[\"+i+\"].compressedKeyHash: \" + Arrays.toString(compressedKeyHash));\r\n            if (souts) System.out.println(\"publicKeys[\"+i+\"].uncompressedKeyHash: \" + Arrays.toString(uncompressedKeyHash));\r\n        }\r\n        long afterHash = System.currentTimeMillis();\r\n        if (souts) System.out.println(\"... hashed in: \" + (afterHash - beforeHash) + \"ms\");\r\n    }\r\n    \r\n    /**\r\n     * Read the inner bytes in reverse order. Remove padding bytes to return a clean byte array. Only for x with padding\r\n     */\r\n    @Deprecated\r\n    private static final byte[] getPublicKeyFromByteBuffer(ByteBuffer b, int keyOffset) {\r\n        int paddingBytes = 3;\r\n        int publicKeyByteLength = PublicKeyBytes.SEC_PUBLIC_KEY_COMPRESSED_WORDS * PublicKeyBytes.U32_NUM_BYTES;\r\n        byte[] publicKey = new byte[publicKeyByteLength - paddingBytes];\r\n        // its not inverted because the memory was written in OpenCL\r\n        int offset = publicKeyByteLength * keyOffset;\r\n        outer:\r\n        for (int i=0; i<PublicKeyBytes.SEC_PUBLIC_KEY_COMPRESSED_WORDS; i++) {\r\n            int x = i*PublicKeyBytes.U32_NUM_BYTES;\r\n            for (int j = 0; j < PublicKeyBytes.U32_NUM_BYTES; j++) {\r\n                int publicKeyOffset = x+j;\r\n                if (publicKeyOffset == publicKey.length) {\r\n                    // return the public key, read of all bytes finish\r\n                    break outer;\r\n                }\r\n                int y = PublicKeyBytes.U32_NUM_BYTES-j-1;\r\n                int byteBufferOffset = offset+x+y;\r\n                publicKey[publicKeyOffset] = b.get(byteBufferOffset);\r\n            }\r\n        }\r\n        return publicKey;\r\n    }\r\n    \r\n    @Deprecated\r\n    private static void dumpIntArray(String name, int[] intArray) {\r\n        for (int i = 0; i < intArray.length; i++) {\r\n            System.out.println(name + \"[\"+i+\"]: \" + Integer.toHexString(intArray[i]));\r\n        }\r\n    }\r\n    \r\n    /**\r\n     * from https://java-browser.yawk.at/org.bouncycastle/bcprov-jdk15/1.46/org/bouncycastle/math/ec/WNafMultiplier.java\r\n     */\r\n    @Deprecated\r\n    private static byte[] windowNaf(byte width, BigInteger k)\r\n    {\r\n        // The window NAF is at most 1 element longer than the binary\r\n        // representation of the integer k. byte can be used instead of short or\r\n        // int unless the window width is larger than 8. For larger width use\r\n        // short or int. However, a width of more than 8 is not efficient for\r\n        // m = log2(q) smaller than 2305 Bits. Note: Values for m larger than\r\n        // 1000 Bits are currently not used in practice.\r\n        byte[] wnaf = new byte[k.bitLength() + 1];\r\n\r\n        // 2^width as short and BigInteger\r\n        short pow2wB = (short)(1 << width);\r\n        BigInteger pow2wBI = BigInteger.valueOf(pow2wB);\r\n\r\n        int i = 0;\r\n\r\n        // The actual length of the WNAF\r\n        int length = 0;\r\n\r\n        // while k >= 1\r\n        while (k.signum() > 0)\r\n        {\r\n            // if k is odd\r\n            if (k.testBit(0))\r\n            {\r\n                // k mod 2^width\r\n                BigInteger remainder = k.mod(pow2wBI);\r\n\r\n                // if remainder > 2^(width - 1) - 1\r\n                if (remainder.testBit(width - 1))\r\n                {\r\n                    wnaf[i] = (byte)(remainder.intValue() - pow2wB);\r\n                }\r\n                else\r\n                {\r\n                    wnaf[i] = (byte)remainder.intValue();\r\n                }\r\n                // wnaf[i] is now in [-2^(width-1), 2^(width-1)-1]\r\n\r\n                k = k.subtract(BigInteger.valueOf(wnaf[i]));\r\n                length = i;\r\n            }\r\n            else\r\n            {\r\n                wnaf[i] = 0;\r\n            }\r\n\r\n            // k = k/2\r\n            k = k.shiftRight(1);\r\n            i++;\r\n        }\r\n\r\n        length++;\r\n\r\n        // Reduce the WNAF array to its actual length\r\n        byte[] wnafShort = new byte[length];\r\n        System.arraycopy(wnaf, 0, wnafShort, 0, length);\r\n        return wnafShort;\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ProducerJavaSecretsFilesTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.google.common.hash.Hashing;\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.ArrayList;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Random;\r\nimport java.util.stream.Collectors;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJavaSecretsFiles;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat;\r\nimport static net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat.BIG_INTEGER;\r\nimport static net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat.STRING_DO_SHA256;\r\nimport static net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat.SHA256;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.UnknownSecretFormatException;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.apache.commons.io.FileUtils;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class ProducerJavaSecretsFilesTest {\r\n    \r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n    \r\n    private static final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final BitHelper bitHelper = new BitHelper();\r\n    \r\n    enum PrivateKey {\r\n        TEST(\"test\"),\r\n        TEST_WITH_SPACE(\"test with space\"),\r\n        NUMBER_1337(\"1337\"),\r\n        NUMBER_73(\"73\"),\r\n        WITH_COMMENT(\"#WithComment\"),\r\n        WITH_SPECIAL_CHARACTER(\"schön, für schälen $%&?`´\");\r\n\r\n        private final String string;\r\n\r\n        PrivateKey(String string) {\r\n            this.string = string;\r\n        }\r\n\r\n        public String getSHA256() {\r\n            byte[] sha256 = Hashing.sha256().hashString(string, StandardCharsets.UTF_8).asBytes();\r\n            return Hex.encodeHexString( sha256 );\r\n        }\r\n\r\n        public BigInteger getBigInteger() {\r\n            return new BigInteger(getSHA256(), 16);\r\n        }\r\n\r\n        public PublicKeyBytes getPublicKeyBytes() {\r\n            return PublicKeyBytes.fromPrivate(getBigInteger());\r\n        }\r\n        \r\n        public String getWiF() {\r\n            return ECKey.fromPrivate(getBigInteger(), false).getPrivateKeyAsWiF(network);\r\n        }\r\n\r\n        public String getHex() {\r\n            return ECKey.fromPrivate(getBigInteger(), false).getPrivateKeyAsHex();\r\n        }\r\n    }\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"initProducer\">\r\n    @Test\r\n    public void initProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        CProducerJavaSecretsFiles cProducerJavaSecretsFiles = new CProducerJavaSecretsFiles();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJava producerJava = new ProducerJavaSecretsFiles(cProducerJavaSecretsFiles, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        AbstractProducerTest.verifyInitProducer(producerJava);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"releaseProducer\">\r\n    @Test\r\n    public void releaseProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        CProducerJavaSecretsFiles cProducerJavaSecretsFiles = new CProducerJavaSecretsFiles();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJava producerJava = new ProducerJavaSecretsFiles(cProducerJavaSecretsFiles, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        AbstractProducerTest.verifyReleaseProducer(producerJava);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"produceKeys\">\r\n    @Test\r\n    public void produceKeys_noFileConfigured_noKeysCreated() throws IOException, InterruptedException {\r\n        CProducerJavaSecretsFiles cProducerJavaSecretsFiles = new CProducerJavaSecretsFiles();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJavaSecretsFiles producerJavaSecretsFiles = new ProducerJavaSecretsFiles(cProducerJavaSecretsFiles, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJavaSecretsFiles.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(0)));\r\n    }\r\n    \r\n    @Test\r\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_CSECRET_FORMAT, location = CommonDataProvider.class)\r\n    public void produceKeys_filesConfigured_keysCreated(CSecretFormat cSecretFormat) throws IOException, InterruptedException {\r\n        CProducerJavaSecretsFiles cProducerJavaSecretsFiles = new CProducerJavaSecretsFiles();\r\n        List<File> secretsFiles = createSecretsFiles(cSecretFormat);\r\n        List<String> secretsFilesAsStringList = secretsFiles.stream().map(file -> file.getAbsolutePath()).collect(Collectors.toList());\r\n        cProducerJavaSecretsFiles.files = secretsFilesAsStringList;\r\n        cProducerJavaSecretsFiles.secretFormat = cSecretFormat;\r\n        cProducerJavaSecretsFiles.batchSizeInBits = 0;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJavaSecretsFiles producerJavaSecretsFiles = new ProducerJavaSecretsFiles(cProducerJavaSecretsFiles, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJavaSecretsFiles.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(6)));\r\n        \r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0).length, is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(1).length, is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(2).length, is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(3).length, is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(4).length, is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(5).length, is(equalTo(1)));\r\n        \r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[0], is(equalTo(PrivateKey.TEST.getPublicKeyBytes())));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(1)[0], is(equalTo(PrivateKey.TEST_WITH_SPACE.getPublicKeyBytes())));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(2)[0], is(equalTo(PrivateKey.NUMBER_1337.getPublicKeyBytes())));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(3)[0], is(equalTo(PrivateKey.NUMBER_73.getPublicKeyBytes())));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(4)[0], is(equalTo(PrivateKey.WITH_COMMENT.getPublicKeyBytes())));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(5)[0], is(equalTo(PrivateKey.WITH_SPECIAL_CHARACTER.getPublicKeyBytes())));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    private List<File> createSecretsFiles(CSecretFormat secretFormat) throws IOException {\r\n        List<File> fileList = new ArrayList<>();\r\n        {\r\n            File secretsFile = folder.newFile(\"secretsFile0.txt\");\r\n            fileList.add(secretsFile);\r\n            PrivateKey[] secretsAsArray = new PrivateKey[] {\r\n                PrivateKey.TEST,\r\n                PrivateKey.TEST_WITH_SPACE,\r\n                PrivateKey.NUMBER_1337\r\n            };\r\n            List<PrivateKey> secretsAsList = Arrays.asList(secretsAsArray);\r\n            fillSecretsFile(secretsFile, secretsAsList, secretFormat);\r\n        }\r\n        {\r\n            File secretsFile = folder.newFile(\"secretsFile1.txt\");\r\n            fileList.add(secretsFile);\r\n            PrivateKey[] secretsAsArray = new PrivateKey[] {\r\n                PrivateKey.NUMBER_73,\r\n                PrivateKey.WITH_COMMENT,\r\n                PrivateKey.WITH_SPECIAL_CHARACTER\r\n            };\r\n            List<PrivateKey> secretsAsList = Arrays.asList(secretsAsArray);\r\n            fillSecretsFile(secretsFile, secretsAsList, secretFormat);\r\n        }\r\n        return fileList;\r\n    }\r\n\r\n    private void fillSecretsFile(File file, Iterable<PrivateKey> secrets, CSecretFormat secretFormat) throws IOException {\r\n        StringBuilder sb = new StringBuilder();\r\n        for (PrivateKey secret : secrets) {\r\n            switch(secretFormat) {\r\n            case STRING_DO_SHA256:\r\n                sb.append(secret.string);\r\n                break;\r\n            case BIG_INTEGER:\r\n                sb.append(secret.getBigInteger());\r\n                break;\r\n            case SHA256:\r\n                sb.append(secret.getSHA256());\r\n                break;\r\n            case DUMPED_RIVATE_KEY:\r\n                sb.append(secret.getWiF());\r\n                break;\r\n            default:\r\n                throw new UnknownSecretFormatException(secretFormat);\r\n            }\r\n            sb.append(\"\\n\");\r\n        }\r\n        String content = sb.toString();\r\n        FileUtils.writeStringToFile(file, content, StandardCharsets.UTF_8.name());\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ProducerJavaTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.util.Random;\r\nimport static net.ladenthin.bitcoinaddressfinder.PublicKeyBytes.INVALID_PRIVATE_KEY_REPLACEMENT;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerJava;\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.CoreMatchers.not;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.*;\r\nimport static org.hamcrest.text.MatchesPattern.matchesPattern;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\nimport org.junit.runner.RunWith;\r\n\r\n@RunWith(DataProviderRunner.class)\r\npublic class ProducerJavaTest {\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final BitHelper bitHelper = new BitHelper();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"initProducer\">\r\n    @Test\r\n    public void initProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        AbstractProducerTest.verifyInitProducer(producerJava);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toString\">\r\n    @ToStringTest\r\n    @Test\r\n    public void toString_whenCalled_containsClassNameAndIdentityHash() {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        String toStringOutput = producerJava.toString();\r\n\r\n        assertThat(toStringOutput, not(emptyOrNullString()));\r\n        assertThat(toStringOutput, matchesPattern(\"ProducerJava@\\\\p{XDigit}+\"));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"releaseProducer\">\r\n    @Test\r\n    public void releaseProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        AbstractProducerTest.verifyReleaseProducer(producerJava);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"produceKeys\">\r\n    @Test\r\n    public void produceKeys_BatchSizeInBitsEqualsKeyMaxNumBits_noExceptionThrown() throws Exception {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        cProducerJava.batchUsePrivateKeyIncrement = true;\r\n        cProducerJava.batchSizeInBits = 2;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        int maximumBitLength = 2;\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJava.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0).length, is(equalTo(bitHelper.convertBitsToSize(cProducerJava.batchSizeInBits))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[0], is(equalTo(PublicKeyBytes.INVALID_KEY_ONE)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[1], is(equalTo(PublicKeyBytes.INVALID_KEY_ONE)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[2], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(2)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[3], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n    }\r\n\r\n    @Test\r\n    public void produceKeys_KeyMaxNumBitsLowerThanBatchSizeInBits_produceBatchSizeInBitsNevertheless() throws Exception {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        cProducerJava.batchUsePrivateKeyIncrement = true;\r\n        cProducerJava.batchSizeInBits = 4;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        int maximumBitLength = 3;\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJava.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0).length, is(equalTo(bitHelper.convertBitsToSize(cProducerJava.batchSizeInBits))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[0], is(equalTo(PublicKeyBytes.INVALID_KEY_ONE)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[1], is(equalTo(PublicKeyBytes.INVALID_KEY_ONE)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[2], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(2)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[3], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[4], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(4)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[5], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(5)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[6], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(6)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[7], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(7)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[8], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(8)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[9], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(9)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[10], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(10)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[11], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(11)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[12], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(12)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[13], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(13)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[14], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(14)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[15], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(15)))));\r\n    }\r\n\r\n    @Test\r\n    public void produceKeys_privateKeyMaxNumBitsIsVeryLowAndProduceReplacedKeys_keysEqualsReplacement() throws Exception {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        cProducerJava.batchUsePrivateKeyIncrement = true;\r\n        cProducerJava.batchSizeInBits = 1;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        int maximumBitLength = 2;\r\n        Random random = new Random(0);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJava.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0).length, is(equalTo(bitHelper.convertBitsToSize(cProducerJava.batchSizeInBits))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[0], is(equalTo(PublicKeyBytes.fromPrivate(INVALID_PRIVATE_KEY_REPLACEMENT))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[1], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n    }\r\n    \r\n    @Test\r\n    public void produceKeys_privateKeyMaxNumBitsIsLowAndProduceReplacedKeys_keysEqualsReplacement() throws Exception {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        cProducerJava.batchUsePrivateKeyIncrement = false;\r\n        cProducerJava.batchSizeInBits = 4;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        int maximumBitLength = 3;\r\n        Random random = new Random(0);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJava.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0).length, is(equalTo(bitHelper.convertBitsToSize(cProducerJava.batchSizeInBits))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[0], is(equalTo(PublicKeyBytes.fromPrivate(INVALID_PRIVATE_KEY_REPLACEMENT))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[1], is(equalTo(PublicKeyBytes.fromPrivate(INVALID_PRIVATE_KEY_REPLACEMENT))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[2], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(2)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[3], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(6)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[4], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(6)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[5], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(2)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[6], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(7)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[7], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[8], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(6)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[9], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(5)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[10], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[11], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[12], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(3)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[13], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(5)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[14], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(7)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[15], is(equalTo(PublicKeyBytes.fromPrivate(INVALID_PRIVATE_KEY_REPLACEMENT))));\r\n    }\r\n\r\n    @Test\r\n    public void produceKeys_SomeBitRanges_consumerContainsData() throws Exception {\r\n        CProducerJava cProducerJava = new CProducerJava();\r\n        cProducerJava.batchUsePrivateKeyIncrement = true;\r\n        cProducerJava.batchSizeInBits = 3;\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        int maximumBitLength = 6;\r\n        Random random = new Random(2);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random, maximumBitLength);\r\n        ProducerJava producerJava = new ProducerJava(cProducerJava, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // act\r\n        producerJava.produceKeys();\r\n\r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(equalTo(1)));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0).length, is(equalTo(bitHelper.convertBitsToSize(cProducerJava.batchSizeInBits))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[0], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(56)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[1], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(57)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[2], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(58)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[3], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(59)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[4], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(60)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[5], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(61)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[6], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(62)))));\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.get(0)[7], is(equalTo(PublicKeyBytes.fromPrivate(BigInteger.valueOf(63)))));\r\n    }\r\n    // </editor-fold>\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ProducerOpenCLTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\nimport java.io.IOException;\r\nimport java.time.Duration;\r\nimport java.util.Random;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CProducerOpenCL;\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.CoreMatchers.notNullValue;\r\nimport static org.hamcrest.CoreMatchers.nullValue;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.greaterThan;\r\nimport static org.hamcrest.Matchers.is;\r\n\r\npublic class ProducerOpenCLTest {\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\r\n    private final BitHelper bitHelper = new BitHelper();\r\n    \r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"initProducer\">\r\n    @OpenCLTest\r\n    @Test\r\n    public void initProducer_configurationGiven_stateInitializedAndLogged() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        AbstractProducerTest.verifyInitProducer(producerOpenCL);\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"releaseProducer\">\r\n    @OpenCLTest\r\n    @Test\r\n    public void releaseProducer_configurationGiven_stateInitializedAndLoggedAndExecuterServiceShutdown() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        AbstractProducerTest.verifyReleaseProducer(producerOpenCL);\r\n        assertThat(producerOpenCL.resultReaderThreadPoolExecutor.isShutdown(), is(equalTo(Boolean.TRUE)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"initProducer\">\r\n    @OpenCLTest\r\n    @Test\r\n    public void initProducer_configurationGiven_stateInitializedAndOpenCLContextSet() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n\r\n        // pre-assert\r\n        assertThat(producerOpenCL.openCLContext, nullValue());\r\n        assertThat(producerOpenCL.state, is(equalTo(ProducerState.UNINITIALIZED)));\r\n        \r\n        // act\r\n        producerOpenCL.initProducer();\r\n\r\n        // assert\r\n        assertThat(producerOpenCL.openCLContext, notNullValue());\r\n        assertThat(producerOpenCL.state, is(equalTo(ProducerState.INITIALIZED)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"releaseProducers\">\r\n    @Test\r\n    public void releaseProducers_notInitialized_noExceptionThrown() throws IOException, InterruptedException {\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        // act\r\n        producerOpenCL.releaseProducer();\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void releaseProducers_initialized_noExceptionThrownAndOpenCLContextFreed() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        producerOpenCL.initProducer();\r\n        \r\n        // pre-assert\r\n        assertThat(producerOpenCL.openCLContext, notNullValue());\r\n        \r\n        // act\r\n        producerOpenCL.releaseProducer();\r\n        \r\n        // assert\r\n        assertThat(producerOpenCL.openCLContext, nullValue());\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getFreeThreads\">\r\n    @Test\r\n    public void getFreeThreads_notInitialized_numberOfFreeThreadsReturned() throws IOException, InterruptedException {\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        // act\r\n        int freeThreads = producerOpenCL.getFreeThreads();\r\n        \r\n        // assert\r\n        assertThat(freeThreads, is(equalTo(Integer.valueOf(cProducerOpenCL.maxResultReaderThreads))));\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void getFreeThreads_initialized_numberOfFreeThreadsReturned() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        producerOpenCL.initProducer();\r\n        \r\n        // act\r\n        int freeThreads = producerOpenCL.getFreeThreads();\r\n        \r\n        // assert\r\n        assertThat(freeThreads, is(equalTo(Integer.valueOf(cProducerOpenCL.maxResultReaderThreads))));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"waitTillFreeThreadsInPool\">\r\n    @Test\r\n    public void waitTillFreeThreadsInPool_notInitialized_returnImmediately() throws IOException, InterruptedException {\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        // act\r\n        producerOpenCL.waitTillFreeThreadsInPool();\r\n        \r\n        // assert\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void waitTillFreeThreadsInPool_initialized_returnImmediately() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        producerOpenCL.initProducer();\r\n        \r\n        // act\r\n        producerOpenCL.waitTillFreeThreadsInPool();\r\n        \r\n        // assert\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void waitTillFreeThreadsInPool_initializedAndThreadPoolFull_doNotReturn() throws IOException, InterruptedException {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        producerOpenCL.initProducer();\r\n        \r\n        Duration sleepDuration = Duration.ofSeconds(5L);\r\n        \r\n        for (int i = 0; i < cProducerOpenCL.maxResultReaderThreads; i++) {\r\n            producerOpenCL.resultReaderThreadPoolExecutor.submit(() -> {\r\n                try {\r\n                    Thread.sleep(sleepDuration);\r\n                } catch (InterruptedException ex) {\r\n                    throw new RuntimeException(ex);\r\n                }\r\n            });\r\n        }\r\n        // act\r\n        final long before = System.currentTimeMillis();\r\n        producerOpenCL.waitTillFreeThreadsInPool();\r\n        final long after = System.currentTimeMillis();\r\n        \r\n        Duration durationOfWait = Duration.ofMillis(after-before);\r\n        // assert\r\n        // expect at least the half of the sleep duration\r\n        assertThat(durationOfWait, is(greaterThan(sleepDuration.dividedBy(2))));\r\n    }\r\n    // </editor-fold>\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"produceKeys\">\r\n    @Test(expected = IllegalStateException.class)\r\n    public void produceKeys_notInitialized_illegalStateExceptionThrown() throws Exception {\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        // act\r\n        producerOpenCL.produceKeys();\r\n        \r\n        // assert\r\n    }\r\n    \r\n    @Test\r\n    @OpenCLTest\r\n    public void produceKeys_initialized_keysInConsumer() throws Exception {\r\n        new OpenCLPlatformAssume().assumeOpenCLLibraryLoadableAndOneOpenCL2_0OrGreaterDeviceAvailable();\r\n        CProducerOpenCL cProducerOpenCL = new CProducerOpenCL();\r\n\r\n        MockConsumer mockConsumer = new MockConsumer();\r\n        Random random = new Random(1);\r\n        MockKeyProducer mockKeyProducer = new MockKeyProducer(keyUtility, random);\r\n        ProducerOpenCL producerOpenCL = new ProducerOpenCL(cProducerOpenCL, mockConsumer, keyUtility, mockKeyProducer, bitHelper);\r\n        \r\n        producerOpenCL.initProducer();\r\n        \r\n        // act\r\n        producerOpenCL.produceKeys();\r\n        \r\n        // it takes some time to consume keys\r\n        Thread.sleep(Duration.ofSeconds(10L));\r\n        \r\n        // assert\r\n        assertThat(mockConsumer.publicKeyBytesArrayList.size(), is(greaterThan(0)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ProducerStateTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Test;\r\n\r\npublic class ProducerStateTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"values\">\r\n    @Test\r\n    public void values_allStatesPresent_countIsFour() {\r\n        // arrange, act\r\n        ProducerState[] states = ProducerState.values();\r\n\r\n        // assert\r\n        assertThat(states.length, is(equalTo(4)));\r\n    }\r\n\r\n    @Test\r\n    public void values_ordinalOfUninitialized_isZero() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.UNINITIALIZED.ordinal(), is(equalTo(0)));\r\n    }\r\n\r\n    @Test\r\n    public void values_ordinalOfInitialized_isOne() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.INITIALIZED.ordinal(), is(equalTo(1)));\r\n    }\r\n\r\n    @Test\r\n    public void values_ordinalOfRunning_isTwo() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.RUNNING.ordinal(), is(equalTo(2)));\r\n    }\r\n\r\n    @Test\r\n    public void values_ordinalOfNotRunning_isThree() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.NOT_RUNNING.ordinal(), is(equalTo(3)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"name\">\r\n    @Test\r\n    public void name_uninitialized_returnsExpectedString() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.UNINITIALIZED.name(), is(equalTo(\"UNINITIALIZED\")));\r\n    }\r\n\r\n    @Test\r\n    public void name_initialized_returnsExpectedString() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.INITIALIZED.name(), is(equalTo(\"INITIALIZED\")));\r\n    }\r\n\r\n    @Test\r\n    public void name_running_returnsExpectedString() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.RUNNING.name(), is(equalTo(\"RUNNING\")));\r\n    }\r\n\r\n    @Test\r\n    public void name_notRunning_returnsExpectedString() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.NOT_RUNNING.name(), is(equalTo(\"NOT_RUNNING\")));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"valueOf\">\r\n    @Test\r\n    public void valueOf_uninitializedString_returnsUninitializedState() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.valueOf(\"UNINITIALIZED\"), is(equalTo(ProducerState.UNINITIALIZED)));\r\n    }\r\n\r\n    @Test\r\n    public void valueOf_initializedString_returnsInitializedState() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.valueOf(\"INITIALIZED\"), is(equalTo(ProducerState.INITIALIZED)));\r\n    }\r\n\r\n    @Test\r\n    public void valueOf_runningString_returnsRunningState() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.valueOf(\"RUNNING\"), is(equalTo(ProducerState.RUNNING)));\r\n    }\r\n\r\n    @Test\r\n    public void valueOf_notRunningString_returnsNotRunningState() {\r\n        // arrange, act, assert\r\n        assertThat(ProducerState.valueOf(\"NOT_RUNNING\"), is(equalTo(ProducerState.NOT_RUNNING)));\r\n    }\r\n\r\n    @Test(expected = IllegalArgumentException.class)\r\n    public void valueOf_unknownString_throwsIllegalArgumentException() {\r\n        // arrange, act, assert\r\n        ProducerState.valueOf(\"UNKNOWN_STATE\");\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/PublicKeyBytesTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport org.junit.Test;\n\nimport java.io.IOException;\nimport java.math.BigInteger;\nimport java.util.Arrays;\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.TestAddresses42;\nimport org.apache.commons.codec.binary.Hex;\nimport org.bitcoinj.base.LegacyAddress;\nimport org.bitcoinj.base.Network;\nimport org.bitcoinj.crypto.ECKey;\nimport org.bitcoinj.crypto.internal.CryptoUtils;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.emptyOrNullString;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\nimport static org.hamcrest.Matchers.matchesPattern;\nimport static org.hamcrest.Matchers.not;\nimport static org.mockito.ArgumentMatchers.anyString;\nimport static org.mockito.ArgumentMatchers.contains;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.never;\nimport static org.mockito.Mockito.verify;\nimport org.slf4j.Logger;\n\npublic class PublicKeyBytesTest {\n\n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\n    protected final KeyUtility keyUtility = new KeyUtility(network, byteBufferUtility);\n    \n    @Test\n    public void publicKeyBytes_fromPublicKey_matchesExpectedHashes() {\n        // arrange\n        ECKey keyUncompressed = new TestAddresses42(1, false).getECKeys().get(0);\n        ECKey keyCompressed = new TestAddresses42(1, true).getECKeys().get(0);\n        \n        // act\n        PublicKeyBytes publicKeyBytesUncompressed = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey());\n        PublicKeyBytes publicKeyBytesCompressed = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey(), keyCompressed.getPubKey());\n        \n        // assert\n        assertThat(publicKeyBytesUncompressed.getUncompressed(), is(equalTo(keyUncompressed.getPubKey())));\n        assertThat(publicKeyBytesUncompressed.getUncompressedKeyHash(), is(equalTo(keyUncompressed.getPubKeyHash())));\n        assertThat(CryptoUtils.sha256hash160(publicKeyBytesCompressed.getUncompressed()), is(equalTo(keyUncompressed.getPubKeyHash())));\n        assertThat(publicKeyBytesCompressed.getUncompressedKeyHash(), is(equalTo(keyUncompressed.getPubKeyHash())));\n        assertThat(publicKeyBytesUncompressed.getUncompressedKeyHashAsBase58(keyUtility), is(equalTo(LegacyAddress.fromPubKeyHash(network, keyUncompressed.getPubKeyHash()).toBase58())));\n        assertThat(publicKeyBytesCompressed.getUncompressedKeyHashAsBase58(keyUtility), is(equalTo(LegacyAddress.fromPubKeyHash(network, keyUncompressed.getPubKeyHash()).toBase58())));\n        \n        assertThat(publicKeyBytesUncompressed.getCompressed(), is(equalTo(keyCompressed.getPubKey())));\n        assertThat(publicKeyBytesUncompressed.getCompressedKeyHash(), is(equalTo(keyCompressed.getPubKeyHash())));\n        assertThat(CryptoUtils.sha256hash160(publicKeyBytesCompressed.getCompressed()), is(equalTo(keyCompressed.getPubKeyHash())));\n        assertThat(publicKeyBytesCompressed.getCompressedKeyHash(), is(equalTo(keyCompressed.getPubKeyHash())));\n        assertThat(publicKeyBytesUncompressed.getCompressedKeyHashAsBase58(keyUtility), is(equalTo(LegacyAddress.fromPubKeyHash(network, keyCompressed.getPubKeyHash()).toBase58())));\n        assertThat(publicKeyBytesCompressed.getCompressedKeyHashAsBase58(keyUtility), is(equalTo(LegacyAddress.fromPubKeyHash(network, keyCompressed.getPubKeyHash()).toBase58())));\n    }\n    \n    @Test\n    public void publicKeyBytes_toStringEqualsAndHashCode_consistent() {\n        // arrange\n        ECKey keyUncompressed = new TestAddresses42(1, false).getECKeys().get(0);\n        ECKey keyCompressed = new TestAddresses42(1, true).getECKeys().get(0);\n        \n        // act\n        PublicKeyBytes publicKeyBytesUncompressed = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey());\n        PublicKeyBytes publicKeyBytesUncompressed2 = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey());\n        PublicKeyBytes publicKeyBytesCompressed = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey(), keyCompressed.getPubKey());\n        PublicKeyBytes publicKeyBytesCompressed2 = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey(), keyCompressed.getPubKey());\n        \n        // assert\n        EqualHashCodeToStringTestHelper equalHashCodeToStringTestHelper = new EqualHashCodeToStringTestHelper(publicKeyBytesUncompressed, publicKeyBytesUncompressed2, publicKeyBytesCompressed, publicKeyBytesCompressed2);\n        equalHashCodeToStringTestHelper.assertEqualsHashCodeToStringAIsEqualToB();\n\n        // toString\n        assertThat(publicKeyBytesUncompressed.toString(), is(equalTo(publicKeyBytesCompressed.toString())));\n        assertThat(publicKeyBytesUncompressed.toString(), is(equalTo(\"PublicKeyBytes{secretKey=24250429618215260598957696001935175135959229619080974590971174872813112994997}\")));\n    }\n    \n    @Test\n    public void maxPrivateKeyAsHexString_isEqualToConstant() {\n        // arrange\n        String maxPrivateKeyAsHexString = Hex.encodeHexString(ByteBufferUtility.bigIntegerToBytes(PublicKeyBytes.MAX_PRIVATE_KEY));\n        // act\n        \n        // assert\n        assertThat(maxPrivateKeyAsHexString.toLowerCase(), is(equalTo(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\".toLowerCase())));\n    }\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"Tests for runtimePublicKeyCalculationCheck\">\n    @Test\n    public void runtimePublicKeyCalculationCheck_validKey_returnsTrue() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] uncompressed = ecKey.getPubKey();\n        PublicKeyBytes publicKeyBytes = new PublicKeyBytes(secretKey, uncompressed); // compressed is derived\n\n        Logger logger = mock(Logger.class);\n\n        // act\n        boolean result = publicKeyBytes.runtimePublicKeyCalculationCheck(logger);\n\n        // assert\n        assertThat(result, is(true));\n        verify(logger, never()).error(anyString());\n    }\n\n    @Test\n    public void runtimePublicKeyCalculationCheck_invalidCompressedHash_returnsFalse() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] uncompressed = ecKey.getPubKey();\n        byte[] compressed = ECKey.fromPrivate(secretKey, true).getPubKey();\n        byte[] wrongCompressedHash = new byte[PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES]; // all-zero hash (invalid)\n\n        PublicKeyBytes publicKeyBytes = new PublicKeyBytes(secretKey, uncompressed, wrongCompressedHash);\n\n        Logger logger = mock(Logger.class);\n\n        // act\n        boolean result = publicKeyBytes.runtimePublicKeyCalculationCheck(logger);\n\n        // assert\n        assertThat(result, is(false));\n        verify(logger).error(contains(\"fromPrivateCompressed.getPubKeyHash()\"));\n    }\n\n    @Test\n    public void runtimePublicKeyCalculationCheck_invalidUncompressedHash_returnsFalse() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] uncompressed = ecKey.getPubKey();\n        byte[] compressed = ECKey.fromPrivate(secretKey, true).getPubKey();\n        byte[] wrongUncompressedHash = new byte[PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES]; // all-zero hash (invalid)\n\n        PublicKeyBytes publicKeyBytes = new PublicKeyBytes(secretKey, wrongUncompressedHash, compressed);\n\n        Logger logger = mock(Logger.class);\n\n        // act\n        boolean result = publicKeyBytes.runtimePublicKeyCalculationCheck(logger);\n\n        // assert\n        assertThat(result, is(false));\n        verify(logger).error(contains(\"fromPrivateUncompressed.getPubKeyHash()\"));\n    }\n    \n    @Test\n    public void runtimePublicKeyCalculationCheck_invalidCompressedAndUncompressed_returnsFalse() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        byte[] uncompressedWrong = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES]; // all-zero hash (invalid)\n        byte[] compressedWrong = new byte[PublicKeyBytes.PUBLIC_KEY_COMPRESSED_BYTES]; // all-zero hash (invalid)\n\n        PublicKeyBytes publicKeyBytes = new PublicKeyBytes(secretKey, uncompressedWrong, compressedWrong);\n\n        Logger logger = mock(Logger.class);\n\n        // act\n        boolean result = publicKeyBytes.runtimePublicKeyCalculationCheck(logger);\n\n        // assert\n        assertThat(result, is(false));\n        verify(logger).error(contains(\"fromPrivateUncompressed.getPubKeyHash()\"));\n        verify(logger).error(contains(\"fromPrivateCompressed.getPubKeyHash()\"));\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"Tests for assembleUncompressedPublicKey\">\n    @Test\n    public void assembleUncompressedPublicKey_validXY_correctlyAssembles() {\n        // arrange\n        byte[] x = new byte[PublicKeyBytes.ONE_COORDINATE_NUM_BYTES];\n        byte[] y = new byte[PublicKeyBytes.ONE_COORDINATE_NUM_BYTES];\n        for (int i = 0; i < PublicKeyBytes.ONE_COORDINATE_NUM_BYTES; i++) {\n            x[i] = (byte) i;\n            y[i] = (byte) (i + PublicKeyBytes.ONE_COORDINATE_NUM_BYTES);\n        }\n\n        // act\n        byte[] result = PublicKeyBytes.assembleUncompressedPublicKey(x, y);\n\n        // assert\n        assertThat(result[0], is((byte) PublicKeyBytes.SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT));\n        for (int i = 0; i < PublicKeyBytes.ONE_COORDINATE_NUM_BYTES; i++) {\n            assertThat(\"X coordinate mismatch at index \" + i, result[i + PublicKeyBytes.SEC_PREFIX_NUM_BYTES], is(x[i]));\n            assertThat(\"Y coordinate mismatch at index \" + i, result[i + PublicKeyBytes.SEC_PREFIX_NUM_BYTES + PublicKeyBytes.ONE_COORDINATE_NUM_BYTES], is(y[i]));\n        }\n    }\n\n    @Test\n    public void assembleUncompressedPublicKey_allZeros_createsValidKey() {\n        // arrange\n        byte[] x = new byte[PublicKeyBytes.ONE_COORDINATE_NUM_BYTES];\n        byte[] y = new byte[PublicKeyBytes.ONE_COORDINATE_NUM_BYTES];\n\n        // act\n        byte[] result = PublicKeyBytes.assembleUncompressedPublicKey(x, y);\n\n        // assert\n        assertThat(result[0], is((byte) PublicKeyBytes.SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT));\n        for (int i = PublicKeyBytes.SEC_PREFIX_NUM_BYTES; i < result.length; i++) {\n            assertThat(\"Expected zero at index \" + i, result[i], is((byte) 0x00));\n        }\n    }\n    \n    @Test\n    public void assembleUncompressedPublicKey_validXAndY_assemblesCorrectly() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] pubKey = ecKey.getPubKey(); // full uncompressed pubkey (parity + X + Y)\n\n        // extract X and Y from real ECKey\n        byte[] x = Arrays.copyOfRange(pubKey, PublicKeyBytes.SEC_PREFIX_NUM_BYTES, PublicKeyBytes.SEC_PREFIX_NUM_BYTES + PublicKeyBytes.ONE_COORDINATE_NUM_BYTES);\n        byte[] y = Arrays.copyOfRange(pubKey, PublicKeyBytes.SEC_PREFIX_NUM_BYTES + PublicKeyBytes.ONE_COORDINATE_NUM_BYTES, PublicKeyBytes.SEC_PREFIX_NUM_BYTES + PublicKeyBytes.TWO_COORDINATES_NUM_BYTES);\n\n        // act\n        byte[] assembledUncompressed = PublicKeyBytes.assembleUncompressedPublicKey(x, y);\n\n        // assert\n        assertThat(assembledUncompressed, is(equalTo(pubKey)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toString\">\n    @ToStringTest\n    @Test\n    public void toString_whenCalled_containsClassNameAndPrivateKey() throws IOException {\n        // arrange\n        ECKey keyUncompressed = new TestAddresses42(1, false).getECKeys().get(0);\n        \n        // act\n        PublicKeyBytes publicKeyBytesUncompressed = new PublicKeyBytes(keyUncompressed.getPrivKey(), keyUncompressed.getPubKey());\n        String toStringOutput = publicKeyBytesUncompressed.toString();\n\n        assertThat(toStringOutput, not(emptyOrNullString()));\n        assertThat(toStringOutput, matchesPattern(\"PublicKeyBytes\\\\{secretKey=\\\\d+}\"));\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"fromPrivate\">\n    @Test\n    public void fromPrivate_validSecretKey_returnsPublicKeyBytesWithCorrectKey() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n\n        // act\n        PublicKeyBytes result = PublicKeyBytes.fromPrivate(secretKey);\n\n        // assert\n        assertThat(result.getSecretKey(), is(equalTo(secretKey)));\n    }\n\n    @Test\n    public void fromPrivate_validSecretKey_returnsMatchingUncompressedPubKey() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n\n        // act\n        PublicKeyBytes result = PublicKeyBytes.fromPrivate(secretKey);\n\n        // assert\n        assertThat(result.getUncompressed(), is(equalTo(ecKey.getPubKey())));\n    }\n\n    @Test\n    public void fromPrivate_validSecretKey_returnsMatchingCompressedPubKey() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKeyCompressed = ECKey.fromPrivate(secretKey, true);\n\n        // act\n        PublicKeyBytes result = PublicKeyBytes.fromPrivate(secretKey);\n\n        // assert\n        assertThat(result.getCompressed(), is(equalTo(ecKeyCompressed.getPubKey())));\n    }\n\n    @Test\n    public void fromPrivate_minValidPrivateKey_noExceptionThrown() {\n        // arrange\n        BigInteger secretKey = PublicKeyBytes.MIN_VALID_PRIVATE_KEY;\n\n        // act\n        PublicKeyBytes result = PublicKeyBytes.fromPrivate(secretKey);\n\n        // assert\n        assertThat(result.getSecretKey(), is(equalTo(secretKey)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getSecretKey\">\n    @Test\n    public void getSecretKey_constructedWithKnownKey_returnsCorrectKey() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"42\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, ecKey.getPubKey());\n\n        // act\n        BigInteger result = sut.getSecretKey();\n\n        // assert\n        assertThat(result, is(equalTo(secretKey)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getCompressed\">\n    @Test\n    public void getCompressed_constructedFromUncompressed_returnsValidCompressedKey() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKeyUncompressed = ECKey.fromPrivate(secretKey, false);\n        ECKey ecKeyCompressed = ECKey.fromPrivate(secretKey, true);\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, ecKeyUncompressed.getPubKey());\n\n        // act\n        byte[] result = sut.getCompressed();\n\n        // assert\n        assertThat(result, is(equalTo(ecKeyCompressed.getPubKey())));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getUncompressed\">\n    @Test\n    public void getUncompressed_constructedWithUncompressed_returnsSameArray() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] uncompressed = ecKey.getPubKey();\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, uncompressed);\n\n        // act\n        byte[] result = sut.getUncompressed();\n\n        // assert\n        assertThat(result, is(equalTo(uncompressed)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"isOutsidePrivateKeyRange\">\n    @Test\n    public void isOutsidePrivateKeyRange_validKey_returnsFalse() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, ecKey.getPubKey());\n\n        // act\n        boolean result = sut.isOutsidePrivateKeyRange();\n\n        // assert\n        assertThat(result, is(false));\n    }\n\n    @Test\n    public void isOutsidePrivateKeyRange_keyAboveMax_returnsTrue() {\n        // arrange\n        BigInteger secretKey = PublicKeyBytes.MAX_PRIVATE_KEY.add(BigInteger.ONE);\n        byte[] dummyUncompressed = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES];\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, dummyUncompressed);\n\n        // act\n        boolean result = sut.isOutsidePrivateKeyRange();\n\n        // assert\n        assertThat(result, is(true));\n    }\n\n    @Test\n    public void isOutsidePrivateKeyRange_keyBelowMin_returnsTrue() {\n        // arrange\n        BigInteger secretKey = BigInteger.ZERO;\n        byte[] dummyUncompressed = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES];\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, dummyUncompressed);\n\n        // act\n        boolean result = sut.isOutsidePrivateKeyRange();\n\n        // assert\n        assertThat(result, is(true));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"sha256hash160Fast\">\n    @Test\n    public void sha256hash160Fast_knownInput_matchesCryptoUtilsResult() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] pubKey = ecKey.getPubKey();\n\n        // act\n        byte[] fastResult = PublicKeyBytes.sha256hash160Fast(pubKey);\n\n        // assert\n        byte[] expected = CryptoUtils.sha256hash160(pubKey);\n        assertThat(fastResult, is(equalTo(expected)));\n    }\n\n    @Test\n    public void sha256hash160Fast_compressedKey_matchesCryptoUtilsResult() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, true);\n        byte[] pubKey = ecKey.getPubKey();\n\n        // act\n        byte[] fastResult = PublicKeyBytes.sha256hash160Fast(pubKey);\n\n        // assert\n        byte[] expected = CryptoUtils.sha256hash160(pubKey);\n        assertThat(fastResult, is(equalTo(expected)));\n    }\n\n    @Test\n    public void sha256hash160Fast_resultLength_isRipemd160HashLength() {\n        // arrange\n        byte[] input = new byte[] {0x01, 0x02, 0x03};\n\n        // act\n        byte[] result = PublicKeyBytes.sha256hash160Fast(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createCompressedBytes\">\n    @Test\n    public void createCompressedBytes_evenYCoordinate_prefixIs02() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] uncompressed = ecKey.getPubKey();\n\n        // pre-assert\n        boolean lastByteIsEven = uncompressed[PublicKeyBytes.LAST_Y_COORDINATE_BYTE_INDEX] % 2 == 0;\n\n        // act\n        byte[] compressed = PublicKeyBytes.createCompressedBytes(uncompressed);\n\n        // assert\n        if (lastByteIsEven) {\n            assertThat(compressed[0], is((byte) PublicKeyBytes.SEC_PREFIX_COMPRESSED_ECDSA_POINT_EVEN_Y));\n        } else {\n            assertThat(compressed[0], is((byte) PublicKeyBytes.SEC_PREFIX_COMPRESSED_ECDSA_POINT_ODD_Y));\n        }\n    }\n\n    @Test\n    public void createCompressedBytes_knownKey_matchesECKeyCompressed() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKeyUncompressed = ECKey.fromPrivate(secretKey, false);\n        ECKey ecKeyCompressed = ECKey.fromPrivate(secretKey, true);\n\n        // act\n        byte[] compressed = PublicKeyBytes.createCompressedBytes(ecKeyUncompressed.getPubKey());\n\n        // assert\n        assertThat(compressed, is(equalTo(ecKeyCompressed.getPubKey())));\n    }\n\n    @Test\n    public void createCompressedBytes_resultLength_isCompressedKeyLength() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"42\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n\n        // act\n        byte[] compressed = PublicKeyBytes.createCompressedBytes(ecKey.getPubKey());\n\n        // assert\n        assertThat(compressed.length, is(equalTo(PublicKeyBytes.PUBLIC_KEY_COMPRESSED_BYTES)));\n    }\n\n    @Test\n    public void createCompressedBytes_xCoordinate_matchesUncompressedXCoordinate() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKey = ECKey.fromPrivate(secretKey, false);\n        byte[] uncompressed = ecKey.getPubKey();\n\n        // act\n        byte[] compressed = PublicKeyBytes.createCompressedBytes(uncompressed);\n\n        // assert\n        byte[] xFromUncompressed = Arrays.copyOfRange(uncompressed, PublicKeyBytes.SEC_PREFIX_NUM_BYTES, PublicKeyBytes.SEC_PREFIX_NUM_BYTES + PublicKeyBytes.ONE_COORDINATE_NUM_BYTES);\n        byte[] xFromCompressed = Arrays.copyOfRange(compressed, PublicKeyBytes.SEC_PREFIX_NUM_BYTES, PublicKeyBytes.SEC_PREFIX_NUM_BYTES + PublicKeyBytes.ONE_COORDINATE_NUM_BYTES);\n        assertThat(xFromCompressed, is(equalTo(xFromUncompressed)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"four-arg constructor\">\n    @Test\n    public void constructor_fourArgs_setsAllFields() {\n        // arrange\n        BigInteger secretKey = new BigInteger(\"1337\");\n        ECKey ecKeyUncompressed = ECKey.fromPrivate(secretKey, false);\n        ECKey ecKeyCompressed = ECKey.fromPrivate(secretKey, true);\n        byte[] uncompressedKeyHash = CryptoUtils.sha256hash160(ecKeyUncompressed.getPubKey());\n        byte[] compressedKeyHash = CryptoUtils.sha256hash160(ecKeyCompressed.getPubKey());\n\n        // act\n        PublicKeyBytes sut = new PublicKeyBytes(secretKey, ecKeyUncompressed.getPubKey(), uncompressedKeyHash, compressedKeyHash);\n\n        // assert\n        assertThat(sut.getSecretKey(), is(equalTo(secretKey)));\n        assertThat(sut.getUncompressedKeyHash(), is(equalTo(uncompressedKeyHash)));\n        assertThat(sut.getCompressedKeyHash(), is(equalTo(compressedKeyHash)));\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"isAllCoordinateBytesZero\">\n    @Test\n    public void isAllCoordinateBytesZero_validKey_returnsFalse() {\n        // arrange\n        byte[] validUncompressedKey = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES];\n        validUncompressedKey[0] = PublicKeyBytes.SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT;\n        validUncompressedKey[1] = 0x01; // at least one non-zero coordinate byte\n\n        // act\n        boolean result = PublicKeyBytes.isAllCoordinateBytesZero(validUncompressedKey);\n\n        // assert\n        assertThat(result, is(false));\n    }\n\n    @Test\n    public void isAllCoordinateBytesZero_allCoordinateBytesZero_returnsTrue() {\n        // arrange\n        byte[] invalidUncompressedKey = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES];\n        invalidUncompressedKey[0] = PublicKeyBytes.SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT; // prefix byte set\n\n        // act\n        boolean result = PublicKeyBytes.isAllCoordinateBytesZero(invalidUncompressedKey);\n\n        // assert\n        assertThat(result, is(true));\n    }\n\n    @Test\n    public void isAllCoordinateBytesZero_validKeyOnlyLastByteNonZero_returnsFalse() {\n        // arrange\n        byte[] validUncompressedKey = new byte[PublicKeyBytes.PUBLIC_KEY_UNCOMPRESSED_BYTES];\n        validUncompressedKey[0] = PublicKeyBytes.SEC_PREFIX_UNCOMPRESSED_ECDSA_POINT;\n        validUncompressedKey[validUncompressedKey.length - 1] = 0x01; // last coordinate byte non-zero\n\n        // act\n        boolean result = PublicKeyBytes.isAllCoordinateBytesZero(validUncompressedKey);\n\n        // assert\n        assertThat(result, is(false));\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/RandomSecretSupplierTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.math.BigInteger;\r\nimport java.util.Random;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.greaterThanOrEqualTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.lessThan;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport org.junit.Test;\r\n\r\npublic class RandomSecretSupplierTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"nextSecret\">\r\n    @Test\r\n    public void nextSecret_zeroBitLength_returnsZero() {\r\n        // arrange\r\n        RandomSecretSupplier supplier = new RandomSecretSupplier(new Random(0L));\r\n\r\n        // act\r\n        BigInteger result = supplier.nextSecret(0);\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(BigInteger.ZERO)));\r\n    }\r\n\r\n    @Test\r\n    public void nextSecret_256BitLength_returnsNonNullValue() {\r\n        // arrange\r\n        RandomSecretSupplier supplier = new RandomSecretSupplier(new Random(42L));\r\n\r\n        // act\r\n        BigInteger result = supplier.nextSecret(256);\r\n\r\n        // assert\r\n        assertThat(result, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void nextSecret_256BitLength_returnValueFitsIn256Bits() {\r\n        // arrange\r\n        RandomSecretSupplier supplier = new RandomSecretSupplier(new Random(42L));\r\n        BigInteger maxValue = BigInteger.TWO.pow(256);\r\n\r\n        // act\r\n        BigInteger result = supplier.nextSecret(256);\r\n\r\n        // assert\r\n        assertThat(result, is(greaterThanOrEqualTo(BigInteger.ZERO)));\r\n        assertThat(result, is(lessThan(maxValue)));\r\n    }\r\n\r\n    @Test\r\n    public void nextSecret_1BitLength_returnsZeroOrOne() {\r\n        // arrange\r\n        RandomSecretSupplier supplier = new RandomSecretSupplier(new Random(0L));\r\n        BigInteger two = BigInteger.TWO;\r\n\r\n        // act\r\n        BigInteger result = supplier.nextSecret(1);\r\n\r\n        // assert\r\n        assertThat(result, is(greaterThanOrEqualTo(BigInteger.ZERO)));\r\n        assertThat(result, is(lessThan(two)));\r\n    }\r\n\r\n    @Test\r\n    public void nextSecret_seededRandom_returnsDeterministicValue() {\r\n        // arrange\r\n        long seed = 12345L;\r\n        int bitLength = 128;\r\n        // Two suppliers with the same seed must produce the same value\r\n        RandomSecretSupplier supplier1 = new RandomSecretSupplier(new Random(seed));\r\n        RandomSecretSupplier supplier2 = new RandomSecretSupplier(new Random(seed));\r\n\r\n        // act\r\n        BigInteger result1 = supplier1.nextSecret(bitLength);\r\n        BigInteger result2 = supplier2.nextSecret(bitLength);\r\n\r\n        // assert\r\n        assertThat(result1, is(equalTo(result2)));\r\n    }\r\n\r\n    @Test\r\n    public void nextSecret_consecutiveCalls_canProduceDifferentValues() {\r\n        // arrange\r\n        // Use a seed that is known to produce two different 256-bit values\r\n        RandomSecretSupplier supplier = new RandomSecretSupplier(new Random(1L));\r\n\r\n        // act\r\n        BigInteger first = supplier.nextSecret(256);\r\n        BigInteger second = supplier.nextSecret(256);\r\n\r\n        // assert – with a real Random the two calls should differ (not guaranteed but\r\n        // statistically certain for 256-bit outputs with any reasonable seed)\r\n        assertThat(first.equals(second), is(false));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ReadStatisticTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport org.junit.Test;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.aMapWithSize;\r\nimport static org.hamcrest.Matchers.anEmptyMap;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.empty;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.hasEntry;\r\nimport static org.hamcrest.Matchers.hasSize;\r\nimport static org.hamcrest.Matchers.is;\r\n\r\npublic class ReadStatisticTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"defaultValues\">\r\n    @Test\r\n    public void readStatistic_newInstance_successfulIsZero() {\r\n        // arrange, act\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // assert\r\n        assertThat(readStatistic.successful, is(equalTo(0L)));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_newInstance_unsupportedReasonsIsEmpty() {\r\n        // arrange, act\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // assert\r\n        assertThat(readStatistic.unsupportedReasons, is(anEmptyMap()));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_newInstance_unsupportedTotalIsZero() {\r\n        // arrange, act\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // assert\r\n        assertThat(readStatistic.getUnsupportedTotal(), is(equalTo(0L)));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_newInstance_currentFileProgressIsZero() {\r\n        // arrange, act\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // assert\r\n        assertThat(readStatistic.currentFileProgress, is(equalTo(0.0)));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_newInstance_errorsIsEmpty() {\r\n        // arrange, act\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // assert\r\n        assertThat(readStatistic.errors, is(empty()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"incrementUnsupported\">\r\n    @Test\r\n    public void readStatistic_incrementUnsupported_addsReasonToMap() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n\r\n        // assert\r\n        assertThat(readStatistic.unsupportedReasons, hasEntry(\"address is empty\", 1L));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_incrementUnsupportedTwiceWithSameReason_accumulatesCount() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n\r\n        // assert\r\n        assertThat(readStatistic.unsupportedReasons, hasEntry(\"address is empty\", 2L));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_incrementUnsupportedWithDifferentReasons_eachReasonTrackedSeparately() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n        readStatistic.incrementUnsupported(\"P2TR is not supported\");\r\n\r\n        // assert\r\n        assertThat(readStatistic.unsupportedReasons, aMapWithSize(2));\r\n        assertThat(readStatistic.unsupportedReasons, hasEntry(\"address is empty\", 1L));\r\n        assertThat(readStatistic.unsupportedReasons, hasEntry(\"P2TR is not supported\", 1L));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getUnsupportedTotal\">\r\n    @Test\r\n    public void readStatistic_getUnsupportedTotal_sumsAllReasons() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n        readStatistic.incrementUnsupported(\"P2TR is not supported\");\r\n\r\n        // act\r\n        long total = readStatistic.getUnsupportedTotal();\r\n\r\n        // assert\r\n        assertThat(total, is(equalTo(3L)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"fields\">\r\n    @Test\r\n    public void readStatistic_setSuccessful_reflectsNewValue() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        readStatistic.successful = 42L;\r\n\r\n        // assert\r\n        assertThat(readStatistic.successful, is(equalTo(42L)));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_setCurrentFileProgress_reflectsNewValue() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        readStatistic.currentFileProgress = 55.5;\r\n\r\n        // assert\r\n        assertThat(readStatistic.currentFileProgress, is(equalTo(55.5)));\r\n    }\r\n\r\n    @Test\r\n    public void readStatistic_addError_errorsPresentInList() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        readStatistic.errors.add(\"parse error at line 3\");\r\n\r\n        // assert\r\n        assertThat(readStatistic.errors, hasSize(1));\r\n        assertThat(readStatistic.errors.get(0), is(equalTo(\"parse error at line 3\")));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"toString\">\r\n    @Test\r\n    @ToStringTest\r\n    public void toString_defaultInstance_containsAllFieldNames() {\r\n        // arrange\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n\r\n        // act\r\n        String result = readStatistic.toString();\r\n\r\n        // assert\r\n        assertThat(result, containsString(\"successful=\"));\r\n        assertThat(result, containsString(\"unsupportedTotal=\"));\r\n        assertThat(result, containsString(\"unsupportedReasons=\"));\r\n        assertThat(result, containsString(\"currentFileProgress=\"));\r\n        assertThat(result, containsString(\"errors=\"));\r\n    }\r\n\r\n    @Test\r\n    @ToStringTest\r\n    public void toString_withModifiedValues_containsUpdatedValues() {\r\n        // arrange\r\n        ReadStatistic readStatistic = createReadStatisticWithAllFieldsSet();\r\n\r\n        // act\r\n        String result = readStatistic.toString();\r\n\r\n        // assert\r\n        assertThat(result, containsString(\"successful=10\"));\r\n        assertThat(result, containsString(\"unsupportedTotal=3\"));\r\n        assertThat(result, containsString(\"address is empty=2\"));\r\n        assertThat(result, containsString(\"P2TR is not supported=1\"));\r\n        assertThat(result, containsString(\"currentFileProgress=75.0\"));\r\n        assertThat(result, containsString(\"some error\"));\r\n    }\r\n\r\n    @Test\r\n    @ToStringTest\r\n    public void toString_withModifiedValues_equalsExpectedFullString() {\r\n        // arrange\r\n        ReadStatistic readStatistic = createReadStatisticWithAllFieldsSet();\r\n\r\n        // act\r\n        String result = readStatistic.toString();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(\"ReadStatistic{successful=10, unsupportedTotal=3, unsupportedReasons={address is empty=2, P2TR is not supported=1}, currentFileProgress=75.0, errors=[some error]}\")));\r\n    }\r\n\r\n    private static ReadStatistic createReadStatisticWithAllFieldsSet() {\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        readStatistic.successful = 10L;\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n        readStatistic.incrementUnsupported(\"address is empty\");\r\n        readStatistic.incrementUnsupported(\"P2TR is not supported\");\r\n        readStatistic.currentFileProgress = 75.0;\r\n        readStatistic.errors.add(\"some error\");\r\n        return readStatistic;\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/SecretsFileTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport java.io.File;\r\nimport java.math.BigInteger;\r\nimport java.nio.charset.StandardCharsets;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CSecretFormat;\r\nimport org.apache.commons.io.FileUtils;\r\nimport org.bitcoinj.base.Network;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.greaterThan;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.StaticKey;\r\nimport org.junit.Rule;\r\nimport org.junit.Test;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\n/**\r\n * Unit tests for {@link SecretsFile}.\r\n */\r\npublic class SecretsFileTest {\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final StaticKey staticKey = new StaticKey();\r\n\r\n    @Rule\r\n    public TemporaryFolder folder = new TemporaryFolder();\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"processLine\">\r\n    @Test\r\n    public void processLine_bigIntegerFormat_consumerReceivesExpectedSecret() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.BIG_INTEGER, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.processLine(\"12345\");\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(1)));\r\n        assertThat(captured.get(0)[0], is(equalTo(BigInteger.valueOf(12345))));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_sha256Format_consumerReceivesExpectedSecret() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.SHA256, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.processLine(\"000000000000000000000000000000000000000000000000000000000000000f\");\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(1)));\r\n        assertThat(captured.get(0)[0], is(equalTo(BigInteger.valueOf(15))));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_sha256Format_singleByteValue_consumerReceivesExpected() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.SHA256, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.processLine(\"0000000000000000000000000000000000000000000000000000000000000001\");\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(1)));\r\n        assertThat(captured.get(0)[0], is(equalTo(BigInteger.ONE)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_stringDoSha256Format_consumerReceivesHashOfInput() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.STRING_DO_SHA256, readStatistic, captured::add);\r\n        // SHA256(\"test\") = 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\r\n        BigInteger expectedSecret = new BigInteger(\"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\", 16);\r\n\r\n        // act\r\n        secretsFile.processLine(\"test\");\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(1)));\r\n        assertThat(captured.get(0)[0], is(equalTo(expectedSecret)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_dumpedPrivateKeyFormat_consumerReceivesNonNullPositiveSecret() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.DUMPED_RIVATE_KEY, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.processLine(staticKey.privateKeyWiFUncompressed);\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(1)));\r\n        assertThat(captured.get(0), is(notNullValue()));\r\n        assertThat(captured.get(0)[0], is(greaterThan(BigInteger.ZERO)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_dumpedPrivateKeyFormat_consumerReceivesExpectedPrivateKey() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.DUMPED_RIVATE_KEY, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.processLine(staticKey.privateKeyWiFUncompressed);\r\n\r\n        // assert\r\n        assertThat(captured.get(0)[0], is(equalTo(staticKey.privateKeyBigInteger)));\r\n    }\r\n\r\n    @Test\r\n    public void processLine_bigIntegerFormat_calledTwice_consumerCalledTwice() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.BIG_INTEGER, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.processLine(\"1\");\r\n        secretsFile.processLine(\"2\");\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(2)));\r\n        assertThat(captured.get(0)[0], is(equalTo(BigInteger.ONE)));\r\n        assertThat(captured.get(1)[0], is(equalTo(BigInteger.valueOf(2))));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"readFile\">\r\n    @Test\r\n    public void readFile_fileWithTwoLines_consumerCalledTwice() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        FileUtils.writeStringToFile(file, \"1\\n2\\n\", StandardCharsets.UTF_8.name());\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.BIG_INTEGER, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.readFile();\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(2)));\r\n        assertThat(captured.get(0)[0], is(equalTo(BigInteger.ONE)));\r\n        assertThat(captured.get(1)[0], is(equalTo(BigInteger.valueOf(2))));\r\n    }\r\n\r\n    @Test\r\n    public void readFile_emptyFile_consumerNeverCalled() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.BIG_INTEGER, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.readFile();\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(0)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"interrupt\">\r\n    @Test\r\n    public void interrupt_calledBeforeReadFile_noLinesProcessed() throws Exception {\r\n        // arrange\r\n        File file = folder.newFile(\"secrets.txt\");\r\n        FileUtils.writeStringToFile(file, \"1\\n2\\n3\\n\", StandardCharsets.UTF_8.name());\r\n        ReadStatistic readStatistic = new ReadStatistic();\r\n        List<BigInteger[]> captured = new ArrayList<>();\r\n        SecretsFile secretsFile = new SecretsFile(network, file, CSecretFormat.BIG_INTEGER, readStatistic, captured::add);\r\n\r\n        // act\r\n        secretsFile.interrupt();\r\n        secretsFile.readFile();\r\n\r\n        // assert\r\n        assertThat(captured.size(), is(equalTo(0)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/SeparatorFormatTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport java.io.IOException;\nimport org.junit.Test;\nimport java.util.Arrays;\nimport java.util.List;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.*;\nimport org.junit.runner.RunWith;\n\n/**\n * Unit tests for {@link SeparatorFormat}.\n */\n@RunWith(DataProviderRunner.class)\npublic class SeparatorFormatTest {\n\n    /**\n     * Tests that the input is correctly split into two parts using a valid\n     * separator between them.\n     */\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\n    public void split_separatorBetweenTwoParts_returnsSplitParts(String addressSeparator) {\n        // arrange\n        String expectedLeft = \"leftPart\";\n        String expectedRight = \"rightPart\";\n        String input = expectedLeft + addressSeparator + expectedRight;\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(2)));\n        assertThat(result[0], is(equalTo(expectedLeft)));\n        assertThat(result[1], is(equalTo(expectedRight)));\n    }\n\n    /**\n     * Tests that an input string consisting only of a separator returns two\n     * empty strings after splitting.\n     */\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\n    public void split_inputEqualsSeparator_returnsEmptyStrings(String separator) {\n        // arrange\n        String input = separator;\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(2)));\n        assertThat(result[0], is(equalTo(\"\")));\n        assertThat(result[1], is(equalTo(\"\")));\n    }\n\n    /**\n     * Tests that if no separator is present in the input, the original input is\n     * returned as a single element.\n     */\n    @Test\n    public void split_noSeparatorInInput_returnsWholeInput() {\n        // arrange\n        String input = \"justARegularString\";\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(1)));\n        assertThat(result[0], is(equalTo(input)));\n    }\n    \n    /**\n     * Tests that the input is recursively split on all matching separators,\n     * starting with the longest, respecting their defined priority.\n     */\n    @Test\n    public void split_inputWithMultipleValidSeparators_recursivelySplitsAll() {\n        // arrange\n        String input = \"a\" + SeparatorFormat.DOUBLE_COLON.getSymbol() + \"b\" + SeparatorFormat.SEMICOLON.getSymbol() + \"c\";\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(3)));\n        assertThat(result[0], is(equalTo(\"a\")));\n        assertThat(result[1], is(equalTo(\"b\")));\n        assertThat(result[2], is(equalTo(\"c\")));\n    }\n\n    /**\n     * Tests that when multiple separators are present, the input is recursively\n     * split by all applicable separators, starting with the longest.\n     */\n    @Test\n    public void split_multipleSeparatorsPresent_recursivelySplitsAll() {\n        // arrange\n        String input = \"a\" + SeparatorFormat.DOUBLE_COLON.getSymbol() + \"b\" + SeparatorFormat.COLON.getSymbol() + \"c\";\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(3)));\n        assertThat(result[0], is(equalTo(\"a\")));\n        assertThat(result[1], is(equalTo(\"b\")));\n        assertThat(result[2], is(equalTo(\"c\")));\n    }\n\n    /**\n     * Tests that if the input starts and ends with a separator, the result\n     * contains empty prefix and suffix parts.\n     */\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\n    public void split_inputStartsAndEndsWithSeparator_returnsEmptyAndMiddleAndEmpty(String separator) {\n        // arrange\n        String input = separator + \"middle\" + separator;\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(3)));\n        assertThat(result[0], is(equalTo(\"\")));\n        assertThat(result[1], is(equalTo(\"middle\")));\n        assertThat(result[2], is(equalTo(\"\")));\n    }\n\n    /**\n     * Verifies that the {@link SeparatorFormat#DOUBLE_COLON} separator appears\n     * before the {@link SeparatorFormat#COLON} in the sorted separator list.\n     */\n    @Test\n    public void getSortedSeparators_doubleColonBeforeColon() {\n        // act\n        List<SeparatorFormat> sorted = SeparatorFormat.getSortedSeparators();\n\n        // assert\n        int doubleColonIndex = sorted.indexOf(SeparatorFormat.DOUBLE_COLON);\n        int colonIndex = sorted.indexOf(SeparatorFormat.COLON);\n\n        assertThat(doubleColonIndex, is(lessThan(colonIndex)));\n    }\n\n    /**\n     * Tests that when the separator appears at the end of the input, the last\n     * part is returned as an empty string.\n     */\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\n    public void split_trailingSeparator_returnsEmptyLastPart(String separator) {\n        // arrange\n        String input = \"value\" + separator;\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(2)));\n        assertThat(result[0], is(equalTo(\"value\")));\n        assertThat(result[1], is(equalTo(\"\")));\n    }\n\n    /**\n     * Tests that when the separator appears at the beginning of the input, the\n     * first part is returned as an empty string.\n     */\n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_ADDRESS_SEPARATOR, location = CommonDataProvider.class)\n    public void split_leadingSeparator_returnsEmptyFirstPart(String separator) {\n        // arrange\n        String input = separator + \"value\";\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(2)));\n        assertThat(result[0], is(equalTo(\"\")));\n        assertThat(result[1], is(equalTo(\"value\")));\n    }\n\n    /**\n     * Verifies that every SeparatorFormat constant returns a non-null,\n     * non-empty symbol.\n     */\n    @Test\n    public void getSymbol_eachSeparator_returnsExpectedString() {\n        for (SeparatorFormat separator : SeparatorFormat.values()) {\n            assertThat(separator.getSymbol(), is(notNullValue()));\n            assertThat(separator.getSymbol().length(), is(greaterThan(0)));\n        }\n    }\n\n    @Test\n    public void allSeparators_areUnique() {\n        long uniqueCount = Arrays.stream(SeparatorFormat.values())\n                .map(SeparatorFormat::getSymbol)\n                .distinct()\n                .count();\n        assertThat(uniqueCount, is(equalTo((long) SeparatorFormat.values().length)));\n    }\n\n    @Test\n    public void split_spaceSeparator_surroundedByText_returnsParts() {\n        String input = \"left\" + SeparatorFormat.SPACE.getSymbol() + \"right\";\n        String[] result = SeparatorFormat.split(input);\n        assertThat(result.length, is(equalTo(2)));\n    }\n    \n    @Test\n    public void split_recursiveSplitting_allRelevantSeparatorsAreResolvedInOrder() {\n        // arrange\n        String input = \"first\" \n            + SeparatorFormat.DOUBLE_COLON.getSymbol() \n            + \"second\" \n            + SeparatorFormat.COLON.getSymbol() \n            + \"third\" \n            + SeparatorFormat.PIPE.getSymbol() \n            + \"fourth\";\n\n        // Expected splitting order:\n        // 1. DOUBLE_COLON splits \"first\" and \"second:third|fourth\"\n        // 2. COLON splits \"second\" and \"third|fourth\"\n        // 3. PIPE splits \"third\" and \"fourth\"\n        //\n        // Expected output: [\"first\", \"second\", \"third\", \"fourth\"]\n\n        // act\n        String[] result = SeparatorFormat.split(input);\n\n        // assert\n        assertThat(result.length, is(equalTo(4)));\n        assertThat(result[0], is(equalTo(\"first\")));\n        assertThat(result[1], is(equalTo(\"second\")));\n        assertThat(result[2], is(equalTo(\"third\")));\n        assertThat(result[3], is(equalTo(\"fourth\")));\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/StatisticsTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport org.junit.Test;\r\n\r\npublic class StatisticsTest {\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createStatisticsMessage\">\r\n    @Test\r\n    public void createStatisticsMessage_statisticsGiven_returnExpectedStatisticsMessage() {\r\n        // arrange\r\n        Statistics statistics = new Statistics();\r\n        \r\n        // act\r\n        String result = statistics.createStatisticsMessage(234_000L, 999_000_000L, 345_000_000_000L, 4567L, 5678L, 6789L);\r\n        \r\n        // assert\r\n        assertThat(result, is(equalTo(\"Statistics: [Checked 999 M keys in 3 minutes] [4269 k keys/second] [333 M keys/minute] [Times an empty consumer: 4567] [Average contains time: 345 ms] [keys queue size: 5678] [Hits: 6789]\")));\r\n    }\r\n    // </editor-fold>\r\n    \r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/ToStringTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n/**\n * Marker annotation for tests that validate toString() implementations.\n */\n@Retention(RetentionPolicy.RUNTIME)\n@Target({ElementType.METHOD})\npublic @interface ToStringTest {\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/configuration/CKeyProducerJavaIncrementalTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport java.math.BigInteger;\r\nimport org.junit.Test;\r\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\r\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\n\r\npublic class CKeyProducerJavaIncrementalTest {\r\n\r\n    private static final String START_ADDRESS_CUSTOM_HEX = \"FF\";\r\n    private static final String END_ADDRESS_CUSTOM_HEX = \"FF\";\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getStartAddress\">\r\n    @Test\r\n    public void getStartAddress_defaultStartAddress_returnsMinValidPrivateKey() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n\r\n        // act\r\n        BigInteger result = sut.getStartAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.MIN_VALID_PRIVATE_KEY)));\r\n    }\r\n\r\n    @Test\r\n    public void getStartAddress_customUppercaseHexStartAddress_returnsExpectedBigInteger() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.startAddress = START_ADDRESS_CUSTOM_HEX.toUpperCase();\r\n\r\n        // act\r\n        BigInteger result = sut.getStartAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(new BigInteger(START_ADDRESS_CUSTOM_HEX, BitHelper.RADIX_HEX))));\r\n    }\r\n\r\n    @Test\r\n    public void getStartAddress_customLowercaseHexStartAddress_returnsExpectedBigInteger() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.startAddress = START_ADDRESS_CUSTOM_HEX.toLowerCase();\r\n\r\n        // act\r\n        BigInteger result = sut.getStartAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(new BigInteger(START_ADDRESS_CUSTOM_HEX, BitHelper.RADIX_HEX))));\r\n    }\r\n\r\n    @Test\r\n    public void getStartAddress_maxPrivateKeyHexStartAddress_returnsMaxPrivateKey() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.startAddress = PublicKeyBytes.MAX_PRIVATE_KEY_HEX;\r\n\r\n        // act\r\n        BigInteger result = sut.getStartAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.MAX_PRIVATE_KEY)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getEndAddress\">\r\n    @Test\r\n    public void getEndAddress_defaultEndAddress_returnsMaxPrivateKey() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n\r\n        // act\r\n        BigInteger result = sut.getEndAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.MAX_PRIVATE_KEY)));\r\n    }\r\n\r\n    @Test\r\n    public void getEndAddress_customUppercaseHexEndAddress_returnsExpectedBigInteger() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.endAddress = END_ADDRESS_CUSTOM_HEX.toUpperCase();\r\n\r\n        // act\r\n        BigInteger result = sut.getEndAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(new BigInteger(END_ADDRESS_CUSTOM_HEX, BitHelper.RADIX_HEX))));\r\n    }\r\n\r\n    @Test\r\n    public void getEndAddress_customLowercaseHexEndAddress_returnsExpectedBigInteger() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.endAddress = END_ADDRESS_CUSTOM_HEX.toLowerCase();\r\n\r\n        // act\r\n        BigInteger result = sut.getEndAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(new BigInteger(END_ADDRESS_CUSTOM_HEX, BitHelper.RADIX_HEX))));\r\n    }\r\n\r\n    @Test\r\n    public void getEndAddress_maxPrivateKeyHexEndAddress_returnsMaxPrivateKey() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.endAddress = PublicKeyBytes.MAX_PRIVATE_KEY_HEX;\r\n\r\n        // act\r\n        BigInteger result = sut.getEndAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.MAX_PRIVATE_KEY)));\r\n    }\r\n\r\n    @Test\r\n    public void getEndAddress_minValidPrivateKeyHexEndAddress_returnsMinValidPrivateKey() {\r\n        // arrange\r\n        CKeyProducerJavaIncremental sut = new CKeyProducerJavaIncremental();\r\n        sut.endAddress = PublicKeyBytes.MIN_VALID_PRIVATE_KEY_HEX;\r\n\r\n        // act\r\n        BigInteger result = sut.getEndAddress();\r\n\r\n        // assert\r\n        assertThat(result, is(equalTo(PublicKeyBytes.MIN_VALID_PRIVATE_KEY)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/configuration/CProducerTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2024 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport java.io.IOException;\r\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\r\nimport org.junit.Before;\r\nimport org.junit.Test;\r\n\r\npublic class CProducerTest {\r\n    \r\n    private final BitHelper bitHelper = new BitHelper();\r\n    \r\n    @Before\r\n    public void init() throws IOException {\r\n    }\r\n    \r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"default parameter for batchSizeInBits\">\r\n    @Test\r\n    public void batchSizeInBits_configurationConstantsSet_isValidDefaultValue() throws IOException {\r\n        CProducer cProducer = new CProducer();\r\n        bitHelper.assertBatchSizeInBitsIsInRange(cProducer.batchSizeInBits);\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/configuration/UnknownSecretFormatExceptionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2026 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.configuration;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.instanceOf;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link UnknownSecretFormatException}.\r\n */\r\npublic class UnknownSecretFormatExceptionTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_withBigInteger_messageContainsFormatName() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.BIG_INTEGER;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"BIG_INTEGER\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withSha256_messageContainsFormatName() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.SHA256;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"SHA256\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withStringDoSha256_messageContainsFormatName() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.STRING_DO_SHA256;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"STRING_DO_SHA256\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withDumpedPrivateKey_messageContainsFormatName() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.DUMPED_RIVATE_KEY;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"DUMPED_RIVATE_KEY\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withBigInteger_messageContainsExpectedPrefix() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.BIG_INTEGER;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"Unknown secret format:\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withBigInteger_messageEqualsExpected() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.BIG_INTEGER;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(\"Unknown secret format: BIG_INTEGER\")));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withSha256_messageEqualsExpected() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.SHA256;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(\"Unknown secret format: SHA256\")));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withBigInteger_isInstanceOfIllegalArgumentException() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.BIG_INTEGER;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception, is(instanceOf(IllegalArgumentException.class)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withBigInteger_noCause() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.BIG_INTEGER;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getSecretFormat\">\r\n    @Test\r\n    public void getSecretFormat_withBigInteger_returnsSecretFormat() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.BIG_INTEGER;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n        CSecretFormat actual = exception.getSecretFormat();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(secretFormat)));\r\n    }\r\n\r\n    @Test\r\n    public void getSecretFormat_withSha256_returnsSecretFormat() {\r\n        // arrange\r\n        CSecretFormat secretFormat = CSecretFormat.SHA256;\r\n\r\n        // act\r\n        UnknownSecretFormatException exception = new UnknownSecretFormatException(secretFormat);\r\n        CSecretFormat actual = exception.getSecretFormat();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(secretFormat)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/eckey/Secp256k1Test.java",
    "content": "package net.ladenthin.bitcoinaddressfinder.eckey;\r\n\r\nimport org.junit.Test;\r\n\r\nimport java.math.BigInteger;\r\nimport java.security.KeyFactory;\r\nimport java.security.PrivateKey;\r\nimport java.security.interfaces.ECPrivateKey;\r\nimport java.security.interfaces.ECPublicKey;\r\nimport java.security.spec.PKCS8EncodedKeySpec;\r\nimport static net.ladenthin.bitcoinaddressfinder.eckey.Secp256k1.getPublicKey;\r\nimport static net.ladenthin.bitcoinaddressfinder.eckey.Secp256k1.byteArrayToHexString;\r\nimport static net.ladenthin.bitcoinaddressfinder.eckey.Secp256k1.hexStringToByteArray;\r\nimport org.bitcoinj.crypto.ECKey;\r\nimport org.bouncycastle.jce.ECNamedCurveTable;\r\nimport org.bouncycastle.jce.spec.ECNamedCurveParameterSpec;\r\n\r\npublic class Secp256k1Test {\r\n\r\n    @Test\r\n    public void testme() throws Exception {\r\n        System.out.println(\"Generate ECPublicKey from PrivateKey (String) for curve secp256k1 (final)\");\r\n        System.out.println(\"Check keys with https://gobittest.appspot.com/Address\");\r\n        // https://gobittest.appspot.com/Address\r\n        String privateKey = \"D12D2FACA9AD92828D89683778CB8DFCCDBD6C9E92F6AB7D6065E8AACC1FF6D6\";\r\n        String publicKeyExpected = \"04661BA57FED0D115222E30FE7E9509325EE30E7E284D3641E6FB5E67368C2DB185ADA8EFC5DC43AF6BF474A41ED6237573DC4ED693D49102C42FFC88510500799\";\r\n        System.out.println(\"\\nprivatekey given : \" + privateKey);\r\n        System.out.println(\"publicKeyExpected: \" + publicKeyExpected);\r\n        // routine with bouncy castle\r\n        System.out.println(\"\\nGenerate PublicKey from PrivateKey with BouncyCastle\");\r\n        ECNamedCurveParameterSpec spec = ECNamedCurveTable.getParameterSpec(\"secp256k1\"); // this ec curve is used for bitcoin operations\r\n        org.bouncycastle.math.ec.ECPoint pointQ = spec.getG().multiply(new BigInteger(1, hexStringToByteArray(privateKey)));\r\n        byte[] publickKeyByte = pointQ.getEncoded(false);\r\n        String publicKeyBc = byteArrayToHexString(publickKeyByte);\r\n        System.out.println(\"publicKeyExpected: \" + publicKeyExpected);\r\n        System.out.println(\"publicKey BC     : \" + publicKeyBc);\r\n        System.out.println(\"publicKeys match : \" + publicKeyBc.contentEquals(publicKeyExpected));\r\n\r\n        // regeneration of ECPublicKey with java native starts here\r\n        System.out.println(\"\\nGenerate PublicKey from PrivateKey with Java native routines\");\r\n        // the preset \"303E..\" only works for elliptic curve secp256k1\r\n        // see answer by user dave_thompson_085\r\n        // https://stackoverflow.com/questions/48832170/generate-ec-public-key-from-byte-array-private-key-in-native-java-7\r\n        String privateKeyFull = \"303E020100301006072A8648CE3D020106052B8104000A042730250201010420\"\r\n                + privateKey;\r\n        byte[] privateKeyFullByte = hexStringToByteArray(privateKeyFull);\r\n        System.out.println(\"privateKey full  : \" + privateKeyFull);\r\n        KeyFactory keyFactory = KeyFactory.getInstance(\"EC\");\r\n        PrivateKey privateKeyNative = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(privateKeyFullByte));\r\n        ECPrivateKey ecPrivateKeyNative = (ECPrivateKey) privateKeyNative;\r\n        ECPublicKey ecPublicKeyNative = getPublicKey(ecPrivateKeyNative);\r\n        byte[] ecPublicKeyNativeByte = ecPublicKeyNative.getEncoded();\r\n        String publicKeyNativeFull = byteArrayToHexString(ecPublicKeyNativeByte);\r\n        String publicKeyNativeHeader = publicKeyNativeFull.substring(0, 46);\r\n        String publicKeyNativeKey = publicKeyNativeFull.substring(46, 176);\r\n        System.out.println(\"ecPublicKeyFull  : \" + publicKeyNativeFull);\r\n        System.out.println(\"ecPublicKeyHeader: \" + publicKeyNativeHeader);\r\n        System.out.println(\"ecPublicKeyKey   : \" + publicKeyNativeKey);\r\n        System.out.println(\"publicKeyExpected: \" + publicKeyExpected);\r\n        System.out.println(\"publicKeys match : \" + publicKeyNativeKey.contentEquals(publicKeyExpected));\r\n\r\n        //\r\n        ECKey ecKeyPre = ECKey.fromPrivateAndPrecalculatedPublic(hexStringToByteArray(privateKey), hexStringToByteArray(publicKeyNativeKey));\r\n        ECKey ecKeyFull = ECKey.fromPrivate(hexStringToByteArray(privateKey), false);\r\n\r\n        byte[] ecKeyPrePubKeyHash = ecKeyPre.getPubKeyHash();\r\n        byte[] ecKeyPrePubKey = ecKeyPre.getPubKey();\r\n        byte[] ecKeyFullPubKeyHash = ecKeyFull.getPubKeyHash();\r\n        byte[] ecKeyFullPubKey = ecKeyFull.getPubKey();\r\n\r\n        System.out.println(\"---BLDEBUG---\");\r\n        System.out.println(\"ecKeyPrePubKey   : \" + byteArrayToHexString(ecKeyPrePubKey));\r\n        System.out.println(\"ecKeyPrePubKeyHash   : \" + byteArrayToHexString(ecKeyPrePubKeyHash));\r\n        System.out.println(\"ecKeyFullPubKey: \" + byteArrayToHexString(ecKeyFullPubKey));\r\n        System.out.println(\"ecKeyFullPubKeyHash: \" + byteArrayToHexString(ecKeyFullPubKeyHash));\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/AbstractKeyProducerQueueBufferedTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport org.bitcoinj.base.Network;\n\nimport static org.junit.Assert.assertEquals;\nimport java.util.*;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.concurrent.LinkedBlockingQueue;\n\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport org.slf4j.Logger;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaReceiver;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.verify;\nimport static org.mockito.Mockito.times;\nimport static org.mockito.ArgumentMatchers.eq;\n\npublic class AbstractKeyProducerQueueBufferedTest {\n    \n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n    private final BitHelper bitHelper = new BitHelper();\n    private Logger mockLogger;\n    \n    @Before\n    public void setUp() {\n        mockLogger = mock(Logger.class);\n    }\n    \n    static class TestKeyProducer extends AbstractKeyProducerQueueBuffered<CKeyProducerJavaReceiver> {\n        public TestKeyProducer(CKeyProducerJavaReceiver config, KeyUtility keyUtility, Logger logger) {\n            super(config, keyUtility, logger);\n        }\n        public TestKeyProducer(CKeyProducerJavaReceiver config, KeyUtility keyUtility, Logger logger, BlockingQueue<byte[]> queue) {\n            super(config, keyUtility, logger, queue);\n        }\n\n        @Override\n        protected int getReadTimeout() {\n            return TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;\n        }\n\n        @Override\n        public void interrupt() {\n            shouldStop = true;\n        }\n    }\n\n    private TestKeyProducer createTestKeyProducer(CKeyProducerJavaReceiver config) {\n        return new TestKeyProducer(config, keyUtility, mockLogger);\n    }\n\n    @Test\n    public void createSecrets_returnsSecret_whenAvailableInQueue() throws Exception {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n        TestKeyProducer producer = createTestKeyProducer(config);\n        \n        byte[] secret = new KeyProducerTestUtility().createFilledSecret((byte) 0xAB);\n        BigInteger expectedSecret = new BigInteger(1, secret);\n        producer.addSecret(secret);\n        \n        BigInteger[] secrets = producer.createSecrets(1, true);\n        \n        assertEquals(1, secrets.length);\n        assertEquals(expectedSecret, secrets[0]);\n    }\n    \n    @Test\n    public void createSecrets_readsMultipleSecrets() throws Exception {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n        TestKeyProducer producer = createTestKeyProducer(config);\n        \n        byte[] secret = new KeyProducerTestUtility().createFilledSecret((byte) 0xAB);\n        BigInteger expectedSecret = new BigInteger(1, secret);\n\n        producer.addSecret(secret);\n        producer.addSecret(secret);\n\n        BigInteger[] secrets = producer.createSecrets(2, false);\n\n        assertEquals(2, secrets.length);\n        for (BigInteger bi : secrets) {\n            assertEquals(expectedSecret, bi);\n        }\n    }\n    \n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_throwsException_onInvalidLength() throws Exception {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n        TestKeyProducer producer = createTestKeyProducer(config);\n\n        byte[] invalidSecret = new KeyProducerTestUtility().createInvalidSecret();\n        producer.addSecret(invalidSecret);\n\n        producer.createSecrets(1, true); // should throw\n    }\n    \n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_throwsException_onTimeout() throws Exception {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n        TestKeyProducer producer = createTestKeyProducer(config);\n\n        // Do not add anything to queue\n        producer.createSecrets(1, true); // should timeout\n    }\n    \n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_throwsException_whenShouldStopSet() throws Exception {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n        TestKeyProducer producer = createTestKeyProducer(config);\n\n        producer.shouldStop = true;\n        producer.createSecrets(1, true); // should throw immediately\n    }\n    \n    @Test\n    public void createSecrets_logsSecret_whenEnabled() throws Exception {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n        config.logReceivedSecret = true;\n\n        TestKeyProducer producer = createTestKeyProducer(config);\n\n        byte[] secret = new KeyProducerTestUtility().createFilledSecret((byte) 0xAB);\n        BigInteger expectedSecret = new BigInteger(1, secret);\n        \n        String expectedHex = keyUtility.bigIntegerToFixedLengthHex(expectedSecret);\n\n        producer.addSecret(secret);\n        producer.createSecrets(1, true);\n\n        // Verify that logger.info was called with the expected message\n        verify(mockLogger, times(1)).info(eq(\"Received key: {}\"), eq(expectedHex));\n    }\n\n    @Test()\n    public void addSecret_throwsWhenQueueFull() {\n        CKeyProducerJavaReceiver config = new CKeyProducerJavaReceiver();\n\n        BlockingQueue<byte[]> queue = new LinkedBlockingQueue<>(1);\n        TestKeyProducer producer = new TestKeyProducer(config, keyUtility, mockLogger, queue);\n\n        byte[] secret = new KeyProducerTestUtility().createFilledSecret((byte) 0xAB);\n\n        producer.addSecret(secret); // fills queue\n        producer.addSecret(secret); // must fail\n\n        verify(mockLogger).error(\n                eq(\"Secret queue is full, ignore secret: {}\"),\n                eq(secret)\n        );\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/ConnectionUtilsTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.net.ServerSocket;\nimport java.util.concurrent.*;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\n\npublic class ConnectionUtilsTest {\n\n    private ExecutorService executorService;\n\n    @Before\n    public void setup() {\n        executorService = Executors.newCachedThreadPool();\n    }\n\n    @After\n    public void teardown() {\n        executorService.shutdownNow();\n    }\n\n    private int findFreePort() {\n        try (ServerSocket socket = new ServerSocket(0)) {\n            return socket.getLocalPort();\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    @Test\n    public void waitUntilTcpPortOpen_whenServerAlreadyListening_returnsImmediately() throws Exception {\n        int port = findFreePort();\n\n        try (ServerSocket serverSocket = new ServerSocket(port)) {\n            long start = System.currentTimeMillis();\n            ConnectionUtils.waitUntilTcpPortOpen(\"localhost\", port, 2000);\n            long duration = System.currentTimeMillis() - start;\n\n            // Should return very quickly (< 500ms)\n            assertThat(\"waitUntilTcpPortOpen should return quickly when port is open\", duration, lessThan(500L));\n        }\n    }\n\n    @Test\n    public void waitUntilTcpPortOpen_whenServerStartsLate_returnsAfterStart() throws Exception {\n        int port = findFreePort();\n\n        // Delay server start by 1 second\n        executorService.submit(() -> {\n            Thread.sleep(1000);\n            try (ServerSocket serverSocket = new ServerSocket(port)) {\n                Thread.sleep(1000); // Keep it open for a bit\n            }\n            return null;\n        });\n\n        long start = System.currentTimeMillis();\n        ConnectionUtils.waitUntilTcpPortOpen(\"localhost\", port, 3000);\n        long duration = System.currentTimeMillis() - start;\n\n        // Should return after ~1 second\n        assertThat(\"waitUntilTcpPortOpen should return after port becomes available\", duration, greaterThanOrEqualTo(900L));\n        assertThat(duration, lessThan(2500L)); // with some margin\n    }\n\n    @Test(expected = IllegalStateException.class)\n    public void waitUntilTcpPortOpen_whenPortNeverOpens_throwsException() throws Exception {\n        int unusedPort = findFreePort();\n        // Do not bind anything to this port\n\n        ConnectionUtils.waitUntilTcpPortOpen(\"localhost\", unusedPort, 1000);\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerIdIsNotUniqueExceptionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.instanceOf;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link KeyProducerIdIsNotUniqueException}.\r\n */\r\npublic class KeyProducerIdIsNotUniqueExceptionTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_withId_messageContainsId() {\r\n        // arrange\r\n        String id = \"myProducerId\";\r\n\r\n        // act\r\n        KeyProducerIdIsNotUniqueException exception = new KeyProducerIdIsNotUniqueException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(id));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_messageContainsExpectedPrefix() {\r\n        // arrange\r\n        String id = \"anyId\";\r\n\r\n        // act\r\n        KeyProducerIdIsNotUniqueException exception = new KeyProducerIdIsNotUniqueException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"unique\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_messageEqualsExpected() {\r\n        // arrange\r\n        String id = \"myProducerId\";\r\n\r\n        // act\r\n        KeyProducerIdIsNotUniqueException exception = new KeyProducerIdIsNotUniqueException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(\"Key producer id must be unique: \" + id)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_isInstanceOfRuntimeException() {\r\n        // arrange\r\n        String id = \"anyId\";\r\n\r\n        // act\r\n        KeyProducerIdIsNotUniqueException exception = new KeyProducerIdIsNotUniqueException(id);\r\n\r\n        // assert\r\n        assertThat(exception, is(instanceOf(RuntimeException.class)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_noCause() {\r\n        // arrange\r\n        String id = \"anyId\";\r\n\r\n        // act\r\n        KeyProducerIdIsNotUniqueException exception = new KeyProducerIdIsNotUniqueException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getId\">\r\n    @Test\r\n    public void getId_withId_returnsId() {\r\n        // arrange\r\n        String id = \"producerAlpha\";\r\n\r\n        // act\r\n        KeyProducerIdIsNotUniqueException exception = new KeyProducerIdIsNotUniqueException(id);\r\n        String actual = exception.getId();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(id)));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerIdNullExceptionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.instanceOf;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link KeyProducerIdNullException}.\r\n */\r\npublic class KeyProducerIdNullExceptionTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_noArg_messageContainsNull() {\r\n        // act\r\n        KeyProducerIdNullException exception = new KeyProducerIdNullException();\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"null\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_noArg_messageEqualsExpected() {\r\n        // act\r\n        KeyProducerIdNullException exception = new KeyProducerIdNullException();\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(\"Key producer id must not be null.\")));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_noArg_isInstanceOfRuntimeException() {\r\n        // act\r\n        KeyProducerIdNullException exception = new KeyProducerIdNullException();\r\n\r\n        // assert\r\n        assertThat(exception, is(instanceOf(RuntimeException.class)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_noArg_noCause() {\r\n        // act\r\n        KeyProducerIdNullException exception = new KeyProducerIdNullException();\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerIdUnknownExceptionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.instanceOf;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link KeyProducerIdUnknownException}.\r\n */\r\npublic class KeyProducerIdUnknownExceptionTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_withId_messageContainsId() {\r\n        // arrange\r\n        String id = \"unknownProducer\";\r\n\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(id));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_messageContainsExpectedPrefix() {\r\n        // arrange\r\n        String id = \"anyId\";\r\n\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"unknown\"));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_messageEqualsExpected() {\r\n        // arrange\r\n        String id = \"unknownProducer\";\r\n\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(\"Key producer id is unknown: \" + id)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_isInstanceOfRuntimeException() {\r\n        // arrange\r\n        String id = \"anyId\";\r\n\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(id);\r\n\r\n        // assert\r\n        assertThat(exception, is(instanceOf(RuntimeException.class)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withId_noCause() {\r\n        // arrange\r\n        String id = \"anyId\";\r\n\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(id);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withNullId_messageContainsNull() {\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(null);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"null\"));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"getId\">\r\n    @Test\r\n    public void getId_withId_returnsId() {\r\n        // arrange\r\n        String id = \"unknownProducer\";\r\n\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(id);\r\n        String actual = exception.getId();\r\n\r\n        // assert\r\n        assertThat(actual, is(equalTo(id)));\r\n    }\r\n\r\n    @Test\r\n    public void getId_withNullId_returnsNull() {\r\n        // act\r\n        KeyProducerIdUnknownException exception = new KeyProducerIdUnknownException(null);\r\n        String actual = exception.getId();\r\n\r\n        // assert\r\n        assertThat(actual, is(nullValue()));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaBip39Test.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaBip39;\nimport org.bitcoinj.base.Network;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\nimport org.junit.Before;\nimport org.junit.Test;\nimport static org.mockito.Mockito.mock;\nimport org.slf4j.Logger;\n\npublic class KeyProducerJavaBip39Test {\n\n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n    private final BitHelper bitHelper = new BitHelper();\n    private Logger mockLogger;\n    \n    String keyProducerId = \"exampleId\";\n    \n    @Before\n    public void setUp() {\n        mockLogger = mock(Logger.class);\n    }\n\n    private KeyProducerJavaBip39 createKeyProducerJavaBip39(CKeyProducerJavaBip39 config) {\n        return new KeyProducerJavaBip39(config, keyUtility, bitHelper, mockLogger);\n    }\n    \n    private BigInteger[] generateSecrets() throws NoMoreSecretsAvailableException {\n        CKeyProducerJavaBip39 config = new CKeyProducerJavaBip39();\n        config.keyProducerId = keyProducerId;\n        config.privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\n        config.mnemonic = CKeyProducerJavaBip39.DEFAULT_MNEMONIC;\n        config.passphrase = \"\";\n        config.creationTimeSeconds = 0L;\n        config.hardened = false;\n        \n        KeyProducerJavaBip39 producer = createKeyProducerJavaBip39(config);\n        return producer.createSecrets(bitHelper.convertBitsToSize(0), true);\n    }\n    \n    @Test\n    public void testBip39() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets();\n        assertThat(result.length, is(equalTo(1)));\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaIncrementalTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\n\nimport java.math.BigInteger;\n\nimport net.ladenthin.bitcoinaddressfinder.*;\n\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaIncremental;\nimport static org.junit.Assert.fail;\n\nimport org.bitcoinj.base.Network;\nimport org.junit.Before;\nimport org.junit.Test;\nimport static org.mockito.Mockito.mock;\nimport org.slf4j.Logger;\n\n/**\n * Tests for KeyProducerJavaIncremental with respect to key range boundaries and batch handling.\n *\n * <p>Behavior Matrix for createSecrets(batchSize, returnStartSecretOnly=false):\n * <table border=\"1\" cellpadding=\"4\" cellspacing=\"0\">\n *   <tr>\n *     <th>Scenario</th>\n *     <th>currentValue position</th>\n *     <th>Batch Size</th>\n *     <th>Batch fully within range?</th>\n *     <th>Expected Result</th>\n *     <th>Exception?</th>\n *     <th>Related Test(s)</th>\n *   </tr>\n *   <tr>\n *     <td>1. Start of range, batch fits</td>\n *     <td>At startAddress (min)</td>\n *     <td>≤ keys remaining</td>\n *     <td>Yes</td>\n *     <td>Returns full batch sequential keys</td>\n *     <td>No</td>\n *     <td><code>createSecrets_returnStartSecretOnlyFalse_returnsBatchSecrets</code>, <br><code>createSecrets_currentValueAdvancesByBatchSize</code></td>\n *   </tr>\n *   <tr>\n *     <td>2. Inside range, batch fits</td>\n *     <td>Inside range (between start and end)</td>\n *     <td>≤ keys remaining</td>\n *     <td>Yes</td>\n *     <td>Returns full batch sequential keys</td>\n *     <td>No</td>\n *     <td><code>createSecrets_currentValueAdvancesByBatchSize</code></td>\n *   </tr>\n *   <tr>\n *     <td>3. Inside range, partial batch</td>\n *     <td>Inside range (between start and end)</td>\n *     <td>Partial batch (batch size &gt; keys remaining)</td>\n *     <td>No</td>\n *     <td>Throws NoMoreSecretsAvailableException</td>\n *     <td>Yes</td>\n *     <td><code>createSecrets_threeBatches_twoElementsEach_thirdThrowsException</code></td>\n *   </tr>\n *   <tr>\n *     <td>4. At end, batch size = 1, returnStartSecretOnly=true</td>\n *     <td>At endAddress (max)</td>\n *     <td>1</td>\n *     <td>Yes (single key)</td>\n *     <td>Returns single key (currentValue)</td>\n *     <td>No</td>\n *     <td><code>createSecrets_returnStartSecretOnlyTrue_returnsOneSecret</code></td>\n *   </tr>\n *   <tr>\n *     <td>5. At end, batch size > 1, partial batch not allowed</td>\n *     <td>At endAddress (max)</td>\n *     <td>Batch size &gt; 1</td>\n *     <td>No (batch overruns end)</td>\n *     <td>Throws NoMoreSecretsAvailableException</td>\n *     <td>Yes</td>\n *     <td><code>createSecrets_endAddressInclusive_butPartialBatchNotAllowed_throwsException</code></td>\n *   </tr>\n *   <tr>\n *     <td>6. Beyond end address</td>\n *     <td>Beyond endAddress</td>\n *     <td>Any</td>\n *     <td>N/A</td>\n *     <td>Throws NoMoreSecretsAvailableException immediately</td>\n *     <td>Yes</td>\n *     <td><code>createSecrets_startExceedsEnd_throwsException</code></td>\n *   </tr>\n *   <tr>\n *     <td>7. End address exactly on batch boundary</td>\n *     <td>At endAddress (max)</td>\n *     <td>Batch size divides range exactly</td>\n *     <td>Yes</td>\n *     <td>Returns all batches fully</td>\n *     <td>No</td>\n *     <td><code>createSecrets_endAddressExactlyAtBatchBoundary_allBatchesValid</code></td>\n *   </tr>\n *   <tr>\n *     <td>8. Partial batch allowed with returnStartSecretOnly=true at end</td>\n *     <td>At endAddress (max)</td>\n *     <td>Batch size &gt; keys remaining</td>\n *     <td>No</td>\n *     <td>Returns single start key without exception</td>\n *     <td>No</td>\n *     <td><code>createSecrets_endAddressInclusive_partialBatchAllowedWithReturnStartOnly_noException</code></td>\n *   </tr>\n *   <tr>\n *     <td>9. Batch larger than keys before end (batchExceedsEnd)</td>\n *     <td>Inside range or start</td>\n *     <td>Batch size &gt; keys remaining</td>\n *     <td>No</td>\n *     <td>Throws NoMoreSecretsAvailableException</td>\n *     <td>Yes</td>\n *     <td><code>createSecrets_batchExceedsEnd_throwsException</code></td>\n *   </tr>\n * </table>\n *\n * <p>Note: When <code>returnStartSecretOnly=true</code>, only the starting key of the batch is returned\n * regardless of batch size, allowing partial batch retrieval without exception.\n */\npublic class KeyProducerJavaIncrementalTest {\n\n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\n\n    private KeyUtility keyUtility;\n    private BitHelper bitHelper;\n    private String startHex;\n    private String endHex;\n    \n    private Logger mockLogger;\n\n    @Before\n    public void setUp() {\n        keyUtility = new KeyUtility(network, byteBufferUtility);\n        bitHelper = new BitHelper();\n        startHex = PublicKeyBytes.MIN_VALID_PRIVATE_KEY_HEX;\n        endHex = \"000000000000000000000000000000000000000000000000000000000000000A\";\n        mockLogger = mock(Logger.class);\n    }\n\n    private KeyProducerJavaIncremental createKeyProducerJavaIncremental(String start, String end) {\n        CKeyProducerJavaIncremental config = new CKeyProducerJavaIncremental();\n        config.startAddress = start;\n        config.endAddress = end;\n        return new KeyProducerJavaIncremental(config, keyUtility, bitHelper, mockLogger);\n    }\n\n    /**\n     * Verifies that when requesting only the start secret, exactly one secret is returned,\n     * regardless of batch size. This is important for scenarios where only the initial key is needed.\n     */\n    @Test\n    public void createSecrets_returnStartSecretOnlyTrue_returnsOneSecret() throws Exception {\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(startHex, endHex);\n        BigInteger[] secrets = producer.createSecrets(5, true);\n        assertThat(secrets.length, is(equalTo(1)));\n        assertThat(secrets[0], is(equalTo(new BigInteger(startHex, BitHelper.RADIX_HEX))));\n    }\n\n    /**\n     * Tests that when requesting a full batch of secrets, the returned array has the requested batch size,\n     * and that the keys are sequential starting from the configured start address.\n     */\n    @Test\n    public void createSecrets_returnStartSecretOnlyFalse_returnsBatchSecrets() throws Exception {\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(startHex, endHex);\n        int batchSize = 5;\n        BigInteger[] secrets = producer.createSecrets(batchSize, false);\n        assertThat(secrets.length, is(equalTo(batchSize)));\n\n        BigInteger expected = new BigInteger(startHex, BitHelper.RADIX_HEX);\n        for (int i = 0; i < batchSize; i++) {\n            assertThat(secrets[i], is(equalTo(expected)));\n            expected = expected.add(BigInteger.ONE);\n        }\n    }\n\n    /**\n     * Ensures that if the start key is greater than the configured end key,\n     * the method immediately throws NoMoreSecretsAvailableException.\n     * This prevents invalid key ranges.\n     */\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_startExceedsEnd_throwsException() throws Exception {\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(\n                \"0000000000000000000000000000000000000000000000000000000000000010\",\n                \"0000000000000000000000000000000000000000000000000000000000000005\"\n        );\n        producer.createSecrets(1, true);\n    }\n\n    /**\n     * Tests that requesting a batch larger than the available keys before the end address\n     * causes a NoMoreSecretsAvailableException to be thrown.\n     */\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_batchExceedsEnd_throwsException() throws Exception {\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(\n                startHex,\n                \"0000000000000000000000000000000000000000000000000000000000000003\"\n        );\n        producer.createSecrets(5, false);\n    }\n\n    /**\n     * Verifies that the internal currentValue advances exactly by the batch size\n     * after each call to createSecrets, ensuring consistent sequential key generation.\n     */\n    @Test\n    public void createSecrets_currentValueAdvancesByBatchSize() throws Exception {\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(startHex, endHex);\n        int batchSize = 3;\n        \n        BigInteger expectedFirstBatchStart = new BigInteger(startHex, BitHelper.RADIX_HEX);\n        \n        BigInteger[] secrets1 = producer.createSecrets(batchSize, false);\n        verifySecrets(secrets1, expectedFirstBatchStart);\n        \n        BigInteger expectedSecondBatchStart = expectedFirstBatchStart.add(BigInteger.valueOf(batchSize));\n        BigInteger[] secrets2 = producer.createSecrets(batchSize, false);\n        verifySecrets(secrets2, expectedSecondBatchStart);\n    }\n    \n    private void verifySecrets(BigInteger[] secrets, BigInteger expectedStart) {\n        for (int i = 0; i < secrets.length; i++) {\n            assertThat(secrets[i], is(equalTo(expectedStart.add(BigInteger.valueOf(i)))));\n        }\n    }\n    \n    /**\n     * Tests the case where the end address is exactly at the boundary of a batch.\n     * Confirms that all batches complete successfully without exceptions.\n     */\n    @Test\n    public void createSecrets_endAddressExactlyAtBatchBoundary_allBatchesValid() throws Exception {\n        // Setup: start=1, end=4 (allowed keys: 1, 2, 3, 4)\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(\n            \"0000000000000000000000000000000000000000000000000000000000000001\",\n            \"0000000000000000000000000000000000000000000000000000000000000004\"\n        );\n        int batchSize = 2;\n\n        // 1st batch: [1, 2]\n        BigInteger[] batch1 = producer.createSecrets(batchSize, false);\n        assertThat(batch1.length, is(equalTo(batchSize)));\n        assertThat(batch1[0], is(equalTo(BigInteger.ONE)));\n        assertThat(batch1[1], is(equalTo(BigInteger.TWO)));\n\n        // 2nd batch: [3, 4]\n        BigInteger[] batch2 = producer.createSecrets(batchSize, false);\n        assertThat(batch2.length, is(equalTo(batchSize)));\n        assertThat(batch2[0], is(equalTo(BigInteger.valueOf(3))));\n        assertThat(batch2[1], is(equalTo(BigInteger.valueOf(4))));\n    }\n    \n    /**\n     * Tests that if a batch would partially exceed the end address, an exception is thrown.\n     * This test confirms partial batches are not allowed when returnStartSecretOnly is false.\n     */\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_threeBatches_twoElementsEach_thirdThrowsException() throws Exception {\n        // Setup: start = 1, end = 5 (allowed keys: 1, 2, 3, 4, 5)\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(\n            \"0000000000000000000000000000000000000000000000000000000000000001\",\n            \"0000000000000000000000000000000000000000000000000000000000000004\"\n        );\n        int batchSize = 2;\n\n        assertTwoBatchedOk(producer, batchSize);\n\n        // 3rd batch: should throw NoMoreSecretsAvailableException because\n        // the next values would be 5 and 6, but 6 exceeds the end address\n        producer.createSecrets(batchSize, false);\n    }\n    \n    /**\n     * Similar to above, but with the end address included.\n     * Demonstrates that partial batches beyond the end are disallowed and cause an exception,\n     * even if the end address itself is technically within the allowed range.\n     */\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_endAddressInclusive_butPartialBatchNotAllowed_throwsException() throws Exception {\n        // Setup: start=1, end=5 (allowed keys: 1, 2, 3, 4, 5)\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(\n            \"0000000000000000000000000000000000000000000000000000000000000001\",\n            \"0000000000000000000000000000000000000000000000000000000000000005\"\n        );\n        int batchSize = 2;\n\n        assertTwoBatchedOk(producer, batchSize);\n\n        // 3rd batch: tries [5, 6], but 6 > end (5), so exception thrown\n        producer.createSecrets(batchSize, false);\n    }\n    \n    /**\n     * Tests that if partial batches are allowed by setting returnStartSecretOnly=true,\n     * the last single key within the range can still be retrieved without exception,\n     * even if a full batch would exceed the end address.\n     */\n    @Test\n    public void createSecrets_endAddressInclusive_partialBatchAllowedWithReturnStartOnly_noException() throws Exception {\n        // Setup: start=1, end=5 (allowed keys: 1, 2, 3, 4, 5)\n        KeyProducerJavaIncremental producer = createKeyProducerJavaIncremental(\n            \"0000000000000000000000000000000000000000000000000000000000000001\",\n            \"0000000000000000000000000000000000000000000000000000000000000005\"\n        );\n        int batchSize = 2;\n\n        assertTwoBatchedOk(producer, batchSize);\n\n        // 3rd batch: returnStartSecretOnly = true, so only start value [5] is returned without exception\n        BigInteger[] batch3 = producer.createSecrets(batchSize, true);\n        assertThat(batch3.length, is(equalTo(1)));\n        assertThat(batch3[0], is(equalTo(BigInteger.valueOf(5))));\n    }\n\n    private void assertTwoBatchedOk(KeyProducerJavaIncremental producer, int batchSize) {\n        try {\n            // 1st batch: [1, 2] – OK\n            BigInteger[] batch1 = producer.createSecrets(batchSize, false);\n            assertThat(batch1.length, is(equalTo(batchSize)));\n            assertThat(batch1[0], is(equalTo(BigInteger.ONE)));\n            assertThat(batch1[1], is(equalTo(BigInteger.TWO)));\n\n            // 2nd batch: [3, 4] – OK\n            BigInteger[] batch2 = producer.createSecrets(batchSize, false);\n            assertThat(batch2.length, is(equalTo(batchSize)));\n            assertThat(batch2[0], is(equalTo(BigInteger.valueOf(3))));\n            assertThat(batch2[1], is(equalTo(BigInteger.valueOf(4))));\n        } catch (NoMoreSecretsAvailableException e) {\n            fail(\"Exception thrown too early: \" + e.getMessage());\n        }\n    }\n}"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaRandomTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport java.math.BigInteger;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.CommonDataProvider;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandom;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandomInstance;\nimport org.bitcoinj.base.Network;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.is;\n\nimport org.jspecify.annotations.Nullable;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport static org.mockito.Mockito.mock;\nimport org.slf4j.Logger;\n\n@RunWith(DataProviderRunner.class)\npublic class KeyProducerJavaRandomTest {\n    \n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n    private final BitHelper bitHelper = new BitHelper();\n    private Logger mockLogger;\n    \n    String keyProducerId = \"exampleId\";\n    \n    @Before\n    public void setUp() {\n        mockLogger = mock(Logger.class);\n    }\n\n    private KeyProducerJavaRandom createKeyProducerJavaRandom(CKeyProducerJavaRandom cKeyProducerJavaRandom) {\n        return new KeyProducerJavaRandom(cKeyProducerJavaRandom, keyUtility, bitHelper, mockLogger);\n    }\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"createStatisticsMessage\">\n    @Test\n    public void createSecrets_parameterBatchSizeInBitsZeroAndReturnStartSecretOnlyTrue_returnExpectedSecrets() throws NoMoreSecretsAvailableException {\n        // arrange\n        CKeyProducerJavaRandom cKeyProducerJavaRandom = new CKeyProducerJavaRandom();\n        cKeyProducerJavaRandom.keyProducerId = keyProducerId;\n        cKeyProducerJavaRandom.keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED;\n        cKeyProducerJavaRandom.customSeed = 0L;\n        cKeyProducerJavaRandom.privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\n        \n        KeyProducerJavaRandom keyProducerJavaRandom = createKeyProducerJavaRandom(cKeyProducerJavaRandom);\n        \n        int overallWorkSize = bitHelper.convertBitsToSize(0);\n        \n        // act\n        BigInteger[] result = keyProducerJavaRandom.createSecrets(overallWorkSize, true);\n        \n        // assert\n        assertThat(result.length, is(equalTo(1)));\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX, location = CommonDataProvider.class)\n    public void createSecrets_parameterBatchSizeInBitsFromDataProviderAndReturnStartSecretOnlyTrue_returnExpectedSecrets(int batchSizeInBits) throws NoMoreSecretsAvailableException {\n        // arrange\n        CKeyProducerJavaRandom cKeyProducerJavaRandom = new CKeyProducerJavaRandom();\n        cKeyProducerJavaRandom.keyProducerId = keyProducerId;\n        cKeyProducerJavaRandom.keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED;\n        cKeyProducerJavaRandom.customSeed = 0L;\n        cKeyProducerJavaRandom.privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\n        \n        KeyProducerJavaRandom keyProducerJavaRandom = createKeyProducerJavaRandom(cKeyProducerJavaRandom);\n        \n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\n        \n        // act\n        BigInteger[] result = keyProducerJavaRandom.createSecrets(overallWorkSize, true);\n        \n        // assert\n        assertThat(result.length, is(equalTo(1)));\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_BIT_SIZES_AT_MOST_MAX, location = CommonDataProvider.class)\n    public void createSecrets_parameterBatchSizeInBitsFromDataProviderAndReturnStartSecretOnlyFalse_returnExpectedSecrets(int batchSizeInBits) throws NoMoreSecretsAvailableException {\n        // arrange\n        CKeyProducerJavaRandom cKeyProducerJavaRandom = new CKeyProducerJavaRandom();\n        cKeyProducerJavaRandom.keyProducerId = keyProducerId;\n        cKeyProducerJavaRandom.keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED;\n        cKeyProducerJavaRandom.customSeed = 0L;\n        cKeyProducerJavaRandom.privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\n                \n        KeyProducerJavaRandom keyProducerJavaRandom = createKeyProducerJavaRandom(cKeyProducerJavaRandom);\n        \n        int overallWorkSize = bitHelper.convertBitsToSize(batchSizeInBits);\n        \n        // act\n        BigInteger[] result = keyProducerJavaRandom.createSecrets(overallWorkSize, false);\n        \n        // assert\n        assertThat(result.length, is(equalTo(bitHelper.convertBitsToSize(batchSizeInBits))));\n    }\n    // </editor-fold>\n    \n    // <editor-fold defaultstate=\"collapsed\" desc=\"testAllRNGs\">\n    private BigInteger[] generateSecrets(CKeyProducerJavaRandomInstance instance, @Nullable Long customSeed) throws NoMoreSecretsAvailableException {\n        CKeyProducerJavaRandom config = new CKeyProducerJavaRandom();\n        config.keyProducerId = keyProducerId;\n        config.keyProducerJavaRandomInstance = instance;\n        config.customSeed = customSeed;\n        config.privateKeyMaxNumBits = PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS;\n        KeyProducerJavaRandom producer = createKeyProducerJavaRandom(config);\n        return producer.createSecrets(bitHelper.convertBitsToSize(0), true);\n    }\n\n    @Test\n    public void testSecureRandom() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets(CKeyProducerJavaRandomInstance.SECURE_RANDOM, null);\n        assertThat(result.length, is(equalTo(1)));\n    }\n\n    @Test\n    public void testRandomSeedCurrentTimeMillis() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets(CKeyProducerJavaRandomInstance.RANDOM_CURRENT_TIME_MILLIS_SEED, null);\n        assertThat(result.length, is(equalTo(1)));\n    }\n\n    @Test\n    public void testRandomCustomSeed_default() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets(CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED, null);\n        assertThat(result.length, is(equalTo(1)));\n    }\n\n    @Test\n    public void testRandomCustomSeed_fixed() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets(CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED, 123456789L);\n        assertThat(result.length, is(equalTo(1)));\n    }\n\n    @Test\n    public void testSha1Prng_default() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets(CKeyProducerJavaRandomInstance.SHA1_PRNG, null);\n        assertThat(result.length, is(equalTo(1)));\n    }\n\n    @Test\n    public void testSha1Prng_fixed() throws NoMoreSecretsAvailableException {\n        BigInteger[] result = generateSecrets(CKeyProducerJavaRandomInstance.SHA1_PRNG, 987654321L);\n        assertThat(result.length, is(equalTo(1)));\n    }\n    // </editor-fold>\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaSocketTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport java.io.DataInputStream;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaSocket;\nimport org.jspecify.annotations.Nullable;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.io.DataOutputStream;\nimport java.io.IOException;\nimport java.math.BigInteger;\nimport java.net.ServerSocket;\nimport java.net.Socket;\nimport java.net.SocketTimeoutException;\nimport java.util.concurrent.*;\nimport java.util.concurrent.atomic.AtomicInteger;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport org.bitcoinj.base.Network;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\nimport org.junit.runner.RunWith;\nimport static org.junit.Assert.fail;\nimport static org.junit.Assert.assertTrue;\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNotEquals;\nimport static org.mockito.Mockito.*;\nimport org.slf4j.Logger;\n\n@RunWith(DataProviderRunner.class)\npublic class KeyProducerJavaSocketTest {\n    \n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n    private final BitHelper bitHelper = new BitHelper();\n\n    private ExecutorService executorService;\n    private Logger mockLogger;\n    \n    public static int findFreePort() {\n        try (ServerSocket socket = new ServerSocket(0)) {\n            return socket.getLocalPort();\n        } catch (IOException e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    @Before\n    public void setup() {\n        executorService = Executors.newCachedThreadPool();\n        mockLogger = mock(Logger.class);\n    }\n\n    @After\n    public void teardown() {\n        executorService.shutdownNow();\n    }\n\n    private CKeyProducerJavaSocket createServerConfig(int port) {\n        CKeyProducerJavaSocket config = new CKeyProducerJavaSocket();\n        config.mode = CKeyProducerJavaSocket.Mode.SERVER;\n        config.port = port;\n        return config;\n    }\n\n    private CKeyProducerJavaSocket createClientConfig(String host, int port) {\n        CKeyProducerJavaSocket config = new CKeyProducerJavaSocket();\n        config.mode = CKeyProducerJavaSocket.Mode.CLIENT;\n        config.host = host;\n        config.port = port;\n        return config;\n    }\n    \n    @Test\n    public void testServerReadsSecretWithoutReset() throws Exception {\n        int port = findFreePort();\n        CountDownLatch serverStarted = new CountDownLatch(1);\n\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (ServerSocket serverSocket = new ServerSocket(port)) {\n                serverStarted.countDown(); // only now signal ready\n                try (Socket socket = serverSocket.accept();\n                     DataInputStream in = new DataInputStream(socket.getInputStream())) {\n\n                    byte[] buffer = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\n                    in.readFully(buffer); // exactly 32 bytes\n                }\n            }\n            return null;\n        });\n\n        serverStarted.await(); // wait for real readiness\n\n        try (Socket clientSocket = new Socket(\"localhost\", port);\n             DataOutputStream out = new DataOutputStream(clientSocket.getOutputStream())) {\n\n            byte[] secret = new KeyProducerTestUtility().createZeroedSecret();\n            out.write(secret);\n            out.flush();\n        }\n\n        serverFuture.get(TestTimeProvider.DEFAULT_SOCKET_TIMEOUT, TimeUnit.MILLISECONDS);\n    }\n\n    @Test\n    public void openCloseConnection_serverMode_success() throws Exception {\n        int port = findFreePort();\n        CountDownLatch serverReadyLatch = new CountDownLatch(1);\n\n        // Set up server\n        CKeyProducerJavaSocket serverConfig = createServerConfig(port);\n        serverConfig.timeout = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;\n        serverConfig.readRetryCount = TestTimeProvider.DEFAULT_RETRY_COUNT;\n        serverConfig.connectionRetryCount = TestTimeProvider.DEFAULT_CONNECTION_RETRY_COUNT;\n        serverConfig.retryDelayMillisConnect = TestTimeProvider.SHORT_DELAY;\n        serverConfig.retryDelayMillisRead = TestTimeProvider.SHORT_DELAY;\n        KeyProducerJavaSocket serverKeyProducer = new KeyProducerJavaSocket(serverConfig, keyUtility, bitHelper, mockLogger);\n\n        // Server thread: start createSecrets(1, true)\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try {\n                serverReadyLatch.countDown(); // Signal readiness\n                serverKeyProducer.createSecrets(1, true); // Reads 32 bytes, then exits\n            } catch (NoMoreSecretsAvailableException e) {\n                fail(\"Server failed to read secret: \" + e.getMessage());\n            }\n            return null;\n        });\n\n        // Wait until server is accepting\n        serverReadyLatch.await();\n        waitUntilPortOpen(TestTimeProvider.DEFAULT_ESTABLISH_DELAY);\n\n        // Client: connect and send exactly 1 secret\n        try (Socket clientSocket = new Socket(serverConfig.host, serverConfig.port);\n             DataOutputStream out = new DataOutputStream(clientSocket.getOutputStream())) {\n            byte[] secret = new KeyProducerTestUtility().createZeroedSecret();\n            out.write(secret);\n            out.flush();\n            // Wait briefly to let server finish reading\n            Thread.sleep(TestTimeProvider.SHORT_DELAY);\n        }\n\n        // Wait for server to complete\n        serverFuture.get(TestTimeProvider.DEFAULT_SOCKET_TIMEOUT, TimeUnit.MILLISECONDS);\n        serverKeyProducer.interrupt();\n    }\n    \n    private void waitUntilPortOpen(int timeoutMillis) throws Exception {\n        Thread.sleep(timeoutMillis);\n    }\n\n    @Test\n    public void openCloseConnection_serverClient_success() throws Exception {\n        int port = findFreePort();\n\n        // Start server thread that accepts connection but does nothing\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket s = serverSocket.accept()) {\n                // Just accept and hold open\n                Thread.sleep(TestTimeProvider.DEFAULT_TIMEOUT);\n            }\n            return null;\n        });\n\n        // Client config to connect\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        // Open connection implicitly on createSecrets call with length=1 and returnStartSecretOnly true (1 secret)\n        try {\n            client.createSecrets(1, true);\n        } catch (NoMoreSecretsAvailableException e) {\n            // Expect failure because server sends no bytes - but at least connection opened\n            assertThat(e.getMessage(), containsString(\"Timeout while waiting for secret\"));\n        }\n\n        cleanup(client, serverFuture, serverSocket);\n    }\n\n    @Test\n    public void createSecrets_success_readsExpectedBigInteger() throws Exception {\n        int port = findFreePort();\n\n        // The secret bytes to send (32 bytes = 256 bits)\n        byte[] secretBytes = new KeyProducerTestUtility().createFilledSecret((byte)0xCC);\n        BigInteger expected = new BigInteger(1, secretBytes);\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket clientSocket = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(clientSocket.getOutputStream())) {\n                // Send exactly one private key (32 bytes)\n                dos.write(secretBytes);\n                dos.flush();\n                // Keep socket open a bit\n                Thread.sleep(TestTimeProvider.SHORT_DELAY);\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        BigInteger[] secrets = client.createSecrets(1, true);\n\n        assertThat(secrets.length, is(1));\n        assertThat(secrets[0], is(equalTo(expected)));\n\n        cleanup(client, serverFuture, serverSocket);\n    }\n\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_prematureStreamClose_throwsException() throws Exception {\n        int port = findFreePort();\n\n        // Server sends fewer bytes than required (e.g. 10 bytes instead of 32)\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket clientSocket = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(clientSocket.getOutputStream())) {\n                dos.write(new byte[10]); // insufficient bytes\n                dos.flush();\n                // Close immediately\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        try {\n            client.createSecrets(1, true);\n        } finally {\n            cleanup(client, serverFuture, serverSocket);\n        }\n    }\n    \n    @Test\n    public void interrupt_closesConnectionAndNoExceptionThrown() throws Exception {\n        int port = findFreePort();\n\n        final int serverHoldTime = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;                  // ms - server keeps connection open without sending data\n        final int clientSocketTimeout = TestTimeProvider.LONG_SOCKET_TIMEOUT;                // ms - socket read timeout (should never be hit due to interrupt)\n        final int clientSettleTime = TestTimeProvider.DEFAULT_SETTLE_DELAY;                  // ms - allow client to enter blocking read\n        final int futureWaitTime = clientSocketTimeout;                                      // ms - how long we wait for the future to complete\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket clientSocket = serverSocket.accept()) {\n                // simulate a hanging server that does not respond\n                Thread.sleep(serverHoldTime);\n            }\n            return null;\n        });\n\n        // Configure client socket with read timeout\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        clientConfig.timeout = clientSocketTimeout;\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        // Launch a thread that will block on reading secrets\n        Future<BigInteger[]> future = executorService.submit(() -> {\n            try {\n                return client.createSecrets(10, false);  // blocks until secret data or interruption\n            } catch (NoMoreSecretsAvailableException e) {\n                return null;\n            }\n        });\n\n        Thread.sleep(clientSettleTime); // Give time to enter read state\n        client.interrupt();             // Should trigger socket close and exit read\n\n        // Wait for the client thread to exit cleanly\n        BigInteger[] result = future.get(futureWaitTime, TimeUnit.MILLISECONDS);\n        assertThat(\"Future should return null after interrupt\", result, nullValue());\n\n        // Final cleanup\n        cleanup(client, serverFuture, serverSocket, clientSocketTimeout, TimeUnit.MILLISECONDS);\n    }\n\n    @Test\n    public void createSecrets_afterClose_reconnectsAndReadsSuccessfully() throws Exception {\n        int port = findFreePort();\n\n        // Server that sends a single valid secret\n        ServerSocket serverSocket = new ServerSocket(port);\n\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket s = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                byte[] secretBytes = new KeyProducerTestUtility().createZeroedSecret();\n                dos.write(secretBytes);\n                dos.flush();\n                Thread.sleep(100); // keep open shortly\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        // Successful read\n        BigInteger[] secrets1 = client.createSecrets(1, true);\n        assertThat(secrets1.length, is(1));\n        \n        byte expectedByte1 = 1;\n        for (byte b : secrets1[0].toByteArray()) {\n            // Just check one byte, overall logic assumes full byte array match\n            assertThat(b, is(notNullValue()));\n        }\n\n        // Close client forcibly (simulate socket closed)\n        client.interrupt();\n\n        // Try reuse and expect specific exception\n        try {\n            client.createSecrets(1, true);\n            fail(\"Expected NoMoreSecretsAvailableException due to reuse after close\");\n        } catch (NoMoreSecretsAvailableException e) {\n            assertThat(e.getMessage(), containsString(\"Interrupted\"));\n        }\n\n        cleanup(client, serverFuture, serverSocket);\n    }\n\n    @Test\n    public void createSecrets_multipleSequentialCalls_readsAllSuccessfully() throws Exception {\n        int port = findFreePort();\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket s = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                for (int i = 0; i < 3; i++) {\n                    byte[] secretBytes = new KeyProducerTestUtility().createFilledSecret((byte) (i + 10));\n                    dos.write(secretBytes);\n                    dos.flush();\n                    Thread.sleep(TestTimeProvider.SHORT_DELAY);\n                }\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        for (int i = 0; i < 3; i++) {\n            BigInteger[] secrets = client.createSecrets(1, true);\n            assertThat(secrets.length, is(1));\n            byte expectedByte = (byte) (i + 10);\n            assertThat(secrets[0].toByteArray()[secrets[0].toByteArray().length - 1], is(equalTo(expectedByte)));\n        }\n\n        cleanup(client, serverFuture, serverSocket);\n    }\n\n    @Test\n    public void createSecrets_connectionRetry_worksWhenServerStartsLate() throws Exception {\n        int port = findFreePort();\n        \n        final byte fillByte = (byte)99;\n\n        // Server that only starts after a delay (simulate late server start)\n        Future<Void> serverFuture = executorService.submit(() -> {\n            Thread.sleep(TestTimeProvider.DEFAULT_SOCKET_TIMEOUT); // Delay start by 2 seconds\n            try (ServerSocket serverSocket = new ServerSocket(port);\n                 Socket s = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                byte[] secretBytes = new KeyProducerTestUtility().createFilledSecret(fillByte);\n                dos.write(secretBytes);\n                dos.flush();\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        clientConfig.connectionRetryCount = TestTimeProvider.DEFAULT_CONNECTION_RETRY_COUNT;\n        clientConfig.retryDelayMillisConnect = TestTimeProvider.DEFAULT_RETRY_DELAY;\n        clientConfig.timeout = TestTimeProvider.LONG_SOCKET_TIMEOUT;\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        // This will retry internally until server comes up\n        Thread.sleep(TestTimeProvider.DEFAULT_SETTLE_DELAY);  // allow background thread time to connect and read\n        BigInteger[] secrets = client.createSecrets(1, true);\n\n        assertThat(secrets.length, is(1));\n        new KeyProducerTestUtility().assertFilledSecret(secrets[0], fillByte);\n\n        cleanup(client, serverFuture, null, 3, TimeUnit.SECONDS);\n    }\n\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_socketClosedMidRead_throwsException() throws Exception {\n        int port = findFreePort();\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket s = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                // Write partial bytes, then close abruptly\n                dos.write(new byte[10]); // Less than 32 bytes\n                dos.flush();\n                s.close();\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        try {\n            client.createSecrets(1, true);\n        } finally {\n            cleanup(client, serverFuture, serverSocket);\n        }\n    }\n    \n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_serverDisconnectsMidTransfer_throwsException() throws Exception {\n        int port = findFreePort();\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket s = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                dos.write(new byte[16]); // only half of a secret (32 bytes)\n                dos.flush();\n                s.close();\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        try {\n            client.createSecrets(1, true);\n        } finally {\n            cleanup(client, serverFuture, serverSocket);\n        }\n    }\n\n    @Test\n    public void createSecrets_zeroSecretsRequested_returnsEmptyArray() throws Exception {\n        int port = findFreePort();\n\n        // Server never sends anything, shouldn't matter\n        ServerSocket serverSocket = new ServerSocket(port);\n        serverSocket.setSoTimeout(TestTimeProvider.SOCKET_ACCEPT_TIMEOUT);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try {\n                try (Socket ignored = serverSocket.accept()) {\n                    // No-op\n                }\n            } catch (SocketTimeoutException ignored) {\n                // Accept timed out - expected when client does not connect\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        BigInteger[] secrets = client.createSecrets(0, false);\n        assertThat(secrets.length, is(0));\n\n        cleanup(client, serverFuture, serverSocket);\n    }\n\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_malformedSecretStream_throwsException() throws Exception {\n        int port = findFreePort();\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        Future<Void> serverFuture = executorService.submit(() -> {\n            try (Socket s = serverSocket.accept();\n                 DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                // Send 40 bytes which cannot be split into two full 32-byte secrets\n                dos.write(new byte[40]);\n                dos.flush();\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        try {\n            client.createSecrets(2, false);\n        } finally {\n            cleanup(client, serverFuture, serverSocket);\n        }\n    }\n    \n    @Test\n    public void testReadRetriesAndCloseCalledOnceMaxReached() throws Exception {\n        int port = findFreePort();\n        AtomicInteger connectionAttempts = new AtomicInteger(0);\n\n        ServerSocket serverSocket = new ServerSocket(port);\n        serverSocket.setSoTimeout(TestTimeProvider.SOCKET_ACCEPT_TIMEOUT);\n\n        // Server: accepts but sends too few bytes (always triggers IOException)\n        Future<Void> serverFuture = executorService.submit(() -> {\n            for (int i = 0; i < 3; i++) { // allow up to 3 connections\n                try (Socket s = serverSocket.accept();\n                     DataOutputStream dos = new DataOutputStream(s.getOutputStream())) {\n                    connectionAttempts.incrementAndGet();\n                    dos.write(new byte[10]);  // too few bytes (less than 32)\n                    dos.flush();\n                    Thread.sleep(50);  // simulate partial send delay\n                    s.close();  // force premature closure\n                } catch (SocketTimeoutException timeout) {\n                    break; // no more clients, exit early\n                }\n            }\n            return null;\n        });\n\n        CKeyProducerJavaSocket clientConfig = createClientConfig(\"localhost\", port);\n        clientConfig.readRetryCount = TestTimeProvider.DEFAULT_RETRY_COUNT;\n        clientConfig.retryDelayMillisRead = TestTimeProvider.SHORT_DELAY;\n        clientConfig.timeout = TestTimeProvider.SOCKET_ACCEPT_TIMEOUT;\n\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(clientConfig, keyUtility, bitHelper, mockLogger);\n\n        try {\n            client.createSecrets(1, true);\n            fail(\"Expected NoMoreSecretsAvailableException\");\n        } catch (NoMoreSecretsAvailableException e) {\n            assertThat(e.getMessage(), containsString(\"Timeout while waiting for secret\"));\n        }\n\n        // We expect only one connection attempt, even after retries, because the socket is reused\n        // unless IOException forces reconnection (your logic determines this)\n        assertThat(\"Expected one connection for all retries\", connectionAttempts.get(), is(1));\n\n        // Wait longer in case of multiple connection retries / socket handshakes\n        cleanup(client, serverFuture, serverSocket, 5, TimeUnit.SECONDS);\n    }\n    \n    private ServerSocket hangServer(int port) throws IOException {\n        ServerSocket serverSocket = new ServerSocket(port);\n        new Thread(() -> {\n            try {\n                Socket client = serverSocket.accept();\n                // Do nothing, just hang the connection\n                Thread.sleep(Long.MAX_VALUE);\n            } catch (Exception ignored) {}\n        }).start();\n        return serverSocket;\n    }\n    \n    @Test(timeout = 5000)\n    public void testInterruptCausesShutdownDuringConnectionAttemptOnly() throws Exception {\n        final int STATE_UNEXPECTED_SUCCESS = -1;\n        final int STATE_UNKNOWN = 0;\n        final int STATE_ENTERED = 1;\n        final int STATE_INTERRUPT_TRIGGERED = 2;\n        final int STATE_INTERRUPTED_EXIT = 3;\n        final int STATE_NATURAL_EXIT = 4;\n\n        int port = findFreePort();\n        ServerSocket dummyServer = hangServer(port);  // <-- make sure something accepts\n\n        CKeyProducerJavaSocket config = createClientConfig(\"localhost\", port);\n        config.connectionRetryCount = 3;\n        config.timeout = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT; // make connection attempt long enough to interrupt mid-way\n        config.retryDelayMillisConnect = 0;\n\n        KeyProducerJavaSocket client = new KeyProducerJavaSocket(config, keyUtility, bitHelper, mockLogger);\n\n        ExecutorService executor = Executors.newSingleThreadExecutor();\n        AtomicInteger state = new AtomicInteger(STATE_UNKNOWN);\n\n        Future<?> future = executor.submit(() -> {\n            state.set(STATE_ENTERED); // entered createSecrets\n            try {\n                client.createSecrets(1, true);\n                state.set(STATE_UNEXPECTED_SUCCESS); // no exception, test failed\n            } catch (NoMoreSecretsAvailableException e) {\n                if (state.get() == STATE_INTERRUPT_TRIGGERED) {\n                    state.set(STATE_INTERRUPTED_EXIT); // interrupted before exception\n                } else {\n                    state.set(STATE_NATURAL_EXIT); // exception came naturally without interrupt\n                }\n            }\n        });\n\n        // wait to allow connect() to begin (must be < timeout)\n        Thread.sleep(TestTimeProvider.DEFAULT_SETTLE_DELAY);\n        state.set(STATE_INTERRUPT_TRIGGERED); // interrupt about to happen\n        client.interrupt();\n\n        future.get(3, TimeUnit.SECONDS);\n        executor.shutdownNow();\n        \n        assertNotEquals(\"Thread exited without triggering interrupt\", STATE_UNEXPECTED_SUCCESS, state.get());\n        assertEquals(\"Expected interrupt to cause shutdown\", STATE_INTERRUPTED_EXIT, state.get());\n    }\n    \n    @Test(timeout = 5000)\n    public void serverAcceptTimesOut_whenNoClientConnects() throws Exception {\n        int port = findFreePort();\n\n        CKeyProducerJavaSocket config = createServerConfig(port);\n        config.timeout = TestTimeProvider.SOCKET_ACCEPT_TIMEOUT;\n        config.connectionRetryCount = 1;\n        config.retryDelayMillisConnect = 0;\n\n        KeyProducerJavaSocket server = new KeyProducerJavaSocket(config, keyUtility, bitHelper, mockLogger);\n\n        long start = System.currentTimeMillis();\n\n        try {\n            server.createSecrets(1, true);\n            fail(\"Expected NoMoreSecretsAvailableException due to accept timeout\");\n        } catch (NoMoreSecretsAvailableException e) {\n            long duration = System.currentTimeMillis() - start;\n            // Timeout must be honored within reasonable margin (±200ms)\n            assertTrue(\"Timeout did not occur as expected\", duration >= TestTimeProvider.SOCKET_ACCEPT_TIMEOUT && duration <= TestTimeProvider.SOCKET_ACCEPT_TIMEOUT + 200);\n            assertThat(e.getMessage(), containsString(\"Timeout while waiting for secret\"));\n        } finally {\n            server.interrupt();\n        }\n    }\n    \n    private void cleanup(@Nullable KeyProducerJavaSocket client, @Nullable Future<?> serverFuture, @Nullable ServerSocket serverSocket) throws Exception {\n        cleanup(client, serverFuture, serverSocket, TestTimeProvider.DEFAULT_SOCKET_TIMEOUT, TimeUnit.MILLISECONDS);\n    }\n    \n    private void cleanup(@Nullable KeyProducerJavaSocket client, @Nullable Future<?> serverFuture, @Nullable ServerSocket serverSocket, long timeout, TimeUnit unit) throws Exception {\n        if (client != null) client.interrupt();\n        if (serverFuture != null) serverFuture.get(timeout, unit);\n        if (serverSocket != null && !serverSocket.isClosed()) serverSocket.close();\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport com.tngtech.java.junit.dataprovider.DataProviderRunner;\nimport com.tngtech.java.junit.dataprovider.UseDataProvider;\nimport java.io.IOException;\n\nimport net.ladenthin.bitcoinaddressfinder.*;\n\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJava;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaBip39;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaIncremental;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandom;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaRandomInstance;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaSocket;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaWebSocket;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaZmq;\nimport static org.junit.Assert.fail;\n\nimport org.bitcoinj.base.Network;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport static org.mockito.Mockito.mock;\nimport org.slf4j.Logger;\n\n@RunWith(DataProviderRunner.class)\npublic class KeyProducerJavaTest {\n    \n    /**\n     * A timeout is required to ensure the producer can terminate.\n     * Without it, the producer may block indefinitely while waiting for keys.\n     */\n    public final static int TIMEOUT_FOR_TERMINATE = 3_000;\n    \n    private KeyUtility keyUtility;\n    private BitHelper bitHelper;\n    private Logger mockLogger;\n\n    private final Network network = new NetworkParameterFactory().getNetwork();\n    \n    @Before\n    public void setUp() {\n        keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n        bitHelper = new BitHelper();\n        mockLogger = mock(Logger.class);\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_JAVA_KEY_PRODUCER_AND_BIT_SIZE, location = CommonDataProvider.class)\n    public void createSecrets_throwsException_whenWorkSizeExceedsMax(CommonDataProvider.KeyProducerTypesLocal keyProducerType, int bits) throws IOException, InterruptedException {\n        // arrange\n        final int maxWorkSize = 1 << bits; // 2^bits\n        KeyProducerJava keyProducer = createKeyProducer(keyProducerType, maxWorkSize);\n        \n        // act, assert\n        assertWorkSizeTooLargeThrows(keyProducer, maxWorkSize + 1);\n    }\n    \n    @Test\n    @UseDataProvider(value = CommonDataProvider.DATA_PROVIDER_KEY_PRODUCER_TYPES, location = CommonDataProvider.class)\n    public void createSecrets_throwsException_whenWorkSizeTooLess(CommonDataProvider.KeyProducerTypesLocal keyProducerType) throws IOException, InterruptedException {\n        // arrange\n        KeyProducerJava keyProducer = createKeyProducer(keyProducerType, 1);\n        \n        // act\n        \n        // act, assert\n        assertWorkSizeTooLessThrows(keyProducer);\n    }\n\n    public KeyProducerJava createKeyProducer(CommonDataProvider.KeyProducerTypesLocal keyProducerType, final int maxWorkSize) throws IllegalArgumentException {\n        final String keyProducerId = \"id\";\n        final KeyProducerJava keyProducer;\n        switch (keyProducerType) {\n            case KeyProducerJavaRandom:\n                CKeyProducerJavaRandom configureKeyProducerJavaRandom = configureKeyProducerJavaRandom(keyProducerId, maxWorkSize);\n                keyProducer = new KeyProducerJavaRandom(configureKeyProducerJavaRandom, keyUtility, bitHelper, mockLogger);\n                break;\n            case KeyProducerJavaIncremental:\n                CKeyProducerJavaIncremental configureKeyProducerJavaIncremental = configureKeyProducerJavaIncremental(keyProducerId, maxWorkSize);\n                keyProducer = new KeyProducerJavaIncremental(configureKeyProducerJavaIncremental, keyUtility, bitHelper, mockLogger);\n                break;\n            case KeyProducerJavaBip39:\n                CKeyProducerJavaBip39 configureKeyProducerJavaBip39 = configureKeyProducerJavaBip39(keyProducerId, maxWorkSize);\n                keyProducer = new KeyProducerJavaBip39(configureKeyProducerJavaBip39, keyUtility, bitHelper, mockLogger);\n                break;\n            case KeyProducerJavaSocket:\n                CKeyProducerJavaSocket configureKeyProducerJavaSocket = configureKeyProducerJavaSocket(keyProducerId, maxWorkSize);\n                keyProducer = new KeyProducerJavaSocket(configureKeyProducerJavaSocket, keyUtility, bitHelper, mockLogger);\n                break;\n            case KeyProducerJavaWebSocket:\n                CKeyProducerJavaWebSocket configureKeyProducerJavaWebSocket = configureKeyProducerJavaWebSocket(keyProducerId, maxWorkSize);\n                keyProducer = new KeyProducerJavaWebSocket(configureKeyProducerJavaWebSocket, keyUtility, bitHelper, mockLogger);\n                break;\n            case KeyProducerJavaZmq:\n                CKeyProducerJavaZmq configureKeyProducerJavaZmq = configureKeyProducerJavaZmq(keyProducerId, maxWorkSize);\n                keyProducer = new KeyProducerJavaZmq(configureKeyProducerJavaZmq, keyUtility, bitHelper, mockLogger);\n                break;\n            default:\n                throw new IllegalArgumentException(\"Unknown KeyProducerType: \" + keyProducerType);\n        }\n        return keyProducer;\n    }\n    \n    public static <T extends CKeyProducerJava> void assertWorkSizeTooLargeThrows(\n        KeyProducerJava<T> producer, int requestedSize\n    ) {\n        try {\n            producer.createSecrets(requestedSize, false);\n            fail(\"Expected NoMoreSecretsAvailableException for oversized work size\");\n        } catch (IllegalArgumentException e) {\n            // expected\n        }\n    }\n    \n    public static <T extends CKeyProducerJava> void assertWorkSizeTooLessThrows(\n        KeyProducerJava<T> producer\n    ) {\n        try {\n            producer.createSecrets(-1, false);\n            fail(\"Expected NoMoreSecretsAvailableException for oversized work size\");\n        } catch (IllegalArgumentException e) {\n            // expected\n        }\n    }\n    \n    private CKeyProducerJavaRandom configureKeyProducerJavaRandom(String keyProducerId, int maxWorkSize) {\n        CKeyProducerJavaRandom cKeyProducerJavaRandom = new CKeyProducerJavaRandom();\n        cKeyProducerJavaRandom.keyProducerId = keyProducerId;\n        cKeyProducerJavaRandom.keyProducerJavaRandomInstance = CKeyProducerJavaRandomInstance.RANDOM_CUSTOM_SEED;\n        cKeyProducerJavaRandom.customSeed = 0L;\n        cKeyProducerJavaRandom.maxWorkSize = maxWorkSize;\n        return cKeyProducerJavaRandom;\n    }\n    \n    private CKeyProducerJavaIncremental configureKeyProducerJavaIncremental(String keyProducerId, int maxWorkSize) {\n        CKeyProducerJavaIncremental incremental = new CKeyProducerJavaIncremental();\n        incremental.keyProducerId = keyProducerId;\n        incremental.maxWorkSize = maxWorkSize;\n        return incremental;\n    }\n    \n    private CKeyProducerJavaBip39 configureKeyProducerJavaBip39(String keyProducerId, int maxWorkSize) {\n        CKeyProducerJavaBip39 bip39 = new CKeyProducerJavaBip39();\n        bip39.keyProducerId = keyProducerId;\n        bip39.mnemonic = CKeyProducerJavaBip39.DEFAULT_MNEMONIC;\n        bip39.maxWorkSize = maxWorkSize;\n        return bip39;\n    }\n    \n    private CKeyProducerJavaSocket configureKeyProducerJavaSocket(String keyProducerId, int maxWorkSize) {\n        CKeyProducerJavaSocket socket = new CKeyProducerJavaSocket();\n        socket.port = KeyProducerJavaSocketTest.findFreePort();\n        socket.timeout = TIMEOUT_FOR_TERMINATE;\n        socket.keyProducerId = keyProducerId;\n        socket.maxWorkSize = maxWorkSize;\n        return socket;\n    }\n    \n    private CKeyProducerJavaWebSocket configureKeyProducerJavaWebSocket(String keyProducerId, int maxWorkSize) {\n        CKeyProducerJavaWebSocket webSocket = new CKeyProducerJavaWebSocket();\n        webSocket.port = KeyProducerJavaSocketTest.findFreePort();\n        webSocket.timeout = TIMEOUT_FOR_TERMINATE;\n        webSocket.keyProducerId = keyProducerId;\n        webSocket.maxWorkSize = maxWorkSize;\n        return webSocket;\n    }\n    \n    private CKeyProducerJavaZmq configureKeyProducerJavaZmq(String keyProducerId, int maxWorkSize) {\n        CKeyProducerJavaZmq zmq = new CKeyProducerJavaZmq();\n        zmq.address = KeyProducerJavaZmqTest.findFreeZmqAddress();\n        zmq.timeout = TIMEOUT_FOR_TERMINATE;\n        zmq.keyProducerId = keyProducerId;\n        zmq.maxWorkSize = maxWorkSize;\n        return zmq;\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaWebSocketTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaWebSocket;\nimport org.bitcoinj.base.Network;\nimport org.java_websocket.client.WebSocketClient;\nimport org.java_websocket.handshake.ServerHandshake;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.slf4j.Logger;\n\nimport java.math.BigInteger;\nimport java.net.URI;\nimport java.util.concurrent.*;\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\nimport static org.mockito.Mockito.mock;\n\npublic class KeyProducerJavaWebSocketTest {\n\n    private KeyUtility keyUtility;\n    private BitHelper bitHelper;\n    private Logger mockLogger;\n\n    private ExecutorService executorService;\n\n    @Before\n    public void setUp() {\n        Network network = new NetworkParameterFactory().getNetwork();\n        keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n        bitHelper = new BitHelper();\n        mockLogger = mock(Logger.class);\n        executorService = Executors.newCachedThreadPool();\n    }\n\n    @After\n    public void tearDown() {\n        executorService.shutdownNow();\n    }\n\n    private CKeyProducerJavaWebSocket createConfig() {\n        CKeyProducerJavaWebSocket config = new CKeyProducerJavaWebSocket();\n        config.port = KeyProducerJavaSocketTest.findFreePort();\n        config.timeout = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;\n        return config;\n    }\n\n    @Test\n    public void createSecrets_receivesValidSecret() throws Exception {\n        CKeyProducerJavaWebSocket config = createConfig();\n        KeyProducerJavaWebSocket producer = new KeyProducerJavaWebSocket(config, keyUtility, bitHelper, mockLogger);\n\n        // WebSocket client to send a valid 32-byte secret\n        byte[] secret = new KeyProducerTestUtility().createZeroedSecret();\n        BigInteger expected = new BigInteger(1, secret);\n\n        CountDownLatch connected = new CountDownLatch(1);\n\n        WebSocketClient client = new WebSocketClient(new URI(\"ws://localhost:\" + config.port)) {\n            @Override public void onOpen(ServerHandshake handshakedata) { connected.countDown(); }\n            @Override public void onMessage(String message) {}\n            @Override public void onClose(int code, String reason, boolean remote) {}\n            @Override public void onError(Exception ex) { ex.printStackTrace(); }\n        };\n\n        client.connectBlocking();\n        connected.await(TestTimeProvider.DEFAULT_SOCKET_TIMEOUT, TestTimeProvider.TIME_UNIT);\n\n        client.send(secret);\n\n        BigInteger[] secrets = producer.createSecrets(1, true);\n        assertThat(secrets.length, is(1));\n        assertThat(secrets[0], is(expected));\n\n        producer.interrupt();\n        client.close();\n    }\n\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_timeoutWithoutMessage_throwsException() throws Exception {\n        CKeyProducerJavaWebSocket config = createConfig();\n        config.timeout = TestTimeProvider.DEFAULT_TIMEOUT;\n        KeyProducerJavaWebSocket producer = new KeyProducerJavaWebSocket(config, keyUtility, bitHelper, mockLogger);\n\n        producer.createSecrets(1, true);\n    }\n\n    @Test\n    public void interrupt_stopsReceiverAndCausesNoMoreSecretsAvailableException() throws Exception {\n        CKeyProducerJavaWebSocket config = createConfig();\n        KeyProducerJavaWebSocket producer = new KeyProducerJavaWebSocket(config, keyUtility, bitHelper, mockLogger);\n\n        Future<BigInteger[]> future = executorService.submit(() -> {\n            try {\n                return producer.createSecrets(1, true);\n            } catch (NoMoreSecretsAvailableException e) {\n                return null;\n            }\n        });\n\n        Thread.sleep(TestTimeProvider.DEFAULT_DELAY);\n        producer.interrupt();\n\n        BigInteger[] result = future.get(2, TimeUnit.SECONDS);\n        assertThat(\"Receiver thread should have exited due to interrupt\", result, is(nullValue()));\n    }\n\n    @Test\n    public void createSecrets_invalidMessageLength_ignoredByServer() throws Exception {\n        CKeyProducerJavaWebSocket config = createConfig();\n        KeyProducerJavaWebSocket producer = new KeyProducerJavaWebSocket(config, keyUtility, bitHelper, mockLogger);\n        \n        ConnectionUtils.waitUntilTcpPortOpen(\"localhost\", config.port, TestTimeProvider.DEFAULT_SOCKET_TIMEOUT);\n\n        byte[] invalidSecret = new KeyProducerTestUtility().createInvalidSecret();\n        CountDownLatch connected = new CountDownLatch(1);\n\n        WebSocketClient client = new WebSocketClient(new URI(\"ws://localhost:\" + config.port)) {\n            @Override public void onOpen(ServerHandshake handshakedata) { connected.countDown(); }\n            @Override public void onMessage(String message) {}\n            @Override public void onClose(int code, String reason, boolean remote) {}\n            @Override public void onError(Exception ex) { ex.printStackTrace(); }\n        };\n\n        client.connectBlocking(); // blocks at socket level\n        waitForConnectionOrFail(client, connected, TestTimeProvider.DEFAULT_SOCKET_TIMEOUT);\n\n        client.send(invalidSecret);\n\n        try {\n            producer.createSecrets(1, true);\n        } catch (NoMoreSecretsAvailableException e) {\n            assertThat(e.getMessage(), containsString(\"Timeout while waiting for secret\"));\n        }\n\n        producer.interrupt();\n        client.close();\n    }\n    \n    public static void waitForConnectionOrFail(WebSocketClient client, CountDownLatch latch, int timeoutMillis) throws InterruptedException {\n        boolean opened = latch.await(timeoutMillis, TimeUnit.MILLISECONDS);\n        if (!opened || !client.isOpen()) {\n            throw new IllegalStateException(\"WebSocket not open after \" + timeoutMillis + \"ms\");\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerJavaZmqTest.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.math.BigInteger;\nimport java.util.concurrent.CountDownLatch;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.Future;\nimport java.util.concurrent.TimeUnit;\nimport net.ladenthin.bitcoinaddressfinder.BitHelper;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport net.ladenthin.bitcoinaddressfinder.configuration.CKeyProducerJavaZmq;\nimport org.bitcoinj.base.Network;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.slf4j.Logger;\nimport org.zeromq.SocketType;\nimport org.zeromq.ZContext;\nimport org.zeromq.ZMQ;\nimport org.zeromq.ZMQException;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\nimport static org.mockito.ArgumentMatchers.any;\nimport static org.mockito.ArgumentMatchers.eq;\nimport static org.mockito.Mockito.*;\n\npublic class KeyProducerJavaZmqTest {\n\n    private final Network network = new NetworkParameterFactory().getNetwork();\n    private final KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(false));\n    private final BitHelper bitHelper = new BitHelper();\n    private ExecutorService executorService;\n    private Logger mockLogger;\n\n    @Before\n    public void setup() {\n        executorService = Executors.newCachedThreadPool();\n        mockLogger = mock(Logger.class);\n    }\n\n    @After\n    public void teardown() {\n        executorService.shutdownNow();\n    }\n\n    private KeyProducerJavaZmq createKeyProducerJavaZmq(CKeyProducerJavaZmq config) {\n        return new KeyProducerJavaZmq(config, keyUtility, bitHelper, mockLogger);\n    }\n\n    public static String findFreeZmqAddress() {\n        return \"tcp://127.0.0.1:\" + KeyProducerJavaSocketTest.findFreePort();\n    }\n\n    private CKeyProducerJavaZmq createBindConfig(String address) {\n        CKeyProducerJavaZmq config = new CKeyProducerJavaZmq();\n        config.address = address;\n        config.mode = CKeyProducerJavaZmq.Mode.BIND;\n        return config;\n    }\n\n    private CKeyProducerJavaZmq createConnectConfig(String address) {\n        CKeyProducerJavaZmq config = new CKeyProducerJavaZmq();\n        config.address = address;\n        config.mode = CKeyProducerJavaZmq.Mode.CONNECT;\n        return config;\n    }\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"createSecrets\">\n    @Test\n    public void createSecrets_connectMode_receivesSecret() throws Exception {\n        // arrange\n        try (ZContext context = new ZContext()) {\n            String address = findFreeZmqAddress();\n\n            // Server socket (push) binds\n            ZMQ.Socket sender = context.createSocket(SocketType.PUSH);\n            sender.bind(address);\n\n            // Client config connects to that address\n            CKeyProducerJavaZmq config = createConnectConfig(address);\n            KeyProducerJavaZmq keyProducer = createKeyProducerJavaZmq(config);\n\n            // Create dummy key\n            byte[] secretBytes = new KeyProducerTestUtility().createZeroedSecret();\n            for (int i = 0; i < secretBytes.length; i++) {\n                secretBytes[i] = (byte) (i + 1);\n            }\n            BigInteger expected = new BigInteger(1, secretBytes);\n\n            // Send secret\n            sender.send(secretBytes, 0);\n\n            // act\n            BigInteger[] secrets = keyProducer.createSecrets(1, true);\n\n            // assert\n            assertThat(secrets.length, is(1));\n            assertThat(secrets[0], is(equalTo(expected)));\n\n            keyProducer.interrupt();\n            sender.close();\n        }\n    }\n\n    @Test\n    public void createSecrets_success_receivesOneKey() throws Exception {\n        // arrange\n        String address = findFreeZmqAddress();\n\n        byte[] secretBytes = new KeyProducerTestUtility().createZeroedSecret();\n        BigInteger expected = new BigInteger(1, secretBytes);\n\n        // Create the BIND receiver first (so it's ready to accept)\n        CKeyProducerJavaZmq config = createBindConfig(address);\n        config.timeout = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;\n        KeyProducerJavaZmq producer = createKeyProducerJavaZmq(config);\n\n        // Latch to ensure sender has connected before consuming\n        final CountDownLatch senderReady = new CountDownLatch(1);\n\n        // Now spawn the sender thread\n        Future<Void> senderFuture = executorService.submit(() -> {\n            try (ZContext context = new ZContext(); ZMQ.Socket socket = context.createSocket(ZMQ.PUSH)) {\n                socket.connect(address);\n                Thread.sleep(TestTimeProvider.DEFAULT_ESTABLISH_DELAY); // let connection establish\n                socket.send(secretBytes);\n                Thread.sleep(TestTimeProvider.DEFAULT_ESTABLISH_DELAY); // let message be delivered\n                senderReady.countDown();\n            }\n            return null;\n        });\n\n        // Wait for sender to have sent the message before consuming\n        senderReady.await(TestTimeProvider.LONG_SOCKET_TIMEOUT, TestTimeProvider.TIME_UNIT);\n\n        // act\n        BigInteger[] secrets = producer.createSecrets(1, true);\n\n        // assert\n        assertThat(secrets.length, is(1));\n        assertThat(secrets[0], is(equalTo(expected)));\n\n        producer.interrupt();\n        senderFuture.get(TestTimeProvider.DEFAULT_SOCKET_TIMEOUT, TestTimeProvider.TIME_UNIT);\n    }\n\n    @Test(expected = NoMoreSecretsAvailableException.class)\n    public void createSecrets_timeout_throwsException() throws Exception {\n        // arrange\n        String address = findFreeZmqAddress();\n\n        CKeyProducerJavaZmq config = createBindConfig(address);\n        config.timeout = TestTimeProvider.DEFAULT_TIMEOUT;\n\n        KeyProducerJavaZmq producer = createKeyProducerJavaZmq(config);\n\n        // act\n        producer.createSecrets(1, true);\n    }\n\n    @Test\n    public void createSecrets_multipleKeys_success() throws Exception {\n        // arrange\n        String address = findFreeZmqAddress();\n        final int numberOfSecrets = 3;\n\n        // Bind receiver first (small but important ordering)\n        CKeyProducerJavaZmq config = createBindConfig(address);\n        config.timeout = TestTimeProvider.DEFAULT_SOCKET_TIMEOUT;\n        KeyProducerJavaZmq producer = createKeyProducerJavaZmq(config);\n\n        // Latch to ensure sender has connected before consuming\n        final CountDownLatch senderReady = new CountDownLatch(1);\n        // Latch to ensure all sends actually happened\n        final CountDownLatch sentLatch = new CountDownLatch(numberOfSecrets);\n\n        Future<Void> senderFuture = executorService.submit(() -> {\n            try (ZContext context = new ZContext(); ZMQ.Socket socket = context.createSocket(ZMQ.PUSH)) {\n                socket.connect(address);\n\n                // Let the ZMQ connection fully establish before the first send:\n                Thread.sleep(TestTimeProvider.DEFAULT_ESTABLISH_DELAY);\n                senderReady.countDown();\n\n                for (int i = 0; i < numberOfSecrets; i++) {\n                    byte[] secretBytes = new KeyProducerTestUtility().createIncrementedSecret((byte) i);\n                    socket.send(secretBytes);\n                    sentLatch.countDown();\n                    Thread.sleep(TestTimeProvider.DEFAULT_SEND_DELAY);\n                }\n            }\n            return null;\n        });\n\n        // Wait for sender to be connected before consuming\n        senderReady.await(TestTimeProvider.LONG_SOCKET_TIMEOUT, TestTimeProvider.TIME_UNIT);\n\n        // act\n        BigInteger[] secrets = producer.createSecrets(numberOfSecrets, false);\n\n        // assert\n        assertThat(secrets.length, is(numberOfSecrets));\n        new KeyProducerTestUtility().assertIncrementedSecrets(secrets);\n\n        // Wait until the sender really pushed all messages\n        boolean allSent = sentLatch.await(\n            (long) numberOfSecrets * TestTimeProvider.DEFAULT_SEND_DELAY + TestTimeProvider.DEFAULT_DELAY, TestTimeProvider.TIME_UNIT\n        );\n        assertThat(\"Sender did not send all secrets in time\", allSent, is(true));\n\n        producer.interrupt();\n        senderFuture.get(TestTimeProvider.DEFAULT_SOCKET_TIMEOUT, TestTimeProvider.TIME_UNIT);\n    }\n\n    @Test\n    public void createSecrets_invalidSecretLength_errorLogged() throws Exception {\n        // arrange\n        try (ZContext context = new ZContext()) {\n            String address = findFreeZmqAddress();\n\n            // Server socket (push) binds\n            ZMQ.Socket sender = context.createSocket(SocketType.PUSH);\n            sender.bind(address);\n\n            // Client config connects to that address\n            CKeyProducerJavaZmq config = createConnectConfig(address);\n            KeyProducerJavaZmq keyProducer = createKeyProducerJavaZmq(config);\n\n            // Create invalid secret with wrong length (e.g., 16 bytes instead of 32)\n            byte[] invalidSecretBytes = new byte[16];\n            for (int i = 0; i < invalidSecretBytes.length; i++) {\n                invalidSecretBytes[i] = (byte) (i + 1);\n            }\n\n            // Send invalid secret\n            sender.send(invalidSecretBytes, 0);\n\n            // Wait a bit to ensure the receiver thread processes the message\n            Thread.sleep(TestTimeProvider.DEFAULT_SEND_WAIT);\n\n            // Now send a valid secret so createSecrets can return\n            byte[] validSecretBytes = new KeyProducerTestUtility().createZeroedSecret();\n            sender.send(validSecretBytes, 0);\n\n            // act\n            BigInteger[] secrets = keyProducer.createSecrets(1, true);\n\n            // assert\n            assertThat(secrets.length, is(1));\n\n            // Verify logger was called with error message for invalid length\n            verify(mockLogger).error(\"Received invalid secret length: 16\");\n\n            keyProducer.interrupt();\n            sender.close();\n        }\n    }\n    // </editor-fold>\n\n    // <editor-fold defaultstate=\"collapsed\" desc=\"interrupt\">\n    @Test\n    public void interrupt_duringReceive_stopsCleanly() throws Exception {\n        // arrange\n        String address = findFreeZmqAddress();\n\n        // Setup ZMQ PULL socket that will wait for messages\n        CKeyProducerJavaZmq config = createBindConfig(address);\n        config.timeout = -1; // block indefinitely\n        KeyProducerJavaZmq producer = createKeyProducerJavaZmq(config);\n\n        // Start a thread that will block on createSecrets\n        Future<BigInteger[]> future = executorService.submit(() -> {\n            try {\n                return producer.createSecrets(1, true);\n            } catch (NoMoreSecretsAvailableException e) {\n                return null;\n            }\n        });\n\n        // Let it enter the blocking receive\n        Thread.sleep(TestTimeProvider.DEFAULT_SEND_WAIT);\n\n        // act\n        // Now interrupt from another thread (will close socket/context)\n        producer.interrupt();\n\n        // assert\n        // Assert the future exits cleanly within timeout\n        BigInteger[] result = future.get(2, TimeUnit.SECONDS);\n        assertThat(result, is(nullValue()));\n\n        // Verify no unexpected ZMQ errors were logged\n        verify(mockLogger, never()).error(eq(\"ZMQ error\"), any(ZMQException.class));\n    }\n    // </editor-fold>\n\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/KeyProducerTestUtility.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.is;\nimport static org.hamcrest.Matchers.equalTo;\n\nimport java.math.BigInteger;\n\n/**\n * Utility class providing convenience methods for creating and initializing\n * byte arrays that represent Bitcoin private key secrets.\n * <p>\n * These helpers are mainly used for testing and mock implementations of key producers\n * (e.g. {@code KeyProducerJavaZmqTest}) where deterministic or filled byte arrays\n * are required to simulate secret key transmission.\n */\npublic class KeyProducerTestUtility {\n    \n    /**\n     * Creates a new secret byte array of the standard private key length\n     * defined by {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BYTES}, filled entirely with zeroes.\n     * <p>\n     * This method is a shorthand for {@link #createFilledSecret(byte)} with a fill byte of {@code 0x00}.\n     *\n     * @return a new byte array filled with {@code 0x00}, having a length equal to\n     *         {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BYTES}.\n     */\n    public byte[] createZeroedSecret() {\n        return createFilledSecret((byte)0x0);\n    }\n    \n    /**\n     * Creates a new secret byte array filled with the specified byte value.\n     * <p>\n     * Each position in the resulting array will contain the provided {@code fillByte}.\n     *\n     * @param fillByte the byte value used to fill every position in the secret array.\n     * @return a new byte array of size {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BYTES}\n     *         where each element is set to {@code fillByte}.\n     */\n    public byte[] createFilledSecret(byte fillByte) {\n        byte[] secretBytes = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\n        for (int i = 0; i < secretBytes.length; i++) {\n            secretBytes[i] = fillByte;\n        }\n        return secretBytes;\n    }\n    \n    /**\n     * Creates a new secret byte array where each byte is derived by incrementing the given {@code fillByte}.\n     * <p>\n     * This variant is useful for generating non-uniform test data, as each byte will contain\n     * {@code (fillByte + 1)}.\n     * <p>\n     * Note that this implementation currently applies the same incremented value to all bytes\n     * in the array — it does not perform cumulative iteration.\n     *\n     * @param startByte the base byte value used as the starting point for incrementing.\n     * @return a new byte array of size {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BYTES},\n     *         filled with the value {@code (fillByte + 1)}.\n     */\n    public byte[] createIncrementedSecret(byte startByte) {\n        byte[] secretBytes = new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES];\n        for (int i = 0; i < secretBytes.length; i++) {\n            secretBytes[i] = (byte) (startByte + 1);\n        }\n        return secretBytes;               \n    }\n\n    /**\n     * Asserts that an array of secrets increases by one per index.\n     * <p>\n     * Each secret is expected to represent a BigInteger whose least-significant byte\n     * equals {@code (index + 1)}.\n     *\n     * @param secrets the array of BigInteger secrets to verify\n     */\n    public void assertIncrementedSecrets(BigInteger[] secrets) {\n        for (int i = 0; i < secrets.length; i++) {\n            byte[] bytes = secrets[i].toByteArray();\n\n            // Handle BigInteger sign and potential leading zero\n            byte lastByte = bytes[bytes.length - 1];\n            byte expected = (byte) (i + 1);\n\n            assertThat(\n                \"Secret at index \" + i + \" should end with byte value \" + expected,\n                lastByte,\n                is(expected)\n            );\n        }\n    }\n    \n    /**\n    * Asserts that the given secret consists entirely of the specified fill byte.\n    * <p>\n    * This checks the least significant byte of the {@link BigInteger}'s backing array,\n    * which is sufficient when verifying uniformly filled secrets produced by\n    * {@code generateFilledSecret(byte)} or similar utilities.\n    *\n    * @param secret   the BigInteger secret to verify\n    * @param fillByte the byte value expected to fill the secret\n    */\n   public void assertFilledSecret(BigInteger secret, byte fillByte) {\n       byte[] bytes = secret.toByteArray();\n\n       // Defensive: skip any sign byte (0x00) that BigInteger may prepend\n       int lastIndex = bytes.length - 1;\n       byte lastByte = bytes[lastIndex];\n\n       assertThat(\n           \"Secret should end with byte value \" + fillByte + \" but was \" + lastByte,\n           lastByte,\n           is(equalTo(fillByte))\n       );\n   }\n    \n    /**\n     * Creates a deliberately invalid secret byte array for negative or edge-case testing.\n     * <p>\n     * The returned array is one byte shorter than the valid private key length defined by\n     * {@link PublicKeyBytes#PRIVATE_KEY_MAX_NUM_BYTES}, ensuring it will be rejected by\n     * validation logic that enforces correct secret sizes.\n     * <p>\n     * This method is typically used in unit tests to verify that components such as\n     * {@code KeyProducerJavaZmq} or {@code AbstractKeyProducerQueueBuffered}\n     * properly handle malformed or truncated input.\n     *\n     * @return a new byte array with a length of\n     *         {@code PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES - 1}, representing an invalid secret.\n     */\n    public byte[] createInvalidSecret() {\n        return new byte[PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BYTES - 1];\n    }\n    \n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/NoMoreSecretsAvailableExceptionTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\r\n\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.containsString;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.instanceOf;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.nullValue;\r\nimport org.junit.Test;\r\n\r\n/**\r\n * Unit tests for {@link NoMoreSecretsAvailableException}.\r\n */\r\npublic class NoMoreSecretsAvailableExceptionTest {\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"constructor\">\r\n    @Test\r\n    public void constructor_noArg_isInstanceOfRuntimeException() {\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException();\r\n\r\n        // assert\r\n        assertThat(exception, is(instanceOf(RuntimeException.class)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_noArg_nullMessage() {\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException();\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(nullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_noArg_noCause() {\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException();\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withMessage_messageIsPreserved() {\r\n        // arrange\r\n        String message = \"no more secrets in the file\";\r\n\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException(message);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), is(equalTo(message)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withMessage_noCause() {\r\n        // arrange\r\n        String message = \"a message\";\r\n\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException(message);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(nullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withMessageAndCause_messageIsPreserved() {\r\n        // arrange\r\n        String message = \"wrapped IO failure\";\r\n        Throwable cause = new RuntimeException(\"root cause\");\r\n\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException(message, cause);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(message));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withMessageAndCause_causeIsPreserved() {\r\n        // arrange\r\n        String message = \"msg\";\r\n        Throwable cause = new RuntimeException(\"root cause\");\r\n\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException(message, cause);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(equalTo(cause)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withCause_causeIsPreserved() {\r\n        // arrange\r\n        Throwable cause = new IllegalStateException(\"underlying cause\");\r\n\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException(cause);\r\n\r\n        // assert\r\n        assertThat(exception.getCause(), is(equalTo(cause)));\r\n    }\r\n\r\n    @Test\r\n    public void constructor_withCause_messageContainsCauseMessage() {\r\n        // arrange\r\n        Throwable cause = new IllegalStateException(\"underlying cause\");\r\n\r\n        // act\r\n        NoMoreSecretsAvailableException exception = new NoMoreSecretsAvailableException(cause);\r\n\r\n        // assert\r\n        assertThat(exception.getMessage(), containsString(\"underlying cause\"));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/keyproducer/TestTimeProvider.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.keyproducer;\n\nimport java.util.concurrent.TimeUnit;\n\npublic class TestTimeProvider {\n    \n    public final static TimeUnit TIME_UNIT = TimeUnit.MILLISECONDS;\n\n    public final static int DEFAULT_DELAY = 500;\n    public final static int DEFAULT_SEND_DELAY = 300;\n    public final static int DEFAULT_SEND_WAIT = 1000;\n    public final static int DEFAULT_SETTLE_DELAY = 300;\n    public final static int DEFAULT_ESTABLISH_DELAY = 300;\n    public final static int DEFAULT_TIMEOUT = 500;\n    public final static int DEFAULT_SOCKET_TIMEOUT = 2_000;\n\n    public final static int DEFAULT_RETRY_COUNT = 3;\n    public final static int DEFAULT_CONNECTION_RETRY_COUNT = 10;\n    public final static int DEFAULT_RETRY_DELAY = 500;\n    public final static int SHORT_DELAY = 100;\n    public final static int LONG_SOCKET_TIMEOUT = 3_000;\n    public final static int SOCKET_ACCEPT_TIMEOUT = 1_000;\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/persistence/PersistenceUtilsTest.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.persistence;\r\n\r\nimport java.nio.ByteBuffer;\r\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\r\nimport org.bitcoinj.base.Network;\r\nimport org.junit.Test;\r\nimport static org.hamcrest.MatcherAssert.assertThat;\r\nimport static org.hamcrest.Matchers.equalTo;\r\nimport static org.hamcrest.Matchers.is;\r\nimport static org.hamcrest.Matchers.not;\r\nimport static org.hamcrest.Matchers.notNullValue;\r\nimport static org.hamcrest.Matchers.sameInstance;\r\n\r\npublic class PersistenceUtilsTest {\r\n\r\n    private final Network network = new NetworkParameterFactory().getNetwork();\r\n    private final PersistenceUtils persistenceUtils = new PersistenceUtils(network);\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"longToByteBufferDirect_zeroValue\">\r\n    @Test\r\n    public void longToByteBufferDirect_zeroValue_returnsNotNull() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(0L);\r\n\r\n        // assert\r\n        assertThat(result, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_zeroValue_returnsSameInstanceOnRepeatedCalls() {\r\n        // act\r\n        ByteBuffer first = persistenceUtils.longToByteBufferDirect(0L);\r\n        ByteBuffer second = persistenceUtils.longToByteBufferDirect(0L);\r\n\r\n        // assert\r\n        assertThat(first, is(sameInstance(second)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_zeroValue_capacityIsLongBytes() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(0L);\r\n\r\n        // assert\r\n        assertThat(result.capacity(), is(equalTo(Long.BYTES)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_zeroValue_absoluteGetLongReturnsZero() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(0L);\r\n\r\n        // assert\r\n        assertThat(result.getLong(0), is(equalTo(0L)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"longToByteBufferDirect_positiveValue\">\r\n    @Test\r\n    public void longToByteBufferDirect_positiveValue_returnsNotNull() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(42L);\r\n\r\n        // assert\r\n        assertThat(result, is(notNullValue()));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_positiveValue_capacityIsLongBytes() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(42L);\r\n\r\n        // assert\r\n        assertThat(result.capacity(), is(equalTo(Long.BYTES)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_positiveValue_absoluteGetLongReturnsCorrectValue() {\r\n        // arrange\r\n        long expected = 42L;\r\n\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(expected);\r\n\r\n        // assert\r\n        assertThat(result.getLong(0), is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_positiveValue_remainingIsLongBytes() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(42L);\r\n\r\n        // assert\r\n        assertThat(result.remaining(), is(equalTo(Long.BYTES)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"longToByteBufferDirect_negativeValue\">\r\n    @Test\r\n    public void longToByteBufferDirect_negativeValue_absoluteGetLongReturnsCorrectValue() {\r\n        // arrange\r\n        long expected = -1L;\r\n\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(expected);\r\n\r\n        // assert\r\n        assertThat(result.getLong(0), is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_negativeValue_capacityIsLongBytes() {\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(-1L);\r\n\r\n        // assert\r\n        assertThat(result.capacity(), is(equalTo(Long.BYTES)));\r\n    }\r\n    // </editor-fold>\r\n\r\n    // <editor-fold defaultstate=\"collapsed\" desc=\"longToByteBufferDirect_edgeCases\">\r\n    @Test\r\n    public void longToByteBufferDirect_longMaxValue_absoluteGetLongReturnsMaxValue() {\r\n        // arrange\r\n        long expected = Long.MAX_VALUE;\r\n\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(expected);\r\n\r\n        // assert\r\n        assertThat(result.getLong(0), is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_longMinValue_absoluteGetLongReturnsMinValue() {\r\n        // arrange\r\n        long expected = Long.MIN_VALUE;\r\n\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(expected);\r\n\r\n        // assert\r\n        assertThat(result.getLong(0), is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_oneValue_absoluteGetLongReturnsOne() {\r\n        // arrange\r\n        long expected = 1L;\r\n\r\n        // act\r\n        ByteBuffer result = persistenceUtils.longToByteBufferDirect(expected);\r\n\r\n        // assert\r\n        assertThat(result.getLong(0), is(equalTo(expected)));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_nonZeroValueCalledTwice_returnsDifferentInstances() {\r\n        // act\r\n        ByteBuffer first = persistenceUtils.longToByteBufferDirect(100L);\r\n        ByteBuffer second = persistenceUtils.longToByteBufferDirect(100L);\r\n\r\n        // assert\r\n        assertThat(first, is(not(sameInstance(second))));\r\n    }\r\n\r\n    @Test\r\n    public void longToByteBufferDirect_nonZeroValueNotSameAsZeroCachedBuffer_returnsDifferentInstance() {\r\n        // act\r\n        ByteBuffer zeroBuffer = persistenceUtils.longToByteBufferDirect(0L);\r\n        ByteBuffer nonZeroBuffer = persistenceUtils.longToByteBufferDirect(1L);\r\n\r\n        // assert\r\n        assertThat(zeroBuffer, is(not(sameInstance(nonZeroBuffer))));\r\n    }\r\n    // </editor-fold>\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/AbstractTestAddresses.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Random;\r\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\r\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\r\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\r\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\r\nimport org.apache.commons.codec.binary.Hex;\r\nimport org.bitcoinj.base.LegacyAddress;\r\nimport org.bitcoinj.base.Network;\r\nimport org.bitcoinj.base.ScriptType;\r\nimport org.bitcoinj.crypto.ECKey;\r\n\r\npublic abstract class AbstractTestAddresses implements TestAddresses {\r\n    \r\n    public final Network network = new NetworkParameterFactory().getNetwork();\r\n\r\n    private final List<ECKey> ecKeys = new ArrayList<>();\r\n    \r\n    public AbstractTestAddresses(int randomSeed, int numberOfAddresses, boolean compressed) {\r\n        Random random = new Random(randomSeed);\r\n        for (int i = 0; i < numberOfAddresses; i++) {\r\n            BigInteger secret = new KeyUtility(network, new ByteBufferUtility(false)).createSecret(PublicKeyBytes.PRIVATE_KEY_MAX_NUM_BITS, random);\r\n            ECKey ecKey = ECKey.fromPrivate(secret, compressed);\r\n            ecKeys.add(ecKey);\r\n        }\r\n    }\r\n    \r\n    @Override\r\n    public int getNumberOfAddresses() {\r\n        return ecKeys.size();\r\n    }\r\n\r\n    @Override\r\n    public List<ECKey> getECKeys() {\r\n        return ecKeys;\r\n    }\r\n    \r\n    private LegacyAddress toLegacyAddress(ECKey ecKey) {\r\n        return (LegacyAddress) ecKey.toAddress(ScriptType.P2PKH, network);\r\n    }\r\n    \r\n    private LegacyAddress getLegacyAddressAtIndex(int index) {\r\n        ECKey ecKey = getECKeys().get(index);\r\n        return toLegacyAddress(ecKey);\r\n    }\r\n\r\n    @Override\r\n    public String getIndexAsBase58String(int index) {\r\n        LegacyAddress legacyAddress = getLegacyAddressAtIndex(index);\r\n        return legacyAddress.toBase58();\r\n    }\r\n    \r\n    @Override\r\n    public byte[] getIndexAsHash160(int index) {\r\n        LegacyAddress legacyAddress = getLegacyAddressAtIndex(index);\r\n        return legacyAddress.getHash();\r\n    }\r\n\r\n    @Override\r\n    public String getIndexAsHash160HexEncoded(int index) {\r\n        byte[] hash = getIndexAsHash160(index);\r\n        return Hex.encodeHexString(hash);\r\n    }\r\n    \r\n    @Override\r\n    public ByteBuffer getIndexAsHash160ByteBuffer(int index) {\r\n        ByteBufferUtility byteBufferUtility = new ByteBufferUtility(true);\r\n        byte[] hash160 = getIndexAsHash160(index);\r\n        ByteBuffer byteBuffer = byteBufferUtility.byteArrayToByteBuffer(hash160);\r\n        return byteBuffer;\r\n    }\r\n\r\n    @Override\r\n    public String getAsBase58Strings() {\r\n        StringBuilder sb = new StringBuilder();\r\n        List<String> base58StringList = getAsBase58StringList();\r\n        for (String base58 : base58StringList) {\r\n            sb.append(base58);\r\n            sb.append(System.lineSeparator());\r\n        }\r\n        return sb.toString();\r\n    }\r\n\r\n    @Override\r\n    public List<String> getAsBase58StringList() {\r\n        List<String> base58Strings = new ArrayList<>();\r\n        List<ECKey> ecKeys = getECKeys();\r\n        for (ECKey ecKey : ecKeys) {\r\n            LegacyAddress address = toLegacyAddress(ecKey);\r\n            String base58 = address.toBase58();\r\n            base58Strings.add(base58);\r\n        }\r\n        return base58Strings;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/AddressesFileSpecialUsecases.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\nimport static net.ladenthin.bitcoinaddressfinder.SeparatorFormat.COMMA;\r\nimport static net.ladenthin.bitcoinaddressfinder.SeparatorFormat.SEMICOLON;\r\nimport static net.ladenthin.bitcoinaddressfinder.SeparatorFormat.TAB_SPLIT;\r\n\r\npublic class AddressesFileSpecialUsecases implements AddressesFiles {\r\n\r\n    private final static String ADDRESS_FILE_ONE = \"staticAddressesFile.txt\";\r\n    \r\n    public final static int NUMBER_OF_ADRESSES = 3;\r\n    \r\n    private final TestAddresses42 testAddresses;\r\n    \r\n    public AddressesFileSpecialUsecases() {\r\n        testAddresses = new TestAddresses42(NUMBER_OF_ADRESSES, false);\r\n    }\r\n    \r\n    @Override\r\n    public List<String> createAddressesFiles(TemporaryFolder folder, boolean addInvalidAddresses) throws IOException {\r\n        File one = folder.newFile(ADDRESS_FILE_ONE);\r\n\r\n        Files.write(one.toPath(), getAllAddresses());\r\n        List<String> addresses = new ArrayList<>();\r\n        addresses.add(one.getAbsolutePath());\r\n        return addresses;\r\n    }\r\n    \r\n    /**\r\n     * See {@link net.ladenthin.bitcoinaddressfinder.AddressFileToLMDBTest#addressFilesToLMDB_addressWithAmountOfZero_noExceptionThrown} why {@code 0} is necessary.\r\n     */\r\n    public List<String> getAllAddresses() {\r\n        List<String> addresses = new ArrayList<>();\r\n        addresses.add(testAddresses.getIndexAsBase58String(0) + COMMA.getSymbol() + \"0\");\r\n        addresses.add(testAddresses.getIndexAsBase58String(1) + TAB_SPLIT.getSymbol() + \"0\");\r\n        addresses.add(testAddresses.getIndexAsBase58String(2) + SEMICOLON.getSymbol() + \"0\");\r\n        return addresses;\r\n    }\r\n\r\n    @Override\r\n    public TestAddresses getTestAddresses() {\r\n        return testAddresses;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/AddressesFiles.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\npublic interface AddressesFiles {\r\n\r\n    List<String> createAddressesFiles(TemporaryFolder folder, boolean addInvalidAddresses) throws IOException;\r\n\r\n    TestAddresses getTestAddresses();\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/StaticAddressesFiles.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.util.ArrayList;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.stream.Collectors;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.junit.rules.TemporaryFolder;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.*;\r\n\r\npublic class StaticAddressesFiles implements AddressesFiles {\r\n\r\n    private final static String ADDRESS_FILE_ONE = \"staticAddressesFile.txt\";\r\n    \r\n    public static final Coin amountOtherAddresses = Coin.SATOSHI;\r\n\r\n    public StaticAddressesFiles() {\r\n    }\r\n\r\n    @Override\r\n    public List<String> createAddressesFiles(TemporaryFolder folder, boolean addInvalidAddresses) throws IOException {\r\n        File one = folder.newFile(ADDRESS_FILE_ONE);\r\n\r\n        Files.write(one.toPath(), getAllAddresses());\r\n        List<String> addresses = new ArrayList<>();\r\n        addresses.add(one.getAbsolutePath());\r\n        return addresses;\r\n    }\r\n    \r\n    public List<String> getSupportedAddresses() {\r\n        List<String> addresses = new ArrayList<>();\r\n        addresses.addAll(extractAddresses(P2PKH.class));\r\n        addresses.addAll(extractAddresses(P2SH.class));\r\n        addresses.addAll(extractAddresses(P2WPKH.class));\r\n        return addresses;\r\n    }\r\n    \r\n    public List<String> getAllAddresses() {\r\n        List<String> addresses = new ArrayList<>();\r\n        addresses.addAll(getSupportedAddresses());\r\n        addresses.addAll(getUnsupportedAddresses());\r\n        return addresses;\r\n    }\r\n    \r\n    public List<String> getUnsupportedAddresses() {\r\n        return extractAddresses(StaticUnsupportedAddress.class);\r\n    }\r\n    \r\n    private <T extends Enum<T> & PublicAddress> List<String> extractAddresses(Class<T> enumClass) {\r\n        return Arrays.stream(enumClass.getEnumConstants())\r\n                     .map(PublicAddress::getPublicAddress)\r\n                     .collect(Collectors.toList());\r\n    }\r\n\r\n    @Override\r\n    public TestAddresses getTestAddresses() {\r\n        throw new UnsupportedOperationException(\"Not supported yet.\");\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/StaticKey.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.math.BigInteger;\r\nimport java.nio.ByteBuffer;\r\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\r\n\r\n/**\r\n * Static strings from a random generated address https://www.bitaddress.org\r\n */\r\npublic class StaticKey {\r\n\r\n    final public String privateKeyHex = \"68e23530deb6d5011ab56d8ad9f7b4a3b424f1112f08606357497495929f72dc\";\r\n    final public BigInteger privateKeyBigInteger = new BigInteger(\"47440210799387980664936216788675555637818488436833759923669526136462528967388\");\r\n    final public byte[] privateKeyBytes = {104, -30, 53, 48, -34, -74, -43, 1, 26, -75, 109, -118, -39, -9, -76, -93, -76, 36, -15, 17, 47, 8, 96, 99, 87, 73, 116, -107, -110, -97, 114, -36};\r\n    final public String privateKeyWiFUncompressed = \"5JcUh9ET11ZZHnEhSvzEUCg3opTa9WCmsGuCFYGQGhBzKJpgJ39\";\r\n    final public String privateKeyWiFCompressed = \"KzjbEBLMm3UhX4fTXTHcT4XMPeUHJXty2uBNfAzyiGPVynPeFMeV\";\r\n\r\n    final public String publicKeyUncompressedHex = \"045d99d81d9e731e0d7eebd1c858b1155da7981b1f0a16d322a361f8b589ad2e3bde53dc614e3a84164dab3f5899abde3b09553dca10c9716fa623a5942b9ea420\";\r\n    final public byte[] publicKeyUncompressedBytes = {4, 93, -103, -40, 29, -98, 115, 30, 13, 126, -21, -47, -56, 88, -79, 21, 93, -89, -104, 27, 31, 10, 22, -45, 34, -93, 97, -8, -75, -119, -83, 46, 59, -34, 83, -36, 97, 78, 58, -124, 22, 77, -85, 63, 88, -103, -85, -34, 59, 9, 85, 61, -54, 16, -55, 113, 111, -90, 35, -91, -108, 43, -98, -92, 32};\r\n    final public String publicKeyCompressedHex = \"025d99d81d9e731e0d7eebd1c858b1155da7981b1f0a16d322a361f8b589ad2e3b\";\r\n    final public byte[] publicKeyCompressedBytes = {2, 93, -103, -40, 29, -98, 115, 30, 13, 126, -21, -47, -56, 88, -79, 21, 93, -89, -104, 27, 31, 10, 22, -45, 34, -93, 97, -8, -75, -119, -83, 46, 59};\r\n    \r\n    final public String publicKeyUncompressedHash160Hex = \"024336956610316605d1051cb9b8e88f82b70b29\";\r\n    final public String publicKeyCompressedHash160Hex = \"892852a28710e156b07fa7933edd5490cbbcfa4f\";\r\n    \r\n    final public String publicKeyUncompressed = \"1CxsSWgsWNxoqS1XB5QgchtMpWrzzPCES\";\r\n    final public String publicKeyCompressed = \"1DWDsxY3mvzjPLHD67nRq15M8vs6VLZaqV\";\r\n    \r\n    final public ByteBuffer byteBufferPublicKeyUncompressed = new ByteBufferUtility(false).getByteBufferFromHex(publicKeyUncompressedHash160Hex);\r\n    final public ByteBuffer byteBufferPublicKeyCompressed = new ByteBufferUtility(false).getByteBufferFromHex(publicKeyCompressedHash160Hex);\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/TestAddresses.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.nio.ByteBuffer;\r\nimport java.util.List;\r\nimport org.bitcoinj.crypto.ECKey;\r\n\r\npublic interface TestAddresses {\r\n    \r\n    int getNumberOfAddresses();\r\n    \r\n    List<ECKey> getECKeys();\r\n    \r\n    String getAsBase58Strings();\r\n    \r\n    List<String> getAsBase58StringList();\r\n    \r\n    String getIndexAsBase58String(int index);\r\n\r\n    String getIndexAsHash160HexEncoded(int index);\r\n    \r\n    byte[] getIndexAsHash160(int index);\r\n    \r\n    ByteBuffer getIndexAsHash160ByteBuffer(int index);\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/TestAddresses1337.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\npublic class TestAddresses1337 extends AbstractTestAddresses {\r\n\r\n    public final static int RANDOM_SEED = 1337;\r\n\r\n    public TestAddresses1337(int numberOfAddresses, boolean compressed) {\r\n        super(RANDOM_SEED, numberOfAddresses, compressed);\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/TestAddresses42.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\npublic class TestAddresses42 extends AbstractTestAddresses {\r\n\r\n    public final static int RANDOM_SEED = 42;\r\n\r\n    public TestAddresses42(int numberOfAddresses, boolean compressed) {\r\n        super(RANDOM_SEED, numberOfAddresses, compressed);\r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/TestAddressesFiles.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.util.*;\r\nimport java.util.function.Function;\r\nimport java.util.function.Supplier;\r\nimport net.ladenthin.bitcoinaddressfinder.PublicKeyBytes;\r\nimport net.ladenthin.bitcoinaddressfinder.SeparatorFormat;\r\nimport static net.ladenthin.bitcoinaddressfinder.SeparatorFormat.COMMA;\r\nimport static net.ladenthin.bitcoinaddressfinder.SeparatorFormat.SEMICOLON;\r\nimport static net.ladenthin.bitcoinaddressfinder.SeparatorFormat.TAB_SPLIT;\r\nimport net.ladenthin.bitcoinaddressfinder.staticaddresses.enums.P2WPKH;\r\nimport org.bitcoinj.base.Coin;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\npublic class TestAddressesFiles implements AddressesFiles {\r\n\r\n    public final static Set<String> compressedTestAddressesAsDynamicWidthBase58BitcoinAddressWithAmount = new HashSet<>();\r\n    public final static Set<String> uncompressedTestAddressesAsDynamicWidthBase58BitcoinAddressWithAmount = new HashSet<>();\r\n    public final static Set<String> compressedTestAddressesWithStaticAmountAsDynamicWidthBase58BitcoinAddressWithAmount = new HashSet<>();\r\n    public final static Set<String> uncompressedTestAddressesWithStaticAmountAsDynamicWidthBase58BitcoinAddressWithAmount = new HashSet<>();\r\n    \r\n    public final static Set<String> compressedTestAddressesAsFixedWidthBase58BitcoinAddress = new HashSet<>();\r\n    public final static Set<String> uncompressedTestAddressesAsFixedWidthBase58BitcoinAddress = new HashSet<>();\r\n    public final static Set<String> compressedTestAddressesWithStaticAmountAsFixedWidthBase58BitcoinAddress = new HashSet<>();\r\n    public final static Set<String> uncompressedTestAddressesWithStaticAmountAsFixedWidthBase58BitcoinAddress = new HashSet<>();\r\n    \r\n    public final static Set<String> compressedTestAddressesAsHexHash = new HashSet<>();\r\n    public final static Set<String> uncompressedTestAddressesAsHexHash = new HashSet<>();\r\n    public final static Set<String> compressedTestAddressesWithStaticAmountAsHexHash = new HashSet<>();\r\n    public final static Set<String> uncompressedTestAddressesWithStaticAmountAsHexHash = new HashSet<>();\r\n\r\n    private final static String ADDRESS_FILE_ONE = \"addressesOne.txt\";\r\n    private final static String ADDRESS_FILE_TWO = \"addressesTwo.txt\";\r\n    private final static String ADDRESS_FILE_THREE = \"addressesThree.txt\";\r\n    public final static int NUMBER_OF_ADRESSES = 5;\r\n\r\n    public static final Coin amountFirstAddress = Coin.FIFTY_COINS;\r\n    public static final Coin amountOtherAddresses = Coin.SATOSHI;\r\n    \r\n    public static final String AMOUNT_FIRST_ADDRESS_AS_STRING = \"5000000000\";\r\n    public static final String AMOUNT_OTHER_ADDRESSES_AS_STRING = \"1\";\r\n    \r\n    public static final String STATIC_EMPTY_AMOUNT_AS_STRING = \"0\";\r\n\r\n    public final static Coin[] AMOUNTS = {\r\n        amountFirstAddress,\r\n        amountOtherAddresses,\r\n        amountOtherAddresses,\r\n        amountOtherAddresses,\r\n        amountOtherAddresses\r\n    };\r\n\r\n    private final TestAddresses42 testAddresses;\r\n    \r\n    private static final String COMMA_SEPARATOR = SeparatorFormat.COMMA.getSymbol();\r\n    private static final List<String> NO_AMOUNTS = List.of();\r\n    \r\n    /**\r\n     * A 20-byte test address (hash160) that is guaranteed not to exist in the generated test datasets.\r\n     * <p>\r\n     * This address is used in negative unit tests to verify that lookup methods\r\n     * (e.g. {@code containsAddress}) correctly return {@code false} or {@code null}\r\n     * when queried with a hash160 value that is not present.\r\n     * <p>\r\n     * The array contains exactly {@link PublicKeyBytes#RIPEMD160_HASH_NUM_BYTES} distinct byte values.\r\n     * The final byte is explicitly set to the constant value itself to emphasize the expected length.\r\n     * <p>\r\n     * Note: This address does not collide with any hash160 values in {@link TestAddresses42}.\r\n     */\r\n    public static final byte[] NON_EXISTING_ADDRESS = {\r\n        1, 2, 3, 4, 5, 6, 7, 8, 9, 10,\r\n        11, 12, 13, 14, 15, 16, 17, 18, 19, PublicKeyBytes.RIPEMD160_HASH_NUM_BYTES\r\n    };\r\n    \r\n    public TestAddressesFiles(boolean compressed) {\r\n        testAddresses = new TestAddresses42(NUMBER_OF_ADRESSES, compressed);\r\n\r\n        TestAddresses42 uc = new TestAddresses42(NUMBER_OF_ADRESSES, false);\r\n        TestAddresses42 co = new TestAddresses42(NUMBER_OF_ADRESSES, true);\r\n        \r\n        final String witnessProgramAsBase58 = P2WPKH.BitcoinP2WPKH.getWitnessProgramAsBase58();\r\n        final String witnessProgramAsHex = P2WPKH.BitcoinP2WPKH.getWitnessProgramAsHex();\r\n\r\n        // DynamicWidthBase58BitcoinAddressWithAmount\r\n        addFormattedAddresses(\r\n            uncompressedTestAddressesAsDynamicWidthBase58BitcoinAddressWithAmount,\r\n            uc::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            List.of(AMOUNT_FIRST_ADDRESS_AS_STRING, AMOUNT_OTHER_ADDRESSES_AS_STRING)\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            compressedTestAddressesAsDynamicWidthBase58BitcoinAddressWithAmount,\r\n            co::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            List.of(AMOUNT_FIRST_ADDRESS_AS_STRING, AMOUNT_OTHER_ADDRESSES_AS_STRING)\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            uncompressedTestAddressesWithStaticAmountAsDynamicWidthBase58BitcoinAddressWithAmount,\r\n            uc::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            List.of(STATIC_EMPTY_AMOUNT_AS_STRING)\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            compressedTestAddressesWithStaticAmountAsDynamicWidthBase58BitcoinAddressWithAmount,\r\n            co::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            List.of(STATIC_EMPTY_AMOUNT_AS_STRING)\r\n        );\r\n\r\n        // FixedWidthBase58BitcoinAddress (no amounts)\r\n        addFormattedAddresses(\r\n            uncompressedTestAddressesAsFixedWidthBase58BitcoinAddress,\r\n            uc::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            compressedTestAddressesAsFixedWidthBase58BitcoinAddress,\r\n            co::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            uncompressedTestAddressesWithStaticAmountAsFixedWidthBase58BitcoinAddress,\r\n            uc::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            compressedTestAddressesWithStaticAmountAsFixedWidthBase58BitcoinAddress,\r\n            co::getIndexAsBase58String,\r\n            () -> witnessProgramAsBase58,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        // HexHash (no amounts)\r\n        addFormattedAddresses(\r\n            uncompressedTestAddressesAsHexHash,\r\n            uc::getIndexAsHash160HexEncoded,\r\n            () -> witnessProgramAsHex,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            compressedTestAddressesAsHexHash,\r\n            co::getIndexAsHash160HexEncoded,\r\n            () -> witnessProgramAsHex,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            uncompressedTestAddressesWithStaticAmountAsHexHash,\r\n            uc::getIndexAsHash160HexEncoded,\r\n            () -> witnessProgramAsHex,\r\n            NO_AMOUNTS\r\n        );\r\n\r\n        addFormattedAddresses(\r\n            compressedTestAddressesWithStaticAmountAsHexHash,\r\n            co::getIndexAsHash160HexEncoded,\r\n            () -> witnessProgramAsHex,\r\n            NO_AMOUNTS\r\n        );\r\n    }\r\n\r\n    private void addFormattedAddresses(\r\n        Set<String> targetSet,\r\n        Function<Integer, String> addressGenerator,\r\n        Supplier<String> staticAddressSupplier,\r\n        List<String> amounts\r\n    ) {\r\n        boolean includeAmounts = !amounts.isEmpty();\r\n        String fallbackAmount = includeAmounts ? amounts.getLast() : null;\r\n\r\n        for (int i = 0; i < NUMBER_OF_ADRESSES; i++) {\r\n            String address = addressGenerator.apply(i);\r\n            if (includeAmounts) {\r\n                String amount = i < amounts.size() ? amounts.get(i) : fallbackAmount;\r\n                targetSet.add(address + COMMA_SEPARATOR + amount);\r\n            } else {\r\n                targetSet.add(address);\r\n            }\r\n        }\r\n\r\n        String staticAddress = staticAddressSupplier.get();\r\n        targetSet.add(includeAmounts\r\n            ? staticAddress + COMMA_SEPARATOR + fallbackAmount\r\n            : staticAddress\r\n        );\r\n    }\r\n\r\n    @Override\r\n    public List<String> createAddressesFiles(TemporaryFolder folder, boolean addInvalidAddresses) throws IOException {\r\n        File one = folder.newFile(ADDRESS_FILE_ONE);\r\n        File two = folder.newFile(ADDRESS_FILE_TWO);\r\n        File three = folder.newFile(ADDRESS_FILE_THREE);\r\n\r\n        Files.write(one.toPath(), Arrays.asList(\r\n                testAddresses.getIndexAsBase58String(0) + COMMA.getSymbol() + amountFirstAddress,\r\n                testAddresses.getIndexAsBase58String(1) + TAB_SPLIT.getSymbol() + amountOtherAddresses,\r\n                testAddresses.getIndexAsBase58String(2) + SEMICOLON.getSymbol() + \"1\"\r\n        ));\r\n        Files.write(two.toPath(), Collections.singletonList(\r\n                testAddresses.getIndexAsBase58String(3)\r\n        ));\r\n        \r\n        List<String> listThree = new ArrayList<>();\r\n        \r\n        {\r\n            listThree.add(\"# Test\");\r\n            listThree.add(\"1WrOngAddressFormat\");\r\n            listThree.add(P2WPKH.BitcoinP2WPKH.getPublicAddress());\r\n            listThree.add(testAddresses.getIndexAsBase58String(4));\r\n\r\n            if (addInvalidAddresses) {\r\n                // secret : 1\r\n                listThree.add(\"1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm\");\r\n                listThree.add(\"1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH\");\r\n            }   \r\n        }\r\n        \r\n        Files.write(three.toPath(), listThree);\r\n        List<String> addresses = new ArrayList<>();\r\n        addresses.add(one.getAbsolutePath());\r\n        addresses.add(two.getAbsolutePath());\r\n        addresses.add(three.getAbsolutePath());\r\n        return addresses;\r\n    }\r\n\r\n    @Override\r\n    public TestAddresses getTestAddresses() {\r\n        return testAddresses; \r\n    }\r\n\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/TestAddressesLMDB.java",
    "content": "// @formatter:off\r\n/**\r\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *    http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n *\r\n */\r\n// @formatter:on\r\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport net.ladenthin.bitcoinaddressfinder.AddressFilesToLMDB;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CAddressFilesToLMDB;\r\nimport net.ladenthin.bitcoinaddressfinder.configuration.CLMDBConfigurationWrite;\r\nimport org.junit.rules.TemporaryFolder;\r\n\r\npublic class TestAddressesLMDB {\r\n    \r\n    \r\n    public File createTestLMDB(TemporaryFolder folder, AddressesFiles addressesFiles, boolean useStaticAmount, boolean addInvalidAddresses) throws IOException {\r\n        CAddressFilesToLMDB addressFilesToLMDBConfigurationWrite = new CAddressFilesToLMDB();\r\n        \r\n        List<String> files = addressesFiles.createAddressesFiles(folder, addInvalidAddresses);\r\n        addressFilesToLMDBConfigurationWrite.addressesFiles.addAll(files);\r\n        addressFilesToLMDBConfigurationWrite.lmdbConfigurationWrite = new CLMDBConfigurationWrite();\r\n        addressFilesToLMDBConfigurationWrite.lmdbConfigurationWrite.useStaticAmount = useStaticAmount;\r\n        addressFilesToLMDBConfigurationWrite.lmdbConfigurationWrite.staticAmount = 0L;\r\n        File lmdbFolder = folder.newFolder(\"lmdb\");\r\n        String lmdbFolderPath = lmdbFolder.getAbsolutePath();\r\n        addressFilesToLMDBConfigurationWrite.lmdbConfigurationWrite.lmdbDirectory = lmdbFolderPath;\r\n        AddressFilesToLMDB addressFilesToLMDB = new AddressFilesToLMDB(addressFilesToLMDBConfigurationWrite);\r\n        addressFilesToLMDB.run();\r\n        return lmdbFolder;\r\n    }\r\n}\r\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/enums/P2PKH.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses.enums;\n\nimport java.nio.ByteBuffer;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport org.bitcoinj.base.Network;\nimport org.bouncycastle.util.encoders.Hex;\n\npublic enum P2PKH implements PublicAddress {\n    \n    /**\n     * https://chainz.cryptoid.info/42/address.dws?7793.htm\n     */\n    _42Coin(\"4MTfaF2ummgMp456oxRqefv3YSXPAJJUrt\", \"55136a92273338f277a5d8a845e637b7f4b8f1b2\"),\n    /**\n     * https://chainz.cryptoid.info/alias/address.dws?53237.htm\n     */\n    Alias(\"SSvrL2DGaCHFTbEA3CBx6pNTzs6EMXfrcp\", \"3dd0c10264dc3167da849fd62f297b7d2ae0c556\"),\n    /**\n     * https://chainz.cryptoid.info/agm/address.dws?110142.htm\n     */\n    Argoneum(\"MJuv7nHoyyv7F4Dy8m33uMPqitnkRrRxsw\", \"78ce046cb8eb2e3671e9f96cb96923357acc156e\"),\n    /**\n     * https://chainz.cryptoid.info/aby/address.dws?4281.htm\n     */\n    Artbyte(\"CVVdgmYmygNSParn5SR8agYKEMsiMVFQiF\", \"8eee0ae5d8eaa9a0440feb600e41a1463f7d7b39\"),\n    /**\n     * https://chainz.cryptoid.info/aur/address.dws?947212.htm\n     */\n    AuroraCoin(\"AYZUxKP8JcgwxksZTnDKyAeb5o4EwYXyiT\", \"b822342d1c6b82cc8979128cbf76186463c3a6c0\"),\n    /**\n     * https://chainz.cryptoid.info/b3/address.dws?1103.htm\n     */\n    B3Coin(\"SSYpeH33oR9MqnFufvET9Zv9968aDv9k6r\", \"39a6322da11d08048136fe580b4c69ff32571280\"),\n    /**\n     * https://chainz.cryptoid.info/bqc/address.dws?563888.htm\n     */\n    BBQCoin(\"bF4YneWzKSnyirMsuWd1dLqY2ACuBdLvE5\", \"199596c432527bc1cef625d465a122a12c87d65b\"),\n    /**\n     * https://chainz.cryptoid.info/bean/address.dws?2910182.htm\n     */\n    BeanCash(\"2XkvbsZ6Tza19Lwix4HBwK9aHgXqV6bqAC\", \"cd99b30b02ae8392b4ef41060ae040202b5d4331\"),\n    /**\n     * https://chainz.cryptoid.info/bbp/address.dws?1816663.htm\n     */\n    Biblepay(\"BCkjnP5jbs87VnPQZqBKrBqZB6j7icUCnc\", \"5b17f002a587662b46bf597f679a21ab89425d48\"),\n    /**\n     * https://chainz.cryptoid.info/bay/address.dws?68031.htm\n     */\n    BitBay(\"BJLZ29gAk9aGW9HoAnsEzqmWp6BX7tZEN8\", \"9855b998e3207a7c21357b5ecf10a46265dae9b0\"),\n    /**\n     * https://chainz.cryptoid.info/bbk/address.dws?348283.htm\n     */\n    BitBlocks(\"BKxdSFuJQDgMgegACDtnv5SoR5iqB5WATk\", \"aa2082ea8a4ea667f767d37fdea9986b14469006\"),\n    /**\n     * https://privatekeys.pw/bitcoin/address/1JRW4d8vHZseMEtYbgJ7MwPG1TasHUUVNq\n     */\n    Bitcoin(\"1JRW4d8vHZseMEtYbgJ7MwPG1TasHUUVNq\", \"bf1c61ac19576d71d4623b185f3bae2a3d4df6bc\"),\n    /**\n     * https://privatekeys.pw/bitcoin-cash/address/qz7xc0vl85nck65ffrsx5wvewjznp9lflgktxc5878\n     */\n    BitcoinCash(\"qz7xc0vl85nck65ffrsx5wvewjznp9lflgktxc5878\", \"bc6c3d9f3d278b6a8948e06a399974853097e9fa\"),\n    /**\n     * https://privatekeys.pw/address/bitcoin-cash/qzh96ajgz9ufvs4zmrzq8jr95s7nm0qlnclvk3vpe0\n     */\n    BitcoinCashWithPrefix(\"bitcoincash:qzh96ajgz9ufvs4zmrzq8jr95s7nm0qlnclvk3vpe0\", \"ae5d764811789642a2d8c403c865a43d3dbc1f9e\"),\n    /**\n     * https://bitinfocharts.com/de/bitcoin%20gold/address/GUGsnYNyGYDe4GT2iQKLDjKFPpd4KBXMQB\n     */\n    BitcoinGold(\"GUGsnYNyGYDe4GT2iQKLDjKFPpd4KBXMQB\", \"726975f819dc2043a0350257e92560e59d2e48ae\"),\n    /**\n     * https://btc.cryptoid.info/btco/address.dws?13423.htm\n     */\n    BitcoinOil(\"BY1DJzLaaTnjcueh2QLTnV3C8EBHWymcPN\", \"2e3f213ff41f777385de34e333d79c17efe04015\"),\n    /**\n     * https://chainz.cryptoid.info/xbc/address.dws?117821.htm\n     */\n    BitcoinPlus(\"BMPf5LdLW5bRtG7VnTsKH2tQBd4RpVatrW\", \"b9d4679855e410bb7e3881594299b2b9e3f5cc9c\"),\n    /**\n     * https://privatekeys.pw/bitcoin-testnet/address/miner8VH6WPrsQ1Fxqb7MPgJEoFYX2RCkS\n     */\n    BitcoinTestnet(\"miner8VH6WPrsQ1Fxqb7MPgJEoFYX2RCkS\", \"23e077ffac6f109795a82021dc1698bd9ce40119\"),\n    /**\n     * https://chainz.cryptoid.info/btx/address.dws?6572703.htm\n     */\n    BitCore(\"2NuwYZ1frd3s7FPTGLqkR2zNLTviQcac7o\", \"6c9519147914a961d277d5daff370ae1c7c4a5fa\"),\n    /**\n     * https://chainz.cryptoid.info/btmk/address.dws?1351759.htm\n     */\n    Bitmark(\"bb2CrvTj9EfwxYkqkf5oYpEq8sTxxxTzzV\", \"f486a398c5071b090a64b41c97bf42024063eb3d\"),\n    /**\n     * https://bitinfocharts.com/de/blackcoin/address/BF58Wm7hXSPXxfXm6HwrkWAr45qrZhNHJu\n     */\n    BlackCoin(\"BF58Wm7hXSPXxfXm6HwrkWAr45qrZhNHJu\", \"7482a6aabd8e0bdb6d56a507a6f1352f7cc872fa\"),\n    /**\n     * https://chainz.cryptoid.info/bbtc/address.dws?1165674.htm\n     */\n    BlakeBitcoin(\"2gpsus4Tvd7KDPErd4bWTY3CMqcNa2B7BiZ\", \"1e227f527ddb3ba72ebdf7b97749a2fd4835d121\"),\n    /**\n     * https://chainz.cryptoid.info/blc/address.dws?673727.htm\n     */\n    Blakecoin(\"Bdzkka2a7GUBSgqffVYwmkPjzvUGWC8dc9\", \"6ff9b6dba70fb1e94f27a03bccbb991b82051a6f\"),\n    /**\n     * https://chainz.cryptoid.info/block/address.dws?16204.htm\n     */\n    Blocknet(\"BUE65eaeh3NZwNm2p5yKSstxteYvShi4yu\", \"04cdffba976b79c0d25f06c56151fef6a2a3156b\"),\n    /**\n     * https://chainz.cryptoid.info/boli/address.dws?25860.htm\n     */\n    BolivarCoin(\"bKkVYXDjG8cRrR11cvmujAg7RkVHD2Whz7\", \"4d0405e0b2932f994cc0f686512a3ccd2c7d714d\"),\n    /**\n     * https://chainz.cryptoid.info/bytz/address.dws?547646.htm\n     */\n    BYTZ(\"sLR4SH5jyqyBW7PSvynBcuj3ftSxF89A6s\", \"17c40395c01837b0661ca7542b0812eb685d3dbc\"),\n    /**\n     * https://btc.cryptoid.info/cdn/address.dws?124.htm\n     */\n    CanadaECoin(\"CQcWHGHSwa3oNVdKMQ2QQrsprAusKVHpgh\", \"596224cf7ea3ea29af56db750c1056c9769415fa\"),\n    /**\n     * https://chainz.cryptoid.info/cat/address.dws?161276.htm\n     */\n    Catcoin(\"9jMLSxzshX8dHvv2SjhrfGcKq15UsyjeZY\", \"b248332ed86b2041fe7222953cbc4de6607ab7b6\"),\n    /**\n     * https://chainz.cryptoid.info/chess/address.dws?142577.htm\n     */\n    ChessCoin(\"CahtBj65GuRju1qLkxhx1Ebc8FzGKECNG1\", \"c817c433719ca903caba000ec6763da7f3675d7a\"),\n    /**\n     * https://chainz.cryptoid.info/clam/address.dws?3846102.htm\n     */\n    Clam(\"xJDCLAMZpUG2XsTdek7ZBSW5RhUxHL5MrV\", \"6ca9d69643c78efc8f82a62b73793f711c3b6c2c\"),\n    /**\n     * https://chainz.cryptoid.info/cloak/address.dws?316050.htm\n     */\n    CloakCoin(\"C5REwXC5GL9HN3bLy6XcikhwLzitcE2Kha\", \"86d65f6ff0ecacf26f33a31a7d74f22f426ff77b\"),\n    /**\n     * https://chainz.cryptoid.info/cnote/address.dws?CPZPjKt9Bm6CAiV3ycS8dd4W5toJPbJive.htm\n     */\n    CNote(\"CPZPjKt9Bm6CAiV3ycS8dd4W5toJPbJive\", \"4dd34d4a0938d11f0a4f2c2ac8e60115e0696c63\"),\n    /**\n     * https://chainz.cryptoid.info/cno/address.dws?221360.htm\n     */\n    Coino(\"UWdeqR8s34asJ1qEtWdWeCyNDqg3aXeCjH\", \"5edf2ec006b5312443f66cc966472d2b1b385b89\"),\n    /**\n     * https://chainz.cryptoid.info/colx/address.dws?116595.htm\n     */\n    ColossusXT(\"DSesymccyAQr6LjGLCHsvHzE41uKMk86XS\", \"ebfca2b8c5f6bdcc926ee3fe238a74c1440e22a7\"),\n    /**\n     * https://chainz.cryptoid.info/comp/address.dws?41809.htm\n     */\n    Compound(\"CHHJHhRUsWfi2jgJjqg839FVQ9RA7nsuUr\", \"08f7596368cb2edab1c2621ff97b5a76bbb0ef6e\"),\n    /**\n     * https://chainz.cryptoid.info/crw/address.dws?1628649.htm\n     */\n    CROWN(\"CRWVHacqVcMNdCduFLTKRT9EmiJCku7ydH6R\", \"7507bdfe41900b209a5f8d341b867cbc72f470ec\"),\n    /**\n     * https://chainz.cryptoid.info/shares/address.dws?355140.htm\n     */\n    Cryptoshares(\"B9M5WjVn3MbGgsp9TpnVP1mh5Y6bDeZphw\", \"35b60c0baaf8bd75b0d6ae0160adc906eba7e62c\"),\n    /**\n     * https://chainz.cryptoid.info/cure/address.dws?12256.htm\n     */\n    Curecoin(\"B4dbDb5Qt7DifAd26LqJZi756fNB9YS2JB\", \"01fcde97ab8306f16ea73417c5e474c42b647ffb\"),\n    /**\n     * https://privatekeys.pw/dash/address/XdAUmwtig27HBG6WfYyHAzP8n6XC9jESEw\n     */\n    Dash(\"XdAUmwtig27HBG6WfYyHAzP8n6XC9jESEw\", \"1b2a522cc8d42b0be7ceb8db711416794d50c846\"),\n    /**\n     * https://chainz.cryptoid.info/defcon/address.dws?DK18QNPWoD4PYRXDSzWsyoTLSPhxmEYKRn.htm\n     */\n    Defcon(\"DK18QNPWoD4PYRXDSzWsyoTLSPhxmEYKRn\", \"980ffd3fd11b82d4e5f7e049e62c41269f7170e2\"),\n    /**\n     * https://chainz.cryptoid.info/dfi/address.dws?2581182.htm\n     */\n    DeFiChain(\"dbxMfrpLMQXUdcdz8dUs5gp97nzH5A2br5\", \"f7330ba6437fe7454c8e46f967fc28ca01cd5d2f\"),\n    /**\n     * https://chainz.cryptoid.info/dem/address.dws?85.htm\n     */\n    DeutscheEMark(\"NbN8X6sUKw9cuX5JYX7X8RS2ro5ZbkAFDf\", \"a97c7e369e2a6143f740a102dff61ba39e8aec39\"),\n    /**\n     * https://chainz.cryptoid.info/dmd/address.dws?250463.htm\n     */\n    Diamond(\"dZ2n5pMvviVjps7kJ4CYMniakSeDLjz4su\", \"d720b604208ce237d575dc2223fec7214488864a\"),\n    /**\n     * https://chainz.cryptoid.info/dimi/address.dws?E78M6JWfXF219B721XmUatwPtcXonWPtua.htm\n     */\n    DiminutiveCoin(\"E78M6JWfXF219B721XmUatwPtcXonWPtua\", \"92034764067da1cfe5a5c7e3f0a34f58a47dd878\"),\n    /**\n     * https://dgb.tokenview.io/en/address/DUFy8rH6dxkGutvo43WZryXjR3DU612sjh\n     */\n    Digibyte(\"DUFy8rH6dxkGutvo43WZryXjR3DU612sjh\", \"fd979fe2f333d8a6cc0cb21eeb34d958a2691aa8\"),\n    /**\n     * https://chainz.cryptoid.info/dgc/address.dws?1250320.htm\n     */\n    DigitalCoin(\"DQMLne3GZHo4uiu5nWsxdFsTrrmxYJnubS\", \"d2bb4667cb0c1b5d7eae0a97d2af3d83961778f4\"),\n    /**\n     * https://chainz.cryptoid.info/dime/address.dws?1095943.htm\n     */\n    Dimecoin(\"7LgAUerFPc2RfGJ9bLK14NCH2ZmXZNFnc4\", \"c11e4bc44d8874da582f33b25304fa3207d2b229\"),\n    /**\n     * https://chainz.cryptoid.info/divi/address.dws?896418.htm\n     */\n    Divicoin(\"DGu4qUwJNK3MW4EA1YgYoNMPgvBfggN8az\", \"80fa43aa6c5b022acf18b7a82ee866e334e035a0\"),\n    /**\n     * https://privatekeys.pw/dogecoin/address/DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L\n     */\n    Dogecoin(\"DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L\", \"830a7420e63d76244ff7cbd1c248e94c14463259\"),\n    /**\n     * https://chainz.cryptoid.info/dogm/address.dws?57664657.htm\n     */\n    Dogmcoin(\"DBs4WcRE7eysKwRxHNX88XZVCQ9M6QSUSz\", \"49c0882928a51fe36c50977417a9a34025912803\"),\n    /**\n     * https://btc.cryptoid.info/doi/address.dws?54325.htm\n     */\n    Doichain(\"N6QZUS3kbPyyTHa1Km6YKereP4rNjiiCyJ\", \"6bd681fb9d151be554e28d3c95b9fb73d9e6c11c\"),\n    /**\n     * https://chainz.cryptoid.info/efl/address.dws?228227.htm\n     */\n    eGulden(\"LfWE9Jqe8sJG31eeYemjvJN5yPyYxDNRJ1\", \"de766d85720138fc3fef6192e8c3641c55d9c867\"),\n    /**\n     * https://chainz.cryptoid.info/elt/address.dws?5151818.htm\n     */\n    Electron(\"eCYQZH1khh3p6LEWYE2skmSuDU8UPuZu7T\", \"7297dfd7cc4bacaf7400f0f27d09907701781870\"),\n    /**\n     * https://chainz.cryptoid.info/hyp/address.dws?187625.htm\n     */\n    Element(\"pQBXh5QCNMSu5kAqc3xzc1XUhePncwugmA\", \"6f8f0a226685adc6654c5e7f3ba1746515f2e1a3\"),\n    /**\n     * https://chainz.cryptoid.info/1337/address.dws?758581.htm\n     */\n    Elite(\"LZ1mXdpVU9akMvav4BKXXbg28MUzVLNGJB\", \"9743cf1eae02588033f86ef3b48204561df43197\"),\n    /**\n     * https://chainz.cryptoid.info/emd/address.dws?1369726.htm\n     */\n    Emerald(\"EnMcky7NAEaJUEDS5DfG4J6VQ4So66XDqK\", \"4052ab77e7f4ea9ffe56b439de36bf4f64155123\"),\n    /**\n     * https://chainz.cryptoid.info/egc/address.dws?259889.htm\n     */\n    EverGreenCoin(\"EN4TgTCzrfpBxvXFKGyjm7Esad3gZXBnhc\", \"35d10077a94254b7194328851896a53f154ead69\"),\n    /**\n     * https://bitinfocharts.com/de/feathercoin/address/7E2vzSfb8o3N8E3PEZ6A48sp6bUGUTA8ro\n     */\n    Feathercoin(\"7E2vzSfb8o3N8E3PEZ6A48sp6bUGUTA8ro\", \"7842e48f5012d40ec702ec41d377559bc51f817a\"),\n    /**\n     * https://chainz.cryptoid.info/firo/address.dws?1494520.htm\n     */\n    Firo(\"a8tXPzGEYxcehK6ehfpCUXTtQ6VocQHHRT\", \"59a837e0745d9119d7ae272be5239ebb080def77\"),\n    /**\n     * https://chainz.cryptoid.info/freed/address.dws?35349.htm\n     */\n    Freedomcoin(\"TZgGMmNmu7ozAuwcQ7bgKapVQovn4wxzMw\", \"040ebfefff7fe443ed5f1bc5b0fbb73d6ce44578\"),\n    /**\n     * https://bitcointalk.org/index.php?topic=822498.0\n     */\n    GapCoin(\"GQE3hMaBz1uCCMATzXGfYK13A8PjqxKxz6\", \"45fffb945d96b0ba152d9e3c76245bf67f4ef441\"),\n    /**\n     * https://chainz.cryptoid.info/gold/address.dws?83174.htm\n     */\n    Goldcash(\"GJU2Y9Nk8mhEcsEXfJRv7y8QLeSEW48Q7c\", \"06d4158cc047ae8b2861fb51817c9e66ea95c42f\"),\n    /**\n     * https://chainz.cryptoid.info/glc/address.dws?3389113.htm\n     */\n    GoldCoin(\"EBjzKcELCkTehejJuk9UFimSHhTYcXB6hf\", \"c4a16b0fcf3e21514795e54cbae1e36e75f77be9\"),\n    /**\n     * https://chainz.cryptoid.info/grs/address.dws?1346801.htm\n     */\n    Groestlcoin(\"Fm5t7ayvYgJX7UF8CYiMRQyLRy6F38Px9S\", \"ae9800906772c4578cb27c0f90e3f165a2bc031e\"),\n    /**\n     * https://chainz.cryptoid.info/hms/address.dws?6549.htm\n     */\n    Hemis(\"HQCt7Rt4gwfnnjcMtyAV4CCPvxojkaEt5F\", \"c1fedc737068099b9379ee2536c54cd929c5c80a\"),\n    /**\n     * https://chainz.cryptoid.info/heirs/address.dws?2933.htm\n     */\n    Herencia(\"HSBNkVSiw1JXe54pcm8sF8gMDViGgChdpv\", \"d7a62ff9cf419b28c2701502c5b98da27dd6d023\"),\n    /**\n     * https://chainz.cryptoid.info/hbn/address.dws?446420.htm\n     */\n    HoboNickels(\"Encp6KpMCfnV7ks3PMmC64xK7bTMNxDPSi\", \"43325ec28ecd5e623eabc3a9390b484a2cfb6389\"),\n    /**\n     * https://chainz.cryptoid.info/html/address.dws?399577.htm\n     */\n    HTMLCOIN(\"HfLvLV5tedPCu3KjB9jmCwXpKg4t1Q8cFX\", \"680deed90b17bb4793d13b9afd1311f117637b9e\"),\n    /**\n     * https://chainz.cryptoid.info/ioc/address.dws?65914.htm\n     */\n    IOCoin(\"iYL3GepzxkhnojHbxriiKub4eSG5yd2gZh\", \"3c80cfa9a979502574351e84ec0f7ef8f0d134bb\"),\n    /**\n     * https://chainz.cryptoid.info/dct/address.dws?501.htm\n     */\n    IDChain(\"DUARKejqgQY56Ro9rr48iggZ4GgqgA4hKN\", \"fc8afcea04e9f1a7da5c893747fee960cfa427d5\"),\n    /**\n     * https://chainz.cryptoid.info/inn/address.dws?17764.htm\n     */\n    Innova(\"i8N8m3h8DXWrBYkFAgCKjnPY2vriezuB5h\", \"35a334ed46aaa35a7795bf1b576850a3406f8800\"),\n    /**\n     * https://chainz.cryptoid.info/il8p/address.dws?111.htm\n     */\n    InfiniLooP(\"EYWLjjKWCTrb8hCTg8RJXUfbnjhNa8rRJ6\", \"a867474e613850d49d8414fce7d8bb966040bb06\"),\n    /**\n     * https://chainz.cryptoid.info/ifc/address.dws?2316816.htm\n     */\n    Infinitecoin(\"iRRmTw3y6dLTG6Qpu1R141yc1rL49wtQQH\", \"f0cd3b9102e339eab7ba40bdb57619263ed89432\"),\n    /**\n     * https://chainz.cryptoid.info/ixc/address.dws?634789.htm\n     */\n    iXcoin(\"xuwcXvEq64V5cYJ8ChrfoiRs53JaB98ee6\", \"f49bea19b0d0c89d12007716268c1c54cc001979\"),\n    /**\n     * https://chainz.cryptoid.info/kobo/address.dws?13486.htm\n     */\n    Kobocoin(\"FMGXA8MyNqu4EuoA5TYjZRB96aPpXRSXWe\", \"a95810cceb527f7c9d968c7fc6fa639e27ff8796\"),\n    /**\n     * https://chainz.cryptoid.info/kmd/address.dws?2911308.htm\n     */\n    Komodo(\"RBmjPBHH65gbBSgLBByM1NxJJWwZMmG3Pa\", \"1b5607bab686183e8cde7f77f5a887e807a4930a\"),\n    /**\n     * https://chainz.cryptoid.info/lana/address.dws?78499.htm\n     */\n    Lanacoin(\"LTdb5KrqryPihAU1RebDCy8tVxi1SVtGqu\", \"5c394d80bcd5525edd67777d3566c39ee52a3872\"),\n    /**\n     * https://privatekeys.pw/litecoin/address/LQTpS3VaYTjCr4s9Y1t5zbeY26zevf7Fb3\n     */\n    Litecoin(\"LQTpS3VaYTjCr4s9Y1t5zbeY26zevf7Fb3\", \"3977ea726e43b1db5c1f3ddd634d56ade26eb0a2\"),\n    /**\n     * https://chainz.cryptoid.info/lcc/address.dws?CdEK8wqqzg5ekA6hT9uwiv1TfPad9Wjx1z.htm\n     */\n    LitecoinCash(\"CdEK8wqqzg5ekA6hT9uwiv1TfPad9Wjx1z\", \"e3c953658a0c16ec171553fc923d7c2e11163d32\"),\n    /**\n     * https://chainz.cryptoid.info/ldoge/address.dws?132909.htm\n     */\n    LiteDoge(\"dcdGuzwAjRH8DwpvyzKyLPdvuArfzXcxtN\", \"fe8f4c38418fea2d9b0c184c812537e78f2f35d0\"),\n    /**\n     * https://chainz.cryptoid.info/lit/address.dws?1790.htm\n     */\n    Lithium(\"8y4ntNNxfGuFFFerq4owz6kxoJsPq5XZ6K\", \"cc81a9d59440c823efc483c73c121b7074083a7a\"),\n    /**\n     * https://chainz.cryptoid.info/lky/address.dws?358026.htm\n     */\n    Luckycoin(\"LBZYLUyFVyA3FymzQD7EpFfPNC28SLwpX3\", \"abf35719593fd163e15fb9daba4752e3ce0fbda5\"),\n    /**\n     * https://chainz.cryptoid.info/lynx/address.dws?999646.htm\n     */\n    Lynx(\"KJ2MGS3jq4DPkVmE1ephMCbT7ojDcDSJRG\", \"769eca30fe71718db7fba89f101d243d55d50b02\"),\n    /**\n     * https://chainz.cryptoid.info/mn2/address.dws?3764.htm\n     */\n    MasterNoder2(\"JXdRe3J2ZP3U865Y4jLZwGheNV5nRarJKM\", \"8fa35695a1d627429797681c059a8efed34188ab\"),\n    /**\n     * https://chainz.cryptoid.info/moon/address.dws?1498374.htm\n     */\n    Mooncoin(\"MR3pPKTnPAdGaGAabC47ax954hzufzobkr\", \"bc1d5093b7e68e334b973f20adeb54ba85389a76\"),\n    /**\n     * https://chainz.cryptoid.info/mota/address.dws?66980.htm\n     */\n    MotaCoin(\"MQwRgiHeTj12KsX3DjtwXsVuivPntNMAPb\", \"bae7deb0c0c247b66356c64dee97df7993a6537f\"),\n    /**\n     * https://chainz.cryptoid.info/xmy/address.dws?3867024.htm\n     */\n    Myriad(\"4qJBRfzfsXHjTn22B946xTgV1EjBAAUwN3\", \"866bb2b191810842189f0dab3ad6fcdcf2ee368d\"),\n    /**\n     * https://bitinfocharts.com/de/namecoin/address/NAxZHe6yUCADnGAeCs4xrkgEKHjSFVrK5m\n     */\n    Namecoin(\"NAxZHe6yUCADnGAeCs4xrkgEKHjSFVrK5m\", \"9dc42a94d1852c6b42f93e8130d4a589bc3ffa1f\"),\n    /**\n     * https://chainz.cryptoid.info/nyc/address.dws?1710034.htm\n     */\n    NewYorkCoin(\"RWKh9kHForWNUqoAiQpzoekiPUpwhGceRQ\", \"e6d3be0495d42340b2b95d269ffcec077d3a040b\"),\n    /**\n     * https://bitinfocharts.com/de/novacoin/address/4aLpet1cqwr6TuEb8grfAnpvD1eJbTqyvN\n     */\n    Novacoin(\"4aLpet1cqwr6TuEb8grfAnpvD1eJbTqyvN\", \"e261b8251b26231b0e2d62d7f6698d7acee1dbae\"),\n    /**\n     * https://chainz.cryptoid.info/owc/address.dws?AdNSnHTdxx57E7PbQsZ2jKy8JaM3m4P9yc.htm\n     */\n    Oduwacoin(\"AdNSnHTdxx57E7PbQsZ2jKy8JaM3m4P9yc\", \"ece47177e78e643426d866903bde1ec426a07378\"),\n    /**\n     * https://chainz.cryptoid.info/pnd/address.dws?5.htm\n     */\n    PandaCoin(\"PWdoUrPx9F2jeZpQGhFs5jr5CDmuE98Foe\", \"f1d1ec1375ef9cf6ce0232563ea7b611ea04dfb7\"),\n    /**\n     * https://chainz.cryptoid.info/part/address.dws?437060.htm\n     */\n    Particl_P(\"PfF7TAgTcKBLKNqrzBP7BEf1giQ1YzBmfq\", \"50407d0e5fae1e4b440a51aa0ddc75bcc0b3925e\"),\n    /**\n     * https://chainz.cryptoid.info/part/address.dws?168727.htm\n     */\n    Particl_R(\"RQYUDd3EJohpjq62So4ftcV5XZfxZxJPe9\", \"a76d99568f600ad29333229f74b4724bc991192a\"),\n    /**\n     * https://chainz.cryptoid.info/pcn/address.dws?95072.htm\n     */\n    PeepCoin(\"PB2WBA65zL8CA6UmQgBoJkvzd4ukNTwkGx\", \"1aba872ee91a1ee53975bec9222b795d3ac9b22f\"),\n    /**\n     * https://chainz.cryptoid.info/pac/address.dws?1398861.htm\n     */\n    PACProtocol(\"PRppFVk7UgeZEZzEF2zHWkvRPGU4rqzSxc\", \"bd0e82e8d1170adade5253c0293a3904261f73cc\"),\n    /**\n     * https://chainz.cryptoid.info/pak/address.dws?3611.htm\n     */\n    PakCoin(\"PQC6NTc7Pi4reEPWnJEDAmMhqumjmrSAwV\", \"ab24738aec2c21a9263e89b4973b84c7e0263a78\"),\n    /**\n     * https://chainz.cryptoid.info/ppc/address.dws?932101.htm\n     */\n    Peercoin(\"PN9ZrKwPttJxM8VMsfBFtAWzbycpG2cosD\", \"94b9e4350dd548e23642a903b79ec90d65ede272\"),\n    /**\n     * https://chainz.cryptoid.info/pho/address.dws?1869533.htm\n     */\n    Photon(\"Brs3KRPZBUMnFN35j87aRNUtMEqQqDtqf3\", \"fd1dd9c88af3350afc254ad747d5e815a2705315\"),\n    /**\n     * https://chainz.cryptoid.info/pink/address.dws?299.htm\n     */\n    Pinkcoin(\"2Ki78CrqJMZBPP8y4ShhstMJantscKUe24\", \"496fb9eab64aad43243809fe5f7842eed1ae5cea\"),\n    /**\n     * https://chainz.cryptoid.info/pivx/address.dws?884545.htm\n     */\n    PIVX(\"DSfrFyx2pYR2GzxQuVoysfmqaiRbNf9iR6\", \"ec2b9d8bf19a3bd4cf75f1c72823832fab597200\"),\n    /**\n     * https://chainz.cryptoid.info/pot/address.dws?1587087.htm\n     */\n    PotCoin(\"PSSaD2tSKy3NBi3SgeR8UKFXVzjmp8kTj9\", \"c3d1c390d84f32d482eb8e3cfcf120ed82eb3192\"),\n    /**\n     * https://chainz.cryptoid.info/xpm/address.dws?4777847.htm\n     */\n    Primecoin(\"ALcTQaSPKVNdkXMZNG5b75GYHr1C5Yf2Zi\", \"3510a69548ee579eae8271d0f2b81094d48d1b69\"),\n    /**\n     * https://chainz.cryptoid.info/ppc/address.dws?1288727.htm\n     */\n    Peercoin_SmallPrefix(\"p77CZFn9jvg9waCzKBzkQfSvBBzPH1nRre\", \"23c89acd257e796c209f6f1914ed999f45076d10\"),\n    /**\n     * https://chainz.cryptoid.info/put/address.dws?6846.htm\n     */\n    PutinCoinV2(\"PLb6rb9pxN4YtmfUxjzwUW7TeoqzRPu9cY\", \"839deb912be5bd9f306cb7dae3d8fdb7562ba983\"),\n    /**\n     * https://chainz.cryptoid.info/qrk/address.dws?1060048.htm\n     */\n    Quark(\"QNix46KwSXLWZnfaTPeEKo4LAN8rrhgRMS\", \"17417298753389ceed2a4be28c2b4876ddd14d3e\"),\n    /**\n     * https://chainz.cryptoid.info/rtm/address.dws?1909401.htm\n     */\n    RaptoreumCore(\"RSbJLCmy8bntuXSeCkFJN72y3ZS1jWopXC\", \"bde6d877af4d3bcc751ed975cfb8a3d2ae281a4d\"),\n    /**\n     * https://bitinfocharts.com/de/reddcoin/address/RdLmuVt2ByWxXhiqhKSk4aV9UPLj6Lu3HL\n     */\n    Reddcoin(\"RdLmuVt2ByWxXhiqhKSk4aV9UPLj6Lu3HL\", \"33d101e6da33f9d1da43069cfd7bf370208c9c37\"),\n    /**\n     * https://chainz.cryptoid.info/sls/address.dws?1722.htm\n     */\n    SaluS(\"SMi87Up6Jh6GKTGFGfx1LLPKwFFWKRhDA3\", \"048fe4a5563845f36912a0878c03f1871ddc251b\"),\n    /**\n     * https://chainz.cryptoid.info/sxc/address.dws?930873.htm\n     */\n    SexCoin_R(\"RxZUt9y7zAAD9dZrNnxzAh4RY2qSTVJkDi\", \"06a2983808b90eabc717fd46cfaa7b970bb7b59c\"),\n    /**\n     * https://chainz.cryptoid.info/sxc/address.dws?952091.htm\n     */\n    SexCoin_S(\"SH6sWzoWUnVz2kFJ4CrMmdkiTKwWejg1yc\", \"d204a600a32353e2f1e0035d9308073f22a98036\"),\n    /**\n     * https://chainz.cryptoid.info/slm/address.dws?77842.htm\n     */\n    Slimcoin(\"SfkdJxgVVPR1S8DomypDfihAyRcthFCCzm\", \"ca7b5cc5b8e95a01f32f0dbc6358d8020aa247a0\"),\n    /**\n     * https://chainz.cryptoid.info/smly/address.dws?940996.htm\n     */\n    Smileycoin(\"BDKdA9AkMvcQSHeMKy5ua6TJ4PnCK4vsQd\", \"61502257e1724b08f97ae822ef304a619d09d86a\"),\n    /**\n     * https://chainz.cryptoid.info/smoke/address.dws?1.htm\n     */\n    Smoke(\"SRAz9FdB9MsmpvdmgQUXwzxFmjryCp5DHQ\", \"2a8cd9528e74d0da9a1bab9a5cafc06d826c8cb3\"),\n    /**\n     * https://btc.cryptoid.info/rod/address.dws?676451.htm\n     */\n    SpaceXpanse(\"RFufZfLKFiZrDjQUZrEFDCr5din6syy8gM\", \"48b6ac418c0622e4bf41e21d142638d2a9fd445f\"),\n    /**\n     * https://chainz.cryptoid.info/spk/address.dws?194876.htm\n     */\n    Sparks(\"Gc5z6Wrx9j5oHz2BbFAYK3fTxxhju1AuCZ\", \"c81b28a348c3592195395fac9608f94ca2ab6b60\"),\n    /**\n     * https://chainz.cryptoid.info/stk/address.dws?24242.htm\n     */\n    Stakecoin(\"JM8BsqX9cQYWeKzrtpxA6z5Au1WXJqmnph\", \"1c6a878a1e7ff50fb82d5bb91d5017035d3d56aa\"),\n    /**\n     * https://chainz.cryptoid.info/slg/address.dws?88363.htm\n     */\n    Sterlingcoin(\"SeZm4fynaUaxwpsLmTPcXk8pCUbABbe2Z9\", \"bd75222a12897b9430d273cd14fd18c2514732b1\"),\n    /**\n     * https://chainz.cryptoid.info/shnd/address.dws?167849.htm\n     */\n    Stronghands(\"SNDtNuEqiNN1U4p5J9opMXM5UTfSkHRtQn\", \"0a30e8473e2e489d3a5e468a6fadab937f17b4d9\"),\n    /**\n     * https://chainz.cryptoid.info/sys/address.dws?10476.htm\n     */\n    Syscoin(\"SUBbe8vb7ng9CxZE9J3hma2CCkBh5VBHrv\", \"4b92dbc7787cc53b5aa02bc026bd27c5dd5b1d93\"),\n    /**\n     * https://chainz.cryptoid.info/taj/address.dws?43831.htm\n     */\n    TajCoin(\"THNWmgEnfZwE8aSFnCVaXcjqDVucMmJXmy\", \"513147d92076e92214bc2d00331c100fdb93809d\"),\n    /**\n     * https://chainz.cryptoid.info/trc/address.dws?1286494.htm\n     */\n    Terracoin(\"1FkmsofK4BMZPSZhQk55AoPKSiWiS933En\", \"a1d91b9dde62edbccda90476572842c5bdafbd53\"),\n    /**\n     * https://btc.cryptoid.info/roger/address.dws?56145.htm\n     */\n    TheHolyRogerCoin(\"VWHKSae8spVDCXqQLUNWpjmLPERfGrgToN\", \"d73df84312ce9b05929ce462fae447eccff9bc3f\"),\n    /**\n     * https://chainz.cryptoid.info/tzc/address.dws?956019.htm\n     */\n    Trezarcoin(\"TwSNVquvjtSdChxo8dbj7uq2pruKfmXAYM\", \"f2c0d17f28c7785222a1393a231a4aa06382b2a1\"),\n    /**\n     * https://chainz.cryptoid.info/troll/address.dws?41302.htm\n     */\n    Trollcoin(\"TsLrBvjAJXs4PJcj45WKqTL42gTWSM2N7z\", \"c5d4ef4ec1a91d6a7a847f82be51fd01c16327bc\"),\n    /**\n     * https://chainz.cryptoid.info/ufo/address.dws?193002.htm\n     */\n    UFO(\"Bs9EsQi1EnR5gAca148MJiYGx7SyaYN7uA\", \"002e2619af0dfd932513e5f3e855a0357abc9995\"),\n    /**\n     * https://chainz.cryptoid.info/ufohub/address.dws?41.htm\n     */\n    UFOhub(\"UhKK81G37pZxqjLZj3KCBCytFA9LjnXBig\", \"d4109f5d09158a5dc03cf996b675cedaff157d05\"),\n    /**\n     * https://chainz.cryptoid.info/uis/address.dws?690.htm\n     */\n    Unitus(\"ug5uuo39uXq8JaQGoQ7gsrDBSk4oDKhk82\", \"e7f619bc4a9cf90ef5a78c8a0a16c0a98798065d\"),\n    /**\n     * https://chainz.cryptoid.info/umo/address.dws?3456423.htm\n     */\n    UniversalMolecule(\"uYj4bfbjwj3X3mUZabb4hLsNVqiAUB97qi\", \"973bbc9c336870a27eea7b054dee864eaacab414\"),\n    /**\n     * https://chainz.cryptoid.info/uno/address.dws?291074.htm\n     */\n    Unobtanium(\"uRJ4zdTGSLVDTXoVdB7jHHz6W14DhicmWV\", \"45b8c9a7faee655dd92163bf5ff68066b076ac35\"),\n    /**\n     * https://chainz.cryptoid.info/val/address.dws?117121.htm\n     */\n    Validity(\"XeUbUeeR5igC3qoiY7ZdvRNrdq5QvBDFTS\", \"298f874855a346589845ecc35635cfef81788a2e\"),\n    /**\n     * https://chainz.cryptoid.info/xvc/address.dws?22910.htm\n     */\n    Vanillacash(\"8Z7GY7YR2pDLwLxqLmzca6oHXVnT6NbQzU\", \"c5b68ee79f2ba1af86375ab221b2e72728ec89c7\"),\n    /**\n     * https://chainz.cryptoid.info/vrc/address.dws?531079.htm\n     */\n    VeriCoin(\"VSXZqy4WxCtXL8CPjvpndvfJPKkpHM1Aqg\", \"ae0f5034a122fcd995a44c69f7edb1945d4f4daa\"),\n    /**\n     * https://chainz.cryptoid.info/vcn/address.dws?22215.htm\n     */\n    Versacoin(\"VUKvcdKG1UhdcWtwhT8iDN43XC253khqnu\", \"c1cbe947645e17b019b7595c6c86798046df4161\"),\n    /**\n     * https://bitinfocharts.com/de/vertcoin/address/VfukW89WKT9h3YjHZdSAAuGNVGELY31wyj\n     */\n    Vertcoin(\"VfukW89WKT9h3YjHZdSAAuGNVGELY31wyj\", \"40daff13d20e5c9fdbf17badda0a8a2df6c83f06\"),\n    /**\n     * https://chainz.cryptoid.info/vta/address.dws?3929787.htm\n     */\n    VirtaCoin(\"1Cz37kbZyAbYEZWWLXsKB428X1hBFQZCfe\", \"8372dc3199c2ac3f72dce1b11c7da9ae61efe7c3\"),\n    /**\n     * https://chainz.cryptoid.info/xvp/address.dws?40603.htm\n     */\n    VirtacoinPlus(\"VBJoxxG2QmXLXzwTKrxwQNFRQPhrCpUhMN\", \"071bce6346ddba9212682c8177322f491153f6c7\"),\n    /**\n     * https://chainz.cryptoid.info/wdc/address.dws?1582980.htm\n     */\n    WorldCoin(\"WTUGT6Qgj1DXWfJ6vNjyoT2ambqgxNZJdw\", \"349ef771619cc37b392d9872b12eb86e9db20921\"),\n    /**\n     * https://chainz.cryptoid.info/zet/address.dws?87.htm\n     */\n    Zetacoin(\"99zBB5o1KLrHvo6t3MARTnTwA77t3iFfC4\", \"444b928c98c0bf3877640d38c028ac834f8e5431\"),\n    /**\n     * https://privatekeys.pw/zcash/address/t1VShHAhsQc5RVndQLyM1ZbQXLHKd35GkG1\n     */\n    Zcash(\"t1VShHAhsQc5RVndQLyM1ZbQXLHKd35GkG1\", \"7eeb8313a6c3829217d83a28acb0433a3d6a2bb0\");\n    \n    private final String publicAddress;\n    private final String publicKeyHash;\n    \n    P2PKH(String publicAddress, String publicKeyHash) {\n        this.publicAddress = publicAddress;\n        this.publicKeyHash = publicKeyHash;\n    }\n\n    @Override\n    public String getPublicAddress() {\n        return publicAddress;\n    }\n\n    public String getPublicKeyHashAsHex() {\n        return publicKeyHash;\n    }\n    \n    public byte[] getPublicKeyHash() {\n        return Hex.decode(getPublicKeyHashAsHex());\n    }\n    \n    public ByteBuffer getPublicKeyHashAsByteBuffer() {\n        return new ByteBufferUtility(true).getByteBufferFromHex(getPublicKeyHashAsHex());\n    }\n    \n    public String getPublicKeyHashAsBase58() {\n        final Network network = new NetworkParameterFactory().getNetwork();\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(true));\n        return keyUtility.toBase58(getPublicKeyHash());\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/enums/P2SH.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses.enums;\n\nimport java.nio.ByteBuffer;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport org.bitcoinj.base.Network;\nimport org.bouncycastle.util.encoders.Hex;\n\npublic enum P2SH implements PublicAddress {\n    \n    /**\n     * https://chainz.cryptoid.info/42/address.dws?5973.htm\n     */\n    _42Coin(\"9QEnUA3JnXaFXCAjm6fC2naraT6otg6jmV\", \"e0a09e80866feacac2567198f312b1bce774b2e4\"),\n    /**\n     * https://bitcoin.stackexchange.com/questions/62781/litecoin-constants-and-prefixes\n     * https://privatekeys.pw/litecoin/address/M8T1B2Z97gVdvmfkQcAtYbEepune1tzGua\n     * https://privatekeys.pw/bitcoin/address/3MSvaVbVFFLML86rt5eqgA9SvW23upaXdY\n     */\n    BitcoinAndLitecoinDeprecated(\"3MSvaVbVFFLML86rt5eqgA9SvW23upaXdY\", \"d8b83ad7bf8795b9ff61464fcf06f156c28e3e1f\"),\n\n    /**\n     * https://chainz.cryptoid.info/bytz/address.dws?1494.htm\n     */\n    BYTZ(\"8VS5PNwJ8URbpUdbsQAPwazu22TFNg9PiN\", \"9d64a67ad444c2a00373cca73c85fd5f731f1c62\"),\n    /**\n     * https://chainz.cryptoid.info/cloak/address.dws?299452.htm\n     */\n    CloakCoin(\"BsXZiNs4wZurSwHBbLTZywhcqD4JKRX5oM\", \"046707c85e3de21f4f7701f724e0e952c6a5ddad\"),\n    /**\n     * https://privatekeys.pw/dash/address/7dZe6LvtGPd2TLPpARzThqdF4YwAZvAKDv\n     */\n    Dash(\"7dZe6LvtGPd2TLPpARzThqdF4YwAZvAKDv\", \"7a5c931f83bb3a356c2dcf72b24e1bea461df587\"),\n    /**\n     * https://chainz.cryptoid.info/defcon/address.dws?jp6qj5arxERb9xyvRPAHxrvFj9M4BchNdgRbWP9SNnU8aM2VfX65CVckJ4rkeDncswpJv1A.htm\n     */\n    Defcon(\"jp6qj5arxERb9xyvRPAHxrvFj9M4BchNdgRbWP9SNnU8aM2VfX65CVckJ4rkeDncswpJv1A\", \"5b20fbd82666a13dda6c27be3a867e043cf048d5\"),\n    /**\n     * https://chainz.cryptoid.info/dfi/address.dws?2770030.htm\n     */\n    DeFiChain(\"8W8yVQDEaQiJ5PB4Hy8CvKj9pBtD3zqkhb\", \"a520c86a08366941cd90d22e11ac1c7eefa2db37\"),\n    /**\n     * https://privatekeys.pw/dogecoin/address/A8c3xNz2mqsDLFwv5KL5fpH12QEwDaoTXo\n     */\n    Dogecoin(\"A8c3xNz2mqsDLFwv5KL5fpH12QEwDaoTXo\", \"b15b9098e14dc3c48b4f0a6ac548c66771d30f54\"),\n    /**\n     * https://privatekeys.pw/dogecoin/address/9tp7THhBG3fNNFka1AJm95DU3E4x3pwQA3\n     */\n    DogecoinMultisig(\"9tp7THhBG3fNNFka1AJm95DU3E4x3pwQA3\", \"1a11b73ad3dd99d77da9f858cf323205a84dd5da\"),\n    /**\n     * https://privatekeys.pw/litecoin/address/M8T1B2Z97gVdvmfkQcAtYbEepune1tzGua\n     */\n    Litecoin(\"M8T1B2Z97gVdvmfkQcAtYbEepune1tzGua\", \"0605bfbd71b78f7e9fc815fe9cc90aaeb1d9a728\"),\n    /**\n     * https://chainz.cryptoid.info/moon/address.dws?846906.htm\n     */\n    Mooncoin(\"2QovBjnVke4fgn9UXdz9osheNLxQCk3d8R\", \"8161b82d4543b119cd8317ff4d33f278fc4feac7\"),\n    /**\n     * https://chainz.cryptoid.info/xmy/address.dws?4587668.htm\n     */\n    Myriad(\"MAZExxxhYSjr6zmrxd3SRu4sChjYbWW7Ef\", \"1d240263b4555a8fa09d7e1780ea526e22535fd5\"),\n    /**\n     * https://chainz.cryptoid.info/part/address.dws?167783.htm\n     */\n    Particl_2(\"2vSfGkmkaqG9XQusB4nWbk2sJXE6ZnGoyT5X3TroxaJfAVeonry\", \"5487c9b5a7db93e200ca72a2fd32c4d322e70bdc\"),\n    /**\n     * https://chainz.cryptoid.info/part/address.dws?166420.htm\n     */\n    Particl_3(\"34GQxGYXTZeGQSj8Q1typubQaKYQhEGT7X3QV6HDsjwE93kuDBN\", \"5ad51842f557faa595eee94a521c790e94a7beaf\"),\n    /**\n     * https://chainz.cryptoid.info/ric/address.dws?1357243.htm\n     */\n    Riecoin(\"76a914a17ee99993b6fdd0c717a052c35cd654f17e338088ac\", \"a17ee99993b6fdd0c717a052c35cd654f17e3380\"),\n    /**\n     * https://chainz.cryptoid.info/sls/address.dws?3825.htm\n     */\n    SaluS(\"AeZbYSeAK6gWWz7aX1eiPPWYFShfi16cih\", \"f9f8754cfcc9e49ff024a37cd81b8ec99a24164b\"),\n    /**\n     * https://chainz.cryptoid.info/ufo/address.dws?312088.htm\n     */\n    UFO(\"C4viFjPP5YQwPT61ZdLXowJDwJJYiXj4nk\", \"81711c475bc15419e47397817e8bf7cb3e5a145a\"),\n    /**\n     * https://privatekeys.pw/zcash/address/t3JcMe1E5UkFsUtVb7k17eJwXX5FYUewMBy\n     */\n    Zcash(\"t3JcMe1E5UkFsUtVb7k17eJwXX5FYUewMBy\", \"00847bd140242bd1c9c19024bfe00a4acefbbb85\");\n\n    private final String publicAddress;\n    private final String scriptHash;\n\n    P2SH(String publicAddress, String scriptHash) {\n        this.publicAddress = publicAddress;\n        this.scriptHash = scriptHash;\n    }\n\n    @Override\n    public String getPublicAddress() {\n        return publicAddress;\n    }\n\n    public String getScriptHashAsHex() {\n        return scriptHash;\n    }\n\n    public byte[] getScriptHash() {\n        return Hex.decode(getScriptHashAsHex());\n    }\n\n    public ByteBuffer getScriptHashAsByteBuffer() {\n        return new ByteBufferUtility(true).getByteBufferFromHex(getScriptHashAsHex());\n    }\n\n    private String getScriptHashAsBase58() {\n        final Network network = new NetworkParameterFactory().getNetwork();\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(true));\n        return keyUtility.toBase58(getScriptHash());\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/enums/P2WPKH.java",
    "content": "// @formatter:off\n/**\n * Copyright 2025 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses.enums;\n\nimport java.nio.ByteBuffer;\nimport net.ladenthin.bitcoinaddressfinder.ByteBufferUtility;\nimport net.ladenthin.bitcoinaddressfinder.KeyUtility;\nimport net.ladenthin.bitcoinaddressfinder.NetworkParameterFactory;\nimport org.bitcoinj.base.Network;\nimport org.bouncycastle.util.encoders.Hex;\n\n// P2WPKH addresses\npublic enum P2WPKH implements PublicAddress {\n    \n    /**\n     * https://privatekeys.pw/address/bitcoin/bc1qazcm763858nkj2dj986etajv6wquslv8uxwczt\n     */\n    Bitcoin(\"bc1qazcm763858nkj2dj986etajv6wquslv8uxwczt\", \"e8b1bf6a27a1e76929b229f595f64cd381c87d87\"),\n    \n    // Bitcoin Bech32 (P2WPKH)\n    // Created with random data via https://learnmeabitcoin.com/technical/script/p2wsh/\n    // Public Key Hash: 458cda0e1178d8dd97598df1307ea448bc34c76e\n    BitcoinP2WPKH_Random(\"bc1qgkxd5rs30rvdm96e3hcnql4yfz7rf3mwdgcxkc\", \"458cda0e1178d8dd97598df1307ea448bc34c76e\"),\n    \n    /**\n     * https://privatekeys.pw/bitcoin/address/bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\n     */\n    BitcoinP2WPKH(\"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\", \"e8df018c7e326cc253faac7e46cdc51e68542c42\"),\n    \n    // Bitcoin Oil Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/btco/address.dws?3851.htm\n     */\n    BitcoinOil(\"btco1q8xgl5s6sknp0kx3a7axk63p8xk797rnwp4fx7z\", \"3991fa4350b4c2fb1a3df74d6d442735bc5f0e6e\"),\n    \n    // BitCore Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/btx/address.dws?7481872.htm\n     */\n    BitCore(\"btx1q7tn0z9mln8dq7c73dkrfqpx4wkutqh37sdprwv\", \"f2e6f1177f99da0f63d16d869004d575b8b05e3e\"),\n    \n    // BitCore (WKH)\n    /**\n     * https://btc.cryptoid.info/btx/address.dws?6631790.htm\n     */\n    BitCoreWKH(\"wkh_HPOOHTFGYCOP6IBAC6KMKVUQBU6VOHYD\", \"531d86860dc97923d3dda2c2682fce57637e67e5\"),\n    \n    // CanadaECoin Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/cdn/address.dws?cdn1qf7kyhfue3fjn4y09ec6cqqsxq56vh7q3z9ea8e.htm\n     */\n    CanadaECoin(\"cdn1qf7kyhfue3fjn4y09ec6cqqsxq56vh7q3z9ea8e\", \"4fac4ba7998a653a91e5ce358002060534cbf811\"),\n    \n    // DeFiChain Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/dfi/address.dws?df1qvkmmsj6z602rymrx7fn82gqh68dp3v2f068gsu.htm\n     */\n    DeFiChain(\"df1qvkmmsj6z602rymrx7fn82gqh68dp3v2f068gsu\", \"65b7b84b42d3d4326c66f266752017d1da18b149\"),\n    \n    // Digibyte Bech32 (P2WPKH)\n    /**\n     * https://dgb.tokenview.io/en/address/dgb1qnjf7e2a5ezft480kxzmhgg66pnzqk0aawxa06u\n     */\n    Digibyte(\"dgb1qnjf7e2a5ezft480kxzmhgg66pnzqk0aawxa06u\", \"9c93ecabb4c892ba9df630b774235a0cc40b3fbd\"),\n    \n    // Doichain Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/doi/address.dws?2476957.htm\n     */\n    Doichain(\"dc1qzlspyu8t5ax9rspzd7f2ftn4awusl095c3udhg\", \"17e01270eba74c51c0226f92a4ae75ebb90fbcb4\"),\n        \n    // feathercoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/ftc/address.dws?fc1qvr9zesajsdw8aydcndd70wxj2wdgzu6zzltsph.htm\n     */\n    Feathercoin(\"fc1qvr9zesajsdw8aydcndd70wxj2wdgzu6zzltsph\", \"60ca2cc3b2835c7e91b89b5be7b8d2539a817342\"),\n    \n    // Groestlcoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/grs/address.dws?1455068.htm\n     */\n    Groestlcoin(\"grs1qpuf9cmfysp6dgdxmmar9eap8qrf5p2hl6a52pj\", \"0f125c6d248074d434dbdf465cf42700d340aaff\"),\n    \n    // Groestlcoin Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/grs-test/address.dws?673.htm\n     */\n    GroestlcoinTestNet(\"tgrs1qw4z3xrtgx4f6w7akwpp2xa0gupmkv4yauemmm9\", \"7545130d683553a77bb67042a375e8e07766549d\"),\n\n    // litecoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/ltc/address.dws?187430165.htm\n     */\n    Litecoin(\"ltc1qr07zu594qf63xm7l7x6pu3a2v39m2z6hh5pp4t\", \"1bfc2e50b50275136fdff1b41e47aa644bb50b57\"),\n\n    // litecoin cash Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/lcc/address.dws?lcc1qrzlsxpjl0tynu3t2fkrw2ff2dgm0pv53ern0s5.htm\n     */\n    LitecoinCash(\"lcc1qrzlsxpjl0tynu3t2fkrw2ff2dgm0pv53ern0s5\", \"18bf03065f7ac93e456a4d86e5252a6a36f0b291\"),\n\n    // Mooncoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/moon/address.dws?moon1q2rhkqa03lq2hza99ezpfsauvgqmgqz5xjlawjq.htm\n     */\n    Mooncoin(\"moon1q2rhkqa03lq2hza99ezpfsauvgqmgqz5xjlawjq\", \"50ef6075f1f8157174a5c88298778c4036800a86\"),\n\n    // Myriad Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/xmy/address.dws?4567225.htm\n     */\n    Myriad(\"my1qgsy2zfpk63xst000zqs6npyjzrn7udvcnlejcc\", \"4408a12436d44d05bdef1021a9849210e7ee3598\"),\n\n    // namecoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/nmc/address.dws?nc1q2ml905jv7gx0d8z5f7kl23af0vtrjk4j0llmwr.htm\n     */\n    Namecoin(\"nc1q2ml905jv7gx0d8z5f7kl23af0vtrjk4j0llmwr\", \"56fe57d24cf20cf69c544fadf547a97b16395ab2\"),\n    \n    // Riecoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/ric/address.dws?2133357.htm\n     */\n    Riecoin(\"ric1qhklsed3veursw2m0gjt8xftkhm78uhmyk38exe\", \"bdbf0cb62ccf07072b6f4496732576befc7e5f64\"),\n    \n    // SpaceXpanse Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/rod/address.dws?652202.htm\n     */\n    SpaceXpanse(\"rod1qkw670qzp4gg4gkg9g25jvt7z357c7ykwesha3v\", \"b3b5e78041aa1154590542a9262fc28d3d8f12ce\"),\n    \n    // syscoin Bech32 (P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/sys/address.dws?1435968.htm\n     */\n    Syscoin(\"sys1qync7erear7cvpkysvv0a28mj45g2ps0kq9c6qs\", \"24f1ec8f3d1fb0c0d890631fd51f72ad10a0c1f6\"),\n    \n    // TheHolyRogerCoin Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/roger/address.dws?139264.htm\n     */\n    TheHolyRogerCoin(\"rog1q4vs95czpvgffxtsdz0l858gkkda6nmjkzly8qy\", \"ab205a60416212932e0d13fe7a1d16b37ba9ee56\"),\n\n    // UFO Bech32 (P2WPKH)\n    /**\n     * https://btc.cryptoid.info/ufo/address.dws?570258.htm\n     */\n    UFO(\"uf1qpp3rflelg3h79cnr9xcszr0htyk6n2hkusghed\", \"086234ff3f446fe2e26329b1010df7592da9aaf6\"),\n\n    // vertcoin Bech32 (P2WSH or P2WPKH)\n    /**\n     * https://chainz.cryptoid.info/vtc/address.dws?vtc1qa4wejdlw9lmc7ks7l8hplc9fm394u79qjj0792.htm\n     */\n    Vertcoin(\"vtc1qa4wejdlw9lmc7ks7l8hplc9fm394u79qjj0792\", \"ed5d9937ee2ff78f5a1ef9ee1fe0a9dc4b5e78a0\");\n    \n    // See SegwitAddress#WITNESS_PROGRAM_LENGTH_PKH\n    \n    private final String publicAddress;\n    private final String witnessProgramAsHex;\n    \n    P2WPKH(String publicAddress, String witnessProgramAsHex) {\n        this.publicAddress = publicAddress;\n        this.witnessProgramAsHex = witnessProgramAsHex;\n    }\n    \n    @Override\n    public String getPublicAddress() {\n        return publicAddress;\n    }\n    \n    public String getWitnessProgramAsHex() {\n        return witnessProgramAsHex;\n    }\n\n    public byte[] getWitnessProgram() {\n        return Hex.decode(getWitnessProgramAsHex());\n    }\n    \n    public ByteBuffer getWitnessProgramAsByteBuffer() {\n        return new ByteBufferUtility(true).getByteBufferFromHex(getWitnessProgramAsHex());\n    }\n    \n    public String getWitnessProgramAsBase58() {\n        final Network network = new NetworkParameterFactory().getNetwork();\n        KeyUtility keyUtility = new KeyUtility(network, new ByteBufferUtility(true));\n        return keyUtility.toBase58(getWitnessProgram());\n    }\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/enums/PublicAddress.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses.enums;\n\npublic interface PublicAddress {\n    \n    /**\n     * Returns the public address.\n     * @return the public address.\n     */\n    String getPublicAddress();\n}\n"
  },
  {
    "path": "src/test/java/net/ladenthin/bitcoinaddressfinder/staticaddresses/enums/StaticUnsupportedAddress.java",
    "content": "// @formatter:off\n/**\n * Copyright 2020 Bernard Ladenthin bernard.ladenthin@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n// @formatter:on\npackage net.ladenthin.bitcoinaddressfinder.staticaddresses.enums;\n\npublic enum StaticUnsupportedAddress implements PublicAddress {\n    \n    // Scripts with 32 bytes\n    /**\n     * bitcoin Bech32 (P2WSH) with 32 bytes\n     * https://privatekeys.pw/bitcoin/address/bc1qp762gmkychywl4elnuyuwph68hqw0uc2jkzu3ax48zfjkskslpsq8p66gf\n     * The hash of this script has 32 bytes: 0fb4a46ec4c5c8efd73f9f09c706fa3dc0e7f30a9585c8f4d538932b42d0f860\n     */\n    Bitcoin(\"bc1qp762gmkychywl4elnuyuwph68hqw0uc2jkzu3ax48zfjkskslpsq8p66gf\"),\n    \n    // Bitcoin Bech32 (P2WSH)\n    BitcoinP2SH(\"bc1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ss52r5n8\"),\n    \n    // Bitcoin Bech32 (P2WSH)\n    // Created with random data via https://learnmeabitcoin.com/technical/script/p2wsh/\n    // Script Hash: d698321d7b9f5883fa1bf99b9cb87a9cac9bd462affb300a844998a28d67584d\n    BitcoinP2SH_Random(\"bc1q66vry8tmnavg87smlxdeewr6njkfh4rz4lanqz5yfxv29rt8tpxs8z4cmm\"),\n    \n    // Bitcoin Bech32 (P2TR)\n    // Created with random data via https://learnmeabitcoin.com/technical/script/p2wsh/\n    // tweaked public key: 52a5d35869fedad2a5ce56b39d78500124dfb77b612f9931d4d8f7a1398b0d18\n    BitcoinP2TRRandom(\"bc1p22jaxkrflmdd9fww26ee67zsqyjdldmmvyhejvw5mrm6zwvtp5vq9y5p0g\"),\n\n    // Bitcoin Cash Bech32 (P2WSH)\n    /**\n     * https://privatekeys.pw/bitcoin-cash/address/prseh0a4aejjcewhc665wjqhppgwrz2lw5txgn666a\n     */\n    BitcoinCashP2SH(\"prseh0a4aejjcewhc665wjqhppgwrz2lw5txgn666a\"),\n    \n    /**\n     * Erroneous Bitcoin Cash address - invalid format or checksum.\n     * There seems to be an invalid char: F\n     */\n    BitcoinCash_Erroneous0(\"qnfuF7UrkAgwtxcSgZqhkV\"),\n    \n    /**\n     * Erroneous Bitcoin Cash address - invalid format or checksum.\n     * There seems to be an invalid char: E\n     */\n    BitcoinCash_Erroneous1(\"qEPTALtCh3xTWUpTpRn1Rt\"),\n    \n    /**\n     * Erroneous Bitcoin Cash address - invalid format or checksum.\n     * There seems to be an invalid char: P\n     */\n    BitcoinCash_Erroneous2(\"qsrPaN8AtbByikRAUJZTU8\"),\n    \n    /**\n     * Erroneous Bitcoin Cash address - invalid format or checksum.\n     * There seems to be an invalid char: D\n     */\n    BitcoinCash_Erroneous3(\"q4DWJuRAUZv8K7bD4sDS2t\"),\n\n    // P2MS (Pay to Multisig)\n    /**\n     * \n     */\n    BitcoinP2MS(\"d-414f1537e051163a5a558d5e9ee37439\"),\n    /**\n     * https://privatekeys.pw/address/bitcoin-cash/m-6d14a66d55f88b28b41132f32d1f3059\n     */\n    BitcoinCashP2MS(\"m-6d14a66d55f88b28b41132f32d1f3059\"),\n    /**\n     * \n     */\n    BitcoinCashP2MS_2(\"s-8f1a5a77bd8e884c66044ec2081a05b0\"),\n    \n    // Doichain Bech32 (P2WSH)\n    /**\n     * https://btc.cryptoid.info/doi/address.dws?2378564.htm\n     */\n    DoichainP2WSH(\"dc1q7pmm98r4shmvtjwy6u5ulj4tqemq00fkjgrc2a9alj5z5keaf6ysn5t2m0\"),\n    \n    // litecoin Bech32 (P2WSH)\n    /**\n     * https://bitcoin.stackexchange.com/questions/110995/how-can-i-find-samples-for-p2tr-transactions-on-mainnet\n     */\n    Litecoin(\"ltc1qd5wm03t5kcdupjuyq5jffpuacnaqahvfsdu8smf8z0u0pqdqpatqsdrn8h\"),\n    \n    // Riecoin Bech32 (P2SH)\n    /**\n     * https://chainz.cryptoid.info/ric/address.dws?2130005.htm\n     */\n    Riecoin(\"ric1pmm582sczt9zw8zn7j5eflqlle3p9ap75wwcpjewpdp34wscg0kjsmp5h35\"),\n    \n    // P2TR\n    /**\n     * P2TR (Pay-to-Taproot) with 32 bytes\n     * https://bitcoin.stackexchange.com/questions/110995/how-can-i-find-samples-for-p2tr-transactions-on-mainnet\n     * The hash of this script has 32 bytes: a37c3903c8d0db6512e2b40b0dffa05e5a3ab73603ce8c9c4b7771e5412328f9\n     */\n    BitcoinP2TR(\"bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297\");\n    \n    private final String publicAddress;\n\n    StaticUnsupportedAddress(String publicAddress) {\n        this.publicAddress = publicAddress;\n    }\n\n    @Override\n    public String getPublicAddress() {\n        return publicAddress;\n    }\n}\n"
  },
  {
    "path": "src/test/resources/testOpenCLInfo/config_OpenCLInfo.js",
    "content": "{\n    \"command\": \"OpenCLInfo\"\n}\n"
  },
  {
    "path": "src/test/resources/testOpenCLInfo/config_OpenCLInfo.json",
    "content": "{\r\n    \"command\": \"OpenCLInfo\"\r\n}\r\n"
  },
  {
    "path": "src/test/resources/testOpenCLInfo/config_OpenCLInfo.yaml",
    "content": "command: OpenCLInfo\n"
  },
  {
    "path": "src/test/resources/testOpenCLInfo/config_OpenCLInfo.yml",
    "content": "command: OpenCLInfo\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/addresses/fileContainingAddresses0.txt",
    "content": "# comment\r\n12R4kPeSK6i9427ctH15j2NcJ1ST1FT21C,0\r\n13z55AGS14pSPiPpMqAAFHb576tSmSmR77,1\r\n14rDamyE53BNLPSj4cku6ZXiW6xbBdMJ97,2\r\n15ArtCgi3wmpQAAfYx4riaFmo4prJA4VsK,3\r\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/addresses/fileContainingAddresses1.tsv",
    "content": "# comment\r\n15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC;1337\r\n17LYqSzhuWksgoGsgakiWBG8PmbCKyrrac;1337\r\n17RTTUAiiPqUTKtEggJPec8RxLMi2n9EZ9;1337\r\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/addresses/fileContainingAddresses2.csv",
    "content": "# comment\r\n17aDRzRQK8ccBLVBzsms3ZasVKc9q3o3Qk\r\n18LDvu2nqr8a5AK9AHkkqDK6Z65dzbTgtn\r\n1966U1pjj15tLxPXZ19U48c99EJDkdXeqb\r\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/config_AddressFilesToLMDB.json",
    "content": "{\r\n  \"command\": \"AddressFilesToLMDB\",\r\n  \"addressFilesToLMDB\": {\r\n    \"addressesFiles\": [\r\n      \"src/test/resources/testRoundtrip/addresses/fileContainingAddresses0.txt\",\r\n      \"src/test/resources/testRoundtrip/addresses/fileContainingAddresses1.tsv\",\r\n      \"src/test/resources/testRoundtrip/addresses/fileContainingAddresses2.csv\"\r\n    ],\r\n    \"lmdbConfigurationWrite\": {\r\n      \"initialMapSizeInMiB\": 16,\r\n      \"deleteEmptyAddresses\": false,\r\n      \"staticAmount\": 0,\r\n      \"useStaticAmount\": true,\r\n      \"increaseMapAutomatically\": true,\r\n      \"increaseSizeInMiB\": 1,\r\n      \"lmdbDirectory\": \"src/test/resources/testRoundtrip/lmdb\",\r\n      \"useProxyOptimal\": true,\r\n      \"logStatsOnInit\": true,\r\n      \"logStatsOnClose\": true\r\n    }\r\n  }\r\n}"
  },
  {
    "path": "src/test/resources/testRoundtrip/config_Find_1OpenCLDevice.json",
    "content": "{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"keyProducerJavaRandom\": [\r\n      {\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"privateKeyMaxNumBits\": 256\r\n      }\r\n    ],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": {\r\n        \"lmdbDirectory\": \"src/test/resources/testRoundtrip/lmdb\",\r\n        \"useProxyOptimal\": true,\r\n        \"logStatsOnInit\": true,\r\n        \"logStatsOnClose\": false\r\n      },\r\n      \"printStatisticsEveryNSeconds\": 10,\r\n      \"threads\": 8,\r\n      \"delayEmptyConsumer\": 50,\r\n      \"queueSize\": 4,\r\n      \"runtimePublicKeyCalculationCheck\": false,\r\n      \"enableVanity\": false,\r\n      \"vanityPattern\": \"1[Ee][Mm][Ii][Ll].*\"\r\n    },\r\n    \"producerJava\": [],\r\n    \"producerJavaSecretsFiles\": [],\r\n    \"producerOpenCL\": [\r\n      {\r\n        \"platformIndex\": 0,\r\n        \"deviceType\": -1,\r\n        \"deviceIndex\": 0,\r\n        \"maxResultReaderThreads\": 4,\r\n        \"delayBlockedReader\": 50,\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"batchSizeInBits\": 18,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": false,\r\n        \"runOnce\": false\r\n      }\r\n    ]\r\n  }\r\n}"
  },
  {
    "path": "src/test/resources/testRoundtrip/config_Find_SecretsFile.json",
    "content": "{\r\n  \"command\": \"Find\",\r\n  \"finder\": {\r\n    \"keyProducerJavaRandom\": [\r\n      {\r\n        \"keyProducerJavaRandomInstance\": \"SECURE_RANDOM\",\r\n        \"customSeed\": 0,\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"privateKeyMaxNumBits\": 256\r\n      }\r\n    ],\r\n    \"consumerJava\": {\r\n      \"lmdbConfigurationReadOnly\": {\r\n        \"lmdbDirectory\": \"src/test/resources/testRoundtrip/lmdb\",\r\n        \"useProxyOptimal\": true,\r\n        \"logStatsOnInit\": true,\r\n        \"logStatsOnClose\": false\r\n      },\r\n      \"printStatisticsEveryNSeconds\": 10,\r\n      \"threads\": 4,\r\n      \"delayEmptyConsumer\": 50,\r\n      \"queueSize\": 4,\r\n      \"runtimePublicKeyCalculationCheck\": false,\r\n      \"enableVanity\": false,\r\n      \"vanityPattern\": \"1[Ee][Mm][Ii][Ll].*\"\r\n    },\r\n    \"producerJava\": [],\r\n    \"producerJavaSecretsFiles\": [\r\n      {\r\n        \"files\": [\r\n          \"src/test/resources/testRoundtrip/secrets/fileContainingSecrets_BIG_INTEGER.txt\"\r\n        ],\r\n        \"secretFormat\": \"BIG_INTEGER\",\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      },\r\n      {\r\n        \"files\": [\r\n          \"src/test/resources/testRoundtrip/secrets/fileContainingSecrets_DUMPED_RIVATE_KEY.txt\"\r\n        ],\r\n        \"secretFormat\": \"DUMPED_RIVATE_KEY\",\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      },\r\n      {\r\n        \"files\": [\r\n          \"src/test/resources/testRoundtrip/secrets/fileContainingSecrets_SHA256.txt\"\r\n        ],\r\n        \"secretFormat\": \"SHA256\",\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      },\r\n      {\r\n        \"files\": [\r\n          \"src/test/resources/testRoundtrip/secrets/fileContainingSecrets_STRING_DO_SHA256.txt\"\r\n        ],\r\n        \"secretFormat\": \"STRING_DO_SHA256\",\r\n        \"keyProducerId\": \"exampleKeyProducerSecureRandomId\",\r\n        \"batchSizeInBits\": 0,\r\n        \"batchUsePrivateKeyIncrement\": true,\r\n        \"logSecretBase\": true,\r\n        \"runOnce\": true\r\n      }\r\n    ],\r\n    \"producerOpenCL\": []\r\n  }\r\n}"
  },
  {
    "path": "src/test/resources/testRoundtrip/config_LMDBToAddressFile.json",
    "content": "{\r\n  \"command\": \"LMDBToAddressFile\",\r\n  \"lmdbToAddressFile\": {\r\n    \"lmdbConfigurationReadOnly\": {\r\n      \"lmdbDirectory\": \"src/test/resources/testRoundtrip/lmdb\",\r\n      \"useProxyOptimal\": true,\r\n      \"logStatsOnInit\": false,\r\n      \"logStatsOnClose\": false\r\n    },\r\n    \"addressesFile\": \"src/test/resources/testRoundtrip/export.txt\",\r\n    \"addressFileOutputFormat\": \"HexHash\"\r\n  }\r\n}"
  },
  {
    "path": "src/test/resources/testRoundtrip/secrets/fileContainingSecrets_BIG_INTEGER.txt",
    "content": "72155939486846849509759369733266486982821795810448245423168957390607644363272\r\n39929263256442288830290225612580366403172818928633701045115663441379782969864\r\n42379586058257162021782620237913525000692985364990081801945649219990416465578\r\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/secrets/fileContainingSecrets_DUMPED_RIVATE_KEY.txt",
    "content": "5K2YUVmWfxbmvsNxCsfvArXdGXm7d5DC9pn4yD75k2UaSYgkXTh\r\n5JVAXLpkZ21svEzwyimMHn5hAkWNqJq8uGxqUqcRrNb8F4Csp8V\r\n5JXYuGrwSbyp8sKBmiLcvokqSnxALPjKWQMPJXZYyBWKof7c2pk\r\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/secrets/fileContainingSecrets_SHA256.txt",
    "content": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\r\n58472980a1d3449939eadc2652370972d5007fa9c059ce84fb3ab98f544e4a08\r\n5db1fee4b5703808c48078a76768b155b421b210c0761cd6a5d223f4d99f1eaa\r\n"
  },
  {
    "path": "src/test/resources/testRoundtrip/secrets/fileContainingSecrets_STRING_DO_SHA256.txt",
    "content": "test\r\ntest with space\r\n1337\r\n"
  },
  {
    "path": "src/test/resources/vectors.json",
    "content": "{\n    \"english\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\",\n            \"c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04\",\n            \"xprv9s21ZrQH143K3h3fDYiay8mocZ3afhfULfb5GX8kCBdno77K4HiA15Tg23wpbeF1pLfs1c5SPmYHrEpTuuRhxMwvKDwqdKiGJS9XFKzUsAF\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"legal winner thank year wave sausage worth useful legal winner thank yellow\",\n            \"2e8905819b8723fe2c1d161860e5ee1830318dbf49a83bd451cfb8440c28bd6fa457fe1296106559a3c80937a1c1069be3a3a5bd381ee6260e8d9739fce1f607\",\n            \"xprv9s21ZrQH143K2gA81bYFHqU68xz1cX2APaSq5tt6MFSLeXnCKV1RVUJt9FWNTbrrryem4ZckN8k4Ls1H6nwdvDTvnV7zEXs2HgPezuVccsq\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"letter advice cage absurd amount doctor acoustic avoid letter advice cage above\",\n            \"d71de856f81a8acc65e6fc851a38d4d7ec216fd0796d0a6827a3ad6ed5511a30fa280f12eb2e47ed2ac03b5c462a0358d18d69fe4f985ec81778c1b370b652a8\",\n            \"xprv9s21ZrQH143K2shfP28KM3nr5Ap1SXjz8gc2rAqqMEynmjt6o1qboCDpxckqXavCwdnYds6yBHZGKHv7ef2eTXy461PXUjBFQg6PrwY4Gzq\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong\",\n            \"ac27495480225222079d7be181583751e86f571027b0497b5b5d11218e0a8a13332572917f0f8e5a589620c6f15b11c61dee327651a14c34e18231052e48c069\",\n            \"xprv9s21ZrQH143K2V4oox4M8Zmhi2Fjx5XK4Lf7GKRvPSgydU3mjZuKGCTg7UPiBUD7ydVPvSLtg9hjp7MQTYsW67rZHAXeccqYqrsx8LcXnyd\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon agent\",\n            \"035895f2f481b1b0f01fcf8c289c794660b289981a78f8106447707fdd9666ca06da5a9a565181599b79f53b844d8a71dd9f439c52a3d7b3e8a79c906ac845fa\",\n            \"xprv9s21ZrQH143K3mEDrypcZ2usWqFgzKB6jBBx9B6GfC7fu26X6hPRzVjzkqkPvDqp6g5eypdk6cyhGnBngbjeHTe4LsuLG1cCmKJka5SMkmU\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will\",\n            \"f2b94508732bcbacbcc020faefecfc89feafa6649a5491b8c952cede496c214a0c7b3c392d168748f2d4a612bada0753b52a1c7ac53c1e93abd5c6320b9e95dd\",\n            \"xprv9s21ZrQH143K3Lv9MZLj16np5GzLe7tDKQfVusBni7toqJGcnKRtHSxUwbKUyUWiwpK55g1DUSsw76TF1T93VT4gz4wt5RM23pkaQLnvBh7\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter always\",\n            \"107d7c02a5aa6f38c58083ff74f04c607c2d2c0ecc55501dadd72d025b751bc27fe913ffb796f841c49b1d33b610cf0e91d3aa239027f5e99fe4ce9e5088cd65\",\n            \"xprv9s21ZrQH143K3VPCbxbUtpkh9pRG371UCLDz3BjceqP1jz7XZsQ5EnNkYAEkfeZp62cDNj13ZTEVG1TEro9sZ9grfRmcYWLBhCocViKEJae\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo when\",\n            \"0cd6e5d827bb62eb8fc1e262254223817fd068a74b5b449cc2f667c3f1f985a76379b43348d952e2265b4cd129090758b3e3c2c49103b5051aac2eaeb890a528\",\n            \"xprv9s21ZrQH143K36Ao5jHRVhFGDbLP6FCx8BEEmpru77ef3bmA928BxsqvVM27WnvvyfWywiFN8K6yToqMaGYfzS6Db1EHAXT5TuyCLBXUfdm\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art\",\n            \"bda85446c68413707090a52022edd26a1c9462295029f2e60cd7c4f2bbd3097170af7a4d73245cafa9c3cca8d561a7c3de6f5d4a10be8ed2a5e608d68f92fcc8\",\n            \"xprv9s21ZrQH143K32qBagUJAMU2LsHg3ka7jqMcV98Y7gVeVyNStwYS3U7yVVoDZ4btbRNf4h6ibWpY22iRmXq35qgLs79f312g2kj5539ebPM\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth title\",\n            \"bc09fca1804f7e69da93c2f2028eb238c227f2e9dda30cd63699232578480a4021b146ad717fbb7e451ce9eb835f43620bf5c514db0f8add49f5d121449d3e87\",\n            \"xprv9s21ZrQH143K3Y1sd2XVu9wtqxJRvybCfAetjUrMMco6r3v9qZTBeXiBZkS8JxWbcGJZyio8TrZtm6pkbzG8SYt1sxwNLh3Wx7to5pgiVFU\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic avoid letter advice cage absurd amount doctor acoustic bless\",\n            \"c0c519bd0e91a2ed54357d9d1ebef6f5af218a153624cf4f2da911a0ed8f7a09e2ef61af0aca007096df430022f7a2b6fb91661a9589097069720d015e4e982f\",\n            \"xprv9s21ZrQH143K3CSnQNYC3MqAAqHwxeTLhDbhF43A4ss4ciWNmCY9zQGvAKUSqVUf2vPHBTSE1rB2pg4avopqSiLVzXEU8KziNnVPauTqLRo\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo vote\",\n            \"dd48c104698c30cfe2b6142103248622fb7bb0ff692eebb00089b32d22484e1613912f0a5b694407be899ffd31ed3992c456cdf60f5d4564b8ba3f05a69890ad\",\n            \"xprv9s21ZrQH143K2WFF16X85T2QCpndrGwx6GueB72Zf3AHwHJaknRXNF37ZmDrtHrrLSHvbuRejXcnYxoZKvRquTPyp2JiNG3XcjQyzSEgqCB\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"ozone drill grab fiber curtain grace pudding thank cruise elder eight picnic\",\n            \"274ddc525802f7c828d8ef7ddbcdc5304e87ac3535913611fbbfa986d0c9e5476c91689f9c8a54fd55bd38606aa6a8595ad213d4c9c9f9aca3fb217069a41028\",\n            \"xprv9s21ZrQH143K2oZ9stBYpoaZ2ktHj7jLz7iMqpgg1En8kKFTXJHsjxry1JbKH19YrDTicVwKPehFKTbmaxgVEc5TpHdS1aYhB2s9aFJBeJH\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"gravity machine north sort system female filter attitude volume fold club stay feature office ecology stable narrow fog\",\n            \"628c3827a8823298ee685db84f55caa34b5cc195a778e52d45f59bcf75aba68e4d7590e101dc414bc1bbd5737666fbbef35d1f1903953b66624f910feef245ac\",\n            \"xprv9s21ZrQH143K3uT8eQowUjsxrmsA9YUuQQK1RLqFufzybxD6DH6gPY7NjJ5G3EPHjsWDrs9iivSbmvjc9DQJbJGatfa9pv4MZ3wjr8qWPAK\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"hamster diagram private dutch cause delay private meat slide toddler razor book happy fancy gospel tennis maple dilemma loan word shrug inflict delay length\",\n            \"64c87cde7e12ecf6704ab95bb1408bef047c22db4cc7491c4271d170a1b213d20b385bc1588d9c7b38f1b39d415665b8a9030c9ec653d75e65f847d8fc1fc440\",\n            \"xprv9s21ZrQH143K2XTAhys3pMNcGn261Fi5Ta2Pw8PwaVPhg3D8DWkzWQwjTJfskj8ofb81i9NP2cUNKxwjueJHHMQAnxtivTA75uUFqPFeWzk\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"scheme spot photo card baby mountain device kick cradle pact join borrow\",\n            \"ea725895aaae8d4c1cf682c1bfd2d358d52ed9f0f0591131b559e2724bb234fca05aa9c02c57407e04ee9dc3b454aa63fbff483a8b11de949624b9f1831a9612\",\n            \"xprv9s21ZrQH143K3FperxDp8vFsFycKCRcJGAFmcV7umQmcnMZaLtZRt13QJDsoS5F6oYT6BB4sS6zmTmyQAEkJKxJ7yByDNtRe5asP2jFGhT6\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"horn tenant knee talent sponsor spell gate clip pulse soap slush warm silver nephew swap uncle crack brave\",\n            \"fd579828af3da1d32544ce4db5c73d53fc8acc4ddb1e3b251a31179cdb71e853c56d2fcb11aed39898ce6c34b10b5382772db8796e52837b54468aeb312cfc3d\",\n            \"xprv9s21ZrQH143K3R1SfVZZLtVbXEB9ryVxmVtVMsMwmEyEvgXN6Q84LKkLRmf4ST6QrLeBm3jQsb9gx1uo23TS7vo3vAkZGZz71uuLCcywUkt\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"panda eyebrow bullet gorilla call smoke muffin taste mesh discover soft ostrich alcohol speed nation flash devote level hobby quick inner drive ghost inside\",\n            \"72be8e052fc4919d2adf28d5306b5474b0069df35b02303de8c1729c9538dbb6fc2d731d5f832193cd9fb6aeecbc469594a70e3dd50811b5067f3b88b28c3e8d\",\n            \"xprv9s21ZrQH143K2WNnKmssvZYM96VAr47iHUQUTUyUXH3sAGNjhJANddnhw3i3y3pBbRAVk5M5qUGFr4rHbEWwXgX4qrvrceifCYQJbbFDems\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"cat swing flag economy stadium alone churn speed unique patch report train\",\n            \"deb5f45449e615feff5640f2e49f933ff51895de3b4381832b3139941c57b59205a42480c52175b6efcffaa58a2503887c1e8b363a707256bdd2b587b46541f5\",\n            \"xprv9s21ZrQH143K4G28omGMogEoYgDQuigBo8AFHAGDaJdqQ99QKMQ5J6fYTMfANTJy6xBmhvsNZ1CJzRZ64PWbnTFUn6CDV2FxoMDLXdk95DQ\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"light rule cinnamon wrap drastic word pride squirrel upgrade then income fatal apart sustain crack supply proud access\",\n            \"4cbdff1ca2db800fd61cae72a57475fdc6bab03e441fd63f96dabd1f183ef5b782925f00105f318309a7e9c3ea6967c7801e46c8a58082674c860a37b93eda02\",\n            \"xprv9s21ZrQH143K3wtsvY8L2aZyxkiWULZH4vyQE5XkHTXkmx8gHo6RUEfH3Jyr6NwkJhvano7Xb2o6UqFKWHVo5scE31SGDCAUsgVhiUuUDyh\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"all hour make first leader extend hole alien behind guard gospel lava path output census museum junior mass reopen famous sing advance salt reform\",\n            \"26e975ec644423f4a4c4f4215ef09b4bd7ef924e85d1d17c4cf3f136c2863cf6df0a475045652c57eb5fb41513ca2a2d67722b77e954b4b3fc11f7590449191d\",\n            \"xprv9s21ZrQH143K3rEfqSM4QZRVmiMuSWY9wugscmaCjYja3SbUD3KPEB1a7QXJoajyR2T1SiXU7rFVRXMV9XdYVSZe7JoUXdP4SRHTxsT1nzm\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"vessel ladder alter error federal sibling chat ability sun glass valve picture\",\n            \"2aaa9242daafcee6aa9d7269f17d4efe271e1b9a529178d7dc139cd18747090bf9d60295d0ce74309a78852a9caadf0af48aae1c6253839624076224374bc63f\",\n            \"xprv9s21ZrQH143K2QWV9Wn8Vvs6jbqfF1YbTCdURQW9dLFKDovpKaKrqS3SEWsXCu6ZNky9PSAENg6c9AQYHcg4PjopRGGKmdD313ZHszymnps\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"scissors invite lock maple supreme raw rapid void congress muscle digital elegant little brisk hair mango congress clump\",\n            \"7b4a10be9d98e6cba265566db7f136718e1398c71cb581e1b2f464cac1ceedf4f3e274dc270003c670ad8d02c4558b2f8e39edea2775c9e232c7cb798b069e88\",\n            \"xprv9s21ZrQH143K4aERa2bq7559eMCCEs2QmmqVjUuzfy5eAeDX4mqZffkYwpzGQRE2YEEeLVRoH4CSHxianrFaVnMN2RYaPUZJhJx8S5j6puX\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"void come effort suffer camp survey warrior heavy shoot primary clutch crush open amazing screen patrol group space point ten exist slush involve unfold\",\n            \"01f5bced59dec48e362f2c45b5de68b9fd6c92c6634f44d6d40aab69056506f0e35524a518034ddc1192e1dacd32c1ed3eaa3c3b131c88ed8e7e54c49a5d0998\",\n            \"xprv9s21ZrQH143K39rnQJknpH1WEPFJrzmAqqasiDcVrNuk926oizzJDDQkdiTvNPr2FYDYzWgiMiC63YmfPAa2oPyNB23r2g7d1yiK6WpqaQS\"\n        ]\n    ],\n    \"chinese_simplified\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"的 的 的 的 的 的 的 的 的 的 的 在\",\n            \"7f7c7f91ef81f0fb6a3b95b346c50e6472c1d554f8ba90637bad8afce4a4de87c322c1acafa2f6f5e9a8f9b2d2c40e9d389efdc2adbe4445c21a0939fb39e91f\",\n            \"xprv9s21ZrQH143K2LTAgxJMxVMKie6n9HQHMUohP6x2cx1TVBr6dxnL3mnSLRiXjiCM7g2ZF3BHzpdbFuhdeh7ZRrzv2EEjg5Tv7kgKZrqbVLc\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"枪 疫 霉 尝 俩 闹 饿 贤 枪 疫 霉 卿\",\n            \"816a69d6866891b246b4d33f54d6d2be624470141754396205d039bdd8003949fec4340253dde4c8e11437a181ad992f56d5b976eb9fbe48f4c5e5fec60a27e1\",\n            \"xprv9s21ZrQH143K2t2fMBqtVAVWU3JSpmEbbddwouLX8NoBbcTykD1Tm4s9api6K9zvoKSESUsA7aVxbZRunM5yrjZRNZnZckve98hxUorv2Uv\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"壤 对 据 人 三 谈 我 表 壤 对 据 不\",\n            \"07b6eada2601141ef9748bdf5af296a134f0f9215a946813b84338dcfba93c8247b0c3429a91e0a1b85a93bd9f1275a9524acecadc9b516c3cf4c8990f44052c\",\n            \"xprv9s21ZrQH143K2cgeQUKgCSmaRVXFjEGThqrnNFmH71qG8z3bWqYcbX9zakkRxmDp583tqf3cQzmxtn4C2XqinMNb2HkhXBDYhekCB8AwZWV\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 逻\",\n            \"08ac5d9bed9441013b32bc317aaddeb8310011f219b48239faa4adeeb8b79cb0a3e4d1cb460d2dd37888c0a19bef6edd90ced0fd613d48899eab9ee649d77fcd\",\n            \"xprv9s21ZrQH143K3Zkkh1w8EbXYQWAS5ekbitA2WVrswJY9uEJzig2BtairT72n98ySwQUAhYBsLW9EBjJ1XUinrSb69Ty4mttMLnaUooJwsJ3\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 动\",\n            \"b8fb8047e84951d846dbfbbce3edd0c9e316dc40f35b39f03a837db85f5587ac209088e883b5d924a0a43ad154a636fb65df28fdae821226f0f014a49e773356\",\n            \"xprv9s21ZrQH143K36LufUjTLqXnTiY6ach28pUYMkJ63swx4FhjPkzqD9YRqDZ452whYcNzKpPC8yfBm1eomL2z3VLC4zcwU71oKvMQ5NnD4h1\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"枪 疫 霉 尝 俩 闹 饿 贤 枪 疫 霉 尝 俩 闹 饿 贤 枪 殿\",\n            \"74187bbdce2dba25eed3b9aebdc65dcb7c61e74c58591451d47f9c7b7b17545a527880640bfb9cab36989eba1edddf57bfce7340697926de7f0b9ec1e0345c38\",\n            \"xprv9s21ZrQH143K47jLpKzSgdpMLSKP2ZMLXHHUqYYGKbXNE4k3TA2czvJCx5JAJFNkWKZf2B1AbYoUBpc96YoiwM7yfxyr8gvfNNgL7sFNum6\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"壤 对 据 人 三 谈 我 表 壤 对 据 人 三 谈 我 表 壤 民\",\n            \"e3629a601f4b87101c4bb36496e3dbd146063351f5e47c048211faddab78efdb91910f0eea5c8e53cfb851aa3e156b0bb5c501b83baaf5f5d4a1679a5bb7d885\",\n            \"xprv9s21ZrQH143K4RfeWihCeh1FJL9SobvinRW4z76RL2X1TB6xreXgaMvJGggUgagkaNr7zX47YHEDYdzJmig8SG3Scuet8smspn7HicCtwHa\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 裕\",\n            \"013c8d6868537176fac7bfa966e6219830008f03b650b0f18a12fd67d9ebf871c400c5f980aa073ddd1b23d60846e357aee193ce7644b574bf65e04cf913e39c\",\n            \"xprv9s21ZrQH143K2YiskWzQq8kpFFCoFKKU4L8D6Y593dS2sExuVQ4GjnS57RhibwTWjnD7NTCE7ye4cQbCK6Bw674SHb3xWaQYH3NBLFCGYJb\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 性\",\n            \"1981c3e3ddfd80f6e9ee1c5ef27ba2697df3d1468496f1d56ae3d8e0b3f0677bbbdfca954e48eb86fe6a36fc0f597bf18ea00248757a01e82182badff94abbbd\",\n            \"xprv9s21ZrQH143K25ttGBGbx6h9VBpa9ELbpw35XQqDR8deXRyVP2AbtgJ79Nq2cW8KaDizbwuoHUYR1o4tLPhYvSCTNMft4ZEfiDztmjXKPCj\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"枪 疫 霉 尝 俩 闹 饿 贤 枪 疫 霉 尝 俩 闹 饿 贤 枪 疫 霉 尝 俩 闹 饿 搭\",\n            \"b1eb831927f1c488e233725f9c409dd9bdb9342324393fa56d958e8842623d222510c322f5ba2899428ae08ece8bd87788748c67bdfa73588669ab816c5f3555\",\n            \"xprv9s21ZrQH143K4VNNDqCgnETDkPiihzHpxC9wGE6TBGXaeEd9VkQRHQPotwheeaNFGHGKaPWv5zTqfknzgdWiKFC6DqaqBFKjNSmxas968Vz\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"壤 对 据 人 三 谈 我 表 壤 对 据 人 三 谈 我 表 壤 对 据 人 三 谈 我 五\",\n            \"470e61f7e976fa18c7d559e842ba7f39849b2f72ef15428f4276c5160002f36416cd22c2a86bb686d69f6b91818538aa57ae1aab27b3181b92132c59be2b329b\",\n            \"xprv9s21ZrQH143K3bUoGmLq8aXRKzvUhseqrXw1t7XYCirduP5XLJtVxCos3rYLDvW8V7pK3voZ4EWSdeXiKdbWNjxmiPRDfet23Av9VRaR3ej\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 佳\",\n            \"8e6607a07fa664d6e4ead23fcc08caf72216d6f078c3b2e5be94e4b6e8d64c784d36bf9b70144fa05840e9a49899128111be5093a2b552b6ab76c0906e9b0e65\",\n            \"xprv9s21ZrQH143K2ghKxX47TRr4GnQh3diJFN5rJfybjxuwr3xP6pafXrBhwXJsw4HwoiPZ1f6fFPR964eoXybV2su498Ant3kYuYKE3CszLsU\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"蒙 台 脱 纪 构 硫 浆 霉 感 仅 鱼 汤\",\n            \"decd71d2824a1bbadf8c3942f43504a648a8db5f1cac0ae1d0f787728353002a12644b1a6b725147c91682e7f33aec13493b9a779a7dd8ee15a5d10ab21d49e5\",\n            \"xprv9s21ZrQH143K44Xrktko35a7gPGVo91Va79LNer1MzVokcrYKFP6GMLAcuJP3fBSdbRuG2DauFC48H6LmyZLfkUyjpm1R2AxYVbnT2P5tur\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"父 泥 炼 胁 鞋 控 载 政 惨 逐 整 碗 环 惯 案 棒 订 移\",\n            \"ff66373b70b72b34842f936bf3bb44d661fdafaee7740d574fed6aa2ef07783cb6111f2862cbd3fc5528e322dfe054557a74a568a1b46c020cb88938e2293ca0\",\n            \"xprv9s21ZrQH143K3JLu5XeRDQA5RwHh6gUXaQfRf7ihtVguJvd6EFoAzsoyotvNTDZfC6cciies7fhcqaMRTEsZUSbRYqBdaviWRHatRMoHX6s\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"宁 照 违 材 交 养 违 野 悉 偷 梅 设 贵 帝 鲜 仰 圈 首 荷 钩 隙 抓 养 熟\",\n            \"6ba622f907c61e29e44833b08441b7afa84889a48ca90ebf90f585e257662b2c1b0c35ad54088e745c73689921209fdd4b5b8ace5d850e366d7c2042a076e660\",\n            \"xprv9s21ZrQH143K3dE2RQqFbapci6WBj47vZCkLVf4r14QsRZ6Ny2ck6s8tzZQzQaM55Tt4d2tRS9AuFrEJ4yBXsmP8yKeVGXT8E97iRVkDzCj\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"伐 旱 泡 口 线 揭 县 杨 断 芳 额 件\",\n            \"7346996be5f2b02c67ec465c677197375b589b6e8871c842505b139c2d47feca75a2a941623d6486aff6b21c95193a8177960d123cf610f03f3224a9fa7d0eed\",\n            \"xprv9s21ZrQH143K3A2p7cttKM5L39rutYgY4jqZ16z7hpAEdyiT8fr5eKdaHGLMM2ZmsUFNvGcSfyGMp1sz9nVyg3ZXop1hesUbgAvVBzx4rix\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"福 惜 怀 叔 筋 酵 货 科 牙 冒 辈 罩 悬 耕 浇 呵 连 级\",\n            \"09098e00fcc1bfa7d5b9f0c12dfe1993bbd5a0915200a53fb40b2d6d487b969a18463565c1e035569796a7d8b99f82a4c4b17002b0c582037da95bacfeb422b3\",\n            \"xprv9s21ZrQH143K4LdjFgCrosa76XBrNQ4imGB7XNc5MhfkASrmAHVNWYLNGY6kNj8foXBLS9aUD8RDubyj3NKWarmXxRQ28AeWVPbLD3a1FEq\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"仪 未 九 茶 队 梯 妇 孤 托 病 泉 贺 产 绘 吹 测 局 碳 征 墨 晶 帮 息 延\",\n            \"6d55f2dd8d42f1cc5e0b4ef6e8a95200580ff4e29d2a3dfa7f9ddb1af0aa2e93780d84d952d39776a379ddc017847ea01aa01b85dc208e7f69891d5b7cbf2eb0\",\n            \"xprv9s21ZrQH143K2tkCCjLXj2L9Ds9FttWwH6Eqt3uvihwUvpSpTm3RmRtSkapxASEUW5HXE6Qx2H1viBxXbLZVKxyfQ7fyFn6NcDspgJfdPaT\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"济 扶 块 言 穗 定 万 绘 姻 逃 颗 焰\",\n            \"bf8dcc2fb4dc8fd2311943b527864feabfebd5fffb6641555519da3606265e895bab5aa1647f6e5afb0cb6ea4d0b27e8a9f2f49251b68ad6bf898937581351cb\",\n            \"xprv9s21ZrQH143K2i53x2geCJi6A2QJpaHpxeGK8oeMxYs1tUrUwU3ddu9jHVucF3ePQ1koQ1TVFHnfP21ScWzp8xKnMinNUSW5itm7PicXWYW\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"虑 铺 目 祸 英 钩 尤 添 醇 嘛 触 独 起 赋 连 剪 邦 中\",\n            \"07e1a2dc2eea79bb12be53d6fb662edf87796cad60e8d10a655ba39a95c5a68eb21f865a1b2f37d780286adbbddeccba3f7844c8a2b1a82029e6a855c713aecf\",\n            \"xprv9s21ZrQH143K4V2oh58ZSb1CAbYkwB6ThJmTpRC51uKha9hy51R6RVzzbcEog3n6h4u7FtotS9arBvLofX7A3Apvcaedmeg1jkt7Vkt9TtA\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"而 怕 夏 客 盖 古 松 面 解 谓 鲜 唯 障 烯 共 吴 永 丁 赤 副 醒 分 猛 埔\",\n            \"0402ae511062cfacbd5e33637a95e57e2e14fde0c5dd471fe66fc1154b6373802aa8641a78b91658052bff0a5c5bd075f01fc74b0d73e95a890430ff6f0e728e\",\n            \"xprv9s21ZrQH143K4LSoFcKBWtmUHjzuH56srzrkpPfGx3i36UXpVUEtGvCuZ3egRTyDkaqRN5Ec1HXvXGSGTXLyAKzCRnTspi1D9NdmQmWqM5x\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"昏 途 所 够 请 乃 风 一 雕 缺 垫 阀\",\n            \"aa7e38f64810007db63e31c479b9848cd5ffda839546749669bf53476dd036a33fd77d0a13d4418fb536ea78b028fc19533db4bc9e0e12a14a9432cb9fd112a2\",\n            \"xprv9s21ZrQH143K31afj91bWiGw2aC2xHJwrWsMs9MuvEWZETkpWr15ZNF6LFjkHh53iD2bwJYEawvCCvDRaqDsr37fhapgGDkA7UATtwBsZu3\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"瓶 顾 床 圈 倡 励 炭 柄 且 招 价 紧 折 将 乎 硬 且 空\",\n            \"2a6181cf2b069ba30a87228d54770ed5abf61e8151abdb0b27646a87a6100d4b7b496c3ca26f027d0b06724c6c5a469f43a7f1ffb7782e5afb01d143ca65973d\",\n            \"xprv9s21ZrQH143K3ji6aQ9QQi4WkFhAqnrzRANJkYkRWkMqbr51mAV6JYUt85oR8Jt3D7DreQdsb9292ips6VKwpitAhLR7rfLdhYz7zgYei2F\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"柄 需 固 姆 色 斥 霍 握 宾 琴 况 团 抵 经 摸 郭 沙 鸣 拖 妙 阳 辈 掉 迁\",\n            \"4dccb0a3578716975b840c51e279c2af728567ff42e98dd09b9e61742b41d9f30d411a501172cce9b7d5706a480dd4d4e7fb26021a36a74381156b09d251d65a\",\n            \"xprv9s21ZrQH143K2hLNNA7KnimwonwFXCiGVM3K29DgZiTcVUJ8t8jkc2mXUzFZmoFgXWh9UhJFbyKM44Qm2KeGsrEevajZZfKyoLyFmyoDpUx\"\n        ]\n    ],\n    \"chinese_traditional\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"的 的 的 的 的 的 的 的 的 的 的 在\",\n            \"7f7c7f91ef81f0fb6a3b95b346c50e6472c1d554f8ba90637bad8afce4a4de87c322c1acafa2f6f5e9a8f9b2d2c40e9d389efdc2adbe4445c21a0939fb39e91f\",\n            \"xprv9s21ZrQH143K2LTAgxJMxVMKie6n9HQHMUohP6x2cx1TVBr6dxnL3mnSLRiXjiCM7g2ZF3BHzpdbFuhdeh7ZRrzv2EEjg5Tv7kgKZrqbVLc\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"槍 疫 黴 嘗 倆 鬧 餓 賢 槍 疫 黴 卿\",\n            \"f38af46f6bc3222b0f5aa14dd5b8b506e51131510f2450ec9fb52c28617cfa59d436055fe542e25dfa01415639d2171e41796f169f8bbc18516941dfdee8fb72\",\n            \"xprv9s21ZrQH143K2HYJ8dR81cQGust8Gm4MeyfC6off5BvCfffAxE33WhiYxB4aLV6meXP6QmoKZkLX8UJgrZPcA4A2EKU4iaPWenb6Wg9kxzd\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"壤 對 據 人 三 談 我 表 壤 對 據 不\",\n            \"33f373da1a6b4300dad5cc70d2329ed614512e3c8a423673c294110521326ca66753b9663bdd7c844f17d81609a410a61809dd5113823009f729e2f2f940cab9\",\n            \"xprv9s21ZrQH143K4SV7MzxYhSQtxP5gWGCD75QiUsp7z1s7Kuc8b4V4F6wRqKvhdczy3qi2uNeN9Vw4PnKYJtoaFdHFX4qbxweuRDmQqgMjKRJ\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 邏\",\n            \"cfd5f4fa6f2a422811951739b1dad9f5291f9cbc977a14ae9dd35dc8ab17aeec9ee6f1455b20f881838f4f945850765dd002a9abcdbe7be002ffcdaf6f63fdaa\",\n            \"xprv9s21ZrQH143K2BptXPaTm7CCWCs4v3tfG5jGAa9zLqSTKNL1ah8veMWc53hio5grKVriWhKjNKbCA2w6svkL4NC6pkiRwVkbwazVXtjdgEv\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 動\",\n            \"717f4f70c7550da57e42c6b49ac47b5bad3249605ed2f869900596c2de7653a8528380e5c31709ed9c2d19b868bc530158712e97276886b4863d036177bcab33\",\n            \"xprv9s21ZrQH143K39TvGFp5nfiw3zXib4v4waTbxFYoDNoD4pp4DMBneg9MgSqfK4xL7hK1YjDEa5BWMXKVgTxMiNXNSdT3Wv59pD4PB3LDDKP\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"槍 疫 黴 嘗 倆 鬧 餓 賢 槍 疫 黴 嘗 倆 鬧 餓 賢 槍 殿\",\n            \"2b219a8be0a8e27a6b50d0a74eb42175bd23e22cf4081518c9a74cbfe2cbace46f0adad8d390f8a2ac30feb26226db14fbc545d18ba0e56a853cbf103c92539e\",\n            \"xprv9s21ZrQH143K2wC9BUJ9F5CsmV7a6PJQkxc9TT8gUrkoTXurPztKKosq5REGzdEzEuKn221vm2A5KnjrDBC1KcLo4VeYGSkkwxXWYrqSrXW\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"壤 對 據 人 三 談 我 表 壤 對 據 人 三 談 我 表 壤 民\",\n            \"d29225f73231521784d98820ebf0ae4d827c5a9e0c0f8845fd63866cdc70b3a40a2281f3f6c6181c5a53e440528dbf83947a4b2056749cb9cc9c83dcd5c91b0f\",\n            \"xprv9s21ZrQH143K2MQFKxX1ReLYY2rNunsfLpU8F5WRVWeLfauPhD5huvXEzxoPvmLhD3QtSj1Z5jnM51q9NrRjYBaHG5XJzfVsjXWYQop9pXz\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 裕\",\n            \"013c8d6868537176fac7bfa966e6219830008f03b650b0f18a12fd67d9ebf871c400c5f980aa073ddd1b23d60846e357aee193ce7644b574bf65e04cf913e39c\",\n            \"xprv9s21ZrQH143K2YiskWzQq8kpFFCoFKKU4L8D6Y593dS2sExuVQ4GjnS57RhibwTWjnD7NTCE7ye4cQbCK6Bw674SHb3xWaQYH3NBLFCGYJb\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 的 性\",\n            \"1981c3e3ddfd80f6e9ee1c5ef27ba2697df3d1468496f1d56ae3d8e0b3f0677bbbdfca954e48eb86fe6a36fc0f597bf18ea00248757a01e82182badff94abbbd\",\n            \"xprv9s21ZrQH143K25ttGBGbx6h9VBpa9ELbpw35XQqDR8deXRyVP2AbtgJ79Nq2cW8KaDizbwuoHUYR1o4tLPhYvSCTNMft4ZEfiDztmjXKPCj\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"槍 疫 黴 嘗 倆 鬧 餓 賢 槍 疫 黴 嘗 倆 鬧 餓 賢 槍 疫 黴 嘗 倆 鬧 餓 搭\",\n            \"fd50ad67903b2046356e67e55d67309b6f0ccd7c23bfefd049a5b8a40d56c507d73a5517e2d2785f024a7794854594aaad845dd0fbd0432c25a96f2a7181a2cc\",\n            \"xprv9s21ZrQH143K4TP9sQD1LnxuSy6WUe1hF7JMPo4qN6TMX5udfEcJh9x4PqbetYoC9c1hpx7RxP6VcgzdPxPCJ91De4R1TgGNVC9AFhxMwkX\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"壤 對 據 人 三 談 我 表 壤 對 據 人 三 談 我 表 壤 對 據 人 三 談 我 五\",\n            \"d029fc9737b801cb4f9aadf5feed02a117b76ead7058e055cc39cb44864023eb492e6a15c68569d6a03a5b11bf15a456c64e1781a553589b47ab569801239a00\",\n            \"xprv9s21ZrQH143K4bYXrWpQYgiSHDM1iVkNVnyqbpjyZksLS2fmxKCbwQjz3sBFTD1aFY4xWrYdHTyeFYjnYWfKGLc5WCkpokdAZyP9XEGJCsa\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 歇 佳\",\n            \"8e6607a07fa664d6e4ead23fcc08caf72216d6f078c3b2e5be94e4b6e8d64c784d36bf9b70144fa05840e9a49899128111be5093a2b552b6ab76c0906e9b0e65\",\n            \"xprv9s21ZrQH143K2ghKxX47TRr4GnQh3diJFN5rJfybjxuwr3xP6pafXrBhwXJsw4HwoiPZ1f6fFPR964eoXybV2su498Ant3kYuYKE3CszLsU\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"蒙 台 脫 紀 構 硫 漿 黴 感 僅 魚 湯\",\n            \"27ca577f0318b6c6067acce7aefacd12bc9fbbc8e365fdc16bfc0ffd76379b0768dc56877f19eee4c1222dfb5a94a5516c5707e6a6ad070af9a0fe7f7799ac5e\",\n            \"xprv9s21ZrQH143K3FtWQPZHP7Gpf5qgbvXqPNo5iCSfkGhWnATeqM5FuQ3YTx4sSciJx1MjVnbM3XQ16N83x5gNwcsVG7PTf1cRDhvyGZ45EY5\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"父 泥 煉 脅 鞋 控 載 政 慘 逐 整 碗 環 慣 案 棒 訂 移\",\n            \"fcac6cdda6c67e46ea46e66d00df3cfb1e437aa05f1b280f5427c0ce521a94b5a01ab016d235b7944f36d76ba0a297968ae0d882fde95c96cae34e35f2433c82\",\n            \"xprv9s21ZrQH143K4YANCnajhJxfsFsDEZGitTmP934osTHvUmTEtfSaYk8rmvj914uGUYaJH5ALjDgVyNYW5gRGPdQBFaqoSbGkHXhfdVkNVY2\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"寧 照 違 材 交 養 違 野 悉 偷 梅 設 貴 帝 鮮 仰 圈 首 荷 鉤 隙 抓 養 熟\",\n            \"969aaf00b9af97a1c3fd0b7b35480aebf51577658067df966caaf5cace472d2ecdaa2978470be83463262340527c0564d8c57f86764d48e9bebd1ce594955a6e\",\n            \"xprv9s21ZrQH143K3aULbWnFhpGS2h19R5JdizbLLLQTDsGmKP5A1sqQop1Ff8Q7NEetRHRNFR8AAsPm1kr5hGU5VLYKURZeiVe9k5hqVmhZ5zF\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"伐 旱 泡 口 線 揭 縣 楊 斷 芳 額 件\",\n            \"09c172005e7dd81fcd55b87d13f114207ce7726376ea74a1b9085a799b2afbd5ac5526059e722987a65f858e5301edd5f4c91deaf9d7b4f9bcc38919e5ec3725\",\n            \"xprv9s21ZrQH143K2sMUzpWRrPMF1Xx29Yos3Kah6H4E9YaJqDm2yEMXypoKdX1ugkn1Vx3k9Pr2LsKNQnHqoDFP5Jepm2PCkUS1GrQZps1wxkD\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"福 惜 懷 叔 筋 酵 貨 科 牙 冒 輩 罩 懸 耕 澆 呵 連 級\",\n            \"3e09d89450ae45cc1a07ab308649f291ad5c1452da509d7269daef52ddd04db8bbb6bcb8a71322c4d25ed4686d910e84156fccfbac2838ba482bdd1e4b2ea693\",\n            \"xprv9s21ZrQH143K4bLxh3ir6ziqU7t6URBK7uA8Md4tzAd3TAuBNyZREqEoZBevwu8Uw6tfMujFRWrZvCy47nbnKgDhsFaC2hvFJwRdkhnoM1v\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"儀 未 九 茶 隊 梯 婦 孤 托 病 泉 賀 產 繪 吹 測 局 碳 徵 墨 晶 幫 息 延\",\n            \"d687bb89cb435fe1de166e953b41500f3717a497ca35c78322f66cd63e675fe0c8aba92463544631cdd6a985db03bdfcbfd839002ec609879e8768a3ffdb5fea\",\n            \"xprv9s21ZrQH143K2LB4bPuHTErkGLt8DV5BbRsS82ySFPdQr57fzBY5D7VadhJHruxFzVcYdEbDqK8QWPSqj6LCiyQgFFurfnWWm1v6N2nGovN\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"濟 扶 塊 言 穗 定 萬 繪 姻 逃 顆 焰\",\n            \"806655cee21d12c952d6a11c12e742809c4452b6e07458c6ddc2cc2a8920e308476f3c6ba7fbbdab3de3a7bcecd4de5dd82dee7a217d0cd071eaa2313ca390da\",\n            \"xprv9s21ZrQH143K3Kcz7sz3UyDYJhSjUYujBdxFwDHCbqmKWqN3hSf1pjnqoxuAKsQXbnvrxzRBLqPN9BKxHUiYgn1DjhwaStTfZQTCsaTEWxZ\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"慮 鋪 目 禍 英 鉤 尤 添 醇 嘛 觸 獨 起 賦 連 剪 邦 中\",\n            \"b609a4e17fa8c3c0b4da704b1699631f0d85f5b7bcc7d1488270551670b5393a0dfcb4d8eba9860c2c211324bbf3b587763ad1ac6a9e61a4e2e015bb6cc6a58a\",\n            \"xprv9s21ZrQH143K2Gmewuzc56mbdKTqPezqWqk7ih9AdnLc9A2865TYtywU9sZ547mKYFKnbVatAuUUGtqgAz1ENkv9FU85jARHkCmtAGLmExn\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"而 怕 夏 客 蓋 古 松 面 解 謂 鮮 唯 障 烯 共 吳 永 丁 赤 副 醒 分 猛 埔\",\n            \"8ce6b92bf95337a49bfd3d80774c9a73d05046eb2cb41789092a3bfbe7005ca668c427a42f1a93982d9076511330817b6d0bd49ba4f5a39e5756472b162f7ba0\",\n            \"xprv9s21ZrQH143K41g7SsRpGA4g25xDiqjkhq8DNbJD7jgSksvt9kakaTzukN4SfVrUM2A9yGVPggP9eFAmuriRSpPLahm4ngaxvNHyQp82cee\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"昏 途 所 夠 請 乃 風 一 雕 缺 墊 閥\",\n            \"e62457aa7f30c24fa46b90aeba2cbb9e77c28fcafa0c10dab01f5323eb1cef22f23c0e52cb5dffa2b2911a29992213c2cb20564af268eed03ea11292fff1a737\",\n            \"xprv9s21ZrQH143K3JPEGRnwbdy5xdTvVdXEDGJX8gc385oC3H4veWiCVDrdeeFPWrU7Pz3PNMHcZrbutLY1UGs5dE83U925xKXLUrXXpz2ihKw\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"瓶 顧 床 圈 倡 勵 炭 柄 且 招 價 緊 折 將 乎 硬 且 空\",\n            \"6b5591c758a069d3425bf93399398e8ef3e1c32c27f46e0a5284976dcacf25895f5d7747b84f38596247557debd133576932d394ad24c7a00aa24555fa668c5b\",\n            \"xprv9s21ZrQH143K2hh1em7CqtG7uL1bTNG5hfP35X6Y8uwnTDiS9Cm87WNcZvmFHLf3JwoP2W82VzaRejpqr7oPnFLguhVSr5pWnG9YSV4SdeH\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"柄 需 固 姆 色 斥 霍 握 賓 琴 況 團 抵 經 摸 郭 沙 鳴 拖 妙 陽 輩 掉 遷\",\n            \"17ec1a79121f3541e2d78ece35c8cfe7f5763b39d93fa90492c4beca26ee69d3aa7f4b1e6a2ac5e8225e08dded19357ee44b852dca425792842ec8eae09ae43f\",\n            \"xprv9s21ZrQH143K4RoVseL4UENdN7Ag1WmcK7Q6Pk329krQW4RifHJ5sNizkG1PiyRXAouyL7KDFJSQAD1VarGTPftD1yZZAni3QczW8V5gNVG\"\n        ]\n    ],\n    \"czech\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace agrese\",\n            \"872501bed75c98fbf943a67907bf394995f337e9adfa23687282d1135c262421715a0bcccfe2d3f5f8b72c8e2fa12a7a7267f8047b744557f4a9d49d11ccc75f\",\n            \"xprv9s21ZrQH143K3rnjkVvSaFkwgg1J2tnUAeqv8SCEWTWdLVZiJsjM6Z5ieeUnrR1Ws6sDb8Guqp43CXVRmPooUs2cjwefSXh3EyXx2vmzZ96\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"obrazec znak uznat zubovina zeman skupina zrcadlo vzchopit obrazec znak uznat zubr\",\n            \"68e1bd31ed5f20c9ab108c03b524e85209b0b27af80cb5d48fa71d03dbb528b73c2349bb8576f9b68825272984061594f520e54605a4898ba61c433d06bf5de7\",\n            \"xprv9s21ZrQH143K4JXKqKovjKKSb7zgQcgbuKNNjaWyYBjjdny1SyXiPbjzSNUR6uLmNmPJ1NcWzeHDLqmopeTTbZ3DbPobsm4pbDrNrqhEDbK\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"obvinit bageta doma amputace bidlo jedle arogance butik obvinit bageta doma akce\",\n            \"067089f8edbbb8bc8ab6d0f3e29f250d136955745797a20b63fd4372627c51c4576ebd5fb6c6d4825d21f448cc24b342ce3b0117fedf41369cb5a6be77494aa7\",\n            \"xprv9s21ZrQH143K4YKjBNHoBtUM2qhAvjVvXsBZJGAhogbqhBbgTvjRjPSgC5ShPUeGRCRTdRMYLZ7wWxRWwcvgQm9xX7b5udk9p5yfiekNMQK\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zticha\",\n            \"04d0a733d43c640a4492b670a9549c60a358a681891cc2337a01a3c8288cd2941b7e057dbcf2dffd1e614cf5fcc9d38d9228fbd3ea5ceb508b8aacac5f35ccd9\",\n            \"xprv9s21ZrQH143K3pcHonm1bGBQvbLf6Ty3c7HKCyzFr4C4DnvLPaT1JUUJ4MxkWyNhPpCjVsLMJEndqUocNxhqZ3UfFwxAsn7zajkE7n3yXYq\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace balonek\",\n            \"b5eb0b74cb5f2c616e7136182597ab61dd94594d22f15ce6c94e04eb7336a56d3e445ec1279c1f04b861de5f7c6b2fc95227db53be4996de3ba87d6d76b09098\",\n            \"xprv9s21ZrQH143K2Edeaippdsom8CKbdVxcorYqTexQoxhdci7pVuv6K1yFYnGunPP3d6oKyE3ax354UgfNUu6Kes1hvjvJcoyHfyjxwbjhFqM\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"obrazec znak uznat zubovina zeman skupina zrcadlo vzchopit obrazec znak uznat zubovina zeman skupina zrcadlo vzchopit obrazec zmije\",\n            \"93ff13dee31715a6568609df3f7ea295d58728a65611ea03620d2105a0efbbaa39d8b6541b3b5a57a25dbdfd5006f0c58779a7ed196e25a1a97d1442e3f080fa\",\n            \"xprv9s21ZrQH143K3SW9C3X4jc47HaXuDHjRvpCDxoo7PgTpMG5EZoFkDCkCzhs2yMvaUQidKKXBDChe2ns524iFEbrJFqNCPFvR1bjyRmq5rxj\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"obvinit bageta doma amputace bidlo jedle arogance butik obvinit bageta doma amputace bidlo jedle arogance butik obvinit bezinka\",\n            \"1843be39a115dad287e10d256d2e9bb81244cefda2b7ead8a762f53033512abc7b6db26e2ebe8053fb82e313c24bcf62ae84ba4aa2900ca0fcdcb1affc38887a\",\n            \"xprv9s21ZrQH143K3uYc2wzd6UfPLXqfQKsYJVyWL2HeCZ1YKhqd3jt5y4w9bfLTf4bAqvD3NbJ8ifa6vbTvHL2t87wsgi22RXd8c8Moknbzdcc\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zlehka\",\n            \"43b7d9b1b25d046f8a89fb57ba10bed11b5273574bb820eb01cc0733a421f1c98ceb2db42d299e7e96aa2c58435e916821bc9d505525b3b5448ecd4c97babe0b\",\n            \"xprv9s21ZrQH143K3LM3GwVcGcoMnK9UmQKxTaq1GiX1HsG5u76FmfUi5cTcH97WSXxVNLgURJCgL8RT1qDNsiQ9Sw1DDVAhiu4h4xMz6mtFDzL\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace abdikace branka\",\n            \"dd2a9f662649585707dadc6e8b2df2c0e0e2691d53bacea2212aff4063ab4fdc79b703a7ce6744da31cd2ee12e56b9ee0f430a238b892fa660ed0ce879f2c472\",\n            \"xprv9s21ZrQH143K3RHkXA6CEXUxT6nXGMM1zKuxgGQBD6k9gErraXywHoiqx4syweAftp5SCU7XSoFz5T3RbPs3HNZtZFa5JcR9ZD5TUmV15tB\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"obrazec znak uznat zubovina zeman skupina zrcadlo vzchopit obrazec znak uznat zubovina zeman skupina zrcadlo vzchopit obrazec znak uznat zubovina zeman skupina zrcadlo veskrze\",\n            \"f4e4e2d8817cbb3925d6a0e8a2a466dbe1353a5885ec203030722607b8b5f229c71066c18681fda4291d0e323e4f6ba099b5b7efff442adfa14124fd07147fa8\",\n            \"xprv9s21ZrQH143K4bgmXSbkNXn4ntJoQWUwRscM7yiZjzHbBFc5nMmgMeVcVJS6ZqXcWaTp6Phy8PAji336TDSNmiSWK7cmuzCSxkobg11RTN2\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"obvinit bageta doma amputace bidlo jedle arogance butik obvinit bageta doma amputace bidlo jedle arogance butik obvinit bageta doma amputace bidlo jedle arogance cihla\",\n            \"bb8b82baced0db7764e102d1d1f68035269e84ec6c1ed0e09b2a31094330967aff9e1a490a407fef736fb8719c60bfb8cb0be9b27fce97c3b619409c195e2f1d\",\n            \"xprv9s21ZrQH143K2aufrtmAWe6Ppto9BA4jSHu3XmKbMemyWEJ37Zfwxie44JJi8pXDxfjkSv8LxdKKs9rmV1R9SxCfAtcttf6g2JK3mRwPyzM\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zvyk zavolat\",\n            \"3991e1ccc78af78d58cae577b786f7c950e1f23311d0c5f6d51b884d6142a6b4fc91a227c895313bf3d35731682678653101f51546717d60438d54dead32f834\",\n            \"xprv9s21ZrQH143K26BAmMqZUKy3rpA3bYvGiip1tjQ2gnLwKrm9zucVU6n5PSJ9FLWeW1JjQJyZJ52QAV3HtevGNQ3BnTh91mAWgaacd6UenQ7\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"pokoj jogurt malovat kroupa holub malvice rachot uznat hnout kasa karamel potupa\",\n            \"f3922b8086d559436ba2d04bc2aae4174e6504d7d4d451f7282d0b41a1b8cc958b45a896985e0b9316ad09c62f7d62dac85bc3d3e2e2423bcad3336412fd33f8\",\n            \"xprv9s21ZrQH143K3gt3UuAosyvKpAmRpGfWuM19LVhrpWshTnv8o9Z2SPx7PxfgPQSZtm7U34cWo2NUrUtWCtXLhKDFZxg9pjM9KRde9dLwsZC\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"masakr odtok pijavice tajga upravit krmelec krvinka buditel zavinit lakomec flirt traktor kresba plevel kapitola tlupa paseka ladnost\",\n            \"8c7c2b7767caa63139099cc5faf955cc582abc43494fc0f94b1f490ddfb7c221df55b663711755602c1354862c1da7a1241d17888f1be6f4ba7f58634758ea0b\",\n            \"xprv9s21ZrQH143K4TFHpb3sbWvTgFjmH2b2r6TAWi1L9UxyL2hBXQeDwVgQmR7CG3agahDGRPWJZDWZjcAYwEGjRzycaRzTmbmxjaJxujKScF1\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"migrace iluze pukavec kaktus drogerie hrobka pukavec onehdy suchar veterina rorejs cukr mihule koza makovice uvozovka oklika inzerce odhadce zprudka spousta namluvit hrobka obsluha\",\n            \"4b315b6c57139dfd19187b6029ad8b2fc6165dd97a43e59c4606a11deb192b25df5ad4e8fc3b4c2da9b9e80eae48946d769bc7bc95786f93b934bbc842cb8002\",\n            \"xprv9s21ZrQH143K2ro2PraMEHNWQX4w969ZUPVBZFY8pViiRNPhsRjFbj2exS12cg2YCa6kkYUCSJBhuHCicMAGqj1ZtSvKYXLjaErhCBve7XT\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"sledovat ticho potkan dotaz carevna pahorek ihned nikterak hematom pokrok neochota cvik\",\n            \"ce64d48ded9f32127bc7ef66c829e32b576927ffa1f323f0020f58c3256fdeb5ee2ec7bc257bb492e4fa1ae1e7f41b8affd9f68a2143e2d54e443e54d866e6e0\",\n            \"xprv9s21ZrQH143K24d38NZ3eGjiZ5cuqmVJjsC2piMq6ZPSsEfgPf6F9XZJvfsExo6M2P5NCgdaUYgeLchyBw8sAWkH8joq4yMeNF1i12zXWWN\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"most uvolnit novota usmrtit terapie tehdy litovat filozof radon svrab surovina zdivo stanice pejsek ukrojit vymizet helma decibel\",\n            \"8efd8d7625a41d02e53b8f363678acb389136ee9b19512381417e7f3295cc5bea28a7feeadf29ed8c2bd617e67feee3c736bed06f29ed3538777d58187458955\",\n            \"xprv9s21ZrQH143K3Vd6GfvEYmC1ut3Z9uKS5weiaKT77zoz4uc4MaJMnQWsXYFLK2wp3DiARFbUyEv8yLqAirLmWMDmsXFhPioprwBiqQbTPb7\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"poloha koruna dobytek makak domluvit svatba paluba utahovat orlice jakost sypat podvod barva technika pastelka kurt ikona obvod mokro recept napnout kabel lord nasadit\",\n            \"e69afd8c8b83713ce327570ca2dd9d588dd1f266fde95d7848059fdcec016e8f9f587a8fcbdbd061ecd9a5e1e90f51f9453af914df7d8e9b5758f91a1963a413\",\n            \"xprv9s21ZrQH143K2zXve6cknQXePKGSMLedfyGDpgQZ5oNB7YKgyJqjXoZeQ4qj1vd2HZpnF77g1nqihMeAi7wnYd3c3hrgczNAadCKdetb2tf\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"drak uniforma kuna kapka tmel bedna evoluce technika vypustit popadat rychlost vodstvo\",\n            \"cb409aa4d44356187fc1f0777afc3f0057bad31090e589e1a8a13911a0604e9ebe976bbbd1633b3320049e58ae4939591150f1b84fc552975d4c7b5774efd20f\",\n            \"xprv9s21ZrQH143K3S5abSGNCkH4QWovuVGtqjrufboCgkqDvPGUtnUgPFNqXwVyWMD45MmwRFDYUe7Ny89sqvCqxPMWtq2CDa14t1CYxLjefgT\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"ochladit silnice exkurze zrnitost jiskra zprudka pstruh tlukot vytasit valoun najisto kralovat bobek uklidnit helma ubytovna pysk andulka\",\n            \"a295037a0335fc58e639e1eb4ad8c6679386cc0b6696c6c0947b9d4420083740c02a3c7e429c698b3650c5d370b87427ff094e17a18778d917cf5fa274c89b23\",\n            \"xprv9s21ZrQH143K3se5sFVgT6vXcaaKoaHse8ATQJAgDHVBfdwAT2BDgm5YoEPJKR7NN7o5ukvzfKvjZ16NsLG6qngxkRfQRKuSsqyFmcyjpf9\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"bavlna mozaika ofsajd kukla obliba kormidlo monarcha batoh chmura mdloba makovice obilnice popel pohnutka duchovno panika neuron okupant rukavice kouzlo stehno badatel sklenice rozchod\",\n            \"a3314b5d32a47a746f1605029ef41e446e589ec3879b8509a93779bdb5df018c102dc93d3925b1bc04badc7b7e78ed3c79f05485a289d3a8f4731282f4b65f2e\",\n            \"xprv9s21ZrQH143K2NiewxC1w9akTDfjsfRQ7yyv42HTukKMZ2qqx9zRrq4YYoHUnEeSR9kVa8hY8vHzCYhPxzK8VF4vKJhQNAjGpn94j9r7nEi\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"zajet nutrie beton kobyla kriket sranda elektron abeceda uboze lump vzorek potvora\",\n            \"a5fe5fd9fc7a02f2753029978da50e8c1af2a773977ecfda7147c184374376fc1780d4c2516d23eb1559e9cf46cc6f60d30418ba05fc789295adc483f26641ea\",\n            \"xprv9s21ZrQH143K3Pg1Wcq1fLNYrSSbfioYAiYMqkY4bEN9JrUFnJNLsK2Z7b7stHtJae53w7GD7rrDjJ56CCMNYJzwpdC54pSFkCGV3VYwGbY\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"slezina navzdory odjinud oklika ucho ropucha rohovka zavalit graf panenka invalida katedra odebrat deska metoda ohryzek graf flotila\",\n            \"73716db54d10471971852df2bda795452cfe9b38aaef918da7a2216a3b4249d76b4627b603a03537e5dc2152e54c709acba85d361f4978733af4b7366b13a61c\",\n            \"xprv9s21ZrQH143K2YLLxKi6GZjifUEoqww1zAAUd26JY5T54Z6HgEip3hkFKUfAAeVqEmZrdoHoahhm71MvBwkMTZALYrJtZfe4eLqMyZE1op1\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"zavalit genetika kapusta tvrdost dopad ujmout zdobit mistr splav ptactvo fosfor hoch pocit beztak slon poplach mazivo tancovat pravda uvalit konkurs surovina nazvat vypadat\",\n            \"dba03d22ab6f6963abff6d9f9433a6aa733490dab58b39e3eef635c9f4fd6ad8242c3eecc4db0f26a447af06a089d935b3225e36615a07babdf2177ea3fd1670\",\n            \"xprv9s21ZrQH143K29UvdRPWan6npJHgHs7bmiduFR6qWzf5z7gFuqqcR7XoHpSBamvgTn1Qzy3JqMSuyxJEnFN5s2s9mbMna7WAiKheLFAA4x4\"\n        ]\n    ],\n    \"french\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abeille\",\n            \"3bf3366c40256d7e2fca716fddf8673425c7c7e444af290ee1edf1bbf095e6e78a7190253f3e46f1e2069345d4b05ac17b242faa225c0a3e4d268976744e0698\",\n            \"xprv9s21ZrQH143K4ZsEXSdGmcpsqn4YxjPgHqa4DFvMRmD4oTkiFuYia3srKewVsU75LN4jP6PeXPYFWYpgP8B74tQjwG1GoQ9T8eJxGDjzibF\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"implorer visage sonnette voyage véloce pourpre volaille tribunal implorer visage sonnette voyelle\",\n            \"ab9180b7dfdde74e5cf8781e5692e2c0b55afa8bc1987fa8e14e3fb83c88b195c53e9f939f8febc33d2958f5fcd8add57843cb318d8886130ef9c9879c826357\",\n            \"xprv9s21ZrQH143K3MCzhsD85FFZ2d8vDN2QdRTN63gbU3qHjZxn7utU1kwYGR5bxQkssS1Tji4Tuw8vpTzDWogXxhbWYDKuZveeRBe5wiNsuFJ\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"indexer acompte bolide abrasif agréable dédale abusif appuyer indexer acompte bolide abolir\",\n            \"0c1ece83a464688d74744723d609e30e191d05ab8c082cf34bb2405bc4363dbcf6a9f83707b577d230728b3943920f876ec844e86dd0d117152c23802d25be3f\",\n            \"xprv9s21ZrQH143K36u4b8J8pxUwCCnciUPZF3JjZsq5mPCDEpNWA1j4DnYDJ53NV7b6cmNTM6Je6DG11hJw8Fq1HXKEasrpxDC8WqaEsD5BPGq\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie voter\",\n            \"7d2f168ce71ba3e40e74baf47a072a94e49973c0dbdb33a62b3a285ab167c704a85d6ce0d15cc6a4dd3bf1311334ee0d290ae7d20115863d5f5633b8dfacf2d4\",\n            \"xprv9s21ZrQH143K2AsqW9AAdu5C4zUaV45MgyzBQAYbEKtKusR83UzLwCZdqDwqJ59ebNryoNuVA5pEiY1eBYqr64UGkwZGezwaceCqxPWia7M\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser adéquat\",\n            \"93d81d146eccb7c624cc25daa4cd52736d64bdc0fe020940157e73c108a87ee34d94d7e9554e02ea0f9a7ea5574426220bae7c4959c197a6c9e2318cb252683c\",\n            \"xprv9s21ZrQH143K2iCVwUFixFL9fh5f6XrcBfaLgRzozbBgzj3dTo7fBTn4EsQ8ERgq9hTPxFf2hgE57vJDfEGKwsegQFoo2mEM6HEgFavJkQU\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"implorer visage sonnette voyage véloce pourpre volaille tribunal implorer visage sonnette voyage véloce pourpre volaille tribunal implorer vinaigre\",\n            \"dcf42783150cdb92672c9ea7d13f145401661f10b89bfb012a803ca7713e97181ee28ac327a982060a7f8aaa6e8c649ca2c5b83c24458393fe41739ced31d987\",\n            \"xprv9s21ZrQH143K2Lq1fbvL5nedyALbSBmmm4EbcVduaPFArtunM6azzNy96pcKbLvVBQcFFDa3Agp54eMhCBH5Ehtbxitv525n2SrhYvALPiD\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"indexer acompte bolide abrasif agréable dédale abusif appuyer indexer acompte bolide abrasif agréable dédale abusif appuyer indexer agencer\",\n            \"b039606212ccadb0d05c7a0c08605c5137028d0253d26b9ad6ee113f9595700d9834b2eec8b224975a6d9585d7ad39e962036edcf07d5b125b0fc225d519982f\",\n            \"xprv9s21ZrQH143K3m5hJrQxzUdU4bDDvLSisrf1Cv5HQNCEzbUokwaVa8X1huTY2JaTPJug14EbopY3gtdfWjmVoo4CHLzuwjf5Jhdjgaqsh9n\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie viande\",\n            \"e12d20a535ef5e9e2f87e05b5261bdb51451e052fe484feb87543f5cb7a8822c4aa0152492be1259fba00a28c1e95518a90f0645bdd0eb822516d37ac881f7e0\",\n            \"xprv9s21ZrQH143K2woSZYBmSoRYygWNGUUrkLiy2i4FmReSqyc568kb1siagkBpHFj6MzLbfuh8TaWKDckfnfphrYyKTAG2rk5y4sGv4fjn5gD\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser abaisser anaphore\",\n            \"0f3eec3279b55f3cacdbf1aef705a086078d7eb8048e402202572e7038e9487e39104b4794e88a42192af030a176b034fa36ca6641fb8128fd23c30806b96c23\",\n            \"xprv9s21ZrQH143K4UeephsshHgatV7uj2D2DotKpGrWx6ShwxPdRxXtyQWxnadSvjT8Df7UDxmRuiFJa92evePgqwgJSG5pY8VPJ8hNiyGHr1C\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"implorer visage sonnette voyage véloce pourpre volaille tribunal implorer visage sonnette voyage véloce pourpre volaille tribunal implorer visage sonnette voyage véloce pourpre volaille studieux\",\n            \"8f12b35fe92a7586dfbdab9721a91300d0dbe3185d0943021667e62fd5a643e0cf2443e544738c5234009aa50faac0dbb123ac847c31dc25d875c56fe39c6186\",\n            \"xprv9s21ZrQH143K43qySSryByKtU1Df5foSz6kDEHUsR524HZJzxnKrrU3wTdeSvHVvpitC8nAb2kdeVWGREu22KaiaMF3YjEZQdb7htpY6CXP\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"indexer acompte bolide abrasif agréable dédale abusif appuyer indexer acompte bolide abrasif agréable dédale abusif appuyer indexer acompte bolide abrasif agréable dédale abusif axiome\",\n            \"53ab1d10dc8de3a80171b5f00495a3b49e2c5afd486f8111b1afd0ad24f43eb0aab4acab1d4c51126beea32405947924c237157b29dca69fcf64eb635708895f\",\n            \"xprv9s21ZrQH143K31JiBbFJEViuVwAuWSD5X8PKzS4d2PoSCxHpBXpicCEMKndL8TURUZ2zeoA4vDGkECeJS9wMhrRcmW6ATmPmmwC3ziuBRdP\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie zoologie valable\",\n            \"b5e96f552ba44ec827c1bc5ef362e8cea68dd6f36f2c8640aeb171cf9b66198fbdf155fdbcf7dc505431068f972a92442f33cda0065afc1e9a7f5f7097ea6c6a\",\n            \"xprv9s21ZrQH143K2umcmDhRrUZ8wsZ7ACj6rvFCEuDK1coHWpo1RwYPvy3dpWmvPjstSMm9fm3igm9gjsAesjqAU6Tnejizy919FSmyofhRTyS\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"monument dépenser féroce entasser comédie ferveur optique sonnette codifier discuter dioxyde nerveux\",\n            \"d322acd69a849cce8719674eeb7cd76520de01ea35210012a44a5dcc19faf285202c3fb3c749a46d338ad54ddd398029ee308ee352a89f65180dbd3ff750dd50\",\n            \"xprv9s21ZrQH143K4RswQfcyMEjx6Kc5tEBR43MNp7XJH5mWushqBryZTc97VNPNVfRop62sGwu7Tg3vsd559P1G8h6M2N9j1Zj1vVn1919uvmb\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"fiasco ivoire mardi révulsif signal enlever envahir anormal vaisseau essayer céleste sagesse engager mener différer ruisseau lutter esprit\",\n            \"3c0c90b30e1a8bd7aafda95f92fb09bae64988e2431d6c3896c8502f76203652f0db1d4640417d8d3f00ea4de59f1719513f1c01145eb8ee4b0fd73d4c4f706a\",\n            \"xprv9s21ZrQH143K3eSdUPkhpFZamFuu35iaZqRwFWijYkE54fvUKoSNBHkXetNx56yvcJSFoeHT9y4AFuWTcFFzezPuk6D6LqnNscjFnvdGYDt\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"flatteur cultiver oisillon destrier brusque crainte oisillon labourer remède substrat parfumer banquier flèche enclave fémur sombre jongler damier insigne voguer rasage gomme crainte incendie\",\n            \"7363c9fd3127cb683ad39697f3a7282a06f1fd1ab1ceae8e2e0d7ab2766f3b8fb29162bf46e0d6a4917a0085b763f7f6f36adfdde742b6aa4ff1973149b5d239\",\n            \"xprv9s21ZrQH143K3YEnEhMfv1Mwoc91DekvEqXxL85fFtRKtfFk3Jsqu72bUd35jHsTA7aBShvTmhhBrHhqGZ1uVg7RTwzTpnarDUoGU8ZXQ9D\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"prélude routine négation brasier arlequin logique cuivre hiberner cirque moqueur halte barque\",\n            \"c46b545d5e7398d0b5344ecbcc20769fb0fbf674848eef1591725a1113f5bed0edf6d78925798cf87994157f43bd9d0eb5e6f3de7959e2e88f6a586e7499b79a\",\n            \"xprv9s21ZrQH143K4U7WubDzyDun3RrpuVsFECM9u9tNxjhJhZFCJL5DJvGhKkUAbmmhqpwUV7UvgPPG2QFoDq7jYY6Neb6MnQmQYTo3RF57ZXS\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"froid soluble horde sinistre rouge rocheux exiler causer orbite résineux renfort vaste récolter maison serrure tonique cirer bélier\",\n            \"93856e02d3ab2e6738958350f2a96a18183c0c02aa7cf50e4e6877b1d4f9eb4be1806b034e4a4a271390b7b6ba6b4209f5e293840e93a41a2ecb16ad47936c03\",\n            \"xprv9s21ZrQH143K2wjyyXXC3Cra6k8WJ3CPEWc1EgwEyUNjLAxGVoegrni9eMik71k4L6wWxLtqcwgD9TzKLLiaSddwLFp4F6hJ4LuDBWqVJcq\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"mouche embryon bison femme bondir renvoi louer social largeur déborder rétablir miracle adresse rivière machine époque culminer indice frégate ouvrage gourmand déposer exulter grappin\",\n            \"08cd47b905df56e3bfbca6d1ddb7ee7ae75d45f6e5928d337bacf34754d392c7225c611136148e130dc516cdc7ade8e8a95ba62ccfdac01a107875ce3e2cefd2\",\n            \"xprv9s21ZrQH143K3BFxuNuyFSUgQQ3f4tv6HLktHoVxvMfBKVBow3i9GqeTF9oBbG87rZBX79QTCQqgPbn3ywWc8G4ZiUdhdY3xDAciXLtE9aJ\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"brochure sextuple épisode digérer ruser affecter cantine rivière torse muscle permuter talisman\",\n            \"8e4635efc7352a6fa18723aff498fa297c1ed1997c0f3e77a11e65155b25934cf90e74ac66d207175507887068a5c85d24b825d06a31ce75651fc9893e509869\",\n            \"xprv9s21ZrQH143K2CpRxCahnStujg79zUscDimXKHemoY4A1Kep85cPai2e8wJ4Y5R4uhrG76merXXjSuukqjVrzJMBPsGC8apQqHymDsBPf9e\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"informer poivre capable volcan dénicher voguer offenser ruiner tragique sortir glace enduire allouer serein cirer semaine opportun abriter\",\n            \"ed4ed89acf10eb53fd67c9f81f4e8cbe39dafe42c27e942e67559a825c6083d3373a3e98215c37318f0f28c13546895e76a080521222f6d70a9528a582dcdcef\",\n            \"xprv9s21ZrQH143K3N7dvQS9PoT9BemrTHWfp4qzUPT7hbGdZ5uMn6RgMwKerbmrrAqjrMGUskpGJaaorTXnbgtidgEbboJVjH18qDMkLFPf36V\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"adverbe fuite jaune épaule imbiber éluder frémir adulte attentif filou fémur idylle muséum mobile bureau loyal hélium jugement péplum encadrer rédiger acier posséder pavillon\",\n            \"81ecca7ce712963df79d6611d2510e9fa31d307557a5eeea9513a9a940c2531472fec2c6988b70f649b8a3416f8f90f5c9c8f0ac4897f4a5a1304c651226f330\",\n            \"xprv9s21ZrQH143K2ZnKtKjoyhEcsuEzLEzq5oC8sGegz59C3vf4T8VjvRN2UQQsHw2ndFj1UMNo1uuVtxKzjmNLvVAd2SURTgkVXKykFc1S8jG\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"ultrason hublot agacer éclore englober ravin caféine abandon séduire farfelu tropical nettoyer\",\n            \"2efa119637c044ba28eb610178d7de49dabed93fc16f5af675aa661b731567ed3ad7aeb36a04adfbfb694bbd065f6f840ab80369ec3c253ca122deb208ef9f7d\",\n            \"xprv9s21ZrQH143K4NWbtgfxvJK1Us782vFXDdb2bTK839KWEUZFnQTXXt85hAHXML9xkKyuiaiKgD1n6ytUZdgT8hirdn4SQ4DR4T4MPiNQz3K\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"prétexte grogner instinct jongler sembler paresse papier vaillant chenille louve cynique dissiper inoculer besogne flairer jeunesse chenille cellule\",\n            \"887a87c38340befd47d650b73849907b5892a0db26e17ab55601e4e789ae1d0dd4bc3e7fcae0fae25c3e0d3315456fe8a5d84944d2b799cb63fb9544fbd0e568\",\n            \"xprv9s21ZrQH143K4G36f6wnN8JWRYHdbvANd8fF6c1pjb6T11LKxw3Xch5iacc9vyGQDcf51GrF7kknKumq5csscAByQiC1gaY7vFygMghGtJ4\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"vaillant chance dimanche sécable bonus séparer vecteur forcer raideur officier censurer cohésion meuble agiter prison mutation filière rincer novice solitude élargir renfort gronder tornade\",\n            \"e59bf24814adb55cfc2399e03d94e81df4a906ca5e75f36f2e297623ffc418b8202e9b1444e0e97234e2d55e194d45f89491dc9533a1c799fbb86c5838cc3454\",\n            \"xprv9s21ZrQH143K2gBerhfhuxyfCEXGiLW3sxY1scEJUtvroAtxPqqatzqTzDmkgxDsL7C7MMbBk1ZKBXHpYiJziBM2VFbTbA3G1qjDkTt8PU5\"\n        ]\n    ],\n    \"italian\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abete\",\n            \"d2ae4bbd4efc4aba345b66dc2bfa4ea280d85810945ba4e100707694d5731c5a42ac0d0308ba9ad176966879328f1aa014fbcbeb46d671d9475c38254bf1eeb7\",\n            \"xprv9s21ZrQH143K3ZxfinfrsmnuKNwdvRtypJ1TEs8JuE6MEmAMDwsSZApCyBFopme4iR7RnRt9XKFprfLKs9vooFuFK6h2a2hzHuXTmE9md1a\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"mimosa vita sussurro zinco vero saltare zattera ulisse mimosa vita sussurro zircone\",\n            \"f8c609647319a50116e9b7d1a0ec5535c6d08d6c958911fd2c8b2dfd55a61e63e9c6c60c22b5c3aec725acb41980e63cb3ed75fb80648092dee1bbbeab476a6d\",\n            \"xprv9s21ZrQH143K3yxi91AAWZvT8797G7kL34h3453QNFSiQybwss1gmx2zYCmbg4tiZdYSEsd7arPWYd5MQh28VBvcEqvXSBRu1zYajyJnzFD\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"misurare afoso bravura accadere alogeno dottore acrilico arazzo misurare afoso bravura abisso\",\n            \"4025269bc4f7550bbc3c61592944946b0d4ac855a5e4582bf86069cc0c9429455cc40d84ba215ed1cec28e27ffc88460c38b9c4e8c486ae878d7c85e95b222bf\",\n            \"xprv9s21ZrQH143K4Hh5BqryXtMu7QLbJC7yDh9kscJ4h3PuxA382w6YyjMMkiFVyfmdYFwfP8sVWR1eLygHmczccbzH7pTGXbeqAy54fNVA13M\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zerbino\",\n            \"24182cf43f956410b5def9df90e3db0d6f3199c2ebd26e7ddef888ee3bece9101d132e449bb9e1c23dd9ccc6131d2f649c021ee591e88cef8d17cb434ef69efb\",\n            \"xprv9s21ZrQH143K2hiPzq8SzzER9TQDFYpnYbfg1hE8wUYwcb7JNRyM4aDB14WfoUghRrBKFGffUx5YsTZvPbdCbuVMJG7egUZVsRTJCviSror\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco agitare\",\n            \"2161a4b869f98778b6321714e2502adb11ea120c12163b46fa34e36442ad1981b911a2f9ec82b497e7cd206fa7af2f21a94bb6e4a90159965854784e1558658b\",\n            \"xprv9s21ZrQH143K48ZSAvHY5BjAyPXxL3pREwQPZ9DxPagzRuK8f5TcKnDr3z2MSjB58uC871CjjjsNTaUa9BxEzEwraQutT42co4mfFGusE2B\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"mimosa vita sussurro zinco vero saltare zattera ulisse mimosa vita sussurro zinco vero saltare zattera ulisse mimosa virulento\",\n            \"d9a6205a985fde8c2337f6cc6acf77a93d6ec7dc792551c01400f5d9aaa86aa943416c99fe60be141ca27ab333d9f96648b40b266d6b2d6a6e5b07c8939568be\",\n            \"xprv9s21ZrQH143K2wPR9TuAQcWLNSM8X9oRjUCC3GN6aGevV1zfm8cwi2JtrzS21GzAaqd2MJDszoka7xiduQrDc666Wk27qYhUTagEfr4E218\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"misurare afoso bravura accadere alogeno dottore acrilico arazzo misurare afoso bravura accadere alogeno dottore acrilico arazzo misurare allievo\",\n            \"cfb1f800cd5a0f7a8cffb12231fc61739f5f87c963ead5e205dd48221c3417eb1173d3209d9a8ffc4f00ab291bc22c1480b4a0a4fdeef9a1f3916d0ccbed5591\",\n            \"xprv9s21ZrQH143K2EQGrM2arQhKSEhd4DwraP86UrUKsVcLvM2NujY9rPJK78rGUCD4Z3AG8tz8brxcSaDQYDw18jZz8FuT1H6ZdwFyUQVERus\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa vile\",\n            \"05a43b9c258f6e83f4073fe4a66d6309e94610fe12dd5d598f4725e4e85ff1fde5ff5b1e61b40e09a481a98953f9dc818342172a460e5e6d17d9ab14874447e2\",\n            \"xprv9s21ZrQH143K39Y9dY1q4sf3Bv7dkFfDasdSbWUKNx7GCsMp1JTo8KFDRq5TNkGr1wQYm3QZaALpFhcHWhPV67oVZQFMRFu51yVxeL9KDMF\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco abaco angelo\",\n            \"84055239f41c182bbfe6ede6db2e8bc4a97cf86746643b7ea6910c71d67bb2a678a97ecd378cfbf59e30db720b1cfde0faaee73afd3c5deef2188e307d04442c\",\n            \"xprv9s21ZrQH143K2b5TRb8ReAEzasjVej3ttSzyy5YRu91SdQKP4XUZtgeUipuJx6YoArxkiRSBU5eP2wu6dmgLhgBQJ8Bx5UXmwFudc423DdN\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"mimosa vita sussurro zinco vero saltare zattera ulisse mimosa vita sussurro zinco vero saltare zattera ulisse mimosa vita sussurro zinco vero saltare zattera tarpare\",\n            \"f0e226efcd929216020a9e8f879f06b146d28fecd2856bd401a62ecc0ece8bc6ea717e3f9df523a6a00bd4ca8965e0498d63e779e3156dbf174ebac74ad7be31\",\n            \"xprv9s21ZrQH143K2dys2Z5k2tZoxJuBENLaf3cTEpb7JUeXDp9i63vbPMqVNqHqx5bGJ5tdNug3JFWJCC4amzYLoFRi3YS55MiHnnUN6w1V57h\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"misurare afoso bravura accadere alogeno dottore acrilico arazzo misurare afoso bravura accadere alogeno dottore acrilico arazzo misurare afoso bravura accadere alogeno dottore acrilico baco\",\n            \"ef549c1e44a7b183031b41f9f692795406de605e43ecc628911a38d7c92f392660c48313a08cf1a055a420d4a8c6b12bef7ff354c903303bc3a5dc12948ff5be\",\n            \"xprv9s21ZrQH143K2mWU418GviWbPrYTveuukEHsYJRn8aUxV5PrE4XacaDX74amiRkH3m3Qmnz7YPRRXkF33z5472Trb39RksWRmcJitkT5uJx\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa zuppa vedetta\",\n            \"5089f33aee7852d86a01e8afbfdc8a0ad5af51538e62e3f007d098fa4fc9817ddc990fa87b7235273798e2df52228b62738df923bc2d711fed9cc0558b3ebfec\",\n            \"xprv9s21ZrQH143K2VqjZNjnyCMUrTw6XhLt2BsaPVpHD8MKpKq5mq9S5SLyMSv58y7nCofNGZSgQQpky6aujCURjVuAM9jCcN6xjzbeRQYYACi\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"pesista educare imballo formica curvo imbevuto raddoppio sussurro croce eppure epilogo poligono\",\n            \"4ffd8b7879c0c6d7eee14682a26465d6429b8b921d6ea3299fb8a448d84d19b47ead5b23fd14449539cbd358abd19a23560dbd8c4bf6c153d98ea0fce7f474de\",\n            \"xprv9s21ZrQH143K2bsiFmYu4jzf5fjcHrrEarDgY3NYhmUEU5bxz3eS3NwS924WYnioF6rf6Fij6XQdmCNjcCJwqdFJ1AKKLMxa4obLnbdFgA6\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"immolato mummia oviparo sigla stirpe fonetico fosso appetito vasca galoppo cigno solubile foderato pargolo enduro sociale ormeggio galateo\",\n            \"188305ae9b45e400f6a3ad839061265f36e6050118283b85a3ea842aae1cca29c808978b3b0e297dbd794b74916fc43da57172e90c9fdab930638863c3472522\",\n            \"xprv9s21ZrQH143K4RNJpMYxxAuHtA77jzNEAjh3MznXe6FejAGGUPHTDUFL3z6LB1FioxHnMirHNcHyV4QVsXs8rZACW8YSJcNo3Wqjg7dNoUC\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"infatti dire pudica elica camola deposito pudica nobile servire taverna restauro baritono inflitto flacone ilare suonare nastrare dito montato vulcano scrutinio lisca deposito mirtillo\",\n            \"093ef04fe24f1c45148f3d4d9a54fb033638011507418cd7cbd91a8fa12157e1cbd9d095b2a660db26e8d674cbf6033a384954fdeadcd7c20cbbd3da46d90f1a\",\n            \"xprv9s21ZrQH143K2ZBg22DZJyspAmZcVMa1efjpsz89Hmcsu7dPZ39sH5RCCNr2kBRNFQUUmcwsNUTyZ6UGk7zjZKgCdXrmxg8gJ7FBCEeE5Au\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"sarto smottato podismo burlone aria omissione dipolo marmo coricato peso malto basso\",\n            \"d9e2a2e18ca8173859b0030186941149f630483cc9fcf3b189e5752d4f8b7dce2b285008f52ff1301dd2e2a673a4c76f8ffec9f8617fd577173b90c6af95631f\",\n            \"xprv9s21ZrQH143K2FR5gEkuFMhmYGVyUKiSrZspfn52HonhhbvwWrn5fL7aST1yxtAfd8cQSyWVGH9TamV4SPvyKRZbSV2U7ZTurX1Zoe86ngE\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"italia sultano meccanico strappo smeraldo sipario gommone chimera raffica sforzato sfamato vendemmia segnalato oscurare staffa trio cordata benda\",\n            \"c40130a2db00d82c2dfb127c768724c522cbf7f47b464061198c65e9bf4e3879262dd112cb7a526bf4450785e9f7f7e7511f05985d9104d9e75e1baf038c91e6\",\n            \"xprv9s21ZrQH143K3QTUdUYC375Cvtyea83NqatsgA5z3BMp95Fbd7QfQRvzqgjuCMU9zhSgiVtAYuDoR1GK9gQRP8juxnFR2Hd4v3mNgfMySGq\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"piacere feudo bisonte ignorato brevetto sfida onorevole stufo nulla docente sfuso perbene albo sinusoide orologio fulmine diradare mitezza iride rata londra egoismo gravoso luce\",\n            \"e384b6486328949618978c6d2607df3e7a9db9acc94ab24183aa4e7c1af0107ecbcee2dcead27d7f20acaa427d3d6eeac620ff24ae4ac2ba3b6ef01585418f25\",\n            \"xprv9s21ZrQH143K32TYshJvJnEHVnwukKyvaQauzBPx42JYyGT1FfyUvjT5iEfYuaETkYiAUJE434hs5Qkh7FRSqK7kwy5GwjsfS4S5txFKwbL\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"calmo statuto fucsia energia sodale aliante cedibile sinusoide trovare pila rinnovo tiro\",\n            \"5d5faba1d0db08a9f0cdb602e571a9b73565707429d2482e4fcde5a9bac1728b053c65853199fbdba73716bcb8da0616820fc817a309c99607dc56dddb34c344\",\n            \"xprv9s21ZrQH143K2h5d8kmFvaQT4xHzXrAVwmwAMyF1p7jBg2QoE8RGGFWe1NyqcNPhy18CJ6UKcvHTXkijihhLE18yrpec1DxggywYDVWGiUo\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"modulo rubizzo cefalo zavorra economia vulcano prudente soccorso tuta svedese limitare fluente amico srotolato cordata sportivo querela accusato\",\n            \"7f7bd54b8bf5c99a949d3ddc1d4baeec78e503f14ddd20500e307be89e940e5ead97530c014c33053a9b0c942094ea1bad649b2d23d6288dea8fcfe2e3a83c52\",\n            \"xprv9s21ZrQH143K4AwqRHE1Swki4WW3ok7NF5cCs57wYAEhcaDhw9oVh1xwSbCeofP9GMZkTmZo6kSjj5Xh36tuuPebZhDBQRcgRnzLaSgrpL7\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"alcolico lacrima muto frigo michele fessura irrigato alce ateismo incendio ilare metallo pilifero pergamena canotto opposto manovra nemmeno rimorchio fisico selettivo aforisma sabotato riciclato\",\n            \"197457046ab546a171b247c54bb8392aa2ee2d40f07831019776745f17aee46fe9f1611f86f9d7f0cbcacc03ce696082fc13529ba0cab0d57f76934383be0f3c\",\n            \"xprv9s21ZrQH143K416VC54NFDGXsQeXLSAf2JaUD8jQR4SDqAFq2S3BdcSRW66avfcoRK5FsPPCuBKaShrskgoGchxdAeBzVMPFHrJkCwAWgiE\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"utopia melodia allegro evoluto folata scuola carisma abbaglio spillato guanto unificato pollice\",\n            \"53c4c5de8a16381908e397fcb8ce5dcd8c90911d9b538afe83862468816889768d94d040bd249f4eb25d915b05b31addfa0b06d89fe15f521fbf3c8545bbb434\",\n            \"xprv9s21ZrQH143K3u8cCFUJiaxUCKdGZ9Z2u76hUbKNMoCy51gq982aahsMbN5ArmhR1VHFJSMKLsFLkTsSX2gwjrEfj31QsDqCh3nE6FmcV4e\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"satira lusinga mordere nastrare sposo responso replica varcato colza opinione distanza erario monetario bici india narice colza cilindro\",\n            \"5c8c80b1e440dad220a295b282fad7e8a44bfee5210d853fd52d26e8a006787ac7bf4b0a4f81d029e2ae9cdf71814f193bbb23e4b3e149d2f99b03e2417b39a0\",\n            \"xprv9s21ZrQH143K2gMABxA98Be2P18eaj1zxU5qV6sCiMT42cuvLQ3dM2VBnEAvpFwWEDtDcbSkteNAF8nUuCyBETqpAeKmqV6niTPFEECGcLx\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"varcato codice enzima spessore brillante squillo vento insieme scoprire prugna circa cruciale peccato allusivo savio pilota inarcare simulato precluso sugo fegato sfamato lusso trono\",\n            \"e89b83bd1a5fa859922e0045acc84cd04edeb4bf6b5352d197fbed50af0938b17bca7ab9beb8c882d0e0a67597d9e14e88c10e63b824e9206d2848fbb8a55b64\",\n            \"xprv9s21ZrQH143K42yTQvEavGhekzrzpxHY1nspnh5qcgThCuNVAyJPWRMeznMV9FnChg5f7k51DBMawNZKWTFCLy2az1CnyGgCJ2Jk5PGb6Qv\"\n        ]\n    ],\n    \"japanese\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あおぞら\",\n            \"5a6c23b5abdd5c3e1f7d77ad25ecd715647bdafb44dab324c730a76a45d7421daccee1a4ff0739715a2c56a8a9f1e527a5e3496224d91293bfcd9b5393bfff83\",\n            \"xprv9s21ZrQH143K2TDo8AAss7eUkUqLFzBnypFpqjQUMVUrSMvrrgLiRxQPrYnhfoS9NPp3rex725rcuN8pkDL6pwqWfdPtiqa9ib1B37vZwfy\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"そつう　れきだい　ほんやく　わかす　りくつ　ばいか　ろせん　やちん　そつう　れきだい　ほんやく　わかめ\",\n            \"9d269b22155b3c915b09abfefd4e1104573c528f6977cde89c6a68152c3c714dc6c7e0e62f221c322f3f76e4d0bcca66c06e3d2f6a8d70d612c87dd6dee63976\",\n            \"xprv9s21ZrQH143K3kavBMu7K49k18vjQHhNL1ciMgn7S9kDMKdyK1vEpF46UWyoXCvdBLEp8U2bhissPkC6iwXjMgRXyQ6SHbyYYGcnFqNXTW1\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"そとづら　あまど　おおう　あこがれる　いくぶん　けいけん　あたえる　いよく　そとづら　あまど　おおう　あかちゃん\",\n            \"17914bd3fe4b9e1224c968ec6b967fc6144a5795adbb2636a17f77da9b6b118200ad788672fd06096ca62683940523f5178f6ce3845c967cbd4ad2b3643cc660\",\n            \"xprv9s21ZrQH143K2NAPUK7UVbLB4Dd7Hvb7fqysvFyKES5iujX4BfrwUmy1wvWJb3kBc1Zs2jxTTBxBPHuHziB1ZWWUxELrn8g8VLrbjaWDmRe\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　ろんぶん\",\n            \"4bd21b75de4f262b0771a97d6fc877ee19329236ced6e974c4c81a094a5f896758033f7eae270216d727539eee3bc9ba5cad21132a1c6e41a50820e0ac928e83\",\n            \"xprv9s21ZrQH143K43f5tXeZRJ2RMiS6nLhxcqvopg9mc84xTiX1UjLjVQDBHrwmypY45SPscFqT7zJet5b3riay95fJMM4dfZXtoBTcKKkKEao\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あらいぐま\",\n            \"a59401a14bb821cce86ec32add8f273a3e07e9c8b1ed430d5d1a06dbf3c083ff2ffb4bb26a384b8faecb58f6cb4c07cfbf2c91108385f6773f2fefd1581926b5\",\n            \"xprv9s21ZrQH143K3VMwP9nGq47t86uaVENmykbCRuUDKFDSfgDFjJUFuF88JfPPMzwgwFPoaJaAD3YeqrCQBFY5S2jaCXXuc5Vg7u9jb6iB6XF\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"そつう　れきだい　ほんやく　わかす　りくつ　ばいか　ろせん　やちん　そつう　れきだい　ほんやく　わかす　りくつ　ばいか　ろせん　やちん　そつう　れいぎ\",\n            \"809861f80877e3adc842b0204e401d5aeac1d16d24072f387107f9cf95b639d0a76141ab25d3dc90752472787307a7d8b1a534bea237c2bb348faac973e17488\",\n            \"xprv9s21ZrQH143K29NaQCx2DxPkszvvbYj5FmZ7RMMAoCE932mUkfzaAYFf18JiaFC4bJujA7XAsm7TFddxdkXfn6U34te59Bp27CWp71mw55c\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"そとづら　あまど　おおう　あこがれる　いくぶん　けいけん　あたえる　いよく　そとづら　あまど　おおう　あこがれる　いくぶん　けいけん　あたえる　いよく　そとづら　いきなり\",\n            \"01187da93480d0369fff3fc5331284ad6a60cd3ce1f60dbec60899191afa2a2b807cd030038a93ddaf14d4f75d6de4a0e049ee58c92197eb9ca995770b558486\",\n            \"xprv9s21ZrQH143K312KY5MRB74dWa9BDHG7rV4oK7VAfA1eVKPDddPEUTXRZ5ShDzVQJp7d8q8xQLPYVcHYVuxb7sUo6EQpJUytZRHxyytSYbV\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　りんご\",\n            \"a1385ef66f20a905bbfc70f8be6ecfec341ff76d208e89e1a400ccea34313c99e93f4fba9c6f0729397b9002972af93179dc9dd8af7704fa3d28e656248274dc\",\n            \"xprv9s21ZrQH143K2LmZMWVM3JxKTHZEDZg1ZEUZH6hx9yJhBWRSgGGYD8TAaPa6MYto1t1bBXgPYFMLx1Gidw8fJADdFNzvqrAcXiadUPfTTVh\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　あいこくしん　いってい\",\n            \"c91afc204a8b098524c5e2134bf4955b9a9ddd5d4bb78c2184bb4378a306e851b60f3e4032fc910ecb48acfb9e441dd3ceaaab9e14700b11396b94e27e8ac2da\",\n            \"xprv9s21ZrQH143K2WD9BSegbAkGzg4XbqeY7gzCYGWaWfmRifMJJtmDo1pjXmyuEwPnKcLwTZ1uqosvTRBAcPdUUvdHxY6rKj6R28vWVWGLKuu\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"そつう　れきだい　ほんやく　わかす　りくつ　ばいか　ろせん　やちん　そつう　れきだい　ほんやく　わかす　りくつ　ばいか　ろせん　やちん　そつう　れきだい　ほんやく　わかす　りくつ　ばいか　ろせん　まんきつ\",\n            \"79aff5bc7868b9054f6c35bb3fa286c72a6931d5999c6c45a029ad31da550b71c8db72e594875e1d61788371b31a03b70fe1d9484840d403e56a1a2783bf9d7e\",\n            \"xprv9s21ZrQH143K3ZPQiQ24sxzu5PsqazSLn1W48saAFWiDhugDPp7dKB3v5JLfMqzTbqjdwE8P2UxFSKwnFc5CpgMaH2dSmoWDRuaAbrZbJF2\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"そとづら　あまど　おおう　あこがれる　いくぶん　けいけん　あたえる　いよく　そとづら　あまど　おおう　あこがれる　いくぶん　けいけん　あたえる　いよく　そとづら　あまど　おおう　あこがれる　いくぶん　けいけん　あたえる　うめる\",\n            \"0f46c02350b3f1227c3566dea2ff0f2caf716495a95725b320a31a3058d5d62596fdb816be75909d2c5f7094beb171dc504ea8ea60f5e2e40bd8aa0d9339aab0\",\n            \"xprv9s21ZrQH143K2TSJ2oumYNzqQGKmvehh1NKNzAjpu6Ue5yPvtzFvX8aCvBk2eTg8TJfwjiGLfA2KCiajZ1VXBvtQXqk7Wryxgps4BYyNmZt\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　われる　らいう\",\n            \"a0705c2feebefb61509dcc49c57586c35379c1981c688fc1d452da44443d9a651a374f1ad2ee3d7847b50655cf9241d7e607be436c0df7c8bac42f2a82985a79\",\n            \"xprv9s21ZrQH143K2k4V9TkTiFB2LviDq1oSHbRha8AmnPvBtRRVAnf9WJERojPPdki6sbiuNbxv91VhhdreJnaZh29Ay892Mj6KB2aZnysqfvR\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"ておくれ　げざん　しねま　こりる　きぼう　しねん　ななおし　ほんやく　きない　けむり　けまり　てんない\",\n            \"b80f83f27ec3a6cbe804be0661e9bcc30583484dbbd37f689d4952bdf4ad29d9b9f5774fc4c87b733169416418b81f272a3eab37feb22f5c8f6deea6bb08f8c1\",\n            \"xprv9s21ZrQH143K3VLugmPmzLDwfFeo8cgoZ2ajCQwWhGKfXut8C1XhdSNuAnXjz5W2bbbNPmr87yMHAaPMaUhE6MNnfGc21WRc5Lj94Tbbnnh\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"しはつ　たいちょう　ちめいど　ひりつ　ほくろ　こやく　こんかい　いひん　よろしい　さくら　がはく　ふっかつ　こまる　つごう　けぬき　ふすま　ちから　さくし\",\n            \"926ce4647a8f91552ae00efa8880ed7e43b6f8e9cf51c38851b0e242569ea96d77a19c777d28dc33d8912c3e3bc6c59f7a82b6daa25add2c39a492fdebae79da\",\n            \"xprv9s21ZrQH143K3eVmFcDa4FcZCGeNryYBv99mdgidpSeFBt6ppQQjE6MXegs3xmT4arCDXvtg6dGpr7vFY8A9bzzeJ7E9jyzWLPDSrixwqub\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"しやくしょ　くちこみ　どんぶり　けつじょ　おとしもの　くうぐん　どんぶり　たずさわる　ひたむき　みうち　にほん　うわさ　しゃけん　このよ　じどう　ほめる　たいよう　くふう　そんちょう　ろくが　はんこ　せあぶら　くうぐん　そっこう\",\n            \"94308a93dc1bc12f8e917b2445581240d83cd82ad3c52f9ba4125aa6ce5490a3624fb3dfd7e22923ef7ff3b778157e8bec76392b122bf465fcc56ab4f5a73401\",\n            \"xprv9s21ZrQH143K3ResRww4txupLREzrNjYYi6X5FKpKvFUoCwhJS1HtSn21gDkXcBYxQBd9RngafHfWqktMmLgPrVJTisEQbRn4strGawHGpQ\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"はいち　ふかい　てんすう　おさない　いろえんぴつ　だんち　くださる　せんちょう　きさらぎ　てきとう　せもたれ　うんどう\",\n            \"5fae92448afda85f10a50236144cee3068ce21e20a34447a9a4b6e9d5b000a4347a151d7024c2068c4d3c29c46a6f541a94b98624cc25b2c8ff42cafe6a3087b\",\n            \"xprv9s21ZrQH143K3PD5fc3CCepnLDsenZAqyKpcbquY3BR9sfosi7rbjXMo5nL9qUb91FwYUFdN9wJt9v95YoKJJFm9V7a2Xb1sZgstQkZ54cL\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"すいえい　ほとんど　せんやく　ほしい　ふうふ　ひんそう　ざんしょ　がちょう　なにわ　ひはん　ひつじゅひん　られつ　はんぼうき　ちそう　ほいく　めだつ　きさま　えがお\",\n            \"a49ff09e55b62b8fd3d4b88b4fae2c9062e18c06105c796505fde3cc7655cfb9c922c02817d18dd40832ecd19d80a71fd62d915c34cd8d95fc55591d12b6f677\",\n            \"xprv9s21ZrQH143K4AKun3sek391JX1qnWpxriP3eyJviCUq6ouiH3RDzJ1f7Gm6c7dgAkxn18EcaZ6CBNvVkmLxVvB1fdBdLiGeHXf69j4eCR1\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"てそう　こつこつ　えんちょう　じてん　おおや　ぴっちり　だんねつ　ほそく　たなばた　くらべる　ひまん　ていき　あんい　ひんしゅ　ちきん　ざいげん　くたびれる　そなえる　しんか　にいがた　せきむ　けしょう　しあさって　せたい\",\n            \"55d101db3cb8872853a3e84ec97fdeac63fdab33d92def4dc4694beff0f504da29f953bb463d9cbaf0c4d442672d40c5a58d6aed35d5fdbb2768dcc482b59bc0\",\n            \"xprv9s21ZrQH143K2dmFtHdM2tu7mDdKwsbeU7ekYU2dsFDBt7dNbXcsLTnN2MNi3hQssGdcPgEfiXNJcgnoo76t1nAHaoyVBXZ1z6hP8L2UGTs\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"おたく　ほうりつ　さいかい　げねつ　ふせい　いいだす　かいてん　ひんしゅ　もえる　てのひら　ねいき　むいか\",\n            \"1b0fca340ccf977258987a793b3e61b0e20291f8c27645e74621e87c01d0e881cd601bbb0ed98388d22dea341498ed74aea32975a56bd3bdc6027196b7a21640\",\n            \"xprv9s21ZrQH143K3Z6vsGR17YLtiGF2gTkCm9Z7XnJm1ffrLQ9ah7AVye6NyACmsWLZBoREcdCRS7tq4Hrx1NDWqHj3MctxWixcH7XBuigtJri\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"そむく　のぞく　かいふく　ろてん　げきやく　ろくが　ともだち　ふじみ　やおや　まかせる　すらすら　こぼれる　いぜん　へんたい　きさま　へきが　なたでここ　あさひ\",\n            \"d7919c8a5458fa4ff55431021938b15bf39b7542df902f371625d9f064a37b1d06a34cba920a9c8b8d6bf34514f542f5ee91b9eab81a063f9acfad932b43c62b\",\n            \"xprv9s21ZrQH143K462YnNY39Q7Pq8ZXzCXs9k9GexnGbyjVvu3QhrNLCkPxNUtaKZBzqffnmiuU4ZiA5UQKtwVqr1WmXyM3QjVaVg8Cc93xMDQ\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"あんぜん　すうじつ　たいふう　こんぽん　そこそこ　こたつ　しんせいじ　あんこ　うしなう　しまる　じどう　そうり　てはい　ていし　おめでとう　たんまつ　せんげん　たおる　ぬめり　このまま　ひいき　あまい　のらねこ　にんそう\",\n            \"1003a30a516cfa1c30de2a53fe6c5936dcb8ae893f944f459ea4e1f2202716320350dc2ee5d92289dae3c5b1771fec863fbbc40146fed04d0855c6af70b0c7aa\",\n            \"xprv9s21ZrQH143K24jAnV3a4K7xAoD486pMXSvAj41fkB61DopHqcyznUX1zmkFgEGBpNkXi6dckNcpcwXB65i71eBwP25t24QZHVRGJYURZ2Y\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"ようきゅう　そあく　いきおい　こうつう　こもじ　はんだん　おんしゃ　あいさつ　へいたく　しすう　ゆうびんきょく　てんぷら\",\n            \"17593d396c66d776bc15c06e5348bdfa38927daf92402c335041dc500d7c8ea9eccf4f4d1c187785b8c9128d06bd7048a1706006fab82abece74185448caa811\",\n            \"xprv9s21ZrQH143K3P24yRmaXsA2pntRyM375Kb6cF4P73bMQNKyXUPPR86X5o83UmTi4iyQWaCL48EoJUVqC7KxsPXbrAC4nKxjMh7FZJcucRE\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"はえる　せっさたくま　そんみん　たいよう　へこむ　になう　にっさん　よゆう　きあつ　だんぼう　くねくね　けらい　そんけい　えほうまき　しゃうん　たいむ　きあつ　かぶか\",\n            \"2567b4dc469b5d1d7c4aece40e642dea3d5cebd80a577b5a4d72fc2b60da6ca657d3a01270c47530ac71f812e648bac01aaadc62c444749fddec8982430fce7c\",\n            \"xprv9s21ZrQH143K2UfZfzss5CkDCtkRJvLN7DmM4sWjUaYMF4rfeWDERACvg7jGSSkGeFLrcHdpXUFty7wJ5yzyzcbRDqv7b9H6usZ16PnKy2c\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"よゆう　かんけい　けぶかい　へいこう　おかず　べんごし　りえき　じゆう　はんい　ともる　かほご　きぬごし　つみき　いきる　はかる　てふだ　しほう　ひろう　とくてん　ほったん　こさめ　ひつじゅひん　せつぞく　めんどう\",\n            \"909c8c992019adde332a11f0ebd1b0c0fbc9dd96e4d3d30ca4ecb0d06f743841cd25380f87b3a538f46dfa3fb3a5ab330487f99d128b1c6bcdbe476d3bbe2af2\",\n            \"xprv9s21ZrQH143K3a5iyuaeKiPGQbhQLUaBhzfd7inUA5ndrmcYEc7zZzTLGM37Du2M11nXChrzXyZ8ZYtH2dG1CkWE39R749XhcKUcVs9avTR\"\n        ]\n    ],\n    \"korean\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가능\",\n            \"a253d07f616223e337b6fa257632a2cc37e1ba36ff0bc7cf5a943366fa1b9ef02d6aa0333da51c17902951634b8aa81b6692a194b07f4f8c542335d73c96aad3\",\n            \"xprv9s21ZrQH143K2EgqD4YCzE4rJ8rojXAMzqftKGS7694ApSkSoLgheNMawZYv2sArwHhLq4AaJfV6WWtGLjFWdFBT47wsjnq9v6iMXojWZ1V\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"실장 활동 큰절 흔적 형제 제대로 훈련 한글 실장 활동 큰절 흔히\",\n            \"e6995bf885f5c64932ca28bbb00bc100a6b89cb6edc987bb05f05f99ae7caf78329029c189834c1cca938000bcf08423da011558a60cf3d90c9035eaaf241b9e\",\n            \"xprv9s21ZrQH143K3CgBqqMtQxnP4VvSCjaTs2GfqHadwo4ddmKkvzasAHRwAsSDqjvJQu8jmAdEgBrLkVYhHdyZKWkZbyfuwPQG84PrWjEuCLQ\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"실현 감소 기법 가상 걱정 무슨 가족 공간 실현 감소 기법 가득\",\n            \"1bb52039a6cc288cf806740836002abce493724edac3d3b9458e3581427df76414b422171ef115d823a01c6b39fa68bd0fed20bf5e64dec008fcb22e4b7f26bb\",\n            \"xprv9s21ZrQH143K3v6uaDUdZX7Cr8uC3hCE6gJ1MiGsnmRojRtUN6Y8nBiWVfMUc1skLwuUb3NshkJSdCuFew5G2y6YTDCRsSWNxYsJgZCpRxL\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 흑백\",\n            \"b6eb986d6aaf7d0cd0eae2a667ff8bde68c8780fb5a728cf500e29119ce99c9b079a4217836879c1e73b8a85422a85b564d819699a4310a1d007b5be24c24b6d\",\n            \"xprv9s21ZrQH143K2P5vpGbzebpVw9pZzmHHyuoTFDAFCR5UTVwQPdkuKPJB5fP4a6YgAT6seAuv9uGsMcnoyVFkVxoKZxQgB1SXjy89nHvvSHx\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 강도\",\n            \"f40a8db48df9a7fdd73a7b3ceb45f668e4eff098f275a0a5cd739d31572c90aa92bc08b9043d0adf059a945e47e2fdbc26c89dcc15b3893a2a705e4539523ae3\",\n            \"xprv9s21ZrQH143K4FQh3Y65u7oFeQhimhg8fjRV12vp7kYxB1EnjiBVFY1B7AdjQgLcfzK8qLjaZKFq4gfPC5pQtFtDnHi6Y988Skm2oRr758w\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"실장 활동 큰절 흔적 형제 제대로 훈련 한글 실장 활동 큰절 흔적 형제 제대로 훈련 한글 실장 환갑\",\n            \"3162bc17e0f2f01ee571022444d2c5fbddf6a68dedfe734c319fb574592e9c0328f6526116b3b0b025b23391781d0bef8f43bc8ddc2b054b9f52e1fd6a88e3d2\",\n            \"xprv9s21ZrQH143K2cE8CZ9tqfnmvNZcEJpwnyRRcsqDPokupVqx1hecEjQF2zrM6amGPiDiEKGZdNWrps6DdEcP83UABBjV7yJSkAFUWcP1FDF\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"실현 감소 기법 가상 걱정 무슨 가족 공간 실현 감소 기법 가상 걱정 무슨 가족 공간 실현 거액\",\n            \"9fa92e4524e0f7412935b2deea23593c0955f9679d3285e3b955f5cdd2a659ee005ee99bd385f63d82cbdb54a3849229fc9a700e198b65a1452b511884b543eb\",\n            \"xprv9s21ZrQH143K2XL77upQ6FjJr8a9oDGHakG1HQozxUzHJ1aVbv6JLPuX2nXdbopUnxBoKgVBHiZphPg4Krqm1xxUm6YPcZg9NeAiqT1MAcK\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 화살\",\n            \"2543a88c8a31570dc9ee868a7b153f7f2e42700778bae7a3aba7017357e708b5cea97e0d9753c9226abc90b83c76ae369d74515ac64102c51a5fd0f809cf8b92\",\n            \"xprv9s21ZrQH143K3AK2RE2fUZyLssNUUJPyAYjXGDGE7Ysq8hTx7MG43NG7KDALxx6TaVjXCmxFwB2wZnNtSBM2asDYC4YcDMEc9sbCyPPYjdo\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 가격 계단\",\n            \"edb71011bc0c227103ba8a769cc36ba609e5407a771727fc0c8cba1b5a44d21ab9163d9deaa37427ccc579864e21f08d0fdd3a53a6be258d3c73b898a01ce2b2\",\n            \"xprv9s21ZrQH143K2vZcddzTch42FzN5kcvsdtyMNR6QfEgZy1JEor4wzwFKj4JGq8kJEyC4zMQHhN7Q9mhRZJdYceTALfwxmpUAD6AtSzU3n7L\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"실장 활동 큰절 흔적 형제 제대로 훈련 한글 실장 활동 큰절 흔적 형제 제대로 훈련 한글 실장 활동 큰절 흔적 형제 제대로 훈련 통로\",\n            \"dbd640cc9d3e99939bb0fc4473738571e314c29468f01fa85f57e296cf6e8e269d6e32434e46aaa63384930cae83728623195a932a48ccb71a9ea247720d9371\",\n            \"xprv9s21ZrQH143K38C9hPGqNHuxsvKmNVwY2gRiRjjbzuBNme4PgfyLzkhYEt4fGm73xs6c9QDh2GxxkntMiFyeDsMDPkLDa9TkubnWZFCsJP9\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"실현 감소 기법 가상 걱정 무슨 가족 공간 실현 감소 기법 가상 걱정 무슨 가족 공간 실현 감소 기법 가상 걱정 무슨 가족 구속\",\n            \"9a0ec04a48287ae628d61428f921de5f40fc1035f21883798e05c36f9705b2525a00ebd6bb89fcae9b8af8e9861d0083de331199d6b85b24cff598609a49b305\",\n            \"xprv9s21ZrQH143K3PRHhckbBdnb1HMFJWXd2oPh4sXWWP8iMrH5fkxKnDucKqdWFv895Z7BRWKmbHj5gRvB6QddHeMUrk7wzSRzf7ZqkkVCipS\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 힘껏 허용\",\n            \"340bd57209e54e8bde6ca750147933f7e44995047da87b61f64f70f26f289a377e25a65f5efb11f9e651917ec9866d54846516ae0fba956f5f536422bb47d91c\",\n            \"xprv9s21ZrQH143K4Cr2Z2NiQPe5Xz6W92ZCE6SpW5NVmfvjtJgJUAG6WwkQ4iZ1AyfbUDb3yoiQsdoGHSSXNEMtAX3xPdtD38n5JeD8Lx7XNR9\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"원고 물질 생일 부산 마요네즈 생활 일찍 큰절 동화책 반성 반드시 의식\",\n            \"8d148c7f8ed529d7a88fe2bc8bff574b56406f9928ab5426df793f4d3a5121c7c6974c856ad20f66ecf04fbecd3bc025912b3e41d500f1e5be896505e01d08d6\",\n            \"xprv9s21ZrQH143K3t9XU9hQ1sEMc3LTT3MZ4Ar51RchXDvo5sjxDF7bFNaLfz7DttnvUqKAThXzv99QKccqpLQB6DdgR3NJV58AixcCdbw6ZTu\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"서비스 알코올 오로지 착각 카운터 부근 부정 고양이 허락 비디오 단맛 체온 본인 완전 바람 철학 영하 비닐\",\n            \"3b67b06a2386240f75abe8f7905fd0fdb4cc2baa88c090eb9bca3cf144e6e33bbf3dd9085addfa52cd0ff9f2f9cd63ca69e7e77ce903ace942ec7f5b451148a2\",\n            \"xprv9s21ZrQH143K315xG5w3u3mrnhSMVsNVdKmA9VZVXeV3fAcLX94k4N9oDEgSAxsMi3RhACEKFfgWkFex6T1uHSjSeHPxnnVF7muEAVNycgE\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"설렁탕 모범 일곱 민간 낙엽 매스컴 일곱 언어 지진 통장 잠시 국제 설문 복도 생방송 큰딸 약수 목소리 아직 횡단보도 중독 수필 매스컴 실컷\",\n            \"06b321dd10cd2d0dec17212163c5d31f5ebda67027c0159380348d31ec5c5e7914ec75a44d4e225bbe5ce3db967e2f1ae2c9d463a638951b3e16d75ecb92cb17\",\n            \"xprv9s21ZrQH143K4TY4YjtQLxBPerqUshALn696njp6gNVkBTYWWZ5jrQPZRuqxiMoJ6RjQpVgVZFqKBRsWnGcci6UNgPdHbRBuVn93aKdCD1n\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"제주도 처음 의견 김밥 공부 연출 모델 시장 대합실 원래 시금치 군인\",\n            \"5e68ec0b343b62e221ede6dd5d6f33dcf8b5b4f4925ce6a30f49b17182ed0a40f7c7f3248463843f1999dd671a2e9c2abf4e5443a4e88f2bbf10b79524cab827\",\n            \"xprv9s21ZrQH143K4B4gzTqVD1szP9igPch2u3xqQZ2gBsYe4u9kunYh5smSB3Md8EXktwjWafLwMasGuLPiSGXPCwNTgdcEPBsgtq6MiGMscje\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"소음 큰길 식당 커튼 책임 창구 사흘 다양성 일행 질병 진급 혈액 증가 예산 치약 하룻밤 대한민국 그날\",\n            \"c8a07b4a163c3cf4ef400a96bdb7edc012dacb957326de185e66f7804e912c02329ab07520ef05dba38b2b3f6ded8a8691e1b17a38658aaddaed7ca95ff1588b\",\n            \"xprv9s21ZrQH143K2h4eVKk7zbdHmjz5U5poyBbddPTS38xb7rjA9NMdUjYC3Dy2X7top1kVw51cFuJ2UHmFU3WGAzb5Hz4imvuz3ZKWy2R7gAP\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"월급 보너스 금고 생물 기분 진리 열매 콘서트 에어컨 몸무게 집중 우체국 강제 창고 영혼 분필 모든 심리 소나기 자랑 순서 미디어 삼십 술집\",\n            \"683d1f6324fa54a4c4efa9b0573fae573ebc1c8b373890eb9b1e6f760f586126af2a3a39e0494f653ce6dbb954353023c304dd42d80aa939eb5a31acaaa3a60b\",\n            \"xprv9s21ZrQH143K48a2XvjEnkvM3ry54SZdbERB51GvtK6S5hbSwV5SbBkqa2KNW7b3gwY7hC2JMgiNMD45aMhABCDvXUoZTvrq6typLaUAz6k\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"나들이 침대 분야 바이러스 첫날 개선 논문 창고 하필 윗사람 저고리 팩스\",\n            \"f767f63c4febb5c832890f6129d0c3721555de40c28ac11093d23447f507b98f134cfef190cf0f12f1e41278fae5334f460c24c69cadc9aacc5d98efb3903f06\",\n            \"xprv9s21ZrQH143K3K9kkX6aq8Tmqp5RjoDwbrEbqStVfNmSWBofcYA3wYA2MQsDsTZjkfkeu7gz9yJB4foKXE1mveXDf48vdA7L5mPZfC8aYdW\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"씨름 정도 놀이 훨씬 물결 횡단보도 인천 철저히 학비 킬로 수염 본격적 결심 취업 대한민국 출연 일정 가운데\",\n            \"739584c55ab1c8053a44ca3fb50237e066590c92043cf3f45748768df65778bb79175d511543d96112f0a0e7960df081f74e6e477b953a1681cb5331de8abc3e\",\n            \"xprv9s21ZrQH143K3XQJtWHu2YWz62N1SFBLpbweVNpCUoeFEWdukPL2rXvQ7HoDBwPWCnBc5otLQnHomemkmZ19m49YjQTqZY6uvjbDQaWpS5B\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"개구리 속담 액수 북한 실내 병아리 소망 같이 관찰 선물 생방송 신용 유난히 운반 남대문 열차 시설 양주 재판 보편적 증세 감기 정오 장미\",\n            \"068f3943d3b3ba61b74e7900d936fcf4d73fc74852bc011e7405213edebed9f1d6b9a25db10c3ad5552b779225321a36304c757d0479e8b591655d0188961120\",\n            \"xprv9s21ZrQH143K4ameDhGSneS8UaxoYBfQ547c6eDEBvDJJ2cqzFHCCfqcoybLTVreVRjQo6SUDKzoHeNtR9bCQY2qF3iWCJTheeDYTUSGdTs\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"해결 식초 거실 백성 볼펜 중세 냄새 가끔 출근 상인 한번 의심\",\n            \"5f7125457857a8870d1ace1eb0f87479385d08ab8827998f57cb0cab5289d31a360310cdffaf4e8d1202a13fd8bba2ed9bc240a59b6d486d418647c55c7bca44\",\n            \"xprv9s21ZrQH143K2fhpmAA6AkCVJWY7je61aLnS882ga5H3cMuoSp4G4SCzg47MRUjVFQYVytFdSu3M1hYyhW3xkuGqxnUXx1K6jFTg4C5gmst\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"제한 스위치 아프리카 약수 출입 잠수함 잔디 향상 당장 열정 목록 반장 아시아 그토록 선풍기 약간 당장 단순\",\n            \"8c6f94c633c8752381e7bb207083025d7cef6c448695393fc21553e1ac269991a3ace1a2562a6129bdc34494c7a6c01d19f600da9af985eb001d71d2fb9e1480\",\n            \"xprv9s21ZrQH143K2b5dBGtut1we5Wz9S2L2XAXfj6xftmT2omNHimaPwbTWszDvwSLfpjpQCjXKfqW827u8a4ADhCQEnTiiFj4dtbc2DZJRucn\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"향상 담배 박수 추측 기술 충분히 협력 성적 줄무늬 인체 단위 딸아이 왼손 거짓 조깅 유명 석사 참석 이야기 크림 변동 진급 스케이트 하지만\",\n            \"0ecef71bd6f0948d9186c2786086a00f7140a00d37c836d01567077aac0dbc69f62189c02a9138dcc79a74dbb676b74aad4959fdbbf1d06a7798385f8eec97b0\",\n            \"xprv9s21ZrQH143K3zjSpKnVTgqBrJfMK5iZXLrGb5Z4zcWKo9URusFq4n7YjnLR3RCqD8Mytzk4qjHnk52PfdQUHCCJUnKnZxqhMXGGVVe1NXZ\"\n        ]\n    ],\n    \"portuguese\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abater\",\n            \"ab9742b024a1e8bd241b76f8b3a157e9d442da60277bc8f36b8b23afe163de79414fb49fd1a8dd26f4ea7f0dc965c760b3b80727557bdca61e1f0b0f069952f2\",\n            \"xprv9s21ZrQH143K4ayH97er9xirrbGL9hEywmMfh1LdQjwtrsnrvENN7c2yKs82HypXo4GAMt4wpnna9doa1FDFYXQTSFReWDY4XAf4imN5m6s\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"imitador vinheta sogro xerife veleiro pomar volumoso tratador imitador vinheta sogro xingar\",\n            \"298d1614ff06ae803709f5be5331135cb74e6cc77fa09e07a3e887c2e370401f9a73a409dadf58b5a5197b27ffb3fa5dd528aad9a1a8750d7669ce950ee60c2c\",\n            \"xprv9s21ZrQH143K3H4uYufypQuRqf28rLoZpLTwjpeCiPBpcZtJpupYd2oS39oGnrHd7fPAgU5d8bfTpYd97MShp4f9fBGj5K1F9NqgZFpmbVj\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"inalador acirrar barulho abotoar afivelar coruja abutre amostra inalador acirrar barulho abduzir\",\n            \"800fd4e7691fbc3ceed246c211a38949c3607fe269a35829e40ca9d3e26515a4ebd64d8bfe9b66b49543fe9dab78bde7cb7102968ce669f55293bcc02e26ba0e\",\n            \"xprv9s21ZrQH143K2qEuVaHnXDY1HbcQ9nMyNoi5tgGyFxfYXVxHipQ9hcmS2QitJxsNFatCZk4EYoyyNdWamAjJiMLhuimpjiWHPvJCw28EMSr\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido xeque\",\n            \"7fb404372815ea28ef97a64249acd71a293ea0437b3dac8f7e193a10f3584e2055753cc8d6f025229f65e61318fc4e10d4017bd3cc3496f535eca3247d26acd6\",\n            \"xprv9s21ZrQH143K3tfxkHq74PSrq4HqTjs5sHHxBpjoP26GnJ5Q8w7tEn5kmPESuqN5TQb9Lu4LysqMAcXHWNsr3DKSnvuu3vx6sK7V6Hhv2iD\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate acumular\",\n            \"81c66b6789e8b91c169335be4436fd9736ca9c06425acd09b0525e1d6836383130f7f7d31378aaef8b7109503972f40d42f6c6b9f99765827bea762515d3404d\",\n            \"xprv9s21ZrQH143K4LsdmZ3NinpZHGbQ6n7aQr5uV8Rv7Fq8yNPdAzsyrezon8NZ3ZCzode5jS2PXzN1C68amwDmp2bgAEF4jDG7NUbdRYCjR8r\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"imitador vinheta sogro xerife veleiro pomar volumoso tratador imitador vinheta sogro xerife veleiro pomar volumoso tratador imitador viga\",\n            \"17040704dd985478b7d0666c7078201e3cd7d1fd1aca0d7d47c98a91ec7845500c611d987339a1d4c12bc506feb7c486eef0aa8ce679b1d184db5ca40fe8ef67\",\n            \"xprv9s21ZrQH143K3XAGBJxF36qFzxkFaSEsNjqKvCtT3s7WfzgMBRcv8G9K2CRGXXhLYPWKSipBrd9dyLSRuTzQWbAJkhghki7Nn13QfHqCSBq\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"inalador acirrar barulho abotoar afivelar coruja abutre amostra inalador acirrar barulho abotoar afivelar coruja abutre amostra inalador afastar\",\n            \"0f637bf3a487c26fb73f6a464f62ef1f6ca73a6ae083e220374c82881bf4ed2dafd874956ce368c4441e6269759c5864197e87421fbcdb7f6d63df17b4f7df81\",\n            \"xprv9s21ZrQH143K25VJsZdwtDCmzZ5C2LkJyNDKrHiFfHHBEmtvn77g7qrBRGHTum98TqU7sWCGFZ8vjtcPVAfgGcV51vi2BrPR66KC7wNxb3z\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido viaduto\",\n            \"042e40dacea1df76335445c37171e5c0fde334236abe1b5d69378548875d157968dfff5889641f16690dca9baa4d9e5fbf56e3aaf0765144ba96b819f37fd0ae\",\n            \"xprv9s21ZrQH143K3xAXH3i9VReyK3HSyzSmN11DXikYFTA3senE3iWDCdYTFXL9JkBM7CeCS31NBBHNu2tH5T1iDWCBEu1TeWLfELH4CaGAiRR\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate abacate alinhar\",\n            \"8fe67c9f53a30f75513830e18f6bd0950354297a4977393fae3577363393e679cc13452bcfc9460b28a913ab8de9efc55f5901d1ba77e5eec791afd967768607\",\n            \"xprv9s21ZrQH143K3UVmtSkznKJCHUGjkjoHkUd6dxdfo91K8sdpEVmzjyRMB3Sf2WC7WKzmZLw2cfJ43LAEENq2v1gASK4TmMUTkbWVoJaZLge\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"imitador vinheta sogro xerife veleiro pomar volumoso tratador imitador vinheta sogro xerife veleiro pomar volumoso tratador imitador vinheta sogro xerife veleiro pomar volumoso sucata\",\n            \"feac9ad4e1a4a4399a7d57fe47bf64b404a7588eca1025abfa299365f7a75639317e2c89a94812db33405aa0213846bfd6d53dfd02743e2cf3b6984eb9fcf19f\",\n            \"xprv9s21ZrQH143K2Syz6ZuTcKmPtPee4Xn5HMEnuZcNZ1s7hJdgjRLFJ8f4d8DnoBBTUchCBjBnjubsz3wum7zbhdp5h9hm4g6DVDo2LaHGJ2a\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"inalador acirrar barulho abotoar afivelar coruja abutre amostra inalador acirrar barulho abotoar afivelar coruja abutre amostra inalador acirrar barulho abotoar afivelar coruja abutre asilado\",\n            \"32c8feae6a0bee33166468a770cb28459727e10f4f5ffef64977d5ef52a68ec51d832751a10c025058612ab256052cdfa9d8c5c87560de0453efe5a7d4597771\",\n            \"xprv9s21ZrQH143K4XMzpdgrkDGxnU31ezynvtw3iBEfRB8sriHpEwyu2Gb65ao9YLcTTWTyxNh2g2AdtYmZ4wpTaAxLpJBzWY7jAvG1HyotoEt\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido zumbido validade\",\n            \"739a6edd208d09e28fa97f8e8709aaf185e173125b1b427c04d1539173c88b78e81610a759e14f97a2038dcdc2c466a072788e3d7c88cc9bf36b96cb29510e77\",\n            \"xprv9s21ZrQH143K45qUnDL5tCHKGpht6amXS4d278iTXWRJXthNTufwnbnvr6rU8kd4Nb5s9aBWdYFtfcdGkg4GdL91jRhGRtP8mZbjtTvpGsy\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"mexicano crosta farpa empolgar chatice fartura olaria sogro centeio defesa dedal multar\",\n            \"1f0397e6d2aaf8d6867d648e9bc27b12a4ee1b61a47fb63c6676c153c472d708f02344ac56fd1a8e135e18cce4eef711e7e88529bd6c54b90715e9b3d9fb8467\",\n            \"xprv9s21ZrQH143K2ynvNymKuhxopGpKrkH5skB2FqBYXP3N4goobBbXfYS8Vqhr6QAZQqxxr5caCjvSC3P3itpqqbntU9jTmmEdoM1E8Z5f1GU\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"fazenda invasor magreza repolho separado emenda enchente amassar valente enxerto cachorro roteiro eliminar marinho deboche rodovia locutor envolver\",\n            \"1335d5a679638f63a494f1b71f6c6c448ccb0384167f3ef3ad07456f0b70f13b8f6097c1315186543a09325ca3581f329cdb66674d0f97c4474950e3aef3b9e9\",\n            \"xprv9s21ZrQH143K4MHxCTSXTFPDppSnKcW22kjYEg7NMCcHEobe5G337nzsfnuud8asiYwnyMQMG9WkAwPW78E1otspYE4T5t2AU2cArUhhQGg\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"filho comentar obrigado cunhado biologia clone obrigado julgador rebolar sufixo pacote atingir filtrar edital fardado siri janta conhecer inibido vogal quiosque genoma clone impor\",\n            \"ca0462775b11a28cb36c497a36da8e46c1ab618facf7640b42fd4974085e1d682a6ca660560a3b72dc602ff56e4027b53a8ffb691a96e4c827ef4e6d665565bf\",\n            \"xprv9s21ZrQH143K4B1eibfqLNQbrVycyNgNCgQvDFtBLDYbEPtVXRBn44GPmw8fasfeCrV5tc8BFhzSnbg3pHdafof5rrXHm4XUK6EBrpoZni5\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"pote ringue muda benzer andaime levitar comando guloso carreira micro grilo atracar\",\n            \"556b77fc49cd57f7c9c92fafedac1c8341598666721b874db50da261c7cded491c22ecd3235e508822507212698f645bb198f0bb1aecd50d22339e77619a765e\",\n            \"xprv9s21ZrQH143K2NhKv3Pg9xyGsPMDwukoomCFE74Fk4w4K6pe8hetKjNrSWEmzPSr482zkiZ73aE5wTYY8jvLN4Wruv83p6mmxnxkF7qkUBM\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"frieza sirene hibernar setembro rigidez retalho exagero cabana oliveira refugiar recrutar vazar ramal lousa segmento tocha carpete autoria\",\n            \"3059ded790eac1a5bb614c2a88989a4b5d7d4db20acc95f2a9eee1a5889012fa2b7ad2c0b0c5b81abe94d3e4c6c58265058fb257bb051552fe5f82fc45389132\",\n            \"xprv9s21ZrQH143K2EN6vqxgJ2XMXNZx6GWcdcFXajpxqDfWvsrYFETHVWUEZr34sP49GinmReyfUgpakD6xT99vcV7yiAvPnf8BbEJ2PsWf8EH\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"mimado drible baioneta fantoche bastante redonda ligeiro simpatia lamber copeiro reitor mensagem adeus resumir lombo enraizar combinar inapto fosco orfanato gincana cubano exibir global\",\n            \"f26d817eb6474c6ac3358737afd31a4b4be74ba268cb7dd0bab44f959c9b4be5ef7d65245bd0da8f21694bf380e3e4a9fe7f82777b4d59a8c738fc460b0c3210\",\n            \"xprv9s21ZrQH143K4QArHuoZ7djwjgsdKRekuqKqFEBZbYpAQJU2a1mDMm4z8iG28oBs2kAEaGQDPjLu3kiNz3BV5Lio26Zt1z5KzEBxtSJGtCR\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"bifocal semanal enlatar debulhar roedor adquirir branco resumir tora modular patrono tangente\",\n            \"fccd6ccf9cad7af20eaaba21e9f4fbb149907c41b5e000ce398e8956c15a5436e04091402d4851c4cc8cccf9e8a90dc8219f3104698d1022064538c6303dcdef\",\n            \"xprv9s21ZrQH143K25Rf7o8uUBtDjSZkJ4S2Cspm3JN9USxBAXmmUYvw9n7W3qsxbkkptFhejjufMUtKx5QhCMG8Z6RjT58F9kVrRGKMQhatmtb\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"indeciso pires braveza vontade criada vogal nutrir rodeio toxina soletrar gelo elaborar ajudar sediado carpete sarjeta oficina abreviar\",\n            \"c22c6e716250a3b98b0f342f77d4f1fe9a4eab81304fbcc9eb9f9852db769b4164daf2aecf72e6d9879713768628780d0b9900ece13c75aa1f433d48ea5c9839\",\n            \"xprv9s21ZrQH143K4UsyxJK2nxQFmMtrqR5QUuHaK1KiZkp1LZKMqPuUCCe3xqVWDycrKjDSctxm2sPQ72MBM3yZx6tX7Jvemccncy4nw3HEjFb\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"adjetivo fugir irritado engenho iluminar dourado fralda aditivo aprovar ferrugem fardado ignorado moeda mesada bisneto linda guache jejum pastel ecologia rapel acionado pneu palmada\",\n            \"6fc110cbcad37d6a43aadf52643ca9172f51c6fac45bf0a17e60e0fc24b5d1cffc73dd0606c427ef789f9e96c1d05af88a806005a21a4f2f93a5e41ab19fd7d6\",\n            \"xprv9s21ZrQH143K2VBbZdEtqReQrWkiSUvySRGbPbyP9sm8vHAWDwXc1GwsBHc8LQU82gydYVQ2YCDGZKKzKPX8SaWCf2jrQRC7hVAgb2GYZuD\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"turbo hoje aeronave diagrama embargo rachar bochecha abaixo sanidade extinto tridente mundial\",\n            \"d666e6f21c3f8934aa38e45db96ee64eb490156655c2be5d4da4359fc9b11cf9ffda5802ef0eedcc154fb790c41f50ec0cb40b4236972538d8a6e27e54115706\",\n            \"xprv9s21ZrQH143K4CtpNWJhUqGJ7sMBw5MfYzKSNUmFABS3NwoqGtdAXUMyci5F11H9Vbx3kbiEqjDPMvTj84nMVZM9PF7u8ouNEruefbPFc9G\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"povoar gorjeta injetar janta saturar paciente ovelha vaidoso cancelar limpador confuso degelo inflamar avisar ficheiro italiano cancelar cacique\",\n            \"cb72a39ca9d39c4283398a9995754bdff1785ccc0d96f842d748f4fe904f9dc9a963b7e89ca8070154edbc7d1efc90e1554ac4dc34646c38d6950ffaabeee350\",\n            \"xprv9s21ZrQH143K2GgN5EwWK5f6MXbTAvTvN4uiu5pZSgb4MxBAy8VTabQfb7Dc3kp1VmEuKTWJbUtM2Hu8KpFUKWPm48ubQ5JHUHg5PeLwz2m\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"vaidoso calota decote sambar batida seda vazio flora queda nuvem cadeado certeiro matinal afetivo praxe moinho feno resgatar nervoso sintonia dobrador recrutar gorro tonel\",\n            \"8c6d156ba11fbc606a92071e7230fda2446333510ef5f9bed4712b2d737ab43d2e06c4fb3929dfd072ccc8b9003c6bfa62d5b8fcf04396508c54215357f6f8cf\",\n            \"xprv9s21ZrQH143K3fnoXd9pUHy7b6hH79o9bMW45Zc9486jaN1KKJVZrm1XosHw3sduFw58ADzqLZR1TvaB7enqXZoB8hyptgcijczutBxqKNB\"\n        ]\n    ],\n    \"spanish\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco abierto\",\n            \"29a2ee16de47d07025de37e7d9c596869439f9bcd26a702d2bae64db2bf0f68383841c5444b5b3bd39dd720d2ebe59969e110e5955c8e6d32c6c3294fd87439b\",\n            \"xprv9s21ZrQH143K49iYfUTNyLe6mVRHvYSg58nfiLkcSREsu5QefrsvQ9KWsMtX7SXsXwvs6J1esWdna2weySpUFZNN6qiXuHcobEMWGLfyaHG\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"ligero vista talar yogur venta queso yacer trozo ligero vista talar zafiro\",\n            \"1580aa5d5d67057b3a0a12253c283b93921851555529d0bbe9634349d641029216f791ddce3527819d44d833a0df3500b15fd8ba4cae7ca24e1464b9167de633\",\n            \"xprv9s21ZrQH143K27g7EMkgY2F1fuyqSEKq6n1iJCHuiUX5F3oGESmJSS6DcKW5JZ6qWWJ7x8wS1FCrd1NhRS4xCWDn9Bb1HzBuNpitD7FeYGv\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"lino admitir bolero abrir álbum dejar acelga aprender lino admitir bolero abogado\",\n            \"a89366f7f9c4bd98afca8edf1242507506562b8eb8a3a60468cafcb6f3037aba1e4d9a7497f6d49fa94aca87c95703873741441a719325af371f8eda9b59dc83\",\n            \"xprv9s21ZrQH143K2dG5ptughpsWSbdXdRVg6ZZtF8RehVMaDNM2TJ6NZAtorTDm2EVpt5nwpsgtjgYW3GD6oP8Nk3ZhibRQFRJ4f5JoDrunY1m\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo yodo\",\n            \"a9d1f751178872cc53fc5433e9b2a97526448adc4b824cedeadd8a127c2416481345dfbef2bfc78275f3498e40b4e8e2e00560100e543aba3f324e752f032bc9\",\n            \"xprv9s21ZrQH143K4TU3oETVCyPLTqmC8C7zqqSR7L8JpMiR68YNhyvfEmXpRh6pP8gPghpFbvNSQCQppPDf55iNnZhT9iza6HRpTvKeLSDNFCg\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco afición\",\n            \"6c9f21d46c56f723cd734e308f10ebf44b5b92a2e0d80fd66a2952b8d37af5219e0b93c59e1d8e63b47ac657ec2c524e5fb951d87cac824f84a3ac6264b7aaac\",\n            \"xprv9s21ZrQH143K3AjqVTqs8gbpkEoSkCVEM6dAGvRm2TJgxTLih4TuPPSp6gheAkXpPRhG63Fb9Cr5MEto2j6hGJ4ZVPa3C1GHXUyPPwMRXCV\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"ligero vista talar yogur venta queso yacer trozo ligero vista talar yogur venta queso yacer trozo ligero violín\",\n            \"f73b28d7e180e0a92c57276a29489c10a992c8a465ab61be0ade4708543436a682b2a3c22de57c48736ae6f29bebf3e506779c74bc1a835ad6b9f4e174126ca8\",\n            \"xprv9s21ZrQH143K4PEMCi1dMq3ZwveC5um6cXR3tp4Z6LUGLhz4pmkaDU44UoSTiMQHv5icYPjH5EooZNorbDB7fLMDa531HHrKKnEEqCT5Tfs\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"lino admitir bolero abrir álbum dejar acelga aprender lino admitir bolero abrir álbum dejar acelga aprender lino alacrán\",\n            \"f799e5c2782b50d0eb1d25b5f94984c5b4037ade236c6aa3b48b3df01b703d8ede5f94555f4e78f87a642a9676ba052865418c469c5739b3e93acc528fad30b7\",\n            \"xprv9s21ZrQH143K2UeG5FGYFmkW7oTy35ZFgQ7qdR5tzBdKxGLCEfVJPPA98e2wUpfD3Eg6GS4833dFVVKafB3RNGMSZtxoWc56Yxo7PaBgYds\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo viejo\",\n            \"2fd3964ac77c52232dc0eb2ab237fea2de9b7509005214101ecbbaeb40f34bce7735e848fca6339f76f289904c6db959fa573fc0aa607d969ac256693b4fb7af\",\n            \"xprv9s21ZrQH143K3zwjASrAazc9EGeoVcQXA3unTmgxG9ZS7nc75inZw19oktj1y3n2Y7yetBatSN3v2UpS9ms3PvmrgQEMC4jox4ZV1ZrW6Qz\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ábaco ancla\",\n            \"f600536eca941ed937318828e9ebab24b3b571558250e7a8342fc3cf16c458b2d7b36c36155a86cc308f7bef6d87b05d5dbe347f1a83c3dfbabd89e9c45b7883\",\n            \"xprv9s21ZrQH143K2J842VWEPWH3ssnSvZYhRCzPoEcifAN4UgETeYkTdvnMUgnuftLyeGttvdvec8F1YJCmQz5mS956jsb2m8yDXZtnxRgiYgX\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"ligero vista talar yogur venta queso yacer trozo ligero vista talar yogur venta queso yacer trozo ligero vista talar yogur venta queso yacer teatro\",\n            \"3d2a3aec779195f2628e800879d600cfaf2d7fcfa998657068db53906a00608fcc94fc78ceab8c97d6191389c4e468815ea0d11ffa4280c34c3cf17721a27c73\",\n            \"xprv9s21ZrQH143K2WBRPum95TFxfz8niK5sbiDpQjyr915SjEJc99BrYoRhPuYvfzFhPwqUNAFtEdw4khqQMK4ge8EnTZZASbv7oy8t6SMzVSM\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"lino admitir bolero abrir álbum dejar acelga aprender lino admitir bolero abrir álbum dejar acelga aprender lino admitir bolero abrir álbum dejar acelga aumento\",\n            \"dd095dddb50de059f5cb6932d529ad37dd32d40f72da3d0c7671ffc6bd967b4392fe233e5e9a4d9e5e60413160ae215e34375db85e95ccbab4fd4712f32216ab\",\n            \"xprv9s21ZrQH143K3SQcqhHXxwZ793d4RXPpUQJQm8Bpf799AZPzicBxB87hu4Sm2DvWBqFvmxEjN3bY6EVzUxhJbHKdtV2k6u4c3ZNRFGhZDma\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo zurdo varón\",\n            \"deea21c6902df5ef4a8efab8e14de53004c68817ea3de421cdd184f4159a6e9947376ed794c3ce67534f37f80b46674e85335555b5c53f44fdfef27991fedc0e\",\n            \"xprv9s21ZrQH143K4TyBobPSoDLEze5gKjiTZXzaJaND1QHqmrnx6kULMJhGvQkraSHgUsjmisepryPQqTfWyM3ETLjusTsW35KumQ3w3RyusSM\"\n        ],\n        [\n            \"9e885d952ad362caeb4efe34a8e91bd2\",\n            \"obra diadema gorila farmacia colgar gorra pausa talar cocina duda dragón optar\",\n            \"fcf6ebfc7d9eebab56ca868cbd2d5d05a6f2142ba903c52855dad4ab8c0c2cf6b4e047a2dd97cf382ae717dc18d155a45fc798e6f0a0b89971a4224e2a285701\",\n            \"xprv9s21ZrQH143K3pxsjjkbjzEu1f9qaeGb9wTLZ39rUF4CoP125zApXELXDspSNV1Cn8vjvXKNQymm8iwSRpJr9AZyKvHTVVbg1Tq6kY48iTV\"\n        ],\n        [\n            \"6610b25967cdcca9d59875f5cb50b0ea75433311869e930b\",\n            \"gráfico madera muro rutina suelo falso favor añadir variar firma casco semana fácil neón don sección morder fingir\",\n            \"5b48222ce814960e3b2f507ba58e96b4fa655f76060943b47c7a1396d431c570849e6f1595add9474934a72110bd3da06824428650be819f8d093e0023fccee6\",\n            \"xprv9s21ZrQH143K3JpnkDoEPYdCo6QEBW4eUfKe1CCweKfHF5DkonVNPQRkDcYEva6pBBfGLeRt56UB6oSnhemWzbSBXCpdefk3hBDWqUAPb2E\"\n        ],\n        [\n            \"68a79eaca2324873eacc50cb9c6eca8cc68ea5d936f98787c60c7ebc74e6ce7c\",\n            \"guion culebra parcela diluir buitre crecer parcela marzo roce tejado picar azafrán guitarra exilio goloso tabla mando curar loco voto reparto insecto crecer lince\",\n            \"5dd9ecc2a8f504413ee001e4f27f25ad14533a35b3986b4ad505a9774740d0c0a6bbac6953a1ee47104357f4a5bc4acbc0f71813f9532fa667f3d3b6f2d6dd6d\",\n            \"xprv9s21ZrQH143K4XB8BVsQ9TsrC12DWTkizmcY3X6kVqycT1pAVLhx3EHfWow3H27QV4YH8kMLum7nzjSexrAxh8tKZzHRYPPexmAaaM1KEYQ\"\n        ],\n        [\n            \"c0ba5a8e914111210f2bd131f3d5e08d\",\n            \"ración sapo opción brinco árbol mismo cueva lamer cigarro obrero júpiter azufre\",\n            \"49b0de91db6c84527afe1bccb2525b93dbdae0306bd3ea8a1f629ea1704195d450a0a3211894c417f586fde217f024b4159a4f6ac7f5d18bb8b7bbf72c4f4d20\",\n            \"xprv9s21ZrQH143K3W9fk6GQj1oNT2gYszJhNBhZjPmkTsR2jmoE89oRHHknYt8WLWREtopcnPs1ZWoJjV3A5QxrW5crBA5s6bWgp2DCfLUDA5Y\"\n        ],\n        [\n            \"6d9be1ee6ebd27a258115aad99b7317b9c8d28b6d76431c3\",\n            \"honor tabique lata sultán sanidad salón gafas carga payaso rostro rojizo vena retrato móvil soplar trabajo cifra balde\",\n            \"484af722d01c9cdc9ac50f3fdfeec010c7f713fb90dbfe84dae21d8215b683e660ddeec44d685faf3e653f396ef8ce0d341097c50bffcf67ea094ebb44294df4\",\n            \"xprv9s21ZrQH143K2ouVUYDQXJpeurwoTTmfvUThuo1vRhuSXrVrKgsxAtaet1U9M5WZDpqaiLAPz17LLSuHmQG4eMMAy48Zt4AMzUwgNnEXY1Q\"\n        ],\n        [\n            \"9f6a2878b2520799a44ef18bc7df394e7061a224d2c33cd015b157d746869863\",\n            \"océano eterno bestia golfo bomba ron moda sur médula danza rueda núcleo agrio salmón morir ficha cuidar linterna higiene pensar iris diario ganso jamón\",\n            \"8cc9507c9ccafaf341a243e5b82c348e374b24c8c594131add8684cfc1e61ab51e5476a4006d4d780bd2b82e9d9581ae1af67c8845e40246d5b1110814a88088\",\n            \"xprv9s21ZrQH143K3rpBRE8Wy6o6fZ6P6SX9ZrPCATgfgMHBHK4y9vbkj3VW19wRGR6tAeT7td2iB5bvwRXqXZ2FkBCmeCsJD4Uxf363BEuBwtx\"\n        ],\n        [\n            \"23db8160a31d3e0dca3688ed941adbf3\",\n            \"bucle sótano fibra donar seco aire campo salmón trato odio poco tierra\",\n            \"55b603a9cd15a9769e21fd22a384d12de9afe0b9c0af0f07aee688cddd792b2863064767a6df9e8aebb4bf10d4482de07ffe6d7f7440df73f04fc544236fee06\",\n            \"xprv9s21ZrQH143K31JznDuVnKRYfF538PE1GSe5W75rLGwpSuDFWaQrW48bSuzvkD7cPWqLHcjxi1AjQYFjzCEVkwpU8sq4XScgZigY4TQrSEk\"\n        ],\n        [\n            \"8197a4a47f0425faeaa69deebc05ca29c0a5b5cc76ceacc0\",\n            \"llaga pudor candil yate detalle voto papá saxofón tribu talla infiel exponer altivo sonoro cifra solapa pata abuso\",\n            \"b63a7651d8655add895fd8a45f0fd4c0c71bd8863a8e0fd72782b2f36d43ef2fa8830ab46647afc8c437e701aed41b0bc6b2df9f11887c44457aefe2c11d413d\",\n            \"xprv9s21ZrQH143K3CSbDbXN4ckMcyDHyLwkrQqvXL4xBRATernArEtGvZG8eFhxLbbRBZqaBnRc3ZyrN349dRxUeAozveLohZ5AWRKsDuk6XT1\"\n        ],\n        [\n            \"066dca1a2bb7e8a1db2832148ce9933eea0f3ac9548d793112d9a95c9407efad\",\n            \"águila hoyo maldad fértil libertad estilo historia agudo asilo grosor goloso leopardo odisea nueve butaca molde lacio mañana plomo exento rey adicto puño piña\",\n            \"e4df51858246fe7a1f5b7e0045704ba76ff9d2b099707ea1d8b731dc3216c3de4edc63bad0911179d818b20e2c2a4e8da9e62dac242f6369221802e25abd0ceb\",\n            \"xprv9s21ZrQH143K381uk3B2rYMvPGDjn8oqzxK2tGqoNmB9eN2puxmZtB3BximsnfUd6u3eKP58aVTrUmKW4xA4ckETJwd6YPVa7G8nLkdBknC\"\n        ],\n        [\n            \"f30f8c1da665478f49b001d94c5fc452\",\n            \"urbe lección ajuste enero faena reptil caimán abdomen sobre genio túnel óptica\",\n            \"f5e417f1f68c479cd3058e836ce47aaa52629ac4cb93e99e8025ab38e76a6fab56f6b5a6c1f20637bf29e108f41bca76a1a061d8f8ea40f7c0e5a15552c23ae2\",\n            \"xprv9s21ZrQH143K3sNRU3fx6SQaMRXAAJPHtmBFpXF5MhZ6AEURc2zE2gmVexqAA6EFyTBUBfxv982cwPLR2fM81SivaJXcN2FdbmgzrFbEdqs\"\n        ],\n        [\n            \"c10ec20dc3cd9f652c7fac2f1230f7a3c828389a14392f05\",\n            \"rama jeringa logro mando soldado pezuña pésimo vampiro cerrar mojar cupón dueño llover barro guerra mambo cerrar casero\",\n            \"0ae0e69a6ab7c290e1319018a36a7481b6969f73745db1fe56ed4b928b17458bd86e580b6925ec6b64558e4a1431b4761d0928928b689c37efad8122edd7762c\",\n            \"xprv9s21ZrQH143K2VwsYAPzaKfUBfB8WtQXQux4e5R2cnLhipQ7zQfwWqg2Hozhrh44r1ZtMDzxVDA2PyUqEBtu9o2BidJjQ2psh8QspU8siVK\"\n        ],\n        [\n            \"f585c11aec520db57dd353c69554b21a89b20fb0650966fa0a9d6f74fd989d8f\",\n            \"vampiro célula dos simio bono sondeo vencer haz remar papel castor codo nivel alarma rapaz ofensa gripe sagaz otro tabaco esfuerzo rojizo jinete traje\",\n            \"c87970357a0faf4ebf604d9c486726e1af8d2874d40f3ba30e5774d615c6eb7ecc6cc04d85d6be4e3e36cf4771f8e15350152351f918bf4a555a33d57f90d61c\",\n            \"xprv9s21ZrQH143K4UfkWbEcDPVrme1ea7d9BcQR6XtJ1VJucg1haNWCKCxqkXBshF3QkTSq3HHX2V3qiZmob9bJTnnj6ny5SbvwMp26v6HwxTd\"\n        ]\n    ],\n    \"russian\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац авангард\",\n            \"b4992d0492476a6f8ddef9704b1a34718b7be7df7c6977c456cdc36c1e999d9f2e61837e74ef499b828bfbce54af229f60cb15630c331df7b0e4bcb637f1718a\",\n            \"xprv9s21ZrQH143K2giFszsMo3JcaECAq2BVNdfYzBScYQrgC5oQaEaTbJfbmBhvckkBUftJeWV7Z5FrKBYnU6NLxdQMkVJwHXaQEokWM34EqNx\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"обед эпизод уважение якорь шланг скот юстиция хутор обед эпизод уважение январь\",\n            \"b918bd21a3d4bc9ad48fbf554c1b2170899bdfd6ec116b537d341c1225a9b2acf2f9672363be0041d73d7c648252b42032275fe8f6e185776fc71f87abdd48ae\",\n            \"xprv9s21ZrQH143K4BUbYRa7N1sVZmEGzZF45eQr8aptdLiPLfZhz5vDSDy5B2fCfiR68g6gNRZ6PpaLxRr5AbjgbUbvbeyYMH3Aa6s1VzedHqz\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"обложка антенна время агент бандит заново академия бунт обложка антенна время авария\",\n            \"d0c56ec1f3c77a8258eff821c03751bf33c7e5a79e6077eb266d5189c637f70c44767406e0cf45f155e1776d54f8d38d44713e79b8be7962beb987be49656922\",\n            \"xprv9s21ZrQH143K4RsygSRYGV6FTZGUF7762ZihgxxLwJYuj1ZEbk2co5LJ32ZaGZxauCmLhjYGvwpQj4TXiZXBZnsgmZB42QjdDj5YXKsCbLm\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик яйцо\",\n            \"57ca8a8f55680bffef79708cbd65140021b7e221b2846befb056d90883cc3e9c074b841289742e521a85354c18ae7cb7315b1aa7bde6dd9d1ec5b584e60d9d43\",\n            \"xprv9s21ZrQH143K2HeiRMaLyPjxTxXhUU1hTeCBdfm9TGvct4gqtupxDQ3LsMUDm4uwS61UxqkU73WBB6nmbkNzKWDQpfjXE7SaCGdtcatLBJK\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац аргумент\",\n            \"5c4f8e125883d9f11d9b6f8bb9ab55ded2a5282df1c8bc4daa46bd7a6649bfecf2b6e9560a336db719534d0c57609baca1d49bc522280d2044791736bfb1a171\",\n            \"xprv9s21ZrQH143K2YdWwtmHMfsmGuPrmbRcXWeEj8yM5A6vi8x5nkCcEh7sHQn2PK6FvGq8sjii9WUhvMcPPPEvygriynjHVD8Y6AEdqChjX5f\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"обед эпизод уважение якорь шланг скот юстиция хутор обед эпизод уважение якорь шланг скот юстиция хутор обед экран\",\n            \"5d2f8d26d13deaf9b18dcdd757c02d18aa180e8ab5c02a1b977a3ac57996f59aa7338d44ffb740ace2122750f99c1da2a236c60a113882e93d99175a36521bbd\",\n            \"xprv9s21ZrQH143K3DAEtUMX7ZRKfT2mGkE231EFFYrtnsRBLgqqKy8DXWtU7Q4vnvCgU1EWc3AQDkz27fpW2MDrzGmkuVNTtD9eHFEDmBSu34Y\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"обложка антенна время агент бандит заново академия бунт обложка антенна время агент бандит заново академия бунт обложка бактерия\",\n            \"46031966bcb1de4496e85fb3cabbf538e0319b4621498e9dd49e77d271e5dd9dba8ada21a20a1ca2037225efa3bb69e256fe59f48186acaa8dc70730bbd401db\",\n            \"xprv9s21ZrQH143K4TAkYZVDxfRTcK1ev8turDKM86xykq7qgeAt77MHkqA7Gsf671T1mJnu4Vq3iuDa2tW6infg3cBz3G9WbHA92PjdGGT3CLa\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик шутить\",\n            \"ed0f6a5dd6a5585a5a76fb2dcdff3075beb0f65ac9b91012f331b17e1efc9d4d8221f1a9f99c7662c07e742ccc9d77ed24c5d1c131bdad99dc1e9c67a02cd9f1\",\n            \"xprv9s21ZrQH143K3XeENAs3xCce1rx93vXYrMms6mCig5j8YFcXxPPoFHGevpcRaMs6sdCFS6QBHSKD6FKZMsXeusjTCCD7FFGbDEd47pjmNyq\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац абзац большой\",\n            \"320ad7214b5174a3b49bf7525a5c4bb6de96ff2f10b73c6f30130ba66fb4bdad9676ae540a56ffd08ea405d13a3a8e7cc26285da3d8d6bfff36fe202fbe7575d\",\n            \"xprv9s21ZrQH143K48cthZX5fnGtX8agLdraF3zKwcfo56TTHNg34r33U9VTaPZ9MHGB5y5uQRbxBkELM2BgndH9VQwXC9St7kLUmKTSHq5MUu7\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"обед эпизод уважение якорь шланг скот юстиция хутор обед эпизод уважение якорь шланг скот юстиция хутор обед эпизод уважение якорь шланг скот юстиция улыбка\",\n            \"a14eaf06487df7ebc49779f1393dda273fce4be5799e8b9ac8550687e4111c6825fd49c920a42c0947f80c6e3a3ed2ef7e75af7de43591d01641606b4d80691d\",\n            \"xprv9s21ZrQH143K4VvixRuJc3AgrdUNB5kG91kzA8UdjknRSKTS7JNr9w14NAWuQZcQGjmThGi8MiKNAe1bXGiE4TLuxiT2HKXhGZ7XbW5vwcz\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"обложка антенна время агент бандит заново академия бунт обложка антенна время агент бандит заново академия бунт обложка антенна время агент бандит заново академия вздох\",\n            \"4d8ff971ca6f1f5294dd3153de7176c5634f1c70f8445072c79f8c5e6ba36a9729ac2831b53a5babe23f0e1dd0180437bdc559e6c44d338162be0930074c5ed3\",\n            \"xprv9s21ZrQH143K2h71y4su2ffL4NQR8ZdsZ21WPKHdsH9YjTgBMAWaqQxcR4WXUBt5NSRqfqbn7N6UP44cUct6FPhAkCb8dwnUJHcyKFDCUjW\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик ящик шанс\",\n            \"421c7e6f3365b41ed491814e2c4724f4ee09761857e4f7e5a03f67b6e29a32e4af774b3ef8bbbf3bb192b2906ad8319f88645031180956f38c9c295e6d8940d3\",\n            \"xprv9s21ZrQH143K4HrLURDc1BhtYRSDs3cQDRo9yv4sMPHurQLcXo6JQ9A4hXmZbZ7Jz7XMkrAq4AN7iTyeifMGsevRKiFurNWc7NGTNGjTrbV\"\n        ],\n        [\n            \"bb54aac4b89dc868ba37d9cc21b2cece\",\n            \"сесть пугать роспись монета трогать директор физика экран степень бояться рюкзак порыв\",\n            \"4156db1656dfece6891335740f11dd29d5b9edcb896e2728db9ea8c58ba13e3400d3559a9e5dc031b0c40acec2f1a8d98c3cc0280d6b6782e0b5fcace23b9298\",\n            \"xprv9s21ZrQH143K31Y2PwmSdNGeyfKT3iGy9dbQ7xdNoqcEJykKCGZw2zQFNugPaqqpbL4G8QSAPajyYGn2KPLReU7F6LZrbABLG8pww1CVSYC\"\n        ],\n        [\n            \"9f09b43ceb7e57a0ea8766221624d01b086464359164e7a0\",\n            \"поцелуй калитка будка тесный условие супруг ракета химия вывод роспись динамика должен оптимизм дефект терзать грудь факел атомный\",\n            \"f467318ffc53cf0b7d81fb6ee12a120f50e58568215a395691912c3be11eac41864a9d101bd2ea61759732ae0ab99059271e9a4484fbafe9429297dacd9d9b40\",\n            \"xprv9s21ZrQH143K3Y4mrcPNQ6umuqdkXr1hZLbAyti18xGkyuSUd3xqP2t5PdEVrAuobwiuPfGF7dqzQxfq5gjAmiAMvuASg2ohUQV9RmavcV7\"\n        ],\n        [\n            \"06aadd75179d6d5c5e19fde90cf9b4838622421e57a12862e1811b4cdab215dc\",\n            \"аукцион комиссия круг дача терять репортаж натура залп философ лягушка мечтать бабочка легенда вспышка негодяй чистый глупый вечно куртка досада стоянка корабль компания палуба\",\n            \"bd4593253ad99e8aaffd90d517c33b75b0aede40006f4f60f1cf302aeba27e5aedcf50d856f369c59e64dd696ae1127748b29067f9f46dc23528dae65fb22e48\",\n            \"xprv9s21ZrQH143K2Q7td5VztniaTJ1CH13BFYZRSEJFatqUo3bzmEYG1Ls8YNY3k45Z2o5144jtxP9zgpKf88vCpbaemKQ7FUUnNpr36LjhKqA\"\n        ],\n        [\n            \"934f1cecb1c2236ab4866d6245f7c8db\",\n            \"пешком небо жареный лестница выгнать сарай сыграть стоянка легкий двигать чашка свой\",\n            \"24a97ab44257cfa0ba99a0417e755d5470d97f376795e4393dad4298febea8b3e44f15ed8c4e1526bd2b520cf77116d29bf52479bd15ab8995849c3821b085c4\",\n            \"xprv9s21ZrQH143K4c7VXaAyRDpTKoxkNGaPzmaYd6CYcXvptVYieNuSkdv3WLvkkki5Uy8TsL31oSkcc5ZU9kFZqAuYhvb6G7iqnVCnrwh68iR\"\n        ],\n        [\n            \"815171aac963d551f0a4140f62df9da1ceb7739ce1c2c249\",\n            \"оборона оттого медаль петух забрать развитие смелый объект будущее вечер фабрика звонить фуражка семья мужество дружба слюна интуиция\",\n            \"15620497c365d1411d731172309a186e9ac3e585a57c5e3d0d6238139d22c52c6a3e83e3014ed7b60b3e1773920ae55a5238b10bf83aa6adcd6b9fa6fb85316b\",\n            \"xprv9s21ZrQH143K2J7CmPPcF7JqzphYz5XBVVnbZ53cwkkfQPQCFotjgPosemTxgyF3rCDVzYYNVKLYxqRp4Ftz6Jp8bN2moAeTVUzeUSNrs7w\"\n        ],\n        [\n            \"8d79c52beb01af2b8cfbc74713c164e33a7c9a1afb6cb6a88d344e16fe97084c\",\n            \"падать струя иногда тепло внешний плоский дилер небо избить после корень соленый пятно кавалер менять миграция сверху злой кавалер помидор могучий интуиция встреча почва\",\n            \"e57e5f3e9e5d8048817c57ab4893379834e6387fe3f8e546d8ee50b3c3184bbfbbd60255e3fb0fc19465f6f11bfca5db58174bed2002ae5be0fe9c4ad30db848\",\n            \"xprv9s21ZrQH143K2jsuXtR8fxubVRgj7oebLhyTi7hHXAmLHfqKSJ8ebm93G2WhFp7ctDi7yyEXGrv5o6cC11MDZ128jbsBVbu59T8YwBSVhTd\"\n        ],\n        [\n            \"4bee29faea0a596253797215e1eccf9d\",\n            \"ирония монитор нуль тарелка пузырь роспись камин давно вершина будущее дилер жадный\",\n            \"659aa5e40fcc2d2bda5feb4df9b4b237c8fcb0daaba65ee58dfc4776bd71907816d3ed2811eab37952a9c677b5ea603125d29d8e1797efe1ce39665ce379bf47\",\n            \"xprv9s21ZrQH143K2we3aRVJzfB8Hp58inWapdTbW44A4jCy4kvT2b1t4FfHFkAKo5zNHozyvPxwgmPD6Whc3pXmdzxXKsS7GK9zs4z2S9jYrrK\"\n        ],\n        [\n            \"a00cdab43456290799635064362851cf7d1edc74d4a8ecf2\",\n            \"практика лучший резной мало лежать одежда ловить матч лидер рост вексель похожий съезд миля такси пласт хирург паук\",\n            \"23affb7f9a5f64ab2b5fbba57df4d280b1f0222a8cb6dbcd9ea240ea37bd088d956ff3e712bf6ebb328185e29259e399076da5667852c84e5f9f5183de92a157\",\n            \"xprv9s21ZrQH143K4a31ef7tRvwRY6f8zttbGLfnjTzJRssfEvjFjxDA7kMEk9R8zQYDyYU2LNo3fcyT2DmKAhufNi1i5g44cTgKUM6Qfu3SVHF\"\n        ],\n        [\n            \"6325252245b88bc10e007d1e3acb8e924f03d499f8be13a5061c2d1bbfdfd7cb\",\n            \"лента гнилой изредка оттенок отвлечь угроза дрожать букет волчий терзать унижать вялый цветок форма магазин взнос ведро глоток орган котел сигнал хутор культура наглый\",\n            \"baf6c06e3c917c623ef26b7750ec63d85017d60e6e4d8c7e49ec53dcf6a4d6bf606f2fa55e3dcd860b6adf58033d21fc58b093a6dcf24e7604dcfcf0844329b1\",\n            \"xprv9s21ZrQH143K32a1ZKWu8NpmX55JAejQmV5tUgDDL52dkfZzTNXYF2qyKfUkZSjrLJicaiLMTUvjxpvUU55HjwUQFuf1gB2LSJHMcjhovXC\"\n        ],\n        [\n            \"f25806fe5e6125d9602d50d57129725f\",\n            \"человек слабый скосить симфония ванная хвост обмен ракета темнота отец кричать скорый\",\n            \"f38baf015700f685d1c1f26f9ab52db8700b27ee640f1ba2bde81149dace30415d4411795323eb61cd30d07d149dc0ee3ea33d99e4f52ee0235489d52b9f04d8\",\n            \"xprv9s21ZrQH143K2JUoSW56YcVVgrPj3FP31H8jCX6aSimFw8xmgWFG8dtcKf5AVsxtRMibDde1q6CNCzjMSvetMGp6ywHSYW4QKJKuJJM3r9n\"\n        ],\n        [\n            \"df0ad99c35a4901afbbba60cb8a96e340d1fcdcb13cc0014\",\n            \"тысяча комедия льгота мелкий изящный ботинок хребет мыться болтать совесть кредит магия съезд учесть грош неделя абзац профиль\",\n            \"36f72aef7f6af7f2a687fba3a5e785ab171f6e08f7b7f077e24c4b8b49ac6e026bec1402031a128d11d02a9681711ca2b8ef09d34ae770a1577335d1b59a3b67\",\n            \"xprv9s21ZrQH143K3647uZ91pci7dmAb9tbDYmNmntYV51kDRd5Qg4odoJd4jYh5qAWGAZXvkjaJGGuYawysxeUeYy35QfUrDLD1WemPa5d9uza\"\n        ],\n        [\n            \"dee92aa4e56d2debb9be104a4a3774d153456787c5f7ad23bf6e53f1892b8ff7\",\n            \"туча икра раздел ссора сюрприз шагать учесть случай инвалид кепка трубка приют директор рядом восемь скелет рейс вокзал трепет пятый видимо плоский замок хаос\",\n            \"79f63bcebeb97e95586fb6814b8be4781df00139917075fdf22018f61f547e1b66add4b63264326ec2f46542bcf748104c92b4f9f73705fe8769c0b3897eeb88\",\n            \"xprv9s21ZrQH143K3qEhb6NQP35AFEguHn4iAVEJnfAVgd8pmRQVZnATZwnNACGmeg73XFU6szbt1LkrNgyfLkgJGNtdXLYE4aNfgzpvFssQcAj\"\n        ]\n    ],\n    \"turkish\": [\n        [\n            \"00000000000000000000000000000000\",\n            \"abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abdal\",\n            \"4c14199a1b8df442bb96586e3c3d43305884a05e643fd89ba9d0a18775d80d4a91be22719f0e6ad42a7ad293872f6af429377e4b35863435b4647c617ab4ab4c\",\n            \"xprv9s21ZrQH143K2ugGhLVYL5dCJkVLLSqfQqgYH6WNRVxqurmbLMR16tC7FY6HSH3fir8R7yx5LsAyKtbdqSrXj23ZZicU75g389hf4QJrvUY\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"meziyet yüzyıl tosbağa zindan yoğurt silecek zılgıt vokal meziyet yüzyıl tosbağa zirzop\",\n            \"823d592ed10291fc25837c58bc122b2b37c0d20ea67530349270bcdb92e4892e13a7443eca530e9544694c8fb91d2fb7e8c29caeb598f627f90858e9fda408a0\",\n            \"xprv9s21ZrQH143K3yg9nmyHAJvPDjBzGrWW2r8hqsGGTRrhVGEqvj4dWzwDfX9r9Pj8QWrCmnkdSgtAHJzxfxwRy9GnZvhfsHq2fGGwpDRLd3o\"\n        ],\n        [\n            \"80808080808080808080808080808080\",\n            \"milat aidat cazibe absorbe alperen fıldır adezyon astsubay milat aidat cazibe abdest\",\n            \"8529df63b2fb01db07df4f519d1e0c9066326ee1b7d699499af8a980de371c06e54a33d8788f19811c1b25c326cef643ba4bdd23c790e259a6e109b01e440e0d\",\n            \"xprv9s21ZrQH143K3BV2UQMgVeVKsHWDof76rfWSWtDMvYy6HcCkTzVujez6vEL9o2zCXPAy52nQqU8uyRxmZu21AbRrqyqJe2S7N4aLXmSrTPc\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffff\",\n            \"zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zihniyet\",\n            \"f154669700ee53ef119f7bcbbe62b2bec8296109a4359228e9d6200bf39b33eff7ed443ed92ee28af3504a31d92d12a595eda36f6dd2ab34bb2916ed5a9beaa7\",\n            \"xprv9s21ZrQH143K4Z5Li8i6VfgWhfh5Yf5myQgwD2XQn21pMzn3LdrAQHEXe1WUrpnsfWr661XzBefNRanUfQ1uLgC9GTGiDZzkX1HU2b2Eu3M\"\n        ],\n        [\n            \"000000000000000000000000000000000000000000000000\",\n            \"abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur akdeniz\",\n            \"c11c692fc712c924732c0ea93d1eb38de8e53c591cc1117fc3f957046b9518c7e8eeb0bd156b1c23031557b712f9b6ba4f59b831ab2f35a35e06bca5d1584631\",\n            \"xprv9s21ZrQH143K4U9eG6arRqDzwPxtvPY97cKPPtvsBuYXg3bQFS8sKvxf6z3PLRjER5d11XJaH9J4f9aBcP32QeNsEg2MucvdHQAdf1r6zCW\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"meziyet yüzyıl tosbağa zindan yoğurt silecek zılgıt vokal meziyet yüzyıl tosbağa zindan yoğurt silecek zılgıt vokal meziyet yürek\",\n            \"7d070c17f6421b76ea23f91cda3373f6b87f137643d8117007ca9046c523f61a0f5b824fae61d76ba34505d3a06532c41279957a695b535651702df7688bb765\",\n            \"xprv9s21ZrQH143K3ESh22bdZvgwnjv1rfUBhhqW7MmFe3gCvgssaQMEWZmw3wJasgMbfyjtZ9PtbM4c18Tdw9EFmuVHaWRdE9zmKP1tBnxQZ6G\"\n        ],\n        [\n            \"808080808080808080808080808080808080808080808080\",\n            \"milat aidat cazibe absorbe alperen fıldır adezyon astsubay milat aidat cazibe absorbe alperen fıldır adezyon astsubay milat alıngan\",\n            \"67eda05205e79bb0aea25640c85dec7a6e090df121113cfb8528df87288144a777a12365fc5ea26d78dc4f063894fe1f5692c1cd20b6528cb2dd1fff4aed8c74\",\n            \"xprv9s21ZrQH143K4UxdxPUHqDx1TbUa5ymqrGT4LpxPTokXfjvWg1LwJ6kPrFjtnWQ6AJ4LhMgGJvjpfr93GgkCdsY4bCFveCAqjoG7aL1PMkB\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre yukarı\",\n            \"527598540e10421e68a749ef0f2c6f8c874aff96d5aa885703bdd324dc691bd5edc5aa055adf5582017e32315e8c7d2a059c77928e15acce814765295fe442ad\",\n            \"xprv9s21ZrQH143K3oTbjcF7aPkGaGbu1XWBbJmpFWRe6u4m871jzcuxe9UJwuTfPPDqy8sahH6pX3choSBAtJsKYKw9fQAQy6gykuBgGDXH4Af\"\n        ],\n        [\n            \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur abajur araba\",\n            \"28c310afd7368bcd8c0b0b85f2ea8fdaabde393b603f0ef4c457f6b14d8ec2a2b9520dbaf775686d75e786ffd016a6373c956e3a96d726c6f1a5e604c14b8941\",\n            \"xprv9s21ZrQH143K2AWncG5V4X2SYmfNGNTJadWjzCgiwhfS9QVvAu8RHAvtMnQX7KGFvdZwuPMSjuwycA51FDezqbvEDVuAQtwewnzSbYvZvkC\"\n        ],\n        [\n            \"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f\",\n            \"meziyet yüzyıl tosbağa zindan yoğurt silecek zılgıt vokal meziyet yüzyıl tosbağa zindan yoğurt silecek zılgıt vokal meziyet yüzyıl tosbağa zindan yoğurt silecek zılgıt tuzlu\",\n            \"b37520e13cbd00a4f3f1d9bed02d6dd01668f51204d2cddbf0fb28815567882d79daf30b3971c55ac96ea4b35569f05f9bb4d827de366b4304bdb2c23d595be0\",\n            \"xprv9s21ZrQH143K38tD64zHfNMTLQyszcLiZfsEqx3PKotFEusJJpAzV1LNGrDkKQ2kZyGUcNYkpwJET6xRihooefwYnU8sDc1AVEB8CAmYbSS\"\n        ],\n        [\n            \"8080808080808080808080808080808080808080808080808080808080808080\",\n            \"milat aidat cazibe absorbe alperen fıldır adezyon astsubay milat aidat cazibe absorbe alperen fıldır adezyon astsubay milat aidat cazibe absorbe alperen fıldır adezyon benzer\",\n            \"5d92ee9efcd9cc3f19b8644dc72741caebf4c15d77aec6ab066d5ac3544b942616b567bbdc5eb25b20072d7082cdd7692c369d7575db53fbcdb4be2a8ae0b097\",\n            \"xprv9s21ZrQH143K4TFEM9Dy2iDjmdDijpn3K1HRV5WMfpoaS3Hyt8GNoC3RRDb4MZTKfcckmmazJ5YLtYuxXCM3TZZvrg3uG5ptxrabr6cbbT3\"\n        ],\n        [\n            \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n            \"zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre zümre yeniçeri\",\n            \"2822919551b434114e51a2c00824cdc2dbaf1b567bb71d56c3e388ffedccd5a4054d7f71fc4149ed73f376fc9fad629bc40d2af89f4d61b6292153b73ee5a54d\",\n            \"xprv9s21ZrQH143K2YKCt9cmi7pXRoXpX2AjXR5ydny2pDSbVueGZdwSNN7B1HnTQRf5RtZMtnFghHgH9PRCVAeZUHA4o8wb3anoyAjvtURAB4h\"\n        ],\n        [\n            \"bb54aac4b89dc868ba37d9cc21b2cece\",\n            \"sentez pirinç rota lamba tıknaz edat üçbudak yürek şelale arena saçma parsel\",\n            \"15a94bd53a53df03882bfe746ec24f5349dd8d7c3de8884b032b6cac37cb9771526e2b656e94137b190399e70e6b7e7d08219aa1ba965e58e1c139533362b2a6\",\n            \"xprv9s21ZrQH143K2qNy54d9ktxsVXsrtgmW7nePreUeHV7nTvc2hm5Pyu16xzWrAUE3XAZjnD6rtLALGJRrqWgknVdGbL6TQ72fArknZe9xxCn\"\n        ],\n        [\n            \"9f09b43ceb7e57a0ea8766221624d01b086464359164e7a0\",\n            \"patlıcan havuç asfalt tekdüze ulema taktik pusula varyemez cilt rota ecnebi ekose müstesna duvak teftiş derman uyuşma akustik\",\n            \"f04f5a4067b689cee057321f6bf400a25d96f4be59559d09446c1669595d6b856f79495609d2a1f933ab5f128f3d84cbbe8a471b613fd1e6354383c57ae0cd74\",\n            \"xprv9s21ZrQH143K2M1c94zNSatufZPKm7r9ZvbQBb5XsTv32QbNanqRhY1FcPGXpvFtKu12gzFxaicf8i4x9aRVymXtfBMYWm4SBC7kqx4c2gg\"\n        ],\n        [\n            \"06aadd75179d6d5c5e19fde90cf9b4838622421e57a12862e1811b4cdab215dc\",\n            \"albüm iletişim kahkaha divriği tehlike rehin masmavi fesih üçkağıt kolye kupkuru aleni kenar cepken mavra yatak çuval belge karmaşa elastik şirin irfan ilkokul odun\",\n            \"29cbaa235e2205e406ebe495999f850b309ef442d2a091a2b750d5431bf5c6d308e1a4852172c9558430049b6036ccfed3789da2367e70efe1a8bd701208435c\",\n            \"xprv9s21ZrQH143K3uxUFEhXpHvTZhgDnmDs18GkJkswLP27qQZTDUVF8PiNieqwRR5uCsX2y7ZkMKgi1THaHgeR7q4VcMxHcNRvGeavrrzpzJ2\"\n        ],\n        [\n            \"934f1cecb1c2236ab4866d6245f7c8db\",\n            \"otopark materyal eski kılavuz cisim sakız tapan şirin kerkenez doğalgaz yanıt sarkık\",\n            \"325bf129f10c4b4fc66663958fb09bae1df60a8dd37d219cfbf8c776891889d0e918b1dbe66bf78191687694897bc94a2b2c1b84ab1865eef60a2c03438afa29\",\n            \"xprv9s21ZrQH143K35KwmVQGSrd7X58mMCqKqpSLRSMYnTWzdYTDgPKJnHz6A7PXBvCLJj4vXVfmSNKwraCYm6Cwqd2uGk7J8TLDchDUQMPUjG3\"\n        ],\n        [\n            \"815171aac963d551f0a4140f62df9da1ceb7739ce1c2c249\",\n            \"minyon nilüfer köprücük otoban ezber prim somut morötesi asil bekle uykusuz gariban üzüm sefer lütfen empati solfej hafız\",\n            \"42839d70ad42ad51716b6c30ad29cb7a256fc6e9c6865470e9b302a3bec99be6754714d647870ee02cc75b6e2b46f11c4d4a63009b1ae44aba3f4c1015b846e9\",\n            \"xprv9s21ZrQH143K3tRHyXhqsWfrZ7JT11sMZyYiwkC5Eo4WvRPXLCEHRYP6BcisHLWKNdwQywHet8Fpbzz4t44Db5TcTEYZrpUKZY4iTpLsbrx\"\n        ],\n        [\n            \"8d79c52beb01af2b8cfbc74713c164e33a7c9a1afb6cb6a88d344e16fe97084c\",\n            \"nüfus şöhret güzel tedarik boğaz ölümsüz ecel materyal göçebe pasaport irmik suhulet portakal hapşırık kudurma kurdele sanatçı gemi hapşırık pansuman külçe hafız cerrah patolog\",\n            \"05d2850b6d5b32ca9f9d8345a40362d6f3be8fcc65dc77542e8ca50efaf940ee11cf91594c64c7b511def83fcd5ef3eb4b8c8d6ae3cb10b946f1aa2c0a1f12dd\",\n            \"xprv9s21ZrQH143K4GVKptAzKSVqEsJiG4NpdudPYfqNxBMRhdt4Bf7xXoCeRorRc5pD9VvdgbMNQZHJrDPPCiZSuQUQ2WpufLN2JD1Z5pD9JNf\"\n        ],\n        [\n            \"4bee29faea0a596253797215e1eccf9d\",\n            \"hakan lansman metre taşınmaz pist rota haysiyet dinozor başlık asil ecel ertesi\",\n            \"332a44ae607176fbf85941af7bcd9685b84c2a3d200058e82e099e7b20b799c2619bc85a6c4115be91ed3796546b9a9a1364f862ae156d0f923b96f21d37fcff\",\n            \"xprv9s21ZrQH143K2d1M8F9uPvNEd5QfuvGPCJE8XBh6wf96Arz6CEzs1Hag7WFaUedyzvMXT7HQEN67V2k5RYEo2tc7hVqPpTxaEYDNLzHhPPy\"\n        ],\n        [\n            \"a00cdab43456290799635064362851cf7d1edc74d4a8ecf2\",\n            \"peçete koçbaşı rasyonel konak kesirli musluk kızak koşul kırsal rozet bakteri patika tansiyon kurultay tarumar öğrenci vasıta olay\",\n            \"feece1c9aba98740471e6025b53f6e071815f2302b5d9cdb1796f791cb27dc5d0149c9dd6f7cc1178bfb471fe622eed7f67b85519a609cf336bc986e18c8cbad\",\n            \"xprv9s21ZrQH143K4WQDYJVHrxMNZPzGACWvtgSEN82CCAtE91pJwMrGCnHbqRAb1YUKk4AsZMmy1vPZbDEAV7v81LZMKp75LyAgVbwE8YhuaWF\"\n        ],\n        [\n            \"6325252245b88bc10e007d1e3acb8e924f03d499f8be13a5061c2d1bbfdfd7cb\",\n            \"keyfiyet dalga gövde nicel nasıl transfer emisyon askı burun teftiş tünel çayhane vurma üslup kombine berjer bağlantı çubuk müzik işlem seremoni vokal kanun mahrum\",\n            \"6e51f41ff64b1cf5b464e1ee4d65346652fbc455db859faec1adffe64f1c3e0153bf223a514591a31f7a35f2c1edf8112d01b488c347771cb689791b0c5fca47\",\n            \"xprv9s21ZrQH143K36WkoNrtpfR2W31M9zfoS9b6m8TiVArdY59tzh6RraoaRj6Nid9kcPG1eZWKvjAosoKHziqBUtpkNR4X73JwoXjcK9mJGQc\"\n        ],\n        [\n            \"f25806fe5e6125d9602d50d57129725f\",\n            \"yankı simit silah serüven avukat varsayım milli pusula tazminat nazik kadın sihirbaz\",\n            \"6ec0dea6dae649330517c17ba129179d1f5ec5ae7ed0d4a6f05caa8aff580c88404bbfd55ccd1f4e7408bc75fa3490aaf4523cd853679cfb82eb2797c7302be5\",\n            \"xprv9s21ZrQH143K26t84vvKN1EqXrpVzKCJmv2CkZQVKBXGVdLoCW1bdFKeVTbTxbhMHRfv7S5qc9Z8cLURAW5HtVa2WvLFNLH3M6tHRr8EpfE\"\n        ],\n        [\n            \"df0ad99c35a4901afbbba60cb8a96e340d1fcdcb13cc0014\",\n            \"toplum ileri koğuş köşegen gözleme arefe vestiyer mağdur apse sprey jakoben komedyen tansiyon uyarı dere mayhoş abajur pırasa\",\n            \"e584247a087153923e5b00bf14d179714f151d1064e74dc6dd19905fc37d7bb6fa2fd7757d6d3ca157e01fe517671693ab514eed7d449d160cbbbd0d90ac3468\",\n            \"xprv9s21ZrQH143K2vRvkt63VCpuem6vXLt1pqtVBm7YSuxZbm4G2LihmCfAcbKXJc9E5LnEKngDHqo7oF2YDB17EBFQrYFgxJaqmcyTJbREMct\"\n        ],\n        [\n            \"dee92aa4e56d2debb9be104a4a3774d153456787c5f7ad23bf6e53f1892b8ff7\",\n            \"topaç grup profil şaşırma tarım yengeç uyarı sohbet gündüz hudut tırmanış pervane edat sade bütçe sırtüstü razı burçak teşrif posa beyin ölümsüz festival vakıf\",\n            \"bbdb82c9d5e188f792a6ffa189b3f0fda5aa289f918adf34817918891510e312d351f945e74da91855d1432369344a3094c523d129bad0520951aab542e07b75\",\n            \"xprv9s21ZrQH143K3opfxeLxFyAKr1ufr9qK8crqeht2XaHqsnZ6FbtoovHsocVDjfWXA9PS44CS4NkZ76CKCQhhw489dx9RAN9JXQbj3Ta5UpT\"\n        ]\n    ]\n}\n"
  },
  {
    "path": "testAddressTxtLineTest.bat",
    "content": "mvn clean verify -Dtest=net.ladenthin.bitcoinaddressfinder.AddressTxtLineTest"
  },
  {
    "path": "update.bat",
    "content": "call mvn versions:display-dependency-updates\r\ncall mvn versions:display-plugin-updates\r\n"
  }
]