node {
// Internal state variables defined at this level persists across evaluations
void evaluate(Context ctx) {
uint32_t count = getValue<output_NUMB>(ctx);
uint8_t inx = getValue<input_inx>(ctx);
uint8_t in0 = getValue<input_n>(ctx);
uint8_t in1 = (ctx, pow( 2, in0));
uint8_t in3 = 128;
uint32_t val = count;
uint8_t byt3= (val >> 24);
uint8_t byt2= (val >> 16);
uint8_t byt1= (val >> 8);
uint8_t byt0 = val;
uint8_t charData[4]={byt0,byt1, byt2, byt3,};
emitValue<output_first>(ctx, 0x00000001 & charData[0]);
emitValue<output_inxByte>(ctx, charData[inx]);
emitValue<output_nBit>(ctx, in1 & charData[inx]);
emitValue<output_transfer>(ctx, in3 & charData[3]);
uint8_t transf = getValue<output_transfer>(ctx);
if (isInputDirty<input_RST>(ctx))
count = 0;
else if (isInputDirty<input_INC>(ctx))
count >>= (transf);
count <<= 1;
uint32_t cond = (count >= 0xFFFFFFFF);
uint32_t trueVal = count;
uint32_t falseVal =(count += getValue<input_BIT>(ctx));
emitValue<output_NUMB>(ctx, cond ? trueVal : falseVal);
emitValue<output_UPD>(ctx, 1);
}
}