bool32.rising trigger
frac32.positive envelope output
frac32.s.map.klineartime.exp d
frac32.s.map curveD
int8_t stage;
int ntrig;
int32_t val;
ntrig = 0;
val = 0;
int32_t crv1;
int32_t crv2;
int32_t t;
crv2 = param_curveD;
MTOF(-(param_d << 1) + ___SMMUL(val - (1 << 30), -crv2 << 2), t);
val = __USAT(val - (t >> 3), 31);
if ((inlet_trig > 0) && !ntrig) {
val = (1 << 31);
ntrig = 1;
stage = 1;
} else if (!(inlet_trig > 0)) {
ntrig = 0;
}
outlet_env = val >> 4;