anchor.diff:              end
            end
            else begin
  -            if (fromInteger(i) < offset) begin
  +            if (fromInteger(i) < sh_offset) begin
                  v = readVReg(stor)[40+i];
               end
  -            else if (fromInteger(i) < offset + 66) begin
  -               v = din[i-offset];
  +            else if (fromInteger(i) < sh_offset + 66) begin
  +               v = din[fromInteger(i)-sh_offset];
               end
               else begin
                  v = 0;
  
positive.code:          fifo_out.enq(pack(next_stor)[39:0]);
        end
  
        state <= next_state;
     endrule
  
  
negative.code: 
     let verbose = True;
  
     Vector#(144, Reg#(Bit#(1))) stor      <- replicateM(mkReg(0));
  
     FIFOF#(Bit#(40)) fifo_out <- mkFIFOF;
     PipeOut#(Bit#(40)) pipe_out = toPipeOut(fifo_out);
  
     Reg#(Bit#(6))  state <- mkReg(0);
     Reg#(Bit#(7))  sh_offset <- mkReg(0);
     Reg#(Bit#(7))  total <- mkReg(0);
  
     rule state_machine;
        let next_state = state;
        let curr_total = total;
        let next_total;
        let next_offset;
        let din;
  
        case (state)
  