text:
import React from 'react';
import ReactShallowRenderer from 'react-test-renderer/shallow';
import TextField from 'chamel/Input/TextField';

/**
 * Test rendering the TextField
 */
describe("TextField Component", () => {

  // Basic validation that render works in edit mode and returns children
  it("Should render", () => {

    const renderer = new ReactShallowRenderer();
    const renderedDocument = renderer.render(
      <TextField/>
    );

    expect(renderedDocument.type).toBe('div');
  });
});


text:
package org.olat.presentation.instantmessaging;

import org.olat.lms.instantmessaging.ImPreferences;
import org.olat.presentation.framework.core.UserRequest;
import org.olat.presentation.framework.core.components.form.flexible.FormItem;
import org.olat.presentation.framework.core.components.form.flexible.FormItemContainer;
import org.olat.presentation.framework.core.components.form.flexible.elements.SelectionElement;
import org.olat.presentation.framework.core.components.form.flexible.impl.FormBasicController;
import org.olat.presentation.framework.core.components.form.flexible.impl.FormEvent;
import org.olat.presentation.framework.core.components.form.flexible.impl.FormLayoutContainer;
import org.olat.presentation.framework.core.control.Controller;
import org.olat.presentation.framework.core.control.WindowControl;
import org.olat.system.event.Event;

/**
 * Initial Date: August 08, 2005
 *
 * @author Alexander Schneider Comment: The user can select if his name is (in)visible on the online user list.
 */
public class OnlineListForm extends FormBasicController {
    private static final String ONLINELIST = "onlineList";
    private static final String ONLINETIME = "onlineTime";
    private static final String COURSENAME = "courseName";

    private SelectionElement toogleVisibility, onlineTimeSwitch, courseNameSwitch;

    private final ImPreferences imPrefs;

    public OnlineListForm(final UserRequest ureq, final WindowControl wControl, final ImPreferences imPrefs) {
        super(ureq, wControl);
        this.imPrefs = imPrefs;
        initForm(ureq);
    }

    protected void updateImPreferencesFromFormData(final ImPreferences imPrefs) {
        imPrefs.setVisibleToOthers(toogleVisibility.isSelected(0));
        imPrefs.setOnlineTimeVisible(onlineTimeSwitch.isSelected(0));
        imPrefs.setAwarenessVisible(courseNameSwitch.isSelected(0));
    }

    @Override
    protected void formOK(final UserRequest ureq) {
        fireEvent(ureq, Event.DONE_EVENT);
    }

    @Override
    protected void formCancelled(final UserRequest ureq) {
        fireEvent(ureq, Event.CANCELLED_EVENT);
    }

    @Override
    protected void initForm(final FormItemContainer formLayout, final Controller listener, final UserRequest ureq) {
        setFormTitle("title.onlinelist");
        this.setFormContextHelp("org.olat.presentation.user", "home-imsettings.html", "help.hover.imsettings");

        toogleVisibility = uifactory.addCheckboxesVertical(ONLINELIST, "form.onlinelist", formLayout, new String[] { "xx" }, new String[] { null }, null, 1);
        toogleVisibility.select("xx", imPrefs.isVisibleToOthers());
        toogleVisibility.addActionListener(this, FormEvent.ONCLICK);

        onlineTimeSwitch = uifactory.addCheckboxesVertical(ONLINETIME, "form.onlinetime", formLayout, new String[] { "xx" }, new String[] { null }, null, 1);
        onlineTimeSwitch.select("xx", imPrefs.isOnlineTimeVisible());

        courseNameSwitch = uifactory.addCheckboxesVertical(COURSENAME, "form.coursename", formLayout, new String[] { "xx" }, new String[] { null }, null, 1);
        courseNameSwitch.select("xx", imPrefs.isAwarenessVisible());

        final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("button_layout", getTranslator());
        formLayout.add(buttonLayout);
        uifactory.addFormSubmitButton("save", buttonLayout);
        uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl());

        update();
    }

    private void update() {
        onlineTimeSwitch.setVisible(toogleVisibility.isSelected(0));
        courseNameSwitch.setVisible(toogleVisibility.isSelected(0));
    }

    @Override
    protected void formInnerEvent(final UserRequest ureq, final FormItem source, final FormEvent event) {
        update();
    }

    @Override
    protected void doDispose() {
        //
    }

}

redpajama_set_name: RedPajamaGithub


text:
Storlets API v1
===============
The storlets API is an extension of the Swift API. In some cases we use
the Swift API as is. For example, uploading a storlet is done using Swift upload
to a designated container. In other cases we add storlets specific headers
to existing Swift operations. For example invoking a storlet on download is done
by adding the 'X-Run-Storlet' header to the Swift download operation.

Operations on Storlets
======================

Storlets are stored to a special container called 'storlet'.

.. note::

    The name of the container where storlets are uploaded to is configurable. The name 'storlet' is the default.

List All Storlets
-----------------

::

 [GET] /v1/{account}/storlet

The body of the response contains a list of the names of the uploaded storlets.
The Content-type of the response is (text/plain).

::

            storlet1.jar
            storlet2.jar
            storlet3.jar

Upload a New Storlet
--------------------

You may write a storlet in Java or Python according to the instructions in the storlet developer guide and upload it to the Object Store.
The storlet is uploaded to the container named 'storlet', so '/storlet' appears in the url.
The storlet may depend on other existing libraries, which must be uploaded to the 'dependency' container.

.. note::

    Once again, the name 'dependency' is a default, and can be configured differently.

When uploading a storlet,
the X-Object-Meta-Storlet-Dependency header requires a value that is a comma separated list of dependencies.
The main_class_name parameter for the X-Object-Meta-Storlet-Main header specifies the class in which the invoke
method of the storlet is defined. For python written storlets, this parameter should be prefixed with the python
module name. For example, if the storlet file is named 'mystorlet.py', then the class name must be
'mystorlet.<class name>'.
The X-Object-Meta-Storlet-Language header specified the language in which the storlet is run.
Either "Python" or "Java" is available for the value.
The X-Object-Meta-Storlet-Interface-Version header should be provided and set to the value '1.0'.
Although not currently used, the X-Object-Meta-Storlet-Object-Metadata header must be provided and set to 'no'.
See the Storlets Developer's manual for details of the signature of the invoke method.
The content-type of the request should be set to 'application/octet-stream'. Only in Python, you may
set 'X-Object-Meta-Storlet-Language-Version' to choose your python interpreter version.

::

 [PUT] /v1/{account}/storlet/{storlet_object_name}

For Java written storlets

::

    'X-Object-Meta-Storlet-Language': 'Java'
    'X-Object-Meta-Storlet-Interface-Version': '1.0'
    'X-Object-Meta-Storlet-Dependency': dependencies
    'X-Object-Meta-Storlet-Object-Metadata': 'no'
    'X-Object-Meta-Storlet-Main': {main_class_name}
    'X-Auth-Token': {authorization_token}

For Python written storlets

::

    'X-Object-Meta-Storlet-Language': 'Python'
    'X-Object-Meta-Storlet-Language-Version': '3.6'
    'X-Object-Meta-Storlet-Interface-Version': '1.0'
    'X-Object-Meta-Storlet-Dependency': dependencies
    'X-Object-Meta-Storlet-Object-Metadata': 'no'
    'X-Object-Meta-Storlet-Main': {module_name.class_name}
    'X-Auth-Token': {authorization_token}

Operations on dependencies
==========================

Upload a New Dependency
-----------------------

You may create and upload your own libraries to assist in running a storlet.
These dependencies are uploaded to a special container named 'dependency'.
For an executable dependency (such as a compiled c program),
you must specify the X-Object-Meta-Storlet-Dependency-Permissions header.
Otherwise, that header may be omitted.
The name of the library containing the dependency (i.e. dependency_name) goes into the URI.
The content-type of the request should be set to 'application/octet-stream'.

::

 [PUT] /v1/{account}/dependency/{dependency_object_name}

::

    'X-Object-Meta-Storlet-Dependency-Version': '1'
    'X-Object-Meta-Storlet-Dependency-Permissions' : '0755'
    'X-Auth-Token': {authorization_token}

Storlets Invocation
===================

Once the storlet and its dependencies are deployed the storlet is ready for invocation.
Storlets can be invoked in 3 ways:

#. Invocation upon object download.
    In this case the user gets a transformation of the object residing in the store (as opposed to the actual object).
    One use case for GET is anonymization, where the user might not have access to certain data unless it is
    being anonymized by some storlet. Typically, when invoking a storlet upon object download, the storlet will
    be invoked on a storage node that holds a copy of the object. Exceptions to this rule are detailed below.

#. Invocation upon object upload.
    In this case the data kept in the object store is a transformation of the object uploaded by the user
    (as opposed to the original data or metadata).
    A typical use case is metadata enrichment, where a Storlet extracts format specific metadata from the uploaded data
    and adds it as Swift metadata. When invoking a storlet upon object upload, the storlet will be invoked on a proxy node,
    prior to replication. Thus, the computation happens only once, and not once per replica.

#. Invocation upon object copy.
    In this case the storlet acts on data that is in the object store, generating a new object. A typical use case is
    thumbnail extraction from an existing jpg. The location where the storlet is invoked on copy (object node or proxy node)
    is the same as for the download case.

Below is the API reference of the abovementioned invocations.

Invoke a storlet upon object download
-------------------------------------

::

 [GET] /v1/{account}/{container}/{object}

An additional header ('X-Run-Storlet') must be provided to inform the system to run a storlet.

::

    'X-Run-Storlet': {storlet_name}
    'X-Auth-Token': {authorization_token}

One may also provide parameters to the storlet. There are two ways to send parameters:

#. Through the URL query string. For instance: /v1/{account}/{container}/{object}?param1=val1&param2=val2

#. Through the request headers. For instance:

    ::

        'X-Storlet-Parameter-1': 'param1:val1'
        'X-Storlet-Parameter-2': 'param2:val2'

Parameters that start with 'storlet\_' are not allowed. The 'storlet\_' prefix is reserved for internal system use.

To invoke a storlet on a range of an object use the 'X-Storlet-Range' header. For instance:

    ::

        'X-Storlet-Range': 'bytes=1-6'

