private void cleanRightEdge(int cutIndex) {
        // we're actually sitting one block left if cutIndex lies on a block boundary
        // this means that we'll end up erasing the whole block!!

        if (cutIndex <= (1 << 5)) {
            zeroRight(pointer.display0, cutIndex);
        } else if (cutIndex <= (1 << 10)) {
            zeroRight(pointer.display0, ((cutIndex - 1) & 0x1f) + 1);
            pointer.display1 = copyLeft(pointer.display1, (cutIndex >>> 5));
        } else if (cutIndex <= (1 << 15)) {
            zeroRight(pointer.display0, ((cutIndex - 1) & 0x1f) + 1);
            pointer.display1 = copyLeft(pointer.display1, (((cutIndex - 1) >>> 5) & 0x1f) + 1);
            pointer.display2 = copyLeft(pointer.display2, (cutIndex >>> 10));
        } else if (cutIndex <= (1 << 20)) {
            zeroRight(pointer.display0, ((cutIndex - 1) & 0x1f) + 1);
            pointer.display1 = copyLeft(pointer.display1, (((cutIndex - 1) >>> 5) & 0x1f) + 1);
            pointer.display2 = copyLeft(pointer.display2, (((cutIndex - 1) >>> 10) & 0x1f) + 1);
            pointer.display3 = copyLeft(pointer.display3, (cutIndex >>> 15));
        } else if (cutIndex <= (1 << 25)) {
            zeroRight(pointer.display0, ((cutIndex - 1) & 0x1f) + 1);
            pointer.display1 = copyLeft(pointer.display1, (((cutIndex - 1) >>> 5) & 0x1f) + 1);
            pointer.display2 = copyLeft(pointer.display2, (((cutIndex - 1) >>> 10) & 0x1f) + 1);
            pointer.display3 = copyLeft(pointer.display3, (((cutIndex - 1) >>> 15) & 0x1f) + 1);
            pointer.display4 = copyLeft(pointer.display4, (cutIndex >>> 20));
        } else if (cutIndex <= (1 << 30)) {
            zeroRight(pointer.display0, ((cutIndex - 1) & 0x1f) + 1);
            pointer.display1 = copyLeft(pointer.display1, (((cutIndex - 1) >>> 5) & 0x1f) + 1);
            pointer.display2 = copyLeft(pointer.display2, (((cutIndex - 1) >>> 10) & 0x1f) + 1);
            pointer.display3 = copyLeft(pointer.display3, (((cutIndex - 1) >>> 15) & 0x1f) + 1);
            pointer.display4 = copyLeft(pointer.display4, (((cutIndex - 1) >>> 20) & 0x1f) + 1);
            pointer.display5 = copyLeft(pointer.display5, (cutIndex >>> 25));
        } else {
            throw new IllegalArgumentException();
        }
    }
private void cleanRightEdge ( int cutIndex ) { if ( cutIndex <= ( 1 << 5 ) ) { zeroRight ( pointer . display0 , cutIndex ) ; } else if ( cutIndex <= ( 1 << 10 ) ) { zeroRight ( pointer . display0 , ( ( cutIndex - 1 ) & 0x1f ) + 1 ) ; pointer . display1 = copyLeft ( pointer . display1 , ( cutIndex > > > 5 ) ) ; } else if ( cutIndex <= ( 1 << 15 ) ) { zeroRight ( pointer . display0 , ( ( cutIndex - 1 ) & 0x1f ) + 1 ) ; pointer . display1 = copyLeft ( pointer . display1 , ( ( ( cutIndex - 1 ) > > > 5 ) & 0x1f ) + 1 ) ; pointer . display2 = copyLeft ( pointer . display2 , ( cutIndex > > > 10 ) ) ; } else if ( cutIndex <= ( 1 << 20 ) ) { zeroRight ( pointer . display0 , ( ( cutIndex - 1 ) & 0x1f ) + 1 ) ; pointer . display1 = copyLeft ( pointer . display1 , ( ( ( cutIndex - 1 ) > > > 5 ) & 0x1f ) + 1 ) ; pointer . display2 = copyLeft ( pointer . display2 , ( ( ( cutIndex - 1 ) > > > 10 ) & 0x1f ) + 1 ) ; pointer . display3 = copyLeft ( pointer . display3 , ( cutIndex > > > 15 ) ) ; } else if ( cutIndex <= ( 1 << 25 ) ) { zeroRight ( pointer . display0 , ( ( cutIndex - 1 ) & 0x1f ) + 1 ) ; pointer . display1 = copyLeft ( pointer . display1 , ( ( ( cutIndex - 1 ) > > > 5 ) & 0x1f ) + 1 ) ; pointer . display2 = copyLeft ( pointer . display2 , ( ( ( cutIndex - 1 ) > > > 10 ) & 0x1f ) + 1 ) ; pointer . display3 = copyLeft ( pointer . display3 , ( ( ( cutIndex - 1 ) > > > 15 ) & 0x1f ) + 1 ) ; pointer . display4 = copyLeft ( pointer . display4 , ( cutIndex > > > 20 ) ) ; } else if ( cutIndex <= ( 1 << 30 ) ) { zeroRight ( pointer . display0 , ( ( cutIndex - 1 ) & 0x1f ) + 1 ) ; pointer . display1 = copyLeft ( pointer . display1 , ( ( ( cutIndex - 1 ) > > > 5 ) & 0x1f ) + 1 ) ; pointer . display2 = copyLeft ( pointer . display2 , ( ( ( cutIndex - 1 ) > > > 10 ) & 0x1f ) + 1 ) ; pointer . display3 = copyLeft ( pointer . display3 , ( ( ( cutIndex - 1 ) > > > 15 ) & 0x1f ) + 1 ) ; pointer . display4 = copyLeft ( pointer . display4 , ( ( ( cutIndex - 1 ) > > > 20 ) & 0x1f ) + 1 ) ; pointer . display5 = copyLeft ( pointer . display5 , ( cutIndex > > > 25 ) ) ; } else { throw new IllegalArgumentException ( ) ; } }
requires structure is writable and at index cutIndex