#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-compile-tmp/casterr.imp"
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //      2  
                                                                //      3  %integerfunction hash addr(%string (31) name)
#line 3 "regression-compile-tmp/casterr.imp"
int HASHADDR( _imp_string /*%string(31)*/ NAME )
#line 3 "regression-compile-tmp/casterr.imp"
{
                                                                //      4    %constinteger hash table size = 1023
                                                                //      5    %integer hash index = 0; %integer char
#line 5 "regression-compile-tmp/casterr.imp"
int HASHINDEX;
#line 5 "regression-compile-tmp/casterr.imp"
HASHINDEX = 0;
#line 5 "regression-compile-tmp/casterr.imp"
int CHAR;
                                                                //      6    %for char = 1,1,LENGTH (name) %cycle
#line 6 "regression-compile-tmp/casterr.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = *_imp_LENGTH(&NAME); CHAR = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle CHAR = 1, 1, *_imp_LENGTH(&NAME)");
CHAR -= _increment; _control -= _increment;
L_0002:;
if (CHAR == _final) goto L_0003;
CHAR += _increment; _control += _increment;
if (CHAR != _control) _imp_signal(4,2,0,"Corrupt control variable CHAR"); /* FOR loop control variable corrupted */
}
                                                                //      7      hash index =  hash index<<1 !! CHARNO(name,char)
#line 7 "regression-compile-tmp/casterr.imp"
HASHINDEX = ((((HASHINDEX) << (1))) ^ (*_imp_CHARNO(&NAME, CHAR)));
                                                                //      8    %repeat
#line 8 "regression-compile-tmp/casterr.imp"
goto L_0002;
#line 8 "regression-compile-tmp/casterr.imp"
L_0003:;
                                                                //      9    %result =  hash index & hash table size
#line 9 "regression-compile-tmp/casterr.imp"
/* Remove %on %event handler here if present for this block */
return ((HASHINDEX) & (1023));
                                                                //     10  %end  {of  hash code generated from string}
#line 10 "regression-compile-tmp/casterr.imp"
} // End of block HASHADDR at level 2
                                                                //     11  
                                                                //     12  %endofprogram
#line 12 "regression-compile-tmp/casterr.imp"
/* Remove %on %event handler here if present for this block */
return 0;
} // End of block _imp_main at level 1
#line 12 "regression-compile-tmp/casterr.imp"
// End of file
