IIR Lattice Filter in C programming
assume all of this (except k[0] and the output y[]) gets defined.  states g[] are initialized to zero.
int N, NUM_SAMPLES;
float g[N+1], v[N+1], k[N+1];
float x[NUM_SAMPLES], y[NUM_SAMPLES];

then the sample processing would look like this:
int n = 0;
while (n &lt; NUM_SAMPLES)
    {
    float f = x[n];
    
    float acc = 0.0;
    int m = N;
    while (m &gt; 0)
        {
        f -= k[m]*g[m-1];
        g[m] = k[m]*f + g[m-1];
        acc += v[m]*g[m];
        m--;
        }
    g[0] = f;
    acc += v[0]*g[0];
    
    y[n] = acc;
    n++;
    }

that is, i think, the essential C code.