private static void select(CachedXYT t, int pos, byte b) {
    int bnegative = (b & 0xff) >> 7;
    int babs = b - (((-bnegative) & b) << 1);

    t.copyConditional(Ed25519Constants.B_TABLE[pos][0], eq(babs, 1));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][1], eq(babs, 2));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][2], eq(babs, 3));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][3], eq(babs, 4));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][4], eq(babs, 5));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][5], eq(babs, 6));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][6], eq(babs, 7));
    t.copyConditional(Ed25519Constants.B_TABLE[pos][7], eq(babs, 8));

    long[] yPlusX = Arrays.copyOf(t.yMinusX, Field25519.LIMB_CNT);
    long[] yMinusX = Arrays.copyOf(t.yPlusX, Field25519.LIMB_CNT);
    long[] t2d = Arrays.copyOf(t.t2d, Field25519.LIMB_CNT);
    neg(t2d, t2d);
    CachedXYT minust = new CachedXYT(yPlusX, yMinusX, t2d);
    t.copyConditional(minust, bnegative);
  }
This is a constant time operation where point b*B*256^pos is stored in {@code t}.
When b is 0, t remains the same (i.e., neutral point).

Although B_TABLE[32][8] (B_TABLE[i][j] = (j+1)*B*256^i) has j values in [0, 7], the select
method negates the corresponding point if b is negative (which is straight forward in elliptic
curves by just negating y coordinate). Therefore we can get multiples of B with the half of
memory requirements.

@param t neutral element (i.e., point 0), also serves as output.
@param pos in B[pos][j] = (j+1)*B*256^pos
@param b value in [-8, 8] range.
java_src/src/main/java/com/google/crypto/tink/internal/Ed25519.java