float e0;
spx_word32_t e0;
void open_loop_nbest_pitch(spx_sig_t *sw, int start, int end, int len, int *pitch, float *gain, int N, char *stack){   int i,j,k;   spx_word32_t *best_score;   float e0;   spx_word32_t *corr, *energy;   spx_word32_t *score;   spx_word16_t *swn;   best_score = PUSH(stack,N, spx_word32_t);   corr = PUSH(stack,end-start+1, spx_word32_t);   energy = PUSH(stack,end-start+2, spx_word32_t);   score = PUSH(stack,end-start+1, spx_word32_t);#ifdef FIXED_POINT   swn = PUSH(stack, end+len, spx_word16_t);   normalize16(sw-end, swn, 16384, end+len);   swn += end;#else   swn = sw;#endif   for (i=0;i<N;i++)   {        best_score[i]=-1;        gain[i]=0;   }   energy[0]=inner_prod(swn-start, swn-start, len);   e0=inner_prod(swn, swn, len);   for (i=start;i<=end;i++)   {      /* Update energy for next pitch*/      energy[i-start+1] = energy[i-start] + SHR(MULT16_16(swn[-i-1],swn[-i-1]),6) - SHR(MULT16_16(swn[-i+len-1],swn[-i+len-1]),6);   }   for (i=start;i<=end;i++)   {      corr[i-start]=0;      score[i-start]=0;   }   for (i=start;i<=end;i++)   {      /* Compute correlation*/      corr[i-start]=inner_prod(swn, swn-i, len);   }#ifdef FIXED_POINT   {      spx_word16_t *corr16;      spx_word16_t *ener16;      corr16 = PUSH(stack, end-start+1, spx_word16_t);      ener16 = PUSH(stack, end-start+1, spx_word16_t);      normalize16(corr, corr16, 16384, end-start+1);      normalize16(energy, ener16, 16384, end-start+1);      for (i=start;i<=end;i++)      {         spx_word16_t g;         spx_word32_t tmp;         tmp = corr16[i-start];         if (SHR(corr16[i-start],4)>ener16[i-start])            tmp = SHL((spx_word32_t)ener16[i-start],14);         else if (-SHR(corr16[i-start],4)>ener16[i-start])            tmp = -SHL((spx_word32_t)ener16[i-start],14);         else            tmp = SHL(tmp,10);         g = DIV32_16(tmp, 8+ener16[i-start]);         score[i-start] = MULT16_16(corr16[i-start],g);      }   }#else   for (i=start;i<=end;i++)   {      float g = corr[i-start]/(1+energy[i-start]);      if (g>16)         g = 16;      else if (g<-16)         g = -16;      score[i-start] = g*corr[i-start];   }#endif   for (i=start;i<=end;i++)   {      if (score[i-start]>best_score[N-1])      {         float g1, g;         g1 = corr[i-start]/(energy[i-start]+10.);         g = sqrt(g1*corr[i-start]/(e0+10.));         if (g>g1)            g=g1;         if (g<0)            g=0;         for (j=0;j<N;j++)         {            if (score[i-start] > best_score[j])            {               for (k=N-1;k>j;k--)               {                  best_score[k]=best_score[k-1];                  pitch[k]=pitch[k-1];                  gain[k] = gain[k-1];               }               best_score[j]=score[i-start];               pitch[j]=i;               gain[j]=g;               break;            }         }      }   }}