frac32buffer in1
frac32buffer in2
frac32buffer in3
frac32buffer out
bool32.tgl GAIN
frac32.u.map.gain16 gain1
frac32.u.map.gain16 gain2
frac32.u.map.gain16 gain3
frac32.u.map.gain symmetry
frac32.u.map.gain overall
int32_t val[4];
int32_t v27 = 1 << 27;
int32_t v30 = 1 << 30;
int32_t hp[4];
int32_t symmetry;
int32_t clamp(int32_t in, int I) {
hp[I] += val[I] - hp[I] >> 10;
val[I] -= hp[I];
int32_t damp;
int32_t ABS = __SSAT(val[I] + val[3] >> 1, 28);
ABS = ___SMMUL(ABS, ABS) << 5;
ABS = ___SMMUL(ABS, ABS) << 5;
ABS = ___SMMUL(ABS, ABS) << 5;
MTOF(v27 - (ABS << 2) -
(val[I] < 0 ? ___SMMUL(__USAT(ABS, 24), symmetry) << 6 : 0) *
(I > 2 ? -1 : 1),
damp)
damp = (val[I] > 0 ? val[I] : -val[I]) > (in > 0 ? in : -in)
? (uint32_t)v30 + damp >> 1
: damp;
val[I] += ___SMMUL((in - val[I]), damp) << 1;
}
symmetry = param_symmetry;
clamp(__SSAT(___SMMUL(__SSAT(inlet_in1, 28) << 1, param_gain1), 28), 0);
clamp(__SSAT(___SMMUL(__SSAT(inlet_in2, 28) << 1, param_gain2), 28), 1);
clamp(__SSAT(___SMMUL(__SSAT(inlet_in3, 28) << 1, param_gain3), 28), 2);
clamp(__SSAT(___SMMUL(__SSAT(val[0] + val[1] + val[2], 28) << 1, param_overall),
28),
3);
outlet_out = val[3] >> 1 - param_GAIN;