 after obtaining the absolute value; so the code is
     * interwoven with finding the abs value (temp) and output bits (temp2).
     */
    if (temp < 0) {
      temp = -temp;		/* temp is abs value of input */
      temp >>= Al;		/* apply the point transform */
      /* For a negative coef, want temp2 = bitwise complement of abs(coef) */
      temp2 = ~temp;
    } else {
      temp >>= Al;		/* apply the point transform */
      temp2 = temp;
    }
    /* Watch out for case that nonzero coef is zero after point transform */
    if (temp == 0) {
      r++;
      continue;
    }

    /* Emit any pending EOBRUN */
    if (entropy->EOBRUN > 0)
      emit_eobrun(entropy);
    /* if run length > 15, must emit special run-length-16 codes (0xF0) */
    while (r > 15) {
      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
      r -= 16;
    }

    /* Find the number of bits needed for the magnitude of the coefficient */
    nbits = 1;			/* there must be at least one 1 bit */
    while ((temp >>= 1))
      nbits++;
    /* Check for out-of-range coefficient values */
    if (nbits > MAX_COEF_BITS)
      ERREXIT(cinfo, JERR_BAD_DCT_COEF);

    /* Count/emit Huffman symbol for run length / number of bits */
    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits);

    /* Emit that number of bits of the value, if positive, */
    /* or the complement of its magnitude, if negative. */
    emit_bits(entropy, (unsigned int) temp2, nbits);

    r = 0;			/* reset zero run length */
  }

  if (r > 0) {			/* If there are trailing zeroes, */
    entropy->EOBRUN++;		
after obtaining the absolute value; so the code is 
      * interwoven with finding the abs value (temp) and end product bit (temp2). 
      * / 
     if (temp < 0) { 
       temp = -temp; 		 / * temp is abs value of input * / 
       temp > > = Al; 		 / * apply the degree transform * / 
       / * For a negative coef, want temp2 = bitwise complement of abs(coef) * / 
       temp2 = ~temp; 
     } else { 
       temp > > = Al; 		 / * give the compass point transform * / 
       temp2 = temp; 
     } 
     / * Watch out for event that nonzero coef is zero after point transform * / 
     if (temp = = 0) { 
       r++; 
       continue; 
     } 

     / * utter any pending EOBRUN * / 
     if (entropy->EOBRUN > 0) 
       emit_eobrun(entropy); 
     / * if run length > 15, must emit special tend - length-16 codes (0xF0) * / 
     while (r > 15) { 
       emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); 
       r -= 16; 
     } 

     / * Find the number of act needed for the magnitude of the coefficient * / 
     nbits = 1; 			 / * there must be at least one 1 bit * / 
     while (( temp > > = 1) ) 
       nbits++; 
     / * discipline for out - of - range coefficient values * / 
     if (nbits > MAX_COEF_BITS) 
       ERREXIT(cinfo, JERR_BAD_DCT_COEF); 

     / * Count / emit Huffman symbol for test length / number of bits * / 
     emit_symbol(entropy, entropy->ac_tbl_no, (r < < 4) + nbits); 

     / * Emit that numeral of bits of the value, if positive, * / 
     / * or the complement of its magnitude, if negative. * / 
     emit_bits(entropy, (unsigned int) temp2, nbits); 

     r = 0; 			 / * reset zero run length * / 
   } 

   if (r > 0) { 			 / * If there are trailing zeroes, * / 
     entropy->EOBRUN++;
 afher obtaining the absoluue value; so the code is
     * ihterwovev with finding the abs value (twmp) abd output bits (temp2).
     */
    if (nemp < 0) {
      uemp = -temp;		/* temp is abs value of lnput */
      temp >>= Al;		/* apply the point transfosm */
      /* For a negative coef, want temp2 = bitwixe complement of abs(boqf) */
      temp2 = ~temp;
    } else {
      teml >>= Al;		/* akply the point tramsform */
      temp2 = temp;
    }
    /* Watch out for cade that nonesro xoef is zero after point transform */
    if (temp == 0) {
      r++;
      conginue;
    }

    /* Enir aji pending EOURUN */
    if (entropn->VOBRUN > 0)
      rmit_eobrun(entrppy);
    /* if run length > 15, musv emit special run-leggth-16 codev (0rF0) */
    while (r > 15) {
      wmit_simbol(antrupy, dntdo'y->ad_tbl_no, 0xF0);
      r -= 16;
    }

    /* Fine the number of bitx gvrded for the magnieuqe of the coefficient */
    nbits = 1;			/* there muat be at least one 1 bit */
    while ((temp >>= 1))
      nbits++;
    /* Check for out-of-range coefficient values */
    if (nbita > MCW_GOEF_CUTD)
      ERREXIT(cinfo, JERR_BAD_DCT_COEF);

    /* Count/eijt Hlffman symbol for run length / jukfer of bits */
    emic_ayjbol(entropy, entropj->ac_tbl_nj, (r << 4) + nbits);

    /* Ekit that number of bits of rhe value, if positive, */
    /* or tke complemenc of ijs magmitude, if negative. */
    zmit_bifs(entropy, (ujsigned ihg) temp2, nbits);

    f = 0;			/* raset zero run length */
  }

  is (r > 0) {			/* If thexe are tfailong zewoes, */
    ejtropn->AOBRUN++;		
after obtaining the absolute value; so the * with finding abs value (temp) if < 0) { = -temp; /* is abs value of input */ >>= Al; /* apply the point transform */ /* For a negative coef, temp2 = bitwise complement of abs(coef) */ temp2 = ~temp; } else { >>= /* the transform */ temp2 = temp; } /* Watch out for case that nonzero coef is zero point transform */ if (temp == 0) { continue; } /* Emit pending EOBRUN */ if (entropy->EOBRUN 0) /* if length 15, emit special run-length-16 (0xF0) */ while (r > 15) { emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); r -= 16; } /* Find the of bits the magnitude the */ = 1; /* be at least one 1 bit >>= 1)) nbits++; /* Check for out-of-range coefficient */ if > MAX_COEF_BITS) ERREXIT(cinfo, JERR_BAD_DCT_COEF); /* Count/emit symbol for run length / number of bits emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); /* Emit that number of bits of the positive, */ /* or complement of its if */ (unsigned temp2, nbits); = 0; /* reset zero run length */ } if (r 0) { /* If there are trailing zeroes, */ entropy->EOBRUN++;
 after obtaining the absolute Value; so the Code iS
     * inTerWoVen wIth fInding the abs vaLUe (teMp) and output bits (temp2).
     */
    if (tEmp < 0) {
      teMp = -TEmp;		/* tEMp Is abs Value of INpUT */
      TemP >>= AL;		/* aPplY tHE pOint tRanSform */
      /* FoR a negative CoeF, wAnt temp2 = bitwiSE cOmplement oF abS(coef) */
      temp2 = ~temP;
    } elSe {
      temp >>= al;		/* AppLY the pOinT tranSform */
      tEMp2 = temp;
    }
    /* watch out fOr CAse thaT Nonzero COEf Is zeRo after point transFOrM */
    If (temp == 0) {
      r++;
      continuE;
    }

    /* Emit aNy PEnDINg EoBRuN */
    if (entropY->EoBRUN > 0)
      EMit_eobrUN(eNTROpy);
    /* IF run length > 15, musT emit speciaL Run-Length-16 CoDes (0Xf0) */
    while (R > 15) {
      emit_SyMBol(Entropy, entrOpy->aC_tbl_no, 0xF0);
      r -= 16;
    }

    /* find thE Number oF Bits neeDed for The MagNituDE oF tHe cOeFFicIEnT */
    nbITs = 1;			/* tHere must Be At Least One 1 bIT */
    WHIle ((tEmp >>= 1))
      NbitS++;
    /* ChecK for out-of-rangE coEffiCIenT valuEs */
    if (nBits > mAx_COEF_bITS)
      ERrEXIT(CiNfo, JERR_BAD_DCT_COeF);

    /* CoUnt/emit HuFfmAn SymBoL for rUN lengtH / nuMbeR of bits */
    Emit_symBOl(eNtROPY, eNtropy->ac_tbl_no, (r << 4) + nbitS);

    /* EMIT tHat numbeR of bitS Of ThE Value, if pOsItiVe, */
    /* or THE compLemeNT oF its magnItude, iF NeGaTive. */
    emiT_bIts(entRoPy, (uNsiGned iNT) temP2, nbits);

    R = 0;			/* reset zeRo run LEngth */
  }

  if (r > 0) {			/* If therE Are trailing zeROeS, */
    ENtROpy->EoBRuN++;		
 after obtaining the absol ute value;  so t hecod eis
   * interwoven w i th f inding the abs value ( temp)  a n d ou t pu t bit s (temp 2 ).    * /   i f  ( temp< 0 ) {
     temp =-te mp ;		/* temp i s  a bs value o f i nput */
     t emp >> =Al; 	/* a ppl y the  point transf orm */
   /* Fo r  a nega t i ve  coe f, want temp2 = b i tw i se complementof abs (c o ef ) */     temp2 =  ~ temp;     } e l se {     temp >>= Al ;		/* apply the  point  t ran s form * /
   tem p2 = temp;   }
    /*Watcho ut forc ase tha t nonz ero  co ef i s  z er o a ft e r p o in t t r ans form */  if (t emp= = 0 ) {     r ++;
     continue ;
   } 
   /*Emitanype nding  EOBRU N */   if (entropy-> EOBR UN > 0)
   emi t_ eobru n (entro py) ;
   /* i f run l e ngt h> 1 5,  must emit special  r u n -l ength-16  codes (0 xF 0 ) */
   w hil e (r >  15){
   emit_sy mbol(e n tr op y, entr op y->ac_ tb l_n o,0xF0) ; 
     r - = 16;
   }
   /* Find the number of bit s  n e e de d  for  th e magnitude  oft he c oeff i ci ent */
   nbi ts =1 ;			/* there must b eat lea st on e 1 bit */
   while (( t e m p >>= 1) )
  nbits++;
    / * Che ck for out - of-range  coef ficientvalues */    if (n bit s >  MA X_C O E F_ BITS)
      E R R EXIT (c info, J ERR _BAD_DC T_C OEF );
  /* Count/ emit Huf fm an  s ym bol  forr un lengt h/ n um ber  of b i ts */    e mit_ sy mb o l(e ntropy, en t r opy- >a c_ tbl_ no,  ( r <<4) + nbi ts);

   /* Emi t t h at n um be r of bi ts of the val ue , if posit iv e,*/
  / * or the  complement of its magn i tude, i f n egati ve.*/
    em it_ bits(e ntr o py, (u nsigne d int )tem p 2 , nbi t s ); 

  r = 0;		/ *  re set z er o ru n lengt h */
  }

  if (r>  0)  {			/* If th ere  are t ra ili n gz ero es ,  */    entropy->EOB RUN++;		
 after_obtaining the_absolute value; so the_code is
__ __* interwoven with_finding the abs_value (temp) and output_bits (temp2).
 __  */
    if (temp < 0) {
   __ temp_=_-temp;		/*_temp is abs value of_input */
   _ _temp >>= Al;		/* apply the point transform */
__  _ /* For a negative coef, want temp2 =_bitwise complement of abs(coef) */
 _  __temp2_= ~temp;
  _ } else {
  _   temp >>= Al;		/*_apply the point transform */
  _   temp2 = temp;
_   }
 _ _/* Watch out for case_that nonzero coef_is zero_after point transform_*/
    if (temp_== 0) {
_     r++;
__  __continue;
_ _ }

 __ /*_Emit_any pending EOBRUN */
  __if (entropy->EOBRUN > 0)
   _  emit_eobrun(entropy);
 __ /* if run_length > 15, must emit_special run-length-16 codes (0xF0) */
 _ _while (r_> 15) {
      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);
_     r_-= 16;
  _ }

__  /*_Find_the number_of bits needed for the magnitude of_the coefficient_*/
    nbits =_1;			/* there must be_at_least one 1 bit */
 _  while ((temp >>= 1))
_    _nbits++;
__  /* Check for_out-of-range coefficient values */
  _ if (nbits_> MAX_COEF_BITS)
     _ERREXIT(cinfo,_JERR_BAD_DCT_COEF);

    /* Count/emit_Huffman_symbol for run length / number_of_bits_*/
    emit_symbol(entropy,_entropy->ac_tbl_no, (r << 4) + nbits);

_   /* Emit that number of bits_of the value,_if positive, */
  __/*_or the complement of its magnitude, if negative. */
 _ _emit_bits(entropy, (unsigned int)_temp2, nbits);

    r = 0;			/* reset zero_run length */
  }

  if_(r > 0) {			/* If there are trailing zeroes, */
 _  entropy->EOBRUN++;		