'X-Storlet-Range' can take any value that Swift can take for the HTTP 'Range' header as described in <http://developer.openstack.org/api-ref-objectstorage-v1.html>.
Specifying HTTP 'Range' header together with 'X-Run-Storlet' is not allowed, and results in '400 Bad Request'

.. note::

   In case the object happens to be an SLO the storlet is invoked over the entire object data. Thus, the storlet is invoked on a proxy node.

It is possible to invoke a storlet on GET over more then one object. This is done using the 'X-Storlet-Extra-Resources' header, that can be used
to specify a comma separated list of object paths of the form <container>/<object>. Currently, cross account extra resources are not supported.
In the below GET example the multi input storlet will get 3 object input streams.

::

  [GET] /v1/AUTH_1234/my_container/myobject_1

  'X-Run-Storlet': 'multiinputstorlet-1.0.jar'
  'X-Storlet-Extra-Resources': 'my_other_container/my_other_object', 'my_other_other_container/my_other_other_object'
  'X-Auth-Token': {authorization_token}

When using 'X-Storlet-Extra-Resources' the storlet is invoked on a proxy node.

.. note::

  Refer to the multi-input-storlet source for writing a storlet that processes multiple inputs.

Invoke a storlet upon object upload
-----------------------------------

::

 [PUT] /v1/{account}/{container}/{object}

An additional header ('X-Run-Storlet') must be provided to inform the system to run a storlet.

::

    'X-Run-Storlet': {storlet_name}
    'X-Auth-Token': {authorization_token}

As with the invocation upon download, one may provide parameters to the storlet either through the URL query string or through
the request headers.

Invoke a storlet upon object copy
---------------------------------

Object copy in Swift can be done using both the PUT and the COPY verbs as shown below

::

 [PUT] /v1/{account}/{container}/{object}
   'X-Copy-From': {source container}/{source object}

 [COPY] /v1/{account}/{container}/{object}
   'Destination': {dest container}/{dest object}

An additional header ('X-Run-Storlet') must be provided to inform the system to run a storlet.

::

    'X-Run-Storlet': {storlet_name}
    'X-Auth-Token': {authorization_token}

In the PUT case the storlet acts upon the object appearing in the 'X-Copy-From' header, creating the object appearing in the request path.
In the COPY case the storlet acts upon the object appeairng in the requets path, crating the object appearing in the 'Destination' header.

Independently of the verb used to invoke a copy, one can add the 'X-Storlet-Extra-Resources' header. Thus, one can e.g. create an
object which is a concatenation of the copy source and the extra resources. As with the invocation upon downlod, when using extra
resources, the storlet is invoked on a proxy node.

Currently, specifying any of the headers below while invoking a storlet upon copy will result in '400 Bad Request'
 - 'X-Copy-From-Account'
 - 'Destination-Account'
 - 'X-Fresh-Metadata'

Executing a storlet on proxy servers only
-----------------------------------------
Use the 'X-Storlet-Run-On-Proxy' header to enforce the engine to invoke the storlet on the proxy, e.g.:

::

    'X-Storlet-Run-On-Proxy': ''

Storlets ACLs
=============

Storlets ACLs are an extension to Swift's container read acl that allow to give users access to data through a storlet.
In other words, a certain user may not have access to read objects from a container unless the access is done through
a specific storlet. Setting storlets ACLs is done using the POST verb on a container as follows:

::

  [POST] /v1/{account}/{container}

::

  X-Storlet-Container-Read: {user_name}
  X-Storlet-Name: {storlet_name}
  X-Auth-Token: {authorization_token}

#. The user_name must be a user defined in Keystone, that can retrieve a valid token.

#. The storlet_name is the name of the storlet through which access is permitted. This name
    should match the name specified when running a storlet (see storlet invocation above)

#. The authorization_token is a token of the POST request initiator, which must have
    privilege to set the container ACL

Currently, a storlet ACL can be set only for a single user. Storlets ACLs can be viewed
as any other container read ACL by performing HEAD request on the container. The ACL
will be shown as .r:storlets.<user_name>_<storlet_name> as part of the Container-Read-ACL.


text:
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// namespace
export const storage = {};

/**
 * StorageAreaAsync is a wrapper for existing storage implementations to
 * include async/await compatible version of get/set.
 * @extends {StorageArea}
 */
class StorageAreaAsync {
  /**
   * @param {?StorageArea} storageArea chrome.storage.{local,sync} or null
   */
  constructor(storageArea) {
    this.storageArea_ = (storageArea) ? storageArea : this;

    /**
     * If the chrome.runtime.lastError should be checked.
     * @protected {boolean}
     */
    this.checkLastError = true;

    this.get = this.storageArea_.get.bind(this.storageArea_);
    this.set = this.storageArea_.set.bind(this.storageArea_);
    this.remove = this.storageArea_.remove.bind(this.storageArea_);
    this.clear = this.storageArea_.clear.bind(this.storageArea_);
  }

  /**
   * Convert the storage.{local,sync}.get method to return a Promise.
   * @param {string|!Array<string>} keys
   * @returns {!Promise<!Object<string, *>>}
   */
  async getAsync(keys) {
    return new Promise((resolve, reject) => {
      this.get(keys, (values) => {
        if (this.checkLastError && chrome && chrome.runtime &&
            chrome.runtime.lastError) {
          const keysString = keys && keys.join(', ');
          reject(`Failed to retrieve keys [${keysString}] from browser storage:
              ${chrome.runtime.lastError.message}`);
          return;
        }
        resolve(values);
      });
    });
  }

  /**
   * Convert the storage.{local,sync}.set method to return a Promise.
   * @param {!Object<string, *>} values
   * @returns {!Promise<void>}
   */
  async setAsync(values) {
    return new Promise((resolve, reject) => {
      this.set(values, () => {
        if (this.checkLastError && chrome && chrome.runtime &&
            chrome.runtime.lastError) {
          const keysString = values && Object.keys(values).join(', ');
          reject(`Failed to update browser storage keys
              [${keysString}] with supplied values:
              ${chrome.runtime.lastError.message}`);
          return;
        }
        resolve();
      });
    });
  }
}

/**
 * Propagates the changes to the storage keys.  It replicates the features of
 * chrome.storage.onChanged for the SWA.
 *
 * This does 3 things:
 * 1. Holds the onChanged event listeners/observes for the current window.
 * 2. Sends broadcast event to all windows.
 * 3. Listens to broadcast events and propagates to the listeners/observes in
 *    the current window.
 *
 * NOTE: This doesn't support the `oldValue` because it's simpler and the
 * current clients of `onChanged` don't need it.
 */
class StorageChangeTracker {
  constructor(storageNamespace) {
    /**
     * Listeners for the storage.onChanged.
     * @private {!Array<OnChangedListener>}
     * */
    this.observers_ = [];

    /**
     * Only used to send to the observers, because the chrome.storage.onChanged
     * sends the namespace in the event.
     * @private {string}
     */
    this.storageNamespace_ = storageNamespace;

    /**
     * Event to propagate changes to the localStorage to all windows listeners.
     */
    window.addEventListener('storage', this.onStorageEvent_.bind(this));
  }

  resetForTesting() {
    this.observers_ = [];
  }

  /**
   * Add a new listener to the onChanged event.
   * @param {function(!Object<string, !ValueChanged>, string)} callback
   */
  addListener(callback) {
    this.observers_.push(callback);
  }

  /**
   * Notifies all listeners of the key changes (triggers the onChanged event
   * listeners).
   * @param {!Object<string, *>} changedValues changed.
   * @param {string} namespace
   */
  keysChanged(changedValues, namespace) {
    /** @type {!Object<string, !ValueChanged>} */
    const changedKeys = {};

    for (const [k, v] of Object.entries(changedValues)) {
      // `oldValue` isn't necessary for the current use case.
      const key = /** @type {string} */ (k);
      changedKeys[key] = {newValue: v};
    }

    this.notifyLocally_(changedKeys, namespace);
  }

  /**
   * Process the `storage` event, propagates to all local listeners/observers.
   * @private
   */
  onStorageEvent_(event) {
    if (!event.key) {
      return;
    }
    /** @type {string} */
    const key = event.key;
    const newValue = /** @type {string} */ (event.newValue);
    const changedKeys = {};

    try {
      changedKeys[key] = {newValue: JSON.parse(newValue)};
    } catch (error) {
      console.warn(
          `Failed to JSON parse localStorage value from key: "${key}" ` +
              `returning the raw value.`,
          error);
      changedKeys[key] = {newValue};
    }
    this.notifyLocally_(changedKeys, this.storageNamespace_);
  }

  /**
   * Notifies the local listeners (in this window).
   * @param {!Object<string, ValueChanged>} keys
   * @param {string} namespace where the change occurred.
   * @private
   */
  notifyLocally_(keys, namespace) {
    for (const fn of this.observers_) {
      try {
        fn(keys, namespace);
      } catch (error) {
        console.error(`Error calling storage.onChanged listener: ${error}`);
      }
    }
  }
}

/**
 * StorageAreaSWAImpl enables the SWA version of Files app to continue using the
 * xfm.storage.* APIs by transparently switching them to use window.localStorage
 * instead of the chrome.storage APIs.
 */
class StorageAreaSWAImpl extends StorageAreaAsync {
  /**
   * @param {string} type
   */
  constructor(type) {
    super(/** storageArea */ null);

    this.checkLastError = false;

    /** @private {string} */
    this.type_ = type;
  }

  /** @override */
  get(keys, callback) {
    const inKeys = Array.isArray(keys) ? keys : [keys];
    const result = {};
    for (const key of inKeys) {
      result[key] = this.getValue_(key);
    }
    callback(result);
  }

  /**
   * Gets and parses the value from the storage.
   * @param {string} key
   * @private
   */
  getValue_(key) {
    const value = /** @type {string} */ (window.localStorage.getItem(key));
    try {
      return JSON.parse(value);
    } catch (error) {
      console.warn(
          `Failed to JSON parse localStorage value from key: "${key}" ` +
              `returning the raw value.`,
          error);
      return value;
    }
  }

