frac32buffer input
frac32 cutoff frequency
frac32 res
bool32 mode
frac32buffer output
frac32.s.map res
bool32.tgl mode
frac32.s.map.pitch cut
int32_t val;
int32_t vol;
int32_t prev;
int32_t prav;
int32_t priv;
int i;
int32_t res;
int32_t HP;
int32_t sat;
val = 0;
int32_t f;
MTOF(param_cut + (inlet_cut << 1), f);
int mode = (param_mode + inlet_mode) & 1;
int32_t in = inlet_in + sat;
val = ___SMMLA(((in + prev >> 1) - val) << 1, f >> 1, val);
val = ___SMMLA((in - val) << 1, f >> 1, val);
vol = ___SMMLA(((val + prev >> 1) - vol) << 1, f >> 1, vol);
vol = ___SMMLA((val - vol) << 1, f >> 1, vol);
outlet_out = val;
int32_t temp;
if (mode == 0) {
temp = vol;
}
if (mode == 1) {
temp = ___SMMUL(vol << 3, vol << 3);
}
res = ___SMMLA(((temp + priv >> 1) - res) << 1, f >> 1, res);
res = ___SMMLA(((temp)-res) << 1, f >> 1, res);
sat = __SSAT(___SMMUL(temp - res << 4, (param_res + inlet_res) << 4), 27);
prev = inlet_in;
prav = val;
priv = temp;