frac32 input 0
frac32 input 1
frac32 input 2
frac32 input 3
frac32 i4
frac32 i5
frac32 i6
frac32 i7
frac32 output
frac32.u.map select
int32 jump
int32 exp
int32_t a1;
int32_t a2;
int32_t x;
int32_t y;
int32_t selectbase;
int32_t select1;
int32_t select2;
selectbase = ((param_select >> 24));
select1 =
((selectbase * param_jump) + (selectbase * selectbase * param_exp)) & 7;
select2 = (((selectbase + 1) * param_jump) +
((selectbase + 1) * (selectbase + 1) * param_exp)) &
7;
// select1=selectbase&7;
// select2=(selectbase+1)&7;
switch (int(select1) > 0 ? select1 : 0) {
case 0:
a1 = inlet_i0;
break;
case 1:
a1 = inlet_i1;
break;
case 2:
a1 = inlet_i2;
break;
case 3:
a1 = inlet_i3;
break;
case 4:
a1 = inlet_i4;
break;
case 5:
a1 = inlet_i5;
break;
case 6:
a1 = inlet_i6;
break;
case 7:
a1 = inlet_i7;
break;
default:
a1 = inlet_i0;
break;
}
switch (int(select2) > 0 ? select2 : 0) {
case 0:
a2 = inlet_i0;
break;
case 1:
a2 = inlet_i1;
break;
case 2:
a2 = inlet_i2;
break;
case 3:
a2 = inlet_i3;
break;
case 4:
a2 = inlet_i4;
break;
case 5:
a2 = inlet_i5;
break;
case 6:
a2 = inlet_i6;
break;
case 7:
a2 = inlet_i7;
break;
default:
a2 = inlet_i0;
break;
}
x = param_select - ((param_select >> 24) << 24);
y = (1 << 24) - x;
outlet_out = ___SMMUL(y << 4, a1 << 4) + ___SMMUL(x << 4, a2 << 4);