  /** @override */
  set(items, opt_callback) {
    for (const key in items) {
      const value = JSON.stringify(items[key]);
      window.localStorage.setItem(key, value);
    }
    this.notifyChange_(Object.keys(items));
    if (opt_callback) {
      opt_callback();
    }
  }

  /** @override */
  remove(keys, callback) {
    const keyList = Array.isArray(keys) ? keys : [keys];
    for (const key of keyList) {
      window.localStorage.removeItem(key);
    }
    this.notifyChange_(keyList);
  }

  /** @override */
  clear(callback) {
    window.localStorage.clear();
    this.notifyChange_([]);
  }

  /**
   * Notifies the changes for `keys` to listeners of `onChanged`.
   * @param {!Array<string>} keys
   * @private
   */
  notifyChange_(keys) {
    const values = {};
    for (const k of keys) {
      values[k] = this.getValue_(k);
    }
    if (!storageChangeTracker) {
      console.error('Error xfm.storage requires the storageChangeTracker');
      return;
    }
    storageChangeTracker.keysChanged(values, this.type_);
  }
}

/**
 * NOTE: This in only available for legacy Files app and will be removed in the
 * future.
 * It's only used to allow FolderShortcuts to be migrated to prefs.
 * @type {!StorageAreaAsync}
 */
storage.sync;

/**
 * @type {!StorageAreaAsync}
 */
storage.local;

/**
 * @typedef {function(!Object<string, !ValueChanged>, string)}
 */
export let OnChangedListener;

/**
 * @typedef {{
 *    newValue: *,
 * }}
 */
export let ValueChanged;

/**
 * NOTE: Here we only expose the addListener() from the StorageChangeTracker.
 *
 * @type {{
 *   addListener: function(OnChangedListener),
 *   resetForTesting: function(),
 * }}
 */
storage.onChanged;

/** @private {?StorageChangeTracker} */
let storageChangeTracker = null;

storage.local = new StorageAreaSWAImpl('local');
storageChangeTracker = new StorageChangeTracker('local');
storage.onChanged = storageChangeTracker;


text:
package iptc.newsml.g2.builder;

import static iptc.common.builder.CalendarBuilder.*;
import static iptc.newsml.g2.builder.ContentMetaBuilder.*;
import static iptc.newsml.g2.builder.KeywordBuilder.*;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.collection.IsCollectionWithSize.*;
import static org.junit.Assert.*;
import iptc.common.builder.CalendarBuilder;
import iptc.newsml.g2.model.ContentMeta;

import org.junit.Test;

public class ContentMetaBuilderTest
{

    @Test
    public void testBuild() throws Exception
    {
        ContentMeta contentMeta = contentMetadata().build();
        assertNotNull(contentMeta);
    }

    @Test
    public void testUrgency() throws Exception
    {
        ContentMeta contentMeta = contentMetadata().urgency(4).build();
        assertThat(contentMeta.getUrgency(), is(equalTo(4)));
    }

    @Test
    public void testContentCreated() throws Exception
    {
        CalendarBuilder cal = calendar().date("2015-03-15").time("06:00:00");

        ContentMeta contentMeta = contentMetadata().contentCreated(cal).build();
        assertEquals(cal.build(), contentMeta.getContentCreated());
    }

    @Test
    public void testContentModified() throws Exception
    {
        CalendarBuilder cal = calendar().date("2015-03-15").time("06:00:00");

        ContentMeta contentMeta = contentMetadata().contentModified(cal).build();
        assertEquals(cal.build(), contentMeta.getContentModified());
    }

    @Test
    public void testKeywords() throws Exception
    {
        KeywordBuilder keyword1 = keyword().keyword("Sport").rank(1);
        KeywordBuilder keyword2 = keyword().keyword("Sail").rank(2);

        ContentMeta contentMeta = contentMetadata().addKeyword(keyword1).addKeyword(keyword2).build();

        assertNotNull(contentMeta.getKeyword());
        assertThat(contentMeta.getKeyword(), hasSize(2));
        assertThat(contentMeta.getKeyword(), hasItems(keyword1.build(), keyword2.build()));
    }
}


text:
#ifndef AARCH64_TDEP_H
#define AARCH64_TDEP_H

#include "arch/aarch64.h"

/* Forward declarations.  */
struct gdbarch;
struct regset;

/* AArch64 Dwarf register numbering.  */
#define AARCH64_DWARF_X0   0
#define AARCH64_DWARF_SP  31
#define AARCH64_DWARF_V0  64
#define AARCH64_DWARF_SVE_VG   46
#define AARCH64_DWARF_SVE_FFR  47
#define AARCH64_DWARF_SVE_P0   48
#define AARCH64_DWARF_SVE_Z0   96

/* Size of integer registers.  */
#define X_REGISTER_SIZE  8
#define B_REGISTER_SIZE  1
#define H_REGISTER_SIZE  2
#define S_REGISTER_SIZE  4
#define D_REGISTER_SIZE  8
#define V_REGISTER_SIZE 16
#define Q_REGISTER_SIZE 16

/* Total number of general (X) registers.  */
#define AARCH64_X_REGISTER_COUNT 32
/* Total number of D registers.  */
#define AARCH64_D_REGISTER_COUNT 32

/* The maximum number of modified instructions generated for one
   single-stepped instruction.  */
#define DISPLACED_MODIFIED_INSNS 1

/* Target-dependent structure in gdbarch.  */
struct gdbarch_tdep
{
  /* Lowest address at which instructions will appear.  */
  CORE_ADDR lowest_pc;

  /* Offset to PC value in jump buffer.  If this is negative, longjmp
     support will be disabled.  */
  int jb_pc;

  /* And the size of each entry in the buf.  */
  size_t jb_elt_size;

  /* Types for AdvSISD registers.  */
  struct type *vnq_type;
  struct type *vnd_type;
  struct type *vns_type;
  struct type *vnh_type;
  struct type *vnb_type;
  struct type *vnv_type;

  /* syscall record.  */
  int (*aarch64_syscall_record) (struct regcache *regcache, unsigned long svc_number);

  /* The VQ value for SVE targets, or zero if SVE is not supported.  */
  uint64_t vq;

  /* Returns true if the target supports SVE.  */
  bool has_sve () const
  {
    return vq != 0;
  }
};

const target_desc *aarch64_read_description (uint64_t vq);

extern int aarch64_process_record (struct gdbarch *gdbarch,
                               struct regcache *regcache, CORE_ADDR addr);

struct displaced_step_closure *
  aarch64_displaced_step_copy_insn (struct gdbarch *gdbarch,
				    CORE_ADDR from, CORE_ADDR to,
				    struct regcache *regs);

void aarch64_displaced_step_fixup (struct gdbarch *gdbarch,
				   struct displaced_step_closure *dsc,
				   CORE_ADDR from, CORE_ADDR to,
				   struct regcache *regs);

int aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
					  struct displaced_step_closure *closure);

#endif /* aarch64-tdep.h */


text:
<?php

namespace TypiCMS\Modules\Jobs\Composers;

use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Gate;
use Maatwebsite\Sidebar\SidebarGroup;
use Maatwebsite\Sidebar\SidebarItem;

class SidebarViewComposer
{
    public function compose(View $view)
    {
        $view->sidebar->group(trans('global.menus.content'), function (SidebarGroup $group) {
            $group->addItem(trans('jobs::global.name'), function (SidebarItem $item) {
                $item->id = 'jobs';
                $item->icon = config('typicms.jobs.sidebar.icon');
                $item->weight = config('typicms.jobs.sidebar.weight');
                $item->route('admin::index-jobs');
                $item->append('admin::create-job');
                $item->authorize(
                    Gate::allows('index-jobs')
                );
            });
        });
    }
}


text:
package org.apache.wicket.examples.ajax.builtin;

import org.apache.wicket.ajax.AjaxPreventSubmitBehavior;
import org.apache.wicket.ajax.form.AjaxFormValidatingBehavior;
import org.apache.wicket.feedback.ExactLevelFeedbackMessageFilter;
import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.form.SimpleFormComponentLabel;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.util.io.IClusterable;
import org.apache.wicket.util.time.Duration;
import org.apache.wicket.validation.validator.EmailAddressValidator;
import org.apache.wicket.validation.validator.StringValidator;

/**
 * Page to demonstrate instant ajax validaion feedback. Validation is triggered as the user is
 * typing, but is throttled so that only one ajax call is made to the server per second.
 *
 * @author Igor Vaynberg (ivaynberg)
 */
public class FormPage extends BasePage
{

	/**
	 * Constructor
	 */
	public FormPage()
	{
		// create feedback panel to show errors
		final FeedbackPanel feedbackErrors = new FeedbackPanel("feedbackErrors", new ExactLevelFeedbackMessageFilter(FeedbackMessage.ERROR));
		feedbackErrors.setOutputMarkupId(true);
		add(feedbackErrors);

		// create feedback panel to show info message
		final FeedbackPanel feedbackSuccess = new FeedbackPanel("feedbackSuccess", new ExactLevelFeedbackMessageFilter(FeedbackMessage.INFO));
		feedbackSuccess.setOutputMarkupId(true);
		add(feedbackSuccess);

		// add form with markup id setter so it can be updated via ajax
		addInstantValidationForm();

		addPreventEnterSubmitForm();
	}

	private void addPreventEnterSubmitForm() {
		Bean bean = new Bean();
		Form<Bean> form = new Form<Bean>("preventEnterForm", new CompoundPropertyModel<>(bean))
		{
			@Override
			protected void onSubmit()
			{
				super.onSubmit();
				info("Form successfully submitted!");
			}
		};

		add(form);
		form.setOutputMarkupId(true);

		addFormComponents(form);

		form.add(new AjaxPreventSubmitBehavior());
	}

	private void addInstantValidationForm() {
		Bean bean = new Bean();
		Form<Bean> form = new Form<Bean>("form", new CompoundPropertyModel<>(bean))
		{
			@Override
			protected void onSubmit()
			{
				super.onSubmit();
				info("Form successfully submitted!");
			}
		};

		add(form);
		form.setOutputMarkupId(true);

		addFormComponents(form);

		// attach an ajax validation behavior to all form component's keydown
		// event and throttle it down to once per second

		form.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND));
	}

	private void addFormComponents(final Form<Bean> form) {

		FormComponent<String> fc = new RequiredTextField<>("name");
		fc.add(new StringValidator(4, null));
		fc.setLabel(new ResourceModel("label.name"));

		// add AjaxPreventSubmitBehavior to the text field if it mustn't submit
		// the form when ENTER is pressed
//		fc.add(new AjaxPreventSubmitBehavior());

		form.add(fc);
		form.add(new SimpleFormComponentLabel("name-label", fc));

		fc = new RequiredTextField<>("email");
		fc.add(EmailAddressValidator.getInstance());
		fc.setLabel(new ResourceModel("label.email"));

		form.add(fc);
		form.add(new SimpleFormComponentLabel("email-label", fc));

	}

	/** simple java bean. */
	public static class Bean implements IClusterable
	{
		private String name, email;

		/**
		 * Gets email.
		 *
		 * @return email
		 */
		public String getEmail()
		{
			return email;
		}

		/**
		 * Sets email.
		 *
		 * @param email
		 *            email
		 */
		public void setEmail(String email)
		{
			this.email = email;
		}

		/**
		 * Gets name.
		 *
		 * @return name
		 */
		public String getName()
		{
			return name;
		}

		/**
		 * Sets name.
		 *
		 * @param name
		 *            name
		 */
		public void setName(String name)
		{
			this.name = name;
		}
	}
}


text:
package be.billington.rob;

import okio.Buffer;
import org.slf4j.Logger;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public abstract class RobLogManager {

    protected final LocalDate startDate;
    protected final LocalDate endDate;
    private final ConfigSections config;
    private final Logger log;
    private final Map<String, List<String>> commitListMap;

    public RobLogManager(Logger log, ConfigSections config, String fromDate, String toDate) {
        this.commitListMap = new LinkedHashMap<>();
        this.log = log;
        this.config = config;

        if (toDate != null && toDate.length() > 0) {
            this.endDate = LocalDate.parse(toDate, DateTimeFormatter.ISO_LOCAL_DATE);

        } else {
            this.endDate = LocalDate.now();
        }

        if (fromDate != null && fromDate.length() > 0 && !fromDate.equals(toDate)) {
            this.startDate = LocalDate.parse(fromDate, DateTimeFormatter.ISO_LOCAL_DATE);
        } else {
            this.startDate = this.endDate.minusDays(14l);
        }

        if (this.startDate.isAfter(this.endDate)){
            throw new IllegalArgumentException("'From date' must be before 'to date'");
        }

        initMap();
    }

    public void initMap() {
        for (Section section : this.config.getSections()){
            commitListMap.put(section.getTitle(), new ArrayList<>());
        }
        for (Section section : this.config.getExclusiveSections()){
            commitListMap.put(section.getTitle(), new ArrayList<>());
        }
    }

    public Logger getLog(){
        return this.log;
    }

    protected abstract List<? extends Commit> fetchFromApi(int page);

    protected abstract boolean hasNextPage();

    public void fetchAndProcessCommitMessages() {
        int page = 1;
        List<? extends Commit> commits = fetchFromApi(page);

        LocalDate commitDate;
        boolean readNextPage = true;

        do {
            getLog().info("Walking around house number: " + page + " (Page)");

            for (Commit commit : commits) {

                commitDate = LocalDate.parse(commit.getDate(), DateTimeFormatter.ISO_OFFSET_DATE_TIME);
                if (commitDate.isAfter(this.startDate) &&
                        (commitDate.isBefore(this.endDate) || commitDate.isEqual(this.endDate)) ) {

                    if (commit.getMessage().charAt(0) == '!') {
                        getLog().info("Electrified fences on this side, skipping it (!)");
                        continue;
                    }

                    String[] commitMsgList = commit.getMessage().split("\n");

                    config.getSections().forEach( (section) -> {
                        if (section.excludeCommit(commit.getMessage())) {
                            return ;
                        }
                        if (commit.getMessage().toLowerCase().contains(section.getMatch().toLowerCase())) {
                            commitListMap.get(section.getTitle()).add(commitMsgList[0]);
                        }
                    });

                    for (Section exclusiveSection : config.getExclusiveSections()) {
                        if (config.hasMatchInSections(commit.getMessage())) {
                            continue;
                        }
                        if (exclusiveSection.excludeCommit(commit.getMessage())) {
                            continue;
                        }
                        commitListMap.get(exclusiveSection.getTitle()).add(commitMsgList[0]);
                    }

                } else if (commitDate.isBefore(this.endDate) ) {
                    readNextPage = false;
                    getLog().info("Shit, cops on the lookout.");
                    break;
                }
            }
            if (readNextPage && hasNextPage()) {
                getLog().info("A few more houses to go.");
                page++;
                commits = fetchFromApi(page);

                if (commits == null || commits.isEmpty()) {
                    readNextPage = false;
                    getLog().info("Not enough room in the bag. Gotta stop");
                }

            } else {
                getLog().info("Last one for today.");
                readNextPage = false;
            }

        } while (readNextPage);

        getLog().info("Time is up. It is no longer safe to rob houses.");
    }

    public void generateFile(File targetDirectory, String filePath) {
        getLog().info("Counting how much stuff I have robbed today. (Generate file)");

        Buffer buffer = new Buffer();
        buffer.writeUtf8("Changelog from " + this.startDate + " until " + this.endDate + "\n");

        commitListMap.forEach( (title, commits) -> writeToFile(buffer, title, commits) );

        try {
            File file;
            if (targetDirectory != null && targetDirectory.exists()){
                file = new File(targetDirectory, filePath );
            } else {
                file = new File( filePath );
            }
            file.getParentFile().mkdirs();
            file.createNewFile();

            buffer.writeTo(new FileOutputStream( file ));

            getLog().info("Report: " + file.getPath());

        } catch (IOException ex) {
            getLog().error( "Could not create file: " + ex.getMessage(), ex);
        }
    }
    private void writeToFile(Buffer buffer, String title, List<String> content) {
        if (content.size() > 0) {
            buffer.writeUtf8(title);
            for (String msg : content){
                buffer.writeUtf8("- " + msg + "\n");
            }
        }
    }

}


text:
(function($) {

	$(document).on('ready.stream_list', function(event) {

// 		$(event.target).find('input').on('focus.stream_list click.stream_list', function(event) {
//  			event.preventDefault();
//  			event.stopPropagation();
//  		});

		$('.code-duplicator').symphonyDuplicator({
	  		});

	});

})(window.jQuery);


text:
#ifndef NXOGRE_CONVEX_H
#define NXOGRE_CONVEX_H

#include "NxOgreStable.h"
#include "NxOgreCommon.h"

#include "NxOgreShape.h"
#include "NxOgreShapeDescription.h"
#include "NxOgreShapeFunctions.h"

namespace NxOgre
{

/*! class. Convex
    desc.
         A convex is a convex point cloud (with optional triangles) that is used from a Mesh file.

         Convex shapes can be used in Actors, KinematicActors, StaticGeometries and Volumes for
         collisions and testing against them.
    see. Shape
*/
class NxOgrePublicClass Convex : public Shape
{

  NXOGRE_GC_FRIEND_NEW3
  NXOGRE_GC_FRIEND_DELETE

  public: // Functions

  unsigned int  getShapeType() const;

  /*! function. getShapeFunctionType
      desc.
           Get the shape type based upon the Classes::ShapeFunctionType enum.
      return.
           **ShapeFunctionType** -- This type of shape as a ShapeFunctionType enum.
  */
  Enums::ShapeFunctionType  getShapeFunctionType() const;

  /*! function. getMesh
      desc.
           Get the mesh
      note.
           MeshManager owns this pointer. Do not delete it.
      return.
           **Mesh** * -- The mesh shared by the Convex.
  */
  Mesh*  getMesh();

  /*! function. saveToDescription
      desc.
          Save to a ConvexDescription
  */
  void saveToDescription(ConvexDescription& description);

  /*! function. to_s
      desc.
          Returns the pointer and name as string.
  */
  String to_s() const;

  protected:

  /*
  */
  Convex(NxConvexShape*, Mesh*, bool isDirty = false);

  /*
  */
 ~Convex();

  protected:

  NxConvexShape*  mConvexShape;

  Mesh*  mMesh;

}; // class Convex

} // namespace NxOgre

#endif


text:
package com.hazelcast.internal.networking.nio.iobalancer;

import com.hazelcast.instance.BuildInfoProvider;
import com.hazelcast.internal.networking.nio.MigratablePipeline;
import com.hazelcast.internal.networking.nio.NioThread;
import com.hazelcast.logging.LoggingService;
import com.hazelcast.logging.impl.LoggingServiceImpl;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.annotation.ParallelJVMTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;

@RunWith(HazelcastParallelClassRunner.class)
@Category({QuickTest.class, ParallelJVMTest.class})
public class IOBalancerTest {
    private final LoggingService loggingService = new LoggingServiceImpl("somegroup", "log4j2", BuildInfoProvider.getBuildInfo(), true);

    // https://github.com/hazelcast/hazelcast/issues/11501
    @Test
    public void whenChannelAdded_andDisabled_thenSkipTaskCreation() {
        IOBalancer ioBalancer = new IOBalancer(new NioThread[1], new NioThread[1], "foo", 1, loggingService);
        MigratablePipeline inboundPipeline = mock(MigratablePipeline.class);
        MigratablePipeline outboundPipeline = mock(MigratablePipeline.class);

        ioBalancer.channelAdded(inboundPipeline, outboundPipeline);

        assertTrue(ioBalancer.getWorkQueue().isEmpty());
    }

    // https://github.com/hazelcast/hazelcast/issues/11501
    @Test
    public void whenChannelRemoved_andDisabled_thenSkipTaskCreation() {
        IOBalancer ioBalancer = new IOBalancer(new NioThread[1], new NioThread[1], "foo", 1, loggingService);
        MigratablePipeline inboundPipeline = mock(MigratablePipeline.class);
        MigratablePipeline outboundPipelines = mock(MigratablePipeline.class);

        ioBalancer.channelRemoved(inboundPipeline, outboundPipelines);

        assertTrue(ioBalancer.getWorkQueue().isEmpty());
    }
}


text:
package utexas.ece.smoke.utils;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * A testcase api for our analysis purposes.
 *
 * Created by Nima Dini | April 2015
 */

public final class TestCase {
    /**
     * the test method's long name, including the package prefix
     */
    private String longName;

    /**
     * a map from the methods that are being called in this test method to
     * the blocks that are covered in those if this testcase is getting executed
     * All the method calls, directly or with any number of indirection, count!
     */
    private Map<Method, Set<Integer>> methodToBlocksCovered;

    /**
     * the execution time of this test method
     */
    private long executionTime;

    public TestCase(String completeName) {
        this.longName = completeName;
        this.methodToBlocksCovered = new HashMap<Method, Set<Integer>>();
    }

    public void setExecutionTime(long eTime) {
        this.executionTime = eTime;
    }

    public long getExecutionTime() {
        return this.executionTime;
    }

    public String getParentClassName() {
        return null;
    }

    public void setLongName(String name) {
        longName = name;
    }

    public String getLongName() {
        return longName;
    }

    /**
     * adds a method that is being called in this testcase
     * @param name          The long method name of the callee
     * @param totalBlocks   Total number of blocks in the callee method
     */
    public void addMethod(String name, int totalBlocks) {
        Method m = new Method(name, totalBlocks);
        if (!methodToBlocksCovered.containsKey(m)) {
            methodToBlocksCovered.put(m, new HashSet<Integer>());
        }
    }

    /**
     * adds a method that is being called in this testcase
     * @param m             The desired method
     */
    public void addMethod(Method m) {
        if (!methodToBlocksCovered.containsKey(m)) {
            methodToBlocksCovered.put(m, new HashSet<Integer>());
        }
    }

    /**
     * returns the set of blocks of method m that are being covered by this testcase
     * @param m             The desired method
     *
     * @return              the set of blocks if the method is covered by this test case
     *                      or null otherwise.
     */
    public Set<Integer> getCoveredBlocksByMethod(Method m) {
        if (!methodToBlocksCovered.containsKey(m))
            return null;

        return methodToBlocksCovered.get(m);
    }

    /**
     * returns the set of blocks of method m that are being covered by this testcase
     * @param name          The long name of the desired method
     *
     * @return              the set of blocks if the method is covered by this test case
     *                      or null otherwise.
     */
    public Set<Integer> getCoveredBlocksByMethodName(String name) {
        if (name == null)
            return null;

        Method m = new Method(name);

        if (!methodToBlocksCovered.containsKey(m))
            return null;

        return methodToBlocksCovered.get(m);
    }

    /**
     * whether a block of method m is being covered by calling this testcase
     * @param m             The method under test
     * @param blkIdx        The block of interest
     *
     * @return              true if the block is being covered or false otherwise
     */
    public boolean isBlockCoveredInMethod(Method m, int blkIdx) {
        Set<Integer> blocksCovered = getCoveredBlocksByMethod(m);
        if (blocksCovered == null) {
            return false;
        }

        return blocksCovered.contains(blkIdx);
    }

    /**
     * add a block that this test covers
     * @param m             The method which owns the block
     * @param blkIdx        The block that is getting covered
     *
     * @return              true if the operation is successful and false if the
     *                      method is not being covered with this testcase at all!
     */
    public boolean addCoveredBlock(Method m, int blkIdx) {
        if (!methodToBlocksCovered.containsKey(m))
            return false;

        Set<Integer> method = methodToBlocksCovered.get(m);
        method.add(blkIdx);
        return true;
    }

    /**
     * retrieve the methods that are being covered by this testcase
     *
     * @return              the set of methods that this testcase covers.
     *                      both direct and indirect method calls count!
     */
    public Set<Method> getCoveredMethods() {
        Set<Method> methods = new HashSet<Method>();
        for (Method m : methodToBlocksCovered.keySet()) {
            methods.add(m);
        }
        return methods;
    }

    @Override
    public String toString() {
        String res = "Test method name: " + longName + "| Time: " + executionTime + "\n";
        for (Method m : methodToBlocksCovered.keySet()) {
            res = res + m.getMethodName() + " | total blocks: " + m.getTotalBlocks() + " | covered: " + methodToBlocksCovered.get(m) + "\n";
        }
        return res;
    }

    @Override
    public boolean equals(Object o) {
        if (!o.getClass().equals(TestCase.class))
            return false;

        TestCase tc = (TestCase) o;
        return tc.getLongName().equals(this.getLongName());
    }

    @Override
    public int hashCode() {
        return longName.hashCode();
    }
}


text:
using BepuPhysics.Collidables;
using BepuPhysics.CollisionDetection.SweepTasks;
using BepuUtilities;
using System;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;

namespace BepuPhysics.CollisionDetection.CollisionTasks
{
    using DepthRefiner = BepuPhysics.CollisionDetection.DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Cylinder, CylinderWide, CylinderSupportFinder>;

    public struct CylinderPairTester : IPairTester<CylinderWide, CylinderWide, Convex4ContactManifoldWide>
    {
        public int BatchSize => 16;

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static void ProjectOntoCapA(in Vector<float> capCenterBY, in Vector3Wide capCenterA, in Matrix3x3Wide rA, in Vector<float> inverseNDotAY, in Vector3Wide localNormal, in Vector2Wide point, out Vector2Wide projected)
        {
            Vector3Wide point3D;
            point3D.X = point.X;
            point3D.Y = capCenterBY;
            point3D.Z = point.Y;
            ProjectOntoCapA(capCenterA, rA, inverseNDotAY, localNormal, point3D, out projected);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static void ProjectOntoCapA(in Vector3Wide capCenterA, in Matrix3x3Wide rA, in Vector<float> inverseNDotAY, in Vector3Wide localNormal, in Vector3Wide point, out Vector2Wide projected)
        {
            Vector3Wide.Subtract(capCenterA, point, out var pointToCapCenterA);
            Vector3Wide.Dot(pointToCapCenterA, rA.Y, out var tDistance);
            var tBOnA = tDistance * inverseNDotAY;
            Vector3Wide.Scale(localNormal, tBOnA, out var projectionOffsetB);
            Vector3Wide.Add(point, projectionOffsetB, out var projectedPoint);
            Vector3Wide.Subtract(projectedPoint, capCenterA, out var capCenterAToProjectedPoint);
            Vector3Wide.Dot(capCenterAToProjectedPoint, rA.X, out projected.X);
            Vector3Wide.Dot(capCenterAToProjectedPoint, rA.Z, out projected.Y);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        internal static void ProjectOntoCapB(in Vector<float> capCenterBY, in Vector<float> inverseLocalNormalY, in Vector3Wide localNormal, in Vector3Wide point, out Vector2Wide projected)
        {
            var tAOnB = (point.Y - capCenterBY) * inverseLocalNormalY;
            projected.X = point.X - localNormal.X * tAOnB;
            projected.Y = point.Z - localNormal.Z * tAOnB;
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static void IntersectLineCircle(in Vector2Wide linePosition, in Vector2Wide lineDirection, in Vector<float> radius, out Vector<float> tMin, out Vector<float> tMax)
        {
            //||linePosition + lineDirection * t|| = radius
            //dot(linePosition + lineDirection * t, linePosition + lineDirection * t) = radius * radius
            //dot(linePosition, linePosition) - radius * radius + t * 2 * dot(linePosition, lineDirection) + t^2 * dot(lineDirection, lineDirection) = 0
            Vector2Wide.Dot(lineDirection, lineDirection, out var a);
            var inverseA = Vector<float>.One / a;
            Vector2Wide.Dot(linePosition, lineDirection, out var b);
            Vector2Wide.Dot(linePosition, linePosition, out var c);
            var radiusSquared = radius * radius;
            c -= radiusSquared;
            var tOffset = Vector.SquareRoot(Vector.Max(Vector<float>.Zero, b * b - a * c)) * inverseA;
            var tBase = -b * inverseA;
            tMin = tBase - tOffset;
            tMax = tBase + tOffset;
            //If the projected line direction is zero, just compress the interval to tBase.
            var useFallback = Vector.LessThan(Vector.Abs(a), new Vector<float>(1e-12f));
            tMin = Vector.ConditionalSelect(useFallback, tBase, tMin);
            tMax = Vector.ConditionalSelect(useFallback, tBase, tMax);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        static void FromCapBTo3D(in Vector2Wide contact, in Vector<float> capCenterBY, out Vector3Wide localContact3D)
        {
            localContact3D.X = contact.X;
            localContact3D.Y = capCenterBY;
            localContact3D.Z = contact.Y;
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        internal static void TransformContact(
            in Vector3Wide contact, in Vector3Wide localFeaturePositionA, in Vector3Wide localFeatureNormalA, Vector<float> inverseFeatureNormalADotLocalNormal,
            in Vector3Wide localOffsetB, in Matrix3x3Wide orientationB, Vector<float> negativeSpeculativeMargin,
            out Vector3Wide aToContact, out Vector<float> depth, ref Vector<int> contactExists)
        {
            //While we have computed a global depth, each contact has its own depth.
            //Project the contact on B along the contact normal to the 'face' of A.
            //The full computation is:
            //t = dot(contact - featurePositionA, featureNormalA) / dot(featureNormalA, localNormal)
            //depth = dot(t * localNormal, localNormal) = t
            Vector3Wide.Subtract(contact, localFeaturePositionA, out var featureOffset);
            Vector3Wide.Dot(featureOffset, localFeatureNormalA, out var tDistance);
            depth = tDistance * inverseFeatureNormalADotLocalNormal;
            Vector3Wide.Add(contact, localOffsetB, out var localAToContact);
            Matrix3x3Wide.TransformWithoutOverlap(localAToContact, orientationB, out aToContact);
            contactExists = Vector.BitwiseAnd(contactExists, Vector.GreaterThanOrEqual(depth, negativeSpeculativeMargin));
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public void Test(
            ref CylinderWide a, ref CylinderWide b, ref Vector<float> speculativeMargin,
            ref Vector3Wide offsetB, ref QuaternionWide orientationA, ref QuaternionWide orientationB, int pairCount,
            out Convex4ContactManifoldWide manifold)
        {
            Matrix3x3Wide.CreateFromQuaternion(orientationA, out var worldRA);
            Matrix3x3Wide.CreateFromQuaternion(orientationB, out var worldRB);
            //Work in b's local space.
            Matrix3x3Wide.MultiplyByTransposeWithoutOverlap(worldRA, worldRB, out var rA);
            Matrix3x3Wide.TransformByTransposedWithoutOverlap(offsetB, worldRB, out var localOffsetB);
            Vector3Wide.Negate(localOffsetB, out var localOffsetA);

            //Cylinder-sphere was easy, cylinder-capsule was a bit complicated, and things go downhill from there.
            //The potential normal generators are:
            //capNormalA: trivial
            //capNormalB: trivial
            //sideA vs sideB: capNormalA x capNormalB
            //capEdgeA vs sideB: minimum depth of circle and line, slightly more complex than the distance based implementation in capsule-cylinder because cylinders don't have a spherical margin
            //sideA vs capEdgeB: minimum depth of circle and line again
            //capEdgeA vs capEdgeB: uh oh

            //For reference, the distance between a line and circle (capEdge vs side) involves finding the minimal root of a fourth degree polynomial.
            //The distance between two circles involves finding the minimal root of an eighth degree polynomial.
            //(We aren't computing *distance* here, but rather minimal depth, but computing minimal depth is, at best, no easier than distance.)

            //We can't actually use the same implementation as capsule-cylinder because it assumed nonnegative distance. In the intersecting case, it uses an approximation-
            //that's fine for a capsule which has a large margin, but it can't work for two cylinders.
            //Cylinder-cylinder has to handle the intersecting case accurately, which means you're stuck (conceptually) enumerating 4 or 8 roots per feature pair.
            //There are some pretty fast solvers around, but it's hard to avoid quite a few square roots given the shapes involved.
            //Plus, it would require a lot of special case mathing.

            //Given that we are going to encounter similar difficulties on cylinder-box, cylinder-triangle, and cylinder-hull, can we use some kind of trick to save time and effort?
            //The common approach would be minkowski space methods like GJK and MPR. v1 used them heavily, but I moved away from them for v2 due to numerical concerns.
            //But many of those numerical concerns had to do with contact generation, not finding normals; we can still use custom analytic contact generators with GJK and friends.

            //A couple of notes on convexity:
            //Separated convex objects have a global minimum (negative) depth; the distance function between convex objects is itself convex. GJK takes advantage of this.
            //Intersecting convex objects, in contrast, may have multiple local minima for depth. MPR doesn't find a global minimum depth- in fact, it might not even be a local minimum.

            //GJK and MPR are not the only possible algorithms in this space:
            //the DepthRefiner uses an algorithm which I'll call Tootbird Search, in the hopes that someone will refer to "Tootbird Search" in a paper or presentation at some point.

            //Here, we'll make a few guesses at the best normal, then hand off the result to a minkowski based depth refiner.

            Vector3Wide.Length(localOffsetA, out var length);
            Vector3Wide.Scale(localOffsetA, Vector<float>.One / length, out var localNormal);
            var useInitialSampleFallback = Vector.LessThan(length, new Vector<float>(1e-10f));
            localNormal.X = Vector.ConditionalSelect(useInitialSampleFallback, Vector<float>.Zero, localNormal.X);
            localNormal.Y = Vector.ConditionalSelect(useInitialSampleFallback, Vector<float>.One, localNormal.Y);
            localNormal.Z = Vector.ConditionalSelect(useInitialSampleFallback, Vector<float>.Zero, localNormal.Z);
            CylinderSupportFinder supportFinder;

            //There are some other axes we could try, like axisA x axisB, but they tend to be far less relevant for stacking.
            //Also, keep in mind that feature pairs which form faces, edges, or vertices in minkowski space tend to converge extremely quickly.
            //Blindly trying a bunch of low probability feature pairs- especially those which would fall into the above- isn't very wise.

            //We now have a decent estimate for the local normal and an initial simplex to work from. Refine it to a local minimum.
            var inactiveLanes = BundleIndexing.CreateTrailingMaskForCountInBundle(pairCount);

            var depthThreshold = -speculativeMargin;
            var epsilonScale = Vector.Min(Vector.Max(a.HalfLength, a.Radius), Vector.Max(b.HalfLength, b.Radius));
            DepthRefiner.FindMinimumDepth(
                b, a, localOffsetA, rA, ref supportFinder, ref supportFinder, localNormal, inactiveLanes, epsilonScale * new Vector<float>(1e-6f), depthThreshold,
                out var depth, out localNormal, out var closestOnB, maximumIterations: 25);

            inactiveLanes = Vector.BitwiseOr(inactiveLanes, Vector.LessThan(depth, depthThreshold));
            if (Vector.LessThanAll(inactiveLanes, Vector<int>.Zero))
            {
                //All lanes are either inactive or were found to have a depth lower than the speculative margin, so we can just quit early.
                manifold = default;
                return;
            }

            //We generate contacts according to the dominant features along the collision normal.
            //The possible pairs are:
            //Cap A-Cap B
            //Cap A-Side B
            //Side A-Cap B
            //Side A-Side B
            Vector3Wide.Dot(rA.Y, localNormal, out var nDotAY);
            var inverseNDotAY = Vector<float>.One / nDotAY;
            var inverseLocalNormalY = Vector<float>.One / localNormal.Y;
            Vector3Wide.Scale(rA.Y, Vector.ConditionalSelect(Vector.GreaterThan(nDotAY, Vector<float>.Zero), -a.HalfLength, a.HalfLength), out var capCenterA);
            Vector3Wide.Add(capCenterA, localOffsetA, out capCenterA);
            var capCenterBY = Vector.ConditionalSelect(Vector.LessThan(localNormal.Y, Vector<float>.Zero), -b.HalfLength, b.HalfLength);

            var capThreshold = new Vector<float>(0.70710678118f);
            var useCapA = Vector.GreaterThan(Vector.Abs(nDotAY), capThreshold);
            var useCapB = Vector.GreaterThan(Vector.Abs(localNormal.Y), capThreshold);
            Unsafe.SkipInit(out Vector3Wide contact0);
            Unsafe.SkipInit(out Vector3Wide contact1);
            Unsafe.SkipInit(out Vector3Wide contact2);
            Unsafe.SkipInit(out Vector3Wide contact3);
            manifold.Contact0Exists = default;
            manifold.Contact1Exists = default;
            manifold.Contact2Exists = default;
            manifold.Contact3Exists = default;
            var useCapCap = Vector.AndNot(Vector.BitwiseAnd(useCapA, useCapB), inactiveLanes);

            //The extreme points along the contact normal are shared between multiple contact generator paths, so we just do them up front.
            Vector3Wide.Scale(localNormal, -depth, out var bToAOffset);
            Vector3Wide.Add(closestOnB, bToAOffset, out var extremeA);
            Vector3Wide.Subtract(extremeA, localOffsetA, out var extremeAHorizontalOffset);
            Vector3Wide.Dot(extremeAHorizontalOffset, rA.Y, out var verticalDot);
            Vector3Wide.Scale(rA.Y, verticalDot, out var toRemove);
            Vector3Wide.Subtract(extremeAHorizontalOffset, toRemove, out extremeAHorizontalOffset);

            Vector2Wide extremeB;
            extremeB.X = closestOnB.X;
            extremeB.Y = closestOnB.Z;

            var useNegative = Vector.GreaterThan(nDotAY, Vector<float>.Zero);
            Vector3Wide capFeatureNormalA;
            capFeatureNormalA.X = Vector.ConditionalSelect(useNegative, -rA.Y.X, rA.Y.X);
            capFeatureNormalA.Y = Vector.ConditionalSelect(useNegative, -rA.Y.Y, rA.Y.Y);
            capFeatureNormalA.Z = Vector.ConditionalSelect(useNegative, -rA.Y.Z, rA.Y.Z);
            //We'll just assume every lane is cap-cap to start with; initialize the feature normal accordingly.
            var featureNormalA = capFeatureNormalA;
            var featurePositionA = capCenterA;

            if (Vector.LessThanAny(useCapCap, Vector<int>.Zero))
            {
                //At least one active lane needs cap-cap contacts.
                //While the obvious approach is to intersect the cylinder caps, doing so on the contact plane involves intersecting two ellipses.
                //That involves solving a fourth degree polynomial. Doable, but not super duper cheap. Further, when the caps are not parallel,
                //intersecting the caps doesn't necessarily produce 'better' contacts. It's just a heuristic.

                //Instead, we'll start with extreme points, use them to draw a line, test that line against the caps,
                //and then use a perpendicular line at the midpoint of the first line's intersection interval.
                const float parallelThresholdScalar = 0.9999f;
                const float parallelInterpolationMaxScalar = 0.99995f;
                const float inverseParallelInterpolationSpanScalar = 1f / (parallelInterpolationMaxScalar - parallelThresholdScalar);
                var parallelThreshold = new Vector<float>(parallelThresholdScalar);
                var inverseParallelInterpolationSpan = new Vector<float>(inverseParallelInterpolationSpanScalar);
                var absADot = Vector.Abs(nDotAY);
                var absBDot = Vector.Abs(localNormal.Y);
                var aCapNotParallel = Vector.LessThan(absADot, parallelThreshold);
                var bCapNotParallel = Vector.LessThan(absBDot, parallelThreshold);

                //If both caps are not parallel, we'll use the deepest point on B.
                Vector2Wide capContact0 = extremeB;

                //Only use one contact if neither cap face is involved.
                var bothNotParallel = Vector.BitwiseAnd(aCapNotParallel, bCapNotParallel);
                if (Vector.LessThanAny(Vector.AndNot(Vector.OnesComplement(bothNotParallel), inactiveLanes), Vector<int>.Zero))
                {
                    //The local normal is aligned with at least one of the two cap normals.
                    ProjectOntoCapB(capCenterBY, inverseLocalNormalY, localNormal, capCenterA, out var capCenterAOnB);
                    Vector2Wide.Length(capCenterAOnB, out var horizontalOffsetLength);
                    var inverseHorizontalOffsetLength = Vector<float>.One / horizontalOffsetLength;
                    Vector2Wide.Scale(capCenterAOnB, inverseHorizontalOffsetLength, out var horizontalOffsetDirection);
                    var useBothParallelFallback = Vector.LessThan(horizontalOffsetLength, new Vector<float>(1e-14f));
                    horizontalOffsetDirection.X = Vector.ConditionalSelect(useBothParallelFallback, Vector<float>.One, horizontalOffsetDirection.X);
                    horizontalOffsetDirection.Y = Vector.ConditionalSelect(useBothParallelFallback, Vector<float>.Zero, horizontalOffsetDirection.Y);
                    Vector2Wide.Scale(horizontalOffsetDirection, b.Radius, out var initialLineStart);

                    Vector2Wide.Negate(initialLineStart, out var contact1LineEndpoint);
                    //The above created a line stating at contact0 and pointing to the other side of the cap that contact0 was generated from.
                    //That is, if the extreme point from A was used, then the line direction is localNormal projected on capA.
                    ProjectOntoCapA(capCenterBY, capCenterA, rA, inverseNDotAY, localNormal, initialLineStart, out var lineStartOnA);
                    ProjectOntoCapA(capCenterBY, capCenterA, rA, inverseNDotAY, localNormal, contact1LineEndpoint, out var lineEndOnA);
                    Vector2Wide.Subtract(lineEndOnA, lineStartOnA, out var lineDirectionOnA);
                    Vector2Wide.Subtract(contact1LineEndpoint, initialLineStart, out var contact1LineDirectionOnB);
                    IntersectLineCircle(lineStartOnA, lineDirectionOnA, a.Radius, out var contact1TMinA, out var contact1TMaxA);
                    var firstLineTMin = Vector.Max(contact1TMinA, Vector<float>.Zero);
                    var firstLineTMax = Vector.Min(contact1TMaxA, Vector<float>.One);
                    Vector2Wide.Scale(contact1LineDirectionOnB, firstLineTMin, out capContact0);
                    Vector2Wide.Add(initialLineStart, capContact0, out capContact0);
                    Vector2Wide.Scale(contact1LineDirectionOnB, firstLineTMax, out var capContact1);
                    Vector2Wide.Add(initialLineStart, capContact1, out capContact1);

                    //Just use a perpendicular direction to the centerB->centerA offset and position it to get a decent cross section of the contact manifold-
                    //at point where it would find the A-B circle intersections, or at the midpoint of A if the circle intersections are further out.
                    //Note that for not-entirely-parallel faces, it won't quite match up with the true intersections since the projected cap of A is an ellipse.
                    var circleIntersectionT = 0.5f * (horizontalOffsetLength + (b.Radius * b.Radius - a.Radius * a.Radius) * inverseHorizontalOffsetLength);
                    var secondLineStartT = Vector.Min(horizontalOffsetLength, Vector.Max(Vector<float>.Zero, circleIntersectionT));
                    Vector2Wide.Scale(horizontalOffsetDirection, secondLineStartT, out var secondLineStartOnB);
                    Vector2Wide secondLineDirectionOnB;
                    secondLineDirectionOnB.X = horizontalOffsetDirection.Y;
                    secondLineDirectionOnB.Y = -horizontalOffsetDirection.X;

                    Vector2Wide.Add(secondLineStartOnB, secondLineDirectionOnB, out var secondLineEndOnB);
                    ProjectOntoCapA(capCenterBY, capCenterA, rA, inverseNDotAY, localNormal, secondLineStartOnB, out var secondLineStartOnA);
                    ProjectOntoCapA(capCenterBY, capCenterA, rA, inverseNDotAY, localNormal, secondLineEndOnB, out var secondLineEndOnA);
                    Vector2Wide.Subtract(secondLineEndOnA, secondLineStartOnA, out var secondLineDirectionOnA);

                    IntersectLineCircle(secondLineStartOnA, secondLineDirectionOnA, a.Radius, out var secondLineTMinA, out var secondLineTMaxA);
                    IntersectLineCircle(secondLineStartOnB, secondLineDirectionOnB, b.Radius, out var secondLineTMinB, out var secondLineTMaxB);
                    var secondLineTMin = Vector.Max(secondLineTMinA, secondLineTMinB);
                    var secondLineTMax = Vector.Min(secondLineTMaxA, secondLineTMaxB);

                    Vector2Wide.Scale(secondLineDirectionOnB, secondLineTMin, out var capContact2);
                    Vector2Wide.Scale(secondLineDirectionOnB, secondLineTMax, out var capContact3);
                    Vector2Wide.Add(secondLineStartOnB, capContact2, out capContact2);
                    Vector2Wide.Add(secondLineStartOnB, capContact3, out capContact3);

                    //We've built everything assuming perfectly parallel caps. The manifold we have so far may not include the deepest points.
                    //Replace one of the four points with the deepest point (extremeB) if necessary.
                    var weightAParallel = Vector.Max(Vector<float>.Zero, Vector.Min(Vector<float>.One, (absADot - parallelThreshold) * inverseParallelInterpolationSpan));
                    var weightBParallel = Vector.Max(Vector<float>.Zero, Vector.Min(Vector<float>.One, (absBDot - parallelThreshold) * inverseParallelInterpolationSpan));
                    var parallelWeight = weightAParallel * weightBParallel;
                    var extremeWeight = Vector<float>.One - parallelWeight;
                    Vector2Wide.Subtract(extremeB, secondLineStartOnB, out var manifoldCenterToExtremeB);
                    var replaceDot0 = horizontalOffsetDirection.X * manifoldCenterToExtremeB.X + horizontalOffsetDirection.Y * manifoldCenterToExtremeB.Y;
                    var replaceDot2 = secondLineDirectionOnB.X * manifoldCenterToExtremeB.X + secondLineDirectionOnB.Y * manifoldCenterToExtremeB.Y;
                    var replace0Or1 = Vector.GreaterThan(Vector.Abs(replaceDot0), Vector.Abs(replaceDot2));
                    //var replace0 = Vector.BitwiseAnd(Vector.GreaterThan(replaceDot0, Vector<float>.Zero), replace0Or1);
                    var replace0 = Vector.BitwiseOr(bothNotParallel, Vector.BitwiseAnd(Vector.GreaterThan(replaceDot0, Vector<float>.Zero), replace0Or1));
                    var replace1 = Vector.BitwiseAnd(Vector.LessThanOrEqual(replaceDot0, Vector<float>.Zero), replace0Or1);
                    var replace2 = Vector.AndNot(Vector.LessThan(replaceDot2, Vector<float>.Zero), replace0Or1);
                    var replace3 = Vector.AndNot(Vector.GreaterThanOrEqual(replaceDot2, Vector<float>.Zero), replace0Or1);
                    capContact0.X = Vector.ConditionalSelect(replace0, extremeB.X * extremeWeight + capContact0.X * parallelWeight, capContact0.X);
                    capContact0.Y = Vector.ConditionalSelect(replace0, extremeB.Y * extremeWeight + capContact0.Y * parallelWeight, capContact0.Y);
                    capContact1.X = Vector.ConditionalSelect(replace1, extremeB.X * extremeWeight + capContact1.X * parallelWeight, capContact1.X);
                    capContact1.Y = Vector.ConditionalSelect(replace1, extremeB.Y * extremeWeight + capContact1.Y * parallelWeight, capContact1.Y);
                    capContact2.X = Vector.ConditionalSelect(replace2, extremeB.X * extremeWeight + capContact2.X * parallelWeight, capContact2.X);
                    capContact2.Y = Vector.ConditionalSelect(replace2, extremeB.Y * extremeWeight + capContact2.Y * parallelWeight, capContact2.Y);
                    capContact3.X = Vector.ConditionalSelect(replace3, extremeB.X * extremeWeight + capContact3.X * parallelWeight, capContact3.X);
                    capContact3.Y = Vector.ConditionalSelect(replace3, extremeB.Y * extremeWeight + capContact3.Y * parallelWeight, capContact3.Y);

                    FromCapBTo3D(capContact1, capCenterBY, out contact1);
                    FromCapBTo3D(capContact2, capCenterBY, out contact2);
                    FromCapBTo3D(capContact3, capCenterBY, out contact3);
                    manifold.Contact1Exists = Vector.AndNot(Vector.BitwiseAnd(useCapCap, Vector.GreaterThan(firstLineTMax, firstLineTMin)), bothNotParallel);
                    //If 0 and 1 are in the same spot, there aren't going to be any useful additional contacts.
                    manifold.Contact2Exists = manifold.Contact1Exists;
                    manifold.Contact3Exists = Vector.BitwiseAnd(manifold.Contact1Exists, Vector.GreaterThan(secondLineTMax, secondLineTMin));
                }
                FromCapBTo3D(capContact0, capCenterBY, out contact0);
                manifold.Contact0Exists = useCapCap;
            }
            var useCapSide = Vector.AndNot(Vector.BitwiseOr(Vector.AndNot(useCapA, useCapB), Vector.AndNot(useCapB, useCapA)), inactiveLanes);
            //The side normal is used in both of the following contact generator cases.
            Vector3Wide.Dot(rA.X, localNormal, out var ax);
            Vector3Wide.Dot(rA.Z, localNormal, out var az);
            var horizontalNormalLengthA = Vector.SquareRoot(ax * ax + az * az);
            var inverseHorizontalNormalLengthA = Vector<float>.One / horizontalNormalLengthA;
            var xScale = ax * inverseHorizontalNormalLengthA;
            var zScale = az * inverseHorizontalNormalLengthA;
            Vector3Wide.Scale(rA.X, xScale, out var sideFeatureNormalAX);
            Vector3Wide.Scale(rA.Z, zScale, out var sideFeatureNormalAZ);
            Vector3Wide.Add(sideFeatureNormalAX, sideFeatureNormalAZ, out var sideFeatureNormalA);
            Vector3Wide sideCenterA, sideCenterB;
            sideCenterA.X = extremeAHorizontalOffset.X + localOffsetA.X;
            sideCenterA.Y = extremeAHorizontalOffset.Y + localOffsetA.Y;
            sideCenterA.Z = extremeAHorizontalOffset.Z + localOffsetA.Z;
            sideCenterB.X = extremeB.X;
            sideCenterB.Y = Vector<float>.Zero;
            sideCenterB.Z = extremeB.Y;
            if (Vector.LessThanAny(useCapSide, Vector<int>.Zero))
            {
                //At least one lane needs cap-side contact generation.
                //This is relatively simple:
                //Pick a line on the side of the cylinder in the direction of the extreme point.
                //Pick the cap on the other cylinder in the direction of the extreme point.
                //Intersect the line with the cap in the cap's local space (by projecting the line along the contact normal into the cap's local space).

                //Compute both lines and choose which one to use.
                Vector3Wide.Add(sideCenterA, rA.Y, out var sideLineEndA);
                Vector3Wide sideLineEndB;
                sideLineEndB.X = sideCenterB.X;
                sideLineEndB.Y = Vector<float>.One;
                sideLineEndB.Z = sideCenterB.Z;
                ProjectOntoCapA(capCenterA, rA, inverseNDotAY, localNormal, sideCenterB, out var projectedLineStartBOnA);
                ProjectOntoCapB(capCenterBY, inverseLocalNormalY, localNormal, sideCenterA, out var projectedLineStartAOnB);
                ProjectOntoCapA(capCenterA, rA, inverseNDotAY, localNormal, sideLineEndB, out var projectedLineEndBOnA);
                ProjectOntoCapB(capCenterBY, inverseLocalNormalY, localNormal, sideLineEndA, out var projectedLineEndAOnB);

                Vector2Wide.ConditionalSelect(useCapA, projectedLineStartBOnA, projectedLineStartAOnB, out var projectedLineStart);
                Vector2Wide.ConditionalSelect(useCapA, projectedLineEndBOnA, projectedLineEndAOnB, out var projectedLineEnd);
                var radius = Vector.ConditionalSelect(useCapA, a.Radius, b.Radius);
                var sideHalfLength = Vector.ConditionalSelect(useCapA, b.HalfLength, a.HalfLength);
                Vector2Wide.Subtract(projectedLineEnd, projectedLineStart, out var projectedLineDirection);
                IntersectLineCircle(projectedLineStart, projectedLineDirection, radius, out var tMin, out var tMax);
                tMin = Vector.Min(sideHalfLength, Vector.Max(-sideHalfLength, tMin));
                tMax = Vector.Min(sideHalfLength, tMax);

                //To be consistent with the other contact generation cases, we want contacts to be on cylinder B. So:
                //If the cap was on A, that means the side was B and we should scale the sideLineB to get our contacts.
                //If the cap was on B, that means the side was on A and we should use the *projected* sideLineA to get our contacts.
                Vector3Wide contact0ForCapA;
                contact0ForCapA.X = sideCenterB.X;
                contact0ForCapA.Y = tMin;
                contact0ForCapA.Z = sideCenterB.Z;
                Vector3Wide contact1ForCapA;
                contact1ForCapA.X = sideCenterB.X;
                contact1ForCapA.Y = tMax;
                contact1ForCapA.Z = sideCenterB.Z;
                //Note that we're using the post-conditionalselect projectedLineStart and direction here.
                //That's fine; we only use these results if that choice is actually correct anyway.
                Vector3Wide contact0ForCapB;
                contact0ForCapB.X = projectedLineStart.X + tMin * projectedLineDirection.X;
                contact0ForCapB.Y = capCenterBY;
                contact0ForCapB.Z = projectedLineStart.Y + tMin * projectedLineDirection.Y;
                Vector3Wide contact1ForCapB;
                contact1ForCapB.X = projectedLineStart.X + tMax * projectedLineDirection.X;
                contact1ForCapB.Y = capCenterBY;
                contact1ForCapB.Z = projectedLineStart.Y + tMax * projectedLineDirection.Y;
                Vector3Wide.ConditionalSelect(useCapA, contact0ForCapA, contact0ForCapB, out var capSideContact0);
                Vector3Wide.ConditionalSelect(useCapA, contact1ForCapA, contact1ForCapB, out var capSideContact1);
                Vector3Wide.ConditionalSelect(useCapSide, capSideContact0, contact0, out contact0);
                Vector3Wide.ConditionalSelect(useCapSide, capSideContact1, contact1, out contact1);
                manifold.Contact0Exists = Vector.ConditionalSelect(useCapSide, new Vector<int>(-1), manifold.Contact0Exists);
                manifold.Contact1Exists = Vector.ConditionalSelect(useCapSide, Vector.GreaterThan(tMax, tMin), manifold.Contact1Exists);

                Vector3Wide.ConditionalSelect(useCapA, capFeatureNormalA, sideFeatureNormalA, out var capSideFeatureNormalA);
                Vector3Wide.ConditionalSelect(useCapSide, capSideFeatureNormalA, featureNormalA, out featureNormalA);

                Vector3Wide.ConditionalSelect(useCapA, capCenterA, sideCenterA, out var capSideFeaturePositionA);
                Vector3Wide.ConditionalSelect(useCapSide, capSideFeaturePositionA, featurePositionA, out featurePositionA);
            }
            var useSideSide = Vector.AndNot(Vector.AndNot(Vector.OnesComplement(useCapA), useCapB), inactiveLanes);
            if (Vector.LessThanAny(useSideSide, Vector<int>.Zero))
            {
                //At least one lane needs side-side contacts.
                //This is similar to capsule-capsule; we have two line segments and we want a contact interval on B.
                //Note that we test the line on the side of A against the line *in the center of* B. We then use its interval on the side of B.
                //(Using the side of B to detect the interval can result in issues in medium-depth penetration where the deepest point is ignored in favor of the closest point between the side lines.)
                Vector3Wide.Negate(sideCenterA, out var sideCenterAToLineB);
                var horizontalNormalLengthSquaredB = localNormal.X * localNormal.X + localNormal.Z * localNormal.Z;
                var inverseHorizontalNormalLengthSquaredB = Vector<float>.One / horizontalNormalLengthSquaredB;
                CapsuleCylinderTester.GetContactIntervalBetweenSegments(a.HalfLength, b.HalfLength, rA.Y, localNormal, inverseHorizontalNormalLengthSquaredB, sideCenterAToLineB, out var contactTMin, out var contactTMax);

                contact0.X = Vector.ConditionalSelect(useSideSide, extremeB.X, contact0.X);
                contact0.Y = Vector.ConditionalSelect(useSideSide, contactTMin, contact0.Y);
                contact0.Z = Vector.ConditionalSelect(useSideSide, extremeB.Y, contact0.Z);
                contact1.X = Vector.ConditionalSelect(useSideSide, extremeB.X, contact1.X);
                contact1.Y = Vector.ConditionalSelect(useSideSide, contactTMax, contact1.Y);
                contact1.Z = Vector.ConditionalSelect(useSideSide, extremeB.Y, contact1.Z);
                manifold.Contact0Exists = Vector.ConditionalSelect(useSideSide, new Vector<int>(-1), manifold.Contact0Exists);
                manifold.Contact1Exists = Vector.ConditionalSelect(useSideSide, Vector.GreaterThan(contactTMax, contactTMin), manifold.Contact1Exists);
                Vector3Wide.ConditionalSelect(useSideSide, sideFeatureNormalA, featureNormalA, out featureNormalA);
                Vector3Wide.ConditionalSelect(useSideSide, sideCenterA, featurePositionA, out featurePositionA);
            }
            Vector3Wide.Dot(featureNormalA, localNormal, out var featureNormalADotLocalNormal);
            //No division guard; the feature normal we picked is never more than 45 degrees away from the local normal.
            var inverseFeatureNormalADotLocalNormal = Vector<float>.One / featureNormalADotLocalNormal;
            var negativeSpeculativeMargin = -speculativeMargin;
            TransformContact(contact0, featurePositionA, featureNormalA, inverseFeatureNormalADotLocalNormal, localOffsetB, worldRB, negativeSpeculativeMargin, out manifold.OffsetA0, out manifold.Depth0, ref manifold.Contact0Exists);
            TransformContact(contact1, featurePositionA, featureNormalA, inverseFeatureNormalADotLocalNormal, localOffsetB, worldRB, negativeSpeculativeMargin, out manifold.OffsetA1, out manifold.Depth1, ref manifold.Contact1Exists);
            TransformContact(contact2, featurePositionA, featureNormalA, inverseFeatureNormalADotLocalNormal, localOffsetB, worldRB, negativeSpeculativeMargin, out manifold.OffsetA2, out manifold.Depth2, ref manifold.Contact2Exists);
            TransformContact(contact3, featurePositionA, featureNormalA, inverseFeatureNormalADotLocalNormal, localOffsetB, worldRB, negativeSpeculativeMargin, out manifold.OffsetA3, out manifold.Depth3, ref manifold.Contact3Exists);
            Matrix3x3Wide.TransformWithoutOverlap(localNormal, worldRB, out manifold.Normal);
            //Contact generators all obey a reasonably solid order, so we can use a trivial feature description.
            //Note that this will conflate different contact generator cases, but that's okay- we tend to keep the most important contact in the first slot, for example, and that is the contact that is most likely to persist across feature pair changes.
            manifold.FeatureId0 = Vector<int>.Zero;
            manifold.FeatureId1 = Vector<int>.One;
            manifold.FeatureId2 = new Vector<int>(2);
            manifold.FeatureId3 = new Vector<int>(3);
        }

        public void Test(ref CylinderWide a, ref CylinderWide b, ref Vector<float> speculativeMargin, ref Vector3Wide offsetB, ref QuaternionWide orientationB, int pairCount, out Convex4ContactManifoldWide manifold)
        {
            throw new NotImplementedException();
        }

        public void Test(ref CylinderWide a, ref CylinderWide b, ref Vector<float> speculativeMargin, ref Vector3Wide offsetB, int pairCount, out Convex4ContactManifoldWide manifold)
        {
            throw new NotImplementedException();
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/dummy.iml" filepath="$PROJECT_DIR$/.idea/dummy.iml" />
    </modules>
  </component>
</project>