int32 i1
int32 o
frac32.s.map prob
int32 max
int ptrig;
int32_t pval;
int32_t val;
int ntrig;
int32_t vali;
int itrig;
val = (int32_t)(GenerateRandomNumber()) >> 4;
ntrig = 0;
ptrig = 0;
pval = 0;
if ((pval != inlet_i1) & (!ptrig)) {
pval = inlet_i1;
ptrig = 1;
} else {
ptrig = 0;
}
if ((ptrig > 0) && !ntrig) {
val = (int32_t)(GenerateRandomNumber()) >> 4;
ntrig = 1;
} else if (!(ptrig > 0))
ntrig = 0;
outlet_o = (param_prob > val) ? vali : inlet_i1;
if ((ptrig > 0) && !itrig) {
if (param_max)
vali = (int32_t)(GenerateRandomNumber() % (param_max));
else
vali = 0;
}