bool32 trig
frac32.bipolar i1
frac32.bipolar i2
frac32.bipolar o
frac32.s.map prob
int32_t val;
int ntrig;
val = (int32_t)(GenerateRandomNumber()) >> 4;
ntrig = 0;
if ((inlet_trig > 0) && !ntrig) {
val = (int32_t)(GenerateRandomNumber()) >> 4;
ntrig = 1;
} else if (!(inlet_trig > 0))
ntrig = 0;
outlet_o = val >= param_prob ? inlet_i2 : inlet_i1;