None
bool32 o1
bool32 o2
bool32 o3
bool32 o4
int32.positive output
bool32.mom b1
bool32.mom b2
bool32.mom b3
bool32.mom b4
bool32.tgl indexlatch
int index;
index = 0;
outlet_o1 = param_b1;
outlet_o2 = param_b2;
outlet_o3 = param_b3;
outlet_o4 = param_b4;
if (param_b1)
index = 1;
else if (param_b2)
index = 2;
else if (param_b3)
index = 3;
else if (param_b4)
index = 4;
else if (!param_indexlatch)
index = 0;
outlet_out = index;