 +	    code1 += code3 = getWhiteCode();
 +	  } while (code3 >= 64);
  	}
--	code2 = 0;
--	do {
--	  code2 += code3 = getBlackCode();
--	} while (code3 >= 64);
--	codingLine[a0+1] = codingLine[a0] + code2;
--	++a0;
--	if (codingLine[a0] >= columns) {
--	  break;
--	}
 +	addPixels(codingLine[a0i] + code1, blackPixels);
 +	blackPixels ^= 1;
        }

       }
-    } while (bits > 0 && codingLine[a0] < columns);
+    } while (bits);
   }
-  buf = black ? (ret ^ 0xff) : ret;
+  if (black) {
+    buf ^= 0xff;
+  }
   return buf;
 }
 

+	      --b1i;
+	    } else {
+	      ++b1i;
+	    }
+	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
+	      b1i += 2;
 	    }
 	  }
 	  break;
 	case EOF:
