frac32buffer input
frac32 pitch
frac32 up
frac32 down
frac32 P
frac32 N
frac32buffer output
frac32.s.map.pitch pitch
frac32.s.map up
frac32.s.map down
frac32.s.map P
frac32.s.map N
frac32.u.map.squaregain res
frac32.u.map.kdecaytime.reverse smooth
int32_t val;
int32_t vbl;
bool trg;
int32_t P;
int32_t N;
int32_t ofs;
int32_t hp;
int32_t tmp;
int32_t OFS;
int32_t Ofs;
val = 0;
int32_t pitch = __SSAT(param_pitch + inlet_pitch, 28);
OFS += ___SMMUL(param_smooth, ofs - OFS) << 1;
if ((inlet_in > val) && !trg) {
trg = 1;
ofs = param_P + inlet_P;
Ofs = OFS;
} else if ((inlet_in < val) && trg) {
trg = 0;
ofs = param_N + inlet_N;
Ofs = OFS;
}
Ofs -= ___SMMUL(Ofs, param_smooth) << 1;
int32_t f1;
int32_t f2;
MTOF(__SSAT(pitch + param_up + inlet_up + Ofs, 29), f1);
MTOF(__SSAT(pitch + param_down + inlet_down + Ofs, 29), f2);
if (inlet_in > val) {
val = ___SMMLA((__SSAT(inlet_in + ___SMMUL(param_res, -tmp << 1), 28) - val)
<< 1,
f1, val);
} else {
val = ___SMMLA((__SSAT(inlet_in + ___SMMUL(param_res, -tmp << 1), 28) - val)
<< 1,
f2, val);
}
hp += (val - hp) >> 9;
tmp = outlet_out = val - hp;
if (tmp > vbl) {
vbl = ___SMMLA((tmp - vbl) << 1, f1, vbl);
} else {
vbl = ___SMMLA((tmp - vbl) << 1, f2, vbl);
}
tmp = -__SSAT(tmp - vbl, 26) << 3;