frac32 input
frac32buffer out
frac32.s.map.kpitch a
frac32.s.map.kpitch d
frac32.u.map h
frac32.u.map.gain s
frac32.s.map r
int32_t val;
int32_t v30 = 1 << 30;
int32_t v29 = 1 << 28;
int32_t hold;
bool trg;
int32_t vel;
val = 0;
int32_t H;
MTOFEXTENDED(-param_h - param_a, H)
hold = __USAT(hold - (H >> 7), 31);
vel -= vel >> 14;
if ((inlet_trg > 0) && !trg) {
trg = 1;
hold = v30;
vel = __USAT((inlet_trg >> 1) + vel, 27);
// vel=inlet_trg;
} else if (inlet_trg == 0) {
trg = 0;
}
int32_t a;
MTOF(-param_a, a);
a = a >> 7;
int32_t d;
MTOF(-param_d, d);
d = d >> 7;
int32_t r;
MTOF(-param_r, r);
r = r >> 7;
int32_t tmp =
(hold > 0 ? vel
: ___SMMUL(vel << 2, ___SMMUL(inlet_trg << 3, param_s) << 2));
val = ___SMMLA((tmp - val) << 1, tmp > val ? a : inlet_trg > 0 ? d : r, val);
outlet_out = val;