bool32 i0
bool32 i1
bool32 i2
bool32 i3
int32.positive o0
int result;
result = 0;
if (inlet_i0 != 0) {
result = result + 1;
}
if (inlet_i1 != 0) {
result = result + 2;
}
if (inlet_i2 != 0) {
result = result + 4;
}
if (inlet_i3 != 0) {
result = result + 8;
}
outlet_o0 = result;