#include <perms.h>

                                                                //      1  %EXTERNALROUTINE DRAUGHTS(%STRING(12) S)
#line 1 "regression-bugs-tmp/draft4.imp"
void DRAUGHTS( _imp_string /*%string(12)*/ S )
#line 1 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //      2  !%EXTERNALROUTINESPEC CPULIMIT (%STRING(255) S)
                                                                //      3  !%EXTERNALROUTINESPEC PROMPT(%STRING(15) S)
                                                                //      4  %OWNINTEGER MOB WT = 6
_imp_current_line = 4; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 4 "regression-bugs-tmp/draft4.imp"
static int MOBWT = 6;
                                                                //      5  %CONSTINTEGER TRUE =1, FALSE = 0
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/draft4.imp";
                                                                //      6  
                                                                //      7  %OWNINTEGER BACK WT = 4
_imp_current_line = 7; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 7 "regression-bugs-tmp/draft4.imp"
static int BACKWT = 4;
                                                                //      8  %OWNINTEGER CENT WT = 4
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 8 "regression-bugs-tmp/draft4.imp"
static int CENTWT = 4;
                                                                //      9  %OWNINTEGER ADV1 WT = 450
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 9 "regression-bugs-tmp/draft4.imp"
static int ADV1WT = 450;
                                                                //     10  %OWNINTEGER ADV2 WT = 50
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 10 "regression-bugs-tmp/draft4.imp"
static int ADV2WT = 50;
                                                                //     11  %OWNINTEGER CRAMP WT = 6
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 11 "regression-bugs-tmp/draft4.imp"
static int CRAMPWT = 6;
                                                                //     12  %OWNINTEGER MON = 'Q'
_imp_current_line = 12; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 12 "regression-bugs-tmp/draft4.imp"
static int MON = 81;
                                                                //     13  %OWNINTEGER A WIN = 0
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 13 "regression-bugs-tmp/draft4.imp"
static int AWIN = 0;
                                                                //     14  %OWNINTEGER SEARCH LIMIT = 3
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 14 "regression-bugs-tmp/draft4.imp"
static int SEARCHLIMIT = 3;
                                                                //     15  %OWNINTEGER CROWN = 1800
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 15 "regression-bugs-tmp/draft4.imp"
static int CROWN = 1800;
                                                                //     16  %OWNINTEGERARRAY BACK1(1:5) = 77, 75, 73, 71, 64
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 16 "regression-bugs-tmp/draft4.imp"
static int BACK1[5] = { 77, 75, 73, 71, 64,  };
                                                                //     17  %OWNINTEGERARRAY BACK2(1:5) =  0,  2,  4,  6, 13
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 17 "regression-bugs-tmp/draft4.imp"
static int BACK2[5] = { 0, 2, 4, 6, 13,  };
                                                                //     18  %OWNINTEGERARRAY CENTSQ(0:7) = 51, 53, 42, 44, 33, 35, 24, 26
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 18 "regression-bugs-tmp/draft4.imp"
static int CENTSQ[8] = { 51, 53, 42, 44, 33, 35, 24, 26,  };
                                                                //     19  %OWNINTEGERARRAY MOVE(0:7) =  9, 18, 11, 22, -9,-18,-11,-22
_imp_current_line = 19; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 19 "regression-bugs-tmp/draft4.imp"
static int MOVE[8] = { 9, 18, 11, 22, (-9), (-18), (-11), (-22),  };
                                                                //     20  %OWNINTEGERARRAY PLAYER1(-1:26) =     'W',    1,
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 20 "regression-bugs-tmp/draft4.imp"
static int PLAYER1[28] = { 87, 1, 77, 75, 73, 71, 64, 66, 62, 60, 57, 55, 53, 51, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 12, 0,  };
                                                                //     21     77,   75,   73,   71,   64,   66,   62,   60,   57,   55,   53,   51,
                                                                //     22   1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
                                                                //     23     12,    0
                                                                //     24  %OWNINTEGERARRAY PLAYER2(-1:26) =     'B',    2,
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 24 "regression-bugs-tmp/draft4.imp"
static int PLAYER2[28] = { 66, 2, 0, 2, 4, 6, 13, 11, 15, 17, 20, 22, 24, 26, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 12, 0,  };
                                                                //     25      0,    2,    4,    6,   13,   11,   15,   17,   20,   22,   24,   26,
                                                                //     26   1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
                                                                //     27     12,    0
                                                                //     28  %OWNINTEGERARRAY BOARD(-1:78) = %C
_imp_current_line = 28; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 28 "regression-bugs-tmp/draft4.imp"
static int BOARD[80] = { [0 ... 79] = 32 };
                                                                //     29    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     30    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     31    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     32    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     33    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     34    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     35    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
                                                                //     36    ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '
                                                                //     37  ! This program compiles and runs under i2c if the following auto arrays are converted into own arrays.
                                                                //     38  ! As soon as auto arrays are handled properly this program should run without modification.
                                                                //     39  %INTEGERARRAY MIN(1:12)
_imp_current_line = 39; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 39 "regression-bugs-tmp/draft4.imp"
int MIN[12];
                                                                //     40  %INTEGERARRAY MAX(1:12)
_imp_current_line = 40; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 40 "regression-bugs-tmp/draft4.imp"
int MAX[12];
                                                                //     41  %INTEGERARRAY REPLY(1:9)
_imp_current_line = 41; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 41 "regression-bugs-tmp/draft4.imp"
int REPLY[9];
                                                                //     42  %INTEGERARRAY COMP(-1:26)
_imp_current_line = 42; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 42 "regression-bugs-tmp/draft4.imp"
int COMP[28];
                                                                //     43  %INTEGERARRAY OPP(-1:26)
_imp_current_line = 43; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 43 "regression-bugs-tmp/draft4.imp"
int OPP[28];
                                                                //     44  %INTEGERNAME COMPNUM, OPPNUM
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 44 "regression-bugs-tmp/draft4.imp"
int /*name*/*COMPNUM;
#line 44 "regression-bugs-tmp/draft4.imp"
int /*name*/*OPPNUM;
                                                                //     45  %INTEGERARRAY PSTACK(1:12);            ! piece position take stack
_imp_current_line = 45; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 45 "regression-bugs-tmp/draft4.imp"
int PSTACK[12];
                                                                //     46  %INTEGERARRAY TSTACK(1:12);            ! piece type stack
_imp_current_line = 46; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 46 "regression-bugs-tmp/draft4.imp"
int TSTACK[12];
                                                                //     47  %INTEGERARRAY NSTACK(1:12);            ! piece number stack
_imp_current_line = 47; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 47 "regression-bugs-tmp/draft4.imp"
int NSTACK[12];
                                                                //     48  %OWNINTEGER SP;                        ! stack pointer
_imp_current_line = 48; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 48 "regression-bugs-tmp/draft4.imp"
static int SP;
                                                                //     49  %OWNINTEGER ME = 1
_imp_current_line = 49; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 49 "regression-bugs-tmp/draft4.imp"
static int ME = 1;
                                                                //     50  %OWNINTEGER ONE = 1
_imp_current_line = 50; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 50 "regression-bugs-tmp/draft4.imp"
static int ONE = 1;
                                                                //     51  %OWNINTEGER TWO = 2
_imp_current_line = 51; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 51 "regression-bugs-tmp/draft4.imp"
static int TWO = 2;
                                                                //     52  %OWNINTEGER THREE = 3
_imp_current_line = 52; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 52 "regression-bugs-tmp/draft4.imp"
static int THREE = 3;
                                                                //     53  %INTEGER BEST PIECE, BEST MOVE, BEST TAKE
_imp_current_line = 53; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 53 "regression-bugs-tmp/draft4.imp"
int BESTPIECE;
#line 53 "regression-bugs-tmp/draft4.imp"
int BESTMOVE;
#line 53 "regression-bugs-tmp/draft4.imp"
int BESTTAKE;
                                                                //     54  %INTEGER VALUEB, I, P, M, PIECE, JMAN, JUMP, DIF, MODIF, MORE
_imp_current_line = 54; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 54 "regression-bugs-tmp/draft4.imp"
int VALUEB;
#line 54 "regression-bugs-tmp/draft4.imp"
int I;
#line 54 "regression-bugs-tmp/draft4.imp"
int P;
#line 54 "regression-bugs-tmp/draft4.imp"
int M;
#line 54 "regression-bugs-tmp/draft4.imp"
int PIECE;
#line 54 "regression-bugs-tmp/draft4.imp"
int JMAN;
#line 54 "regression-bugs-tmp/draft4.imp"
int JUMP;
#line 54 "regression-bugs-tmp/draft4.imp"
int DIF;
#line 54 "regression-bugs-tmp/draft4.imp"
int MODIF;
#line 54 "regression-bugs-tmp/draft4.imp"
int MORE;
                                                                //     55  %INTEGER OLDPOS, NEWPOS, LASTPOS, COMPOS
_imp_current_line = 55; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 55 "regression-bugs-tmp/draft4.imp"
int OLDPOS;
#line 55 "regression-bugs-tmp/draft4.imp"
int NEWPOS;
#line 55 "regression-bugs-tmp/draft4.imp"
int LASTPOS;
#line 55 "regression-bugs-tmp/draft4.imp"
int COMPOS;
                                                                //     56  %INTEGER NODES, PLY NUMBER, EXPECTED MOVE
_imp_current_line = 56; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 56 "regression-bugs-tmp/draft4.imp"
int NODES;
#line 56 "regression-bugs-tmp/draft4.imp"
int PLYNUMBER;
#line 56 "regression-bugs-tmp/draft4.imp"
int EXPECTEDMOVE;
                                                                //     57  %INTEGER A,B,C,POS
_imp_current_line = 57; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 57 "regression-bugs-tmp/draft4.imp"
int A;
#line 57 "regression-bugs-tmp/draft4.imp"
int B;
#line 57 "regression-bugs-tmp/draft4.imp"
int C;
#line 57 "regression-bugs-tmp/draft4.imp"
int POS;
                                                                //     58  
                                                                //     59  !*   P L A Y I N G   F U N C T I O N S
                                                                //     60  
                                                                //     61     %INTEGERFN VALID POS(%INTEGER POS)
_imp_current_line = 61; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 61 "regression-bugs-tmp/draft4.imp"
int VALIDPOS( int POS )
#line 61 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //     62     %INTEGER I
_imp_current_line = 62; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 62 "regression-bugs-tmp/draft4.imp"
int I;
                                                                //     63        ! on the board?
                                                                //     64        I = POS>>1
_imp_current_line = 64; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 64 "regression-bugs-tmp/draft4.imp"
I = (int)((((unsigned int)(POS)) >> (1)));
                                                                //     65        %RESULT = -1 %IF POS < 0 %OR POS > 77 %C
_imp_current_line = 65; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 65 "regression-bugs-tmp/draft4.imp"
if (((POS) < (0))) goto L_0002;
#line 65 "regression-bugs-tmp/draft4.imp"
if (((POS) > (77))) goto L_0002;
#line 65 "regression-bugs-tmp/draft4.imp"
if (((I) == (4))) goto L_0002;
#line 65 "regression-bugs-tmp/draft4.imp"
if (((I) == (14))) goto L_0002;
#line 65 "regression-bugs-tmp/draft4.imp"
if (((I) == (24))) goto L_0002;
#line 65 "regression-bugs-tmp/draft4.imp"
if (((I) != (34))) goto L_0003;
#line 65 "regression-bugs-tmp/draft4.imp"
L_0002:;
#line 65 "regression-bugs-tmp/draft4.imp"
return (-1);
#line 65 "regression-bugs-tmp/draft4.imp"
L_0003:;
                                                                //     66                     %OR I = 4 %OR I = 14 %OR I = 24 %OR I = 34
                                                                //     67        ! square vacant?
                                                                //     68        %CYCLE I = 1, 1, 12
_imp_current_line = 68; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 68 "regression-bugs-tmp/draft4.imp"
I = 0;
if ((((12)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 12");
L_0004:;
if (I == 12) goto L_0005;
I += 1;
                                                                //     69           %RESULT = 1 %IF (I <= COMPNUM %AND POS = COMP(I)) %C
_imp_current_line = 69; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 69 "regression-bugs-tmp/draft4.imp"
if (((I) > (*COMPNUM))) goto L_0007;
#line 69 "regression-bugs-tmp/draft4.imp"
if (((POS) == (COMP[((I) + ((int)(1)))]))) goto L_0008;
#line 69 "regression-bugs-tmp/draft4.imp"
L_0007:;
#line 69 "regression-bugs-tmp/draft4.imp"
if (((I) > (*OPPNUM))) goto L_0009;
#line 69 "regression-bugs-tmp/draft4.imp"
if (((POS) != (OPP[((I) + ((int)(1)))]))) goto L_0009;
#line 69 "regression-bugs-tmp/draft4.imp"
L_0008:;
#line 69 "regression-bugs-tmp/draft4.imp"
return 1;
#line 69 "regression-bugs-tmp/draft4.imp"
L_0009:;
                                                                //     70                       %OR (I <= OPPNUM %AND POS = OPP(I))
                                                                //     71        %REPEAT
_imp_current_line = 71; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 71 "regression-bugs-tmp/draft4.imp"
goto L_0004;
#line 71 "regression-bugs-tmp/draft4.imp"
L_0005:;
                                                                //     72        %RESULT = 0
_imp_current_line = 72; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 72 "regression-bugs-tmp/draft4.imp"
return 0;
                                                                //     73     %END
_imp_current_line = 73; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 73 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block VALIDPOS at level 2
                                                                //     74  
                                                                //     75     %INTEGERFN VALID MOVE(%INTEGER M, P, %INTEGERARRAYNAME COMP, OPP)
_imp_current_line = 75; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 75 "regression-bugs-tmp/draft4.imp"
int VALIDMOVE( int M, int P, int /*arrayname*/*COMP, int /*arrayname*/*OPP )
#line 75 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //     76        %INTEGER CPOS, I, T
_imp_current_line = 76; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 76 "regression-bugs-tmp/draft4.imp"
int CPOS;
#line 76 "regression-bugs-tmp/draft4.imp"
int I;
#line 76 "regression-bugs-tmp/draft4.imp"
int T;
                                                                //     77        %UNLESS COMP(P+12) = CROWN %START
_imp_current_line = 77; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 77 "regression-bugs-tmp/draft4.imp"
if (((COMP[(((int)(P)) + (12))]) == (CROWN))) goto L_000a;
                                                                //     78           %IF COMP(0) = 1 %START;       ! player 1
_imp_current_line = 78; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 78 "regression-bugs-tmp/draft4.imp"
if (((COMP[0]) != (1))) goto L_000b;
                                                                //     79              %RESULT = -1 %IF M&4 = 0;  ! backward move
_imp_current_line = 79; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 79 "regression-bugs-tmp/draft4.imp"
if (((((M) & (4))) != (0))) goto L_000c;
#line 79 "regression-bugs-tmp/draft4.imp"
return (-1);
#line 79 "regression-bugs-tmp/draft4.imp"
L_000c:;
                                                                //     80           %FINISH %ELSE %START;         ! else player 2
_imp_current_line = 80; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 80 "regression-bugs-tmp/draft4.imp"
goto L_000d;
#line 80 "regression-bugs-tmp/draft4.imp"
L_000b:;
                                                                //     81              %RESULT = -1 %IF M&4 # 0;  ! backward move
_imp_current_line = 81; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 81 "regression-bugs-tmp/draft4.imp"
if (((((M) & (4))) == (0))) goto L_000e;
#line 81 "regression-bugs-tmp/draft4.imp"
return (-1);
#line 81 "regression-bugs-tmp/draft4.imp"
L_000e:;
                                                                //     82           %FINISH
_imp_current_line = 82; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 82 "regression-bugs-tmp/draft4.imp"
L_000d:;
                                                                //     83        %FINISH
_imp_current_line = 83; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 83 "regression-bugs-tmp/draft4.imp"
L_000a:;
                                                                //     84        CPOS = COMP(P)
_imp_current_line = 84; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 84 "regression-bugs-tmp/draft4.imp"
CPOS = COMP[P];
                                                                //     85        %RESULT = -1 %UNLESS VALID POS(CPOS+MOVE(M)) = 0
_imp_current_line = 85; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 85 "regression-bugs-tmp/draft4.imp"
if (((VALIDPOS((((int)(CPOS)) + (MOVE[M])))) == (0))) goto L_000f;
#line 85 "regression-bugs-tmp/draft4.imp"
return (-1);
#line 85 "regression-bugs-tmp/draft4.imp"
L_000f:;
                                                                //     86        %RESULT = 0 %IF M&1 = 0;         ! ordinary move
_imp_current_line = 86; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 86 "regression-bugs-tmp/draft4.imp"
if (((((M) & (1))) != (0))) goto L_0010;
#line 86 "regression-bugs-tmp/draft4.imp"
return 0;
#line 86 "regression-bugs-tmp/draft4.imp"
L_0010:;
                                                                //     87        %RESULT = -1 %IF OPP(25)=0
_imp_current_line = 87; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 87 "regression-bugs-tmp/draft4.imp"
if (((OPP[25]) != (0))) goto L_0011;
#line 87 "regression-bugs-tmp/draft4.imp"
return (-1);
#line 87 "regression-bugs-tmp/draft4.imp"
L_0011:;
                                                                //     88        I = CPOS+MOVE(M-1);              !  else take-move
_imp_current_line = 88; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 88 "regression-bugs-tmp/draft4.imp"
I = (((int)(CPOS)) + (MOVE[(((int)(M)) - (1))]));
                                                                //     89        %CYCLE T = 1, 1, OPP(25)
_imp_current_line = 89; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 89 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = OPP[25]; T = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle T = 1, 1, OPP[25]");
T -= _increment; _control -= _increment;
L_0012:;
if (T == _final) goto L_0013;
T += _increment; _control += _increment;
if (T != _control) _imp_signal(4,2,0,"Corrupt control variable T"); /* FOR loop control variable corrupted */
}
                                                                //     90           %RESULT = T %IF I = OPP(T);   ! piece to take?
_imp_current_line = 90; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 90 "regression-bugs-tmp/draft4.imp"
if (((I) != (OPP[T]))) goto L_0015;
#line 90 "regression-bugs-tmp/draft4.imp"
return T;
#line 90 "regression-bugs-tmp/draft4.imp"
L_0015:;
                                                                //     91        %REPEAT
_imp_current_line = 91; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 91 "regression-bugs-tmp/draft4.imp"
goto L_0012;
#line 91 "regression-bugs-tmp/draft4.imp"
L_0013:;
                                                                //     92        %RESULT = -1
_imp_current_line = 92; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 92 "regression-bugs-tmp/draft4.imp"
return (-1);
                                                                //     93     %END
_imp_current_line = 93; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 93 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block VALIDMOVE at level 2
                                                                //     94  
                                                                //     95     %INTEGERFN PENDING MOVE(%INTEGERARRAYNAME COMP, OPP)
_imp_current_line = 95; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 95 "regression-bugs-tmp/draft4.imp"
int PENDINGMOVE( int /*arrayname*/*COMP, int /*arrayname*/*OPP )
#line 95 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //     96     %INTEGER P, M, T, COMPNUM
_imp_current_line = 96; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 96 "regression-bugs-tmp/draft4.imp"
int P;
#line 96 "regression-bugs-tmp/draft4.imp"
int M;
#line 96 "regression-bugs-tmp/draft4.imp"
int T;
#line 96 "regression-bugs-tmp/draft4.imp"
int COMPNUM;
                                                                //     97        COMPNUM = COMP(25)
_imp_current_line = 97; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 97 "regression-bugs-tmp/draft4.imp"
COMPNUM = COMP[25];
                                                                //     98        %RESULT = -1 %IF COMPNUM = 0;    ! no pieces left!!
_imp_current_line = 98; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 98 "regression-bugs-tmp/draft4.imp"
if (((COMPNUM) != (0))) goto L_0016;
#line 98 "regression-bugs-tmp/draft4.imp"
return (-1);
#line 98 "regression-bugs-tmp/draft4.imp"
L_0016:;
                                                                //     99        %CYCLE P = 1, 1, COMPNUM
_imp_current_line = 99; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 99 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = COMPNUM; P = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, COMPNUM");
P -= _increment; _control -= _increment;
L_0017:;
if (P == _final) goto L_0018;
P += _increment; _control += _increment;
if (P != _control) _imp_signal(4,2,0,"Corrupt control variable P"); /* FOR loop control variable corrupted */
}
                                                                //    100           %CYCLE M = 1, 2, 7
_imp_current_line = 100; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 100 "regression-bugs-tmp/draft4.imp"
M = (-1);
if ((((7)-(1)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle M = 1, 2, 7");
L_001a:;
if (M == 7) goto L_001b;
M += 2;
                                                                //    101              T = VALID MOVE(M, P, COMP, OPP)
_imp_current_line = 101; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 101 "regression-bugs-tmp/draft4.imp"
T = VALIDMOVE(M, P, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    102              %RESULT = P %IF T > 0;     ! return piece doing take
_imp_current_line = 102; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 102 "regression-bugs-tmp/draft4.imp"
if (((T) <= (0))) goto L_001d;
#line 102 "regression-bugs-tmp/draft4.imp"
return P;
#line 102 "regression-bugs-tmp/draft4.imp"
L_001d:;
                                                                //    103           %REPEAT
_imp_current_line = 103; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 103 "regression-bugs-tmp/draft4.imp"
goto L_001a;
#line 103 "regression-bugs-tmp/draft4.imp"
L_001b:;
                                                                //    104        %REPEAT
_imp_current_line = 104; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 104 "regression-bugs-tmp/draft4.imp"
goto L_0017;
#line 104 "regression-bugs-tmp/draft4.imp"
L_0018:;
                                                                //    105        ! ordinary moves
                                                                //    106        %CYCLE P = 1, 1, COMPNUM
_imp_current_line = 106; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 106 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = COMPNUM; P = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, COMPNUM");
P -= _increment; _control -= _increment;
L_001e:;
if (P == _final) goto L_001f;
P += _increment; _control += _increment;
if (P != _control) _imp_signal(4,2,0,"Corrupt control variable P"); /* FOR loop control variable corrupted */
}
                                                                //    107           %CYCLE M = 0, 2, 6
_imp_current_line = 107; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 107 "regression-bugs-tmp/draft4.imp"
M = (-2);
if ((((6)-(0)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle M = 0, 2, 6");
L_0021:;
if (M == 6) goto L_0022;
M += 2;
                                                                //    108              T = VALID MOVE(M, P, COMP, OPP)
_imp_current_line = 108; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 108 "regression-bugs-tmp/draft4.imp"
T = VALIDMOVE(M, P, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    109              %RESULT = 0 %IF T = 0;     ! move ok
_imp_current_line = 109; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 109 "regression-bugs-tmp/draft4.imp"
if (((T) != (0))) goto L_0024;
#line 109 "regression-bugs-tmp/draft4.imp"
return 0;
#line 109 "regression-bugs-tmp/draft4.imp"
L_0024:;
                                                                //    110           %REPEAT
_imp_current_line = 110; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 110 "regression-bugs-tmp/draft4.imp"
goto L_0021;
#line 110 "regression-bugs-tmp/draft4.imp"
L_0022:;
                                                                //    111        %REPEAT
_imp_current_line = 111; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 111 "regression-bugs-tmp/draft4.imp"
goto L_001e;
#line 111 "regression-bugs-tmp/draft4.imp"
L_001f:;
                                                                //    112        %RESULT = -1;                   ! no moves
_imp_current_line = 112; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 112 "regression-bugs-tmp/draft4.imp"
return (-1);
                                                                //    113     %END
_imp_current_line = 113; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 113 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block PENDINGMOVE at level 2
                                                                //    114  
                                                                //    115     %INTEGERFN CROWNING(%INTEGER POS, PLAYER)
_imp_current_line = 115; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 115 "regression-bugs-tmp/draft4.imp"
int CROWNING( int POS, int PLAYER )
#line 115 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    116        ! assumes valid pos
                                                                //    117        %RESULT=TRUE %IF (PLAYER = 1 %AND POS < 7) %C
_imp_current_line = 117; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 117 "regression-bugs-tmp/draft4.imp"
if (((PLAYER) != (1))) goto L_0025;
#line 117 "regression-bugs-tmp/draft4.imp"
if (((POS) < (7))) goto L_0020;
#line 117 "regression-bugs-tmp/draft4.imp"
L_0025:;
#line 117 "regression-bugs-tmp/draft4.imp"
if (((PLAYER) != (2))) goto L_0026;
#line 117 "regression-bugs-tmp/draft4.imp"
if (((POS) <= (70))) goto L_0026;
#line 117 "regression-bugs-tmp/draft4.imp"
L_0020:;
#line 117 "regression-bugs-tmp/draft4.imp"
return 1;
#line 117 "regression-bugs-tmp/draft4.imp"
L_0026:;
                                                                //    118              %OR (PLAYER = 2 %AND POS > 70)
                                                                //    119        %RESULT=FALSE
_imp_current_line = 119; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 119 "regression-bugs-tmp/draft4.imp"
return 0;
                                                                //    120     %END
_imp_current_line = 120; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 120 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block CROWNING at level 2
                                                                //    121  
                                                                //    122     %INTEGERFN MOD(%INTEGER N)
_imp_current_line = 122; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 122 "regression-bugs-tmp/draft4.imp"
int MOD( int N )
#line 122 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    123  
                                                                //    124        %RESULT = -N %IF N<0
_imp_current_line = 124; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 124 "regression-bugs-tmp/draft4.imp"
if (((N) >= (0))) goto L_0027;
#line 124 "regression-bugs-tmp/draft4.imp"
return (-(N));
#line 124 "regression-bugs-tmp/draft4.imp"
L_0027:;
                                                                //    125        %RESULT = N
_imp_current_line = 125; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 125 "regression-bugs-tmp/draft4.imp"
return N;
                                                                //    126  
                                                                //    127     %END
_imp_current_line = 127; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 127 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block MOD at level 2
                                                                //    128  
                                                                //    129     %INTEGERFN VALUE OF SIDE(%INTEGERARRAYNAME COMP, OPP)
_imp_current_line = 129; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 129 "regression-bugs-tmp/draft4.imp"
int VALUEOFSIDE( int /*arrayname*/*COMP, int /*arrayname*/*OPP )
#line 129 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    130     %INTEGER V1, V2, V3, V4, V5, V6, V7
_imp_current_line = 130; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 130 "regression-bugs-tmp/draft4.imp"
int V1;
#line 130 "regression-bugs-tmp/draft4.imp"
int V2;
#line 130 "regression-bugs-tmp/draft4.imp"
int V3;
#line 130 "regression-bugs-tmp/draft4.imp"
int V4;
#line 130 "regression-bugs-tmp/draft4.imp"
int V5;
#line 130 "regression-bugs-tmp/draft4.imp"
int V6;
#line 130 "regression-bugs-tmp/draft4.imp"
int V7;
                                                                //    131     %INTEGER P, PP, M, MM, MV, ADV1, VM, PLAYER
_imp_current_line = 131; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 131 "regression-bugs-tmp/draft4.imp"
int P;
#line 131 "regression-bugs-tmp/draft4.imp"
int PP;
#line 131 "regression-bugs-tmp/draft4.imp"
int M;
#line 131 "regression-bugs-tmp/draft4.imp"
int MM;
#line 131 "regression-bugs-tmp/draft4.imp"
int MV;
#line 131 "regression-bugs-tmp/draft4.imp"
int ADV1;
#line 131 "regression-bugs-tmp/draft4.imp"
int VM;
#line 131 "regression-bugs-tmp/draft4.imp"
int PLAYER;
                                                                //    132     %INTEGERNAME CPOS, CTYPE
_imp_current_line = 132; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 132 "regression-bugs-tmp/draft4.imp"
int /*name*/*CPOS;
#line 132 "regression-bugs-tmp/draft4.imp"
int /*name*/*CTYPE;
                                                                //    133        PLAYER = COMP(0)
_imp_current_line = 133; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 133 "regression-bugs-tmp/draft4.imp"
PLAYER = COMP[0];
                                                                //    134  
                                                                //    135        ! back control
                                                                //    136        V2 = 0
_imp_current_line = 136; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 136 "regression-bugs-tmp/draft4.imp"
V2 = 0;
                                                                //    137        %IF OPP(26) = 0 %START;          ! OPP has no crowns yet
_imp_current_line = 137; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 137 "regression-bugs-tmp/draft4.imp"
if (((OPP[26]) != (0))) goto L_0028;
                                                                //    138           %IF PLAYER = 1 %START;        ! player 1
_imp_current_line = 138; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 138 "regression-bugs-tmp/draft4.imp"
if (((PLAYER) != (1))) goto L_0029;
                                                                //    139              %CYCLE P = 1, 1, 5
_imp_current_line = 139; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 139 "regression-bugs-tmp/draft4.imp"
P = 0;
if ((((5)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, 5");
L_002a:;
if (P == 5) goto L_002b;
P += 1;
                                                                //    140                 V2 = V2+BACK WT %IF COMP(P) = BACK1(P)
_imp_current_line = 140; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 140 "regression-bugs-tmp/draft4.imp"
if (((COMP[P]) != ((BACK1-1)[P]))) goto L_002d;
#line 140 "regression-bugs-tmp/draft4.imp"
V2 = (((int)(V2)) + (BACKWT));
#line 140 "regression-bugs-tmp/draft4.imp"
L_002d:;
                                                                //    141              %REPEAT
_imp_current_line = 141; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 141 "regression-bugs-tmp/draft4.imp"
goto L_002a;
#line 141 "regression-bugs-tmp/draft4.imp"
L_002b:;
                                                                //    142           %FINISH %ELSE %START;         ! player 2
_imp_current_line = 142; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 142 "regression-bugs-tmp/draft4.imp"
goto L_002e;
#line 142 "regression-bugs-tmp/draft4.imp"
L_0029:;
                                                                //    143              %CYCLE P = 1, 1, 5
_imp_current_line = 143; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 143 "regression-bugs-tmp/draft4.imp"
P = 0;
if ((((5)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, 5");
L_002f:;
if (P == 5) goto L_0030;
P += 1;
                                                                //    144                 V2 = V2+BACK WT %IF COMP(P) = BACK2(P)
_imp_current_line = 144; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 144 "regression-bugs-tmp/draft4.imp"
if (((COMP[P]) != ((BACK2-1)[P]))) goto L_0032;
#line 144 "regression-bugs-tmp/draft4.imp"
V2 = (((int)(V2)) + (BACKWT));
#line 144 "regression-bugs-tmp/draft4.imp"
L_0032:;
                                                                //    145              %REPEAT
_imp_current_line = 145; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 145 "regression-bugs-tmp/draft4.imp"
goto L_002f;
#line 145 "regression-bugs-tmp/draft4.imp"
L_0030:;
                                                                //    146           %FINISH
_imp_current_line = 146; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 146 "regression-bugs-tmp/draft4.imp"
L_002e:;
                                                                //    147        %FINISH
_imp_current_line = 147; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 147 "regression-bugs-tmp/draft4.imp"
L_0028:;
                                                                //    148  
                                                                //    149        V1 = 0;  V3 = 0;  V4 = 0;  V5 = 0;  V6 = 0;  V7 = 0
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 149 "regression-bugs-tmp/draft4.imp"
V1 = 0;
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 149 "regression-bugs-tmp/draft4.imp"
V3 = 0;
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 149 "regression-bugs-tmp/draft4.imp"
V4 = 0;
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 149 "regression-bugs-tmp/draft4.imp"
V5 = 0;
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 149 "regression-bugs-tmp/draft4.imp"
V6 = 0;
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 149 "regression-bugs-tmp/draft4.imp"
V7 = 0;
                                                                //    150        %CYCLE P = 1, 1, COMP(25)
_imp_current_line = 150; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 150 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = COMP[25]; P = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, COMP[25]");
P -= _increment; _control -= _increment;
L_0033:;
if (P == _final) goto L_0034;
P += _increment; _control += _increment;
if (P != _control) _imp_signal(4,2,0,"Corrupt control variable P"); /* FOR loop control variable corrupted */
}
                                                                //    151           CPOS ==COMP(P);  CTYPE ==  COMP(P+12)
_imp_current_line = 151; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 151 "regression-bugs-tmp/draft4.imp"
CPOS = &COMP[P];
_imp_current_line = 151; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 151 "regression-bugs-tmp/draft4.imp"
CTYPE = &COMP[(((int)(P)) + (12))];
                                                                //    152           ADV1 = 0
_imp_current_line = 152; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 152 "regression-bugs-tmp/draft4.imp"
ADV1 = 0;
                                                                //    153  
                                                                //    154           ! add up piece values
                                                                //    155           V1 = V1+CTYPE
_imp_current_line = 155; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 155 "regression-bugs-tmp/draft4.imp"
V1 = (((int)(V1)) + (*CTYPE));
                                                                //    156  
                                                                //    157           %CYCLE M = 0, 1, 7
_imp_current_line = 157; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 157 "regression-bugs-tmp/draft4.imp"
M = (-1);
if ((((7)-(0)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle M = 0, 1, 7");
L_0036:;
if (M == 7) goto L_0037;
M += 1;
                                                                //    158              VM = VALID MOVE(M, P, COMP, OPP)
_imp_current_line = 158; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 158 "regression-bugs-tmp/draft4.imp"
VM = VALIDMOVE(M, P, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    159              MV = MOVE(M)
_imp_current_line = 159; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 159 "regression-bugs-tmp/draft4.imp"
MV = MOVE[M];
                                                                //    160  
                                                                //    161              ! centre control
                                                                //    162              %IF CPOS = CENTSQ(M) %START
_imp_current_line = 162; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 162 "regression-bugs-tmp/draft4.imp"
if (((*CPOS) != (CENTSQ[M]))) goto L_0039;
                                                                //    163                 V4 = V4+CENT WT
_imp_current_line = 163; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 163 "regression-bugs-tmp/draft4.imp"
V4 = (((int)(V4)) + (CENTWT));
                                                                //    164                 V4 = V4+CENT WT+1 %IF CTYPE = CROWN
_imp_current_line = 164; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 164 "regression-bugs-tmp/draft4.imp"
if (((*CTYPE) != (CROWN))) goto L_003a;
#line 164 "regression-bugs-tmp/draft4.imp"
V4 = (((int)((((int)(V4)) + (CENTWT)))) + (1));
#line 164 "regression-bugs-tmp/draft4.imp"
L_003a:;
                                                                //    165              %FINISH
_imp_current_line = 165; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 165 "regression-bugs-tmp/draft4.imp"
L_0039:;
                                                                //    166  
                                                                //    167              %IF VM >= 0 %START
_imp_current_line = 167; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 167 "regression-bugs-tmp/draft4.imp"
if (((VM) < (0))) goto L_003b;
                                                                //    168  
                                                                //    169                 ! mobility
                                                                //    170                 V3 = V3+MOB WT
_imp_current_line = 170; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 170 "regression-bugs-tmp/draft4.imp"
V3 = (((int)(V3)) + (MOBWT));
                                                                //    171                 V3 = V3+MOB WT %IF VM > 0
_imp_current_line = 171; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 171 "regression-bugs-tmp/draft4.imp"
if (((VM) <= (0))) goto L_003c;
#line 171 "regression-bugs-tmp/draft4.imp"
V3 = (((int)(V3)) + (MOBWT));
#line 171 "regression-bugs-tmp/draft4.imp"
L_003c:;
                                                                //    172  
                                                                //    173                 %IF CTYPE # CROWN %START
_imp_current_line = 173; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 173 "regression-bugs-tmp/draft4.imp"
if (((*CTYPE) == (CROWN))) goto L_003d;
                                                                //    174  
                                                                //    175                    ! advancement 1
                                                                //    176                    %IF ADV1 = 0 %AND TRUE=CROWNING(CPOS+MV, PLAYER) %THEN %C
_imp_current_line = 176; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 176 "regression-bugs-tmp/draft4.imp"
if (((ADV1) != (0))) goto L_003e;
#line 176 "regression-bugs-tmp/draft4.imp"
if (((1) != (CROWNING(((*(int *)(CPOS)) + (MV)), PLAYER)))) goto L_003e;
#line 176 "regression-bugs-tmp/draft4.imp"
V5 = (((int)(V5)) + (ADV1WT));
#line 176 "regression-bugs-tmp/draft4.imp"
ADV1 = 1;
#line 176 "regression-bugs-tmp/draft4.imp"
L_003e:;
                                                                //    177                     V5 = V5+ADV1 WT %AND ADV1 = 1
                                                                //    178  
                                                                //    179                    ! advancement 2
                                                                //    180                    %IF VM = 0 %START;   ! ignore jumps to crown
_imp_current_line = 180; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 180 "regression-bugs-tmp/draft4.imp"
if (((VM) != (0))) goto L_003f;
                                                                //    181                       CPOS = CPOS+MV
_imp_current_line = 181; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 181 "regression-bugs-tmp/draft4.imp"
*CPOS = ((*(int *)(CPOS)) + (MV));
                                                                //    182                       %CYCLE MM = 0, 2, 6
_imp_current_line = 182; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 182 "regression-bugs-tmp/draft4.imp"
MM = (-2);
if ((((6)-(0)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle MM = 0, 2, 6");
L_0040:;
if (MM == 6) goto L_0041;
MM += 2;
                                                                //    183                          %IF TRUE=CROWNING(CPOS+MOVE(MM), PLAYER) %C
_imp_current_line = 183; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 183 "regression-bugs-tmp/draft4.imp"
if (((1) != (CROWNING(((*(int *)(CPOS)) + (MOVE[MM])), PLAYER)))) goto L_0043;
#line 183 "regression-bugs-tmp/draft4.imp"
if (((VALIDMOVE(MM, P, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0])) < (0))) goto L_0043;
                                                                //    184                           %AND VALID MOVE(MM, P, COMP, OPP) >= 0 %START
                                                                //    185                             V6 = V6+ADV2 WT;  %EXIT
_imp_current_line = 185; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 185 "regression-bugs-tmp/draft4.imp"
V6 = (((int)(V6)) + (ADV2WT));
_imp_current_line = 185; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 185 "regression-bugs-tmp/draft4.imp"
goto L_0041;
                                                                //    186                          %FINISH
_imp_current_line = 186; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 186 "regression-bugs-tmp/draft4.imp"
L_0043:;
                                                                //    187                       %REPEAT
_imp_current_line = 187; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 187 "regression-bugs-tmp/draft4.imp"
goto L_0040;
#line 187 "regression-bugs-tmp/draft4.imp"
L_0041:;
                                                                //    188                       CPOS = CPOS-MV
_imp_current_line = 188; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 188 "regression-bugs-tmp/draft4.imp"
*CPOS = ((*(int *)(CPOS)) - (MV));
                                                                //    189                    %FINISH
_imp_current_line = 189; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 189 "regression-bugs-tmp/draft4.imp"
L_003f:;
                                                                //    190                 %FINISH
_imp_current_line = 190; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 190 "regression-bugs-tmp/draft4.imp"
L_003d:;
                                                                //    191  
                                                                //    192                 ! cramp
                                                                //    193                 %IF VM = 0 %AND CTYPE = CROWN %AND OPP(25) > 0 %START
_imp_current_line = 193; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 193 "regression-bugs-tmp/draft4.imp"
if (((VM) != (0))) goto L_0044;
#line 193 "regression-bugs-tmp/draft4.imp"
if (((*CTYPE) != (CROWN))) goto L_0044;
#line 193 "regression-bugs-tmp/draft4.imp"
if (((OPP[25]) <= (0))) goto L_0044;
                                                                //    194                    CPOS = CPOS+MV
_imp_current_line = 194; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 194 "regression-bugs-tmp/draft4.imp"
*CPOS = ((*(int *)(CPOS)) + (MV));
                                                                //    195                    %CYCLE PP = 1, 1, OPP(25)
_imp_current_line = 195; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 195 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = OPP[25]; PP = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle PP = 1, 1, OPP[25]");
PP -= _increment; _control -= _increment;
L_0045:;
if (PP == _final) goto L_0046;
PP += _increment; _control += _increment;
if (PP != _control) _imp_signal(4,2,0,"Corrupt control variable PP"); /* FOR loop control variable corrupted */
}
                                                                //    196                       %CYCLE MM = 1, 2, 7
_imp_current_line = 196; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 196 "regression-bugs-tmp/draft4.imp"
MM = (-1);
if ((((7)-(1)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle MM = 1, 2, 7");
L_0048:;
if (MM == 7) goto L_0049;
MM += 2;
                                                                //    197                          %IF VALID MOVE(MM, PP, OPP, COMP) >= 0 %START
_imp_current_line = 197; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 197 "regression-bugs-tmp/draft4.imp"
if (((VALIDMOVE(MM, PP, /*is_array_name_param2 BUG? */ &OPP[0], /*is_array_name_param2 BUG? */ &COMP[0])) < (0))) goto L_004b;
                                                                //    198                             V5 = V5-CRAMP WT;  %EXIT
_imp_current_line = 198; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 198 "regression-bugs-tmp/draft4.imp"
V5 = (((int)(V5)) - (CRAMPWT));
_imp_current_line = 198; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 198 "regression-bugs-tmp/draft4.imp"
goto L_0049;
                                                                //    199                          %FINISH
_imp_current_line = 199; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 199 "regression-bugs-tmp/draft4.imp"
L_004b:;
                                                                //    200                       %REPEAT
_imp_current_line = 200; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 200 "regression-bugs-tmp/draft4.imp"
goto L_0048;
#line 200 "regression-bugs-tmp/draft4.imp"
L_0049:;
                                                                //    201                    %REPEAT
_imp_current_line = 201; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 201 "regression-bugs-tmp/draft4.imp"
goto L_0045;
#line 201 "regression-bugs-tmp/draft4.imp"
L_0046:;
                                                                //    202                    CPOS = CPOS-MV
_imp_current_line = 202; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 202 "regression-bugs-tmp/draft4.imp"
*CPOS = ((*(int *)(CPOS)) - (MV));
                                                                //    203                 %FINISH
_imp_current_line = 203; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 203 "regression-bugs-tmp/draft4.imp"
L_0044:;
                                                                //    204              %FINISH
_imp_current_line = 204; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 204 "regression-bugs-tmp/draft4.imp"
L_003b:;
                                                                //    205           %REPEAT
_imp_current_line = 205; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 205 "regression-bugs-tmp/draft4.imp"
goto L_0036;
#line 205 "regression-bugs-tmp/draft4.imp"
L_0037:;
                                                                //    206        %REPEAT
_imp_current_line = 206; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 206 "regression-bugs-tmp/draft4.imp"
goto L_0033;
#line 206 "regression-bugs-tmp/draft4.imp"
L_0034:;
                                                                //    207        %RESULT = V1+V2+V3+V4+V5+V6+V7
_imp_current_line = 207; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 207 "regression-bugs-tmp/draft4.imp"
return (((int)((((int)((((int)((((int)((((int)((((int)(V1)) + (V2)))) + (V3)))) + (V4)))) + (V5)))) + (V6)))) + (V7));
                                                                //    208     %END
_imp_current_line = 208; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 208 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block VALUEOFSIDE at level 2
                                                                //    209  
                                                                //    210     %INTEGERFN VALUE OF POS(%INTEGERARRAYNAME COMP, OPP)
_imp_current_line = 210; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 210 "regression-bugs-tmp/draft4.imp"
int VALUEOFPOS( int /*arrayname*/*COMP, int /*arrayname*/*OPP )
#line 210 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    211     %INTEGER VALUE
_imp_current_line = 211; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 211 "regression-bugs-tmp/draft4.imp"
int VALUE;
                                                                //    212        %IF PENDING MOVE(COMP, OPP) >= 0 %START
_imp_current_line = 212; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 212 "regression-bugs-tmp/draft4.imp"
if (((PENDINGMOVE(/*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0])) < (0))) goto L_004c;
                                                                //    213           VALUE = VALUE OF SIDE(COMP, OPP)-VALUE OF SIDE(OPP, COMP)-PLY NUMBER
_imp_current_line = 213; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 213 "regression-bugs-tmp/draft4.imp"
VALUE = (((int)((((int)(VALUEOFSIDE(/*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]))) - (VALUEOFSIDE(/*is_array_name_param2 BUG? */ &OPP[0], /*is_array_name_param2 BUG? */ &COMP[0]))))) - (PLYNUMBER));
                                                                //    214        %FINISH %ELSE VALUE = -100000+PLYNUMBER;   ! no mobility!!
_imp_current_line = 214; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 214 "regression-bugs-tmp/draft4.imp"
goto L_004d;
#line 214 "regression-bugs-tmp/draft4.imp"
L_004c:;
#line 214 "regression-bugs-tmp/draft4.imp"
VALUE = (((int)((-100000))) + (PLYNUMBER));
#line 214 "regression-bugs-tmp/draft4.imp"
L_004d:;
                                                                //    215        %RESULT = VALUE %IF COMP(0) = ME
_imp_current_line = 215; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 215 "regression-bugs-tmp/draft4.imp"
if (((COMP[0]) != (ME))) goto L_004e;
#line 215 "regression-bugs-tmp/draft4.imp"
return VALUE;
#line 215 "regression-bugs-tmp/draft4.imp"
L_004e:;
                                                                //    216        %RESULT = -VALUE
_imp_current_line = 216; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 216 "regression-bugs-tmp/draft4.imp"
return (-(VALUE));
                                                                //    217     %END
_imp_current_line = 217; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 217 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block VALUEOFPOS at level 2
                                                                //    218  
                                                                //    219     %ROUTINE MAKE MOVE(%INTEGER MV, P, %INTEGERNAME T, %C
_imp_current_line = 219; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 219 "regression-bugs-tmp/draft4.imp"
void MAKEMOVE( int MV, int P, int /*name*/*T, int /*arrayname*/*COMP, int /*arrayname*/*OPP )
#line 219 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    220                                       %INTEGERARRAYNAME COMP, OPP)
                                                                //    221     %INTEGERNAME CPOS, CTYPE, OPOS, OTYPE, ONUM, ONUMC
_imp_current_line = 221; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 221 "regression-bugs-tmp/draft4.imp"
int /*name*/*CPOS;
#line 221 "regression-bugs-tmp/draft4.imp"
int /*name*/*CTYPE;
#line 221 "regression-bugs-tmp/draft4.imp"
int /*name*/*OPOS;
#line 221 "regression-bugs-tmp/draft4.imp"
int /*name*/*OTYPE;
#line 221 "regression-bugs-tmp/draft4.imp"
int /*name*/*ONUM;
#line 221 "regression-bugs-tmp/draft4.imp"
int /*name*/*ONUMC;
                                                                //    222        CPOS == COMP(P);  CTYPE == COMP(P+12)
_imp_current_line = 222; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 222 "regression-bugs-tmp/draft4.imp"
CPOS = &COMP[P];
_imp_current_line = 222; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 222 "regression-bugs-tmp/draft4.imp"
CTYPE = &COMP[(((int)(P)) + (12))];
                                                                //    223        CPOS = CPOS+MV
_imp_current_line = 223; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 223 "regression-bugs-tmp/draft4.imp"
*CPOS = ((*(int *)(CPOS)) + (MV));
                                                                //    224        %IF T # 0 %START;                ! a take
_imp_current_line = 224; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 224 "regression-bugs-tmp/draft4.imp"
if (((*T) == (0))) goto L_004f;
                                                                //    225           OPOS == OPP(T);  OTYPE == OPP(T+12)
_imp_current_line = 225; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 225 "regression-bugs-tmp/draft4.imp"
OPOS = &OPP[*T];
_imp_current_line = 225; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 225 "regression-bugs-tmp/draft4.imp"
OTYPE = &OPP[((*(int *)(T)) + (12))];
                                                                //    226           ONUM == OPP(25);  ONUMC == OPP(26)
_imp_current_line = 226; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 226 "regression-bugs-tmp/draft4.imp"
ONUM = &OPP[25];
_imp_current_line = 226; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 226 "regression-bugs-tmp/draft4.imp"
ONUMC = &OPP[26];
                                                                //    227           SP = SP+1
_imp_current_line = 227; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 227 "regression-bugs-tmp/draft4.imp"
SP = (((int)(SP)) + (1));
                                                                //    228           PSTACK(SP) = OPOS;            ! save position of taken piece
_imp_current_line = 228; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 228 "regression-bugs-tmp/draft4.imp"
PSTACK[(((int)(SP)) - (1))] = *OPOS;
                                                                //    229           TSTACK(SP) = OTYPE;           ! save piece type
_imp_current_line = 229; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 229 "regression-bugs-tmp/draft4.imp"
TSTACK[(((int)(SP)) - (1))] = *OTYPE;
                                                                //    230           NSTACK(SP) = T;               ! save piece number
_imp_current_line = 230; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 230 "regression-bugs-tmp/draft4.imp"
NSTACK[(((int)(SP)) - (1))] = *T;
                                                                //    231           OPOS = OPP(ONUM);             ! remove piece from board
_imp_current_line = 231; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 231 "regression-bugs-tmp/draft4.imp"
*OPOS = OPP[*ONUM];
                                                                //    232           ONUM = ONUM-1;                ! reduce piece count for opp
_imp_current_line = 232; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 232 "regression-bugs-tmp/draft4.imp"
*ONUM = ((*(int *)(ONUM)) - (1));
                                                                //    233           ONUMC = ONUMC-1 %IF OTYPE = CROWN
_imp_current_line = 233; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 233 "regression-bugs-tmp/draft4.imp"
if (((*OTYPE) != (CROWN))) goto L_0050;
#line 233 "regression-bugs-tmp/draft4.imp"
*ONUMC = ((*(int *)(ONUMC)) - (1));
#line 233 "regression-bugs-tmp/draft4.imp"
L_0050:;
                                                                //    234           OTYPE = OPP(ONUM+13)
_imp_current_line = 234; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 234 "regression-bugs-tmp/draft4.imp"
*OTYPE = OPP[((*(int *)(ONUM)) + (13))];
                                                                //    235        %FINISH
_imp_current_line = 235; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 235 "regression-bugs-tmp/draft4.imp"
L_004f:;
                                                                //    236        %IF CTYPE # CROWN %AND TRUE=CROWNING(CPOS, COMP(0)) %START
_imp_current_line = 236; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 236 "regression-bugs-tmp/draft4.imp"
if (((*CTYPE) == (CROWN))) goto L_0051;
#line 236 "regression-bugs-tmp/draft4.imp"
if (((1) != (CROWNING(*CPOS, COMP[0])))) goto L_0051;
                                                                //    237           CTYPE = CROWN;                ! crown piece
_imp_current_line = 237; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 237 "regression-bugs-tmp/draft4.imp"
*CTYPE = CROWN;
                                                                //    238           COMP(26) = COMP(26)+1;        ! increase crown count
_imp_current_line = 238; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 238 "regression-bugs-tmp/draft4.imp"
COMP[26] = (((int)(COMP[26])) + (1));
                                                                //    239           T = 0;                        ! no more takes
_imp_current_line = 239; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 239 "regression-bugs-tmp/draft4.imp"
*T = 0;
                                                                //    240        %FINISH
_imp_current_line = 240; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 240 "regression-bugs-tmp/draft4.imp"
L_0051:;
                                                                //    241     %END
_imp_current_line = 241; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 241 "regression-bugs-tmp/draft4.imp"
return;
_imp_endofblock: ;
} // End of block MAKEMOVE at level 2
                                                                //    242  
                                                                //    243     %INTEGERFN TRY POSSIBLE MOVES(%INTEGER PLY, DEPTH, %C
_imp_current_line = 243; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 243 "regression-bugs-tmp/draft4.imp"
int TRYPOSSIBLEMOVES( int PLY, int DEPTH, int /*arrayname*/*COMP, int /*arrayname*/*OPP )
#line 243 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    244                                   %INTEGERARRAYNAME COMP, OPP)
                                                                //    245     %INTEGER M,MM,MMM,MMF,P,T,TT,APT,VALUE,TAKES,OLDPOS,OLDTYPE
_imp_current_line = 245; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 245 "regression-bugs-tmp/draft4.imp"
int M;
#line 245 "regression-bugs-tmp/draft4.imp"
int MM;
#line 245 "regression-bugs-tmp/draft4.imp"
int MMM;
#line 245 "regression-bugs-tmp/draft4.imp"
int MMF;
#line 245 "regression-bugs-tmp/draft4.imp"
int P;
#line 245 "regression-bugs-tmp/draft4.imp"
int T;
#line 245 "regression-bugs-tmp/draft4.imp"
int TT;
#line 245 "regression-bugs-tmp/draft4.imp"
int APT;
#line 245 "regression-bugs-tmp/draft4.imp"
int VALUE;
#line 245 "regression-bugs-tmp/draft4.imp"
int TAKES;
#line 245 "regression-bugs-tmp/draft4.imp"
int OLDPOS;
#line 245 "regression-bugs-tmp/draft4.imp"
int OLDTYPE;
                                                                //    246     %INTEGERNAME MAXPLY, MINPLY
_imp_current_line = 246; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 246 "regression-bugs-tmp/draft4.imp"
int /*name*/*MAXPLY;
#line 246 "regression-bugs-tmp/draft4.imp"
int /*name*/*MINPLY;
                                                                //    247  
                                                                //    248        %INTEGERFN PURSUIT
_imp_current_line = 248; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 248 "regression-bugs-tmp/draft4.imp"
int PURSUIT( void )
#line 248 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    249           %RESULT = 1 %IF PLY = 1
_imp_current_line = 249; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 249 "regression-bugs-tmp/draft4.imp"
if (((PLY) != (1))) goto L_0052;
#line 249 "regression-bugs-tmp/draft4.imp"
return 1;
#line 249 "regression-bugs-tmp/draft4.imp"
L_0052:;
                                                                //    250           %RESULT = \M&1
_imp_current_line = 250; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 250 "regression-bugs-tmp/draft4.imp"
return (((~(M))) & (1));
                                                                //    251        %END
_imp_current_line = 251; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 251 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block PURSUIT at level 3
                                                                //    252  
                                                                //    253        NODES = NODES+1
_imp_current_line = 253; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 253 "regression-bugs-tmp/draft4.imp"
NODES = (((int)(NODES)) + (1));
                                                                //    254        APT = PENDING MOVE(COMP, OPP)
_imp_current_line = 254; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 254 "regression-bugs-tmp/draft4.imp"
APT = PENDINGMOVE(/*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    255        PLY NUMBER = PLY-1 %AND %RESULT = VALUE OF POS(COMP, OPP) %C
_imp_current_line = 255; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 255 "regression-bugs-tmp/draft4.imp"
if (((DEPTH) < (SEARCHLIMIT))) goto L_0053;
#line 255 "regression-bugs-tmp/draft4.imp"
if (((APT) <= (0))) goto L_0035;
#line 255 "regression-bugs-tmp/draft4.imp"
L_0053:;
#line 255 "regression-bugs-tmp/draft4.imp"
if (((PLY) <= (12))) goto L_0054;
#line 255 "regression-bugs-tmp/draft4.imp"
L_0035:;
#line 255 "regression-bugs-tmp/draft4.imp"
PLYNUMBER = (((int)(PLY)) - (1));
#line 255 "regression-bugs-tmp/draft4.imp"
return VALUEOFPOS(/*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
#line 255 "regression-bugs-tmp/draft4.imp"
L_0054:;
                                                                //    256         %IF (DEPTH >= SEARCH LIMIT %AND APT <=0) %OR PLY > 12
                                                                //    257        MINPLY == MIN(PLY);  MINPLY = 100000
_imp_current_line = 257; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 257 "regression-bugs-tmp/draft4.imp"
MINPLY = &MIN[(((int)(PLY)) - (1))];
_imp_current_line = 257; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 257 "regression-bugs-tmp/draft4.imp"
*MINPLY = 100000;
                                                                //    258        MAXPLY == MAX(PLY);  MAXPLY =-100000
_imp_current_line = 258; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 258 "regression-bugs-tmp/draft4.imp"
MAXPLY = &MAX[(((int)(PLY)) - (1))];
_imp_current_line = 258; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 258 "regression-bugs-tmp/draft4.imp"
*MAXPLY = (-100000);
                                                                //    259        %IF APT >= 0 %START;             ! COMP able to move
_imp_current_line = 259; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 259 "regression-bugs-tmp/draft4.imp"
if (((APT) < (0))) goto L_0055;
                                                                //    260           %IF APT > 0 %START;           ! take priority
_imp_current_line = 260; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 260 "regression-bugs-tmp/draft4.imp"
if (((APT) <= (0))) goto L_0056;
                                                                //    261              P = APT;  APT = 2;  MMM = 1 ; MMF = 7
_imp_current_line = 261; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 261 "regression-bugs-tmp/draft4.imp"
P = APT;
_imp_current_line = 261; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 261 "regression-bugs-tmp/draft4.imp"
APT = 2;
_imp_current_line = 261; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 261 "regression-bugs-tmp/draft4.imp"
MMM = 1;
_imp_current_line = 261; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 261 "regression-bugs-tmp/draft4.imp"
MMF = 7;
                                                                //    262              SEARCH LIMIT = 2 %IF PLY = 1
_imp_current_line = 262; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 262 "regression-bugs-tmp/draft4.imp"
if (((PLY) != (1))) goto L_0057;
#line 262 "regression-bugs-tmp/draft4.imp"
SEARCHLIMIT = 2;
#line 262 "regression-bugs-tmp/draft4.imp"
L_0057:;
                                                                //    263           %FINISH %ELSE %START
_imp_current_line = 263; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 263 "regression-bugs-tmp/draft4.imp"
goto L_0058;
#line 263 "regression-bugs-tmp/draft4.imp"
L_0056:;
                                                                //    264              P = 1;  APT = 2;  MMM = 0; MMF=6
_imp_current_line = 264; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 264 "regression-bugs-tmp/draft4.imp"
P = 1;
_imp_current_line = 264; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 264 "regression-bugs-tmp/draft4.imp"
APT = 2;
_imp_current_line = 264; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 264 "regression-bugs-tmp/draft4.imp"
MMM = 0;
_imp_current_line = 264; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 264 "regression-bugs-tmp/draft4.imp"
MMF = 6;
                                                                //    265           %FINISH
_imp_current_line = 265; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 265 "regression-bugs-tmp/draft4.imp"
L_0058:;
                                                                //    266           %CYCLE P = P, 1, COMP(25)
_imp_current_line = 266; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 266 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = P; _increment = 1; _final = COMP[25]; P = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle P = P, 1, COMP[25]");
P -= _increment; _control -= _increment;
L_0059:;
if (P == _final) goto L_005a;
P += _increment; _control += _increment;
if (P != _control) _imp_signal(4,2,0,"Corrupt control variable P"); /* FOR loop control variable corrupted */
}
                                                                //    267              OLDPOS = COMP(P);  OLDTYPE = COMP(P+12)
_imp_current_line = 267; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 267 "regression-bugs-tmp/draft4.imp"
OLDPOS = COMP[P];
_imp_current_line = 267; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 267 "regression-bugs-tmp/draft4.imp"
OLDTYPE = COMP[(((int)(P)) + (12))];
                                                                //    268              %CYCLE M = MMM, APT, MMF
_imp_current_line = 268; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 268 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = MMM; _increment = APT; _final = MMF; M = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle M = MMM, APT, MMF");
M -= _increment; _control -= _increment;
L_005c:;
if (M == _final) goto L_005d;
M += _increment; _control += _increment;
if (M != _control) _imp_signal(4,2,0,"Corrupt control variable M"); /* FOR loop control variable corrupted */
}
                                                                //    269                 TAKES = 0
_imp_current_line = 269; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 269 "regression-bugs-tmp/draft4.imp"
TAKES = 0;
                                                                //    270                 T = VALID MOVE(M, P, COMP, OPP)
_imp_current_line = 270; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 270 "regression-bugs-tmp/draft4.imp"
T = VALIDMOVE(M, P, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    271                 %IF T >= 0 %START;               ! valid move
_imp_current_line = 271; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 271 "regression-bugs-tmp/draft4.imp"
if (((T) < (0))) goto L_005f;
                                                                //    272                    MM = M;  TT = T
_imp_current_line = 272; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 272 "regression-bugs-tmp/draft4.imp"
MM = M;
_imp_current_line = 272; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 272 "regression-bugs-tmp/draft4.imp"
TT = T;
                                                                //    273  ANOTHER TAKE:     TAKES = TAKES+1 %IF TT > 0
_imp_current_line = 273; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 273 "regression-bugs-tmp/draft4.imp"
U_1000:;
_imp_current_line = 273; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 273 "regression-bugs-tmp/draft4.imp"
if (((TT) <= (0))) goto L_0060;
#line 273 "regression-bugs-tmp/draft4.imp"
TAKES = (((int)(TAKES)) + (1));
#line 273 "regression-bugs-tmp/draft4.imp"
L_0060:;
                                                                //    274                    MAKE MOVE(MOVE(MM), P, TT, COMP, OPP);! try this move
_imp_current_line = 274; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 274 "regression-bugs-tmp/draft4.imp"
MAKEMOVE(MOVE[MM], P, &TT, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    275                    %IF TT > 0 %START;             ! another take
_imp_current_line = 275; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 275 "regression-bugs-tmp/draft4.imp"
if (((TT) <= (0))) goto L_0061;
                                                                //    276                       %CYCLE MM = 1, 2, 7
_imp_current_line = 276; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 276 "regression-bugs-tmp/draft4.imp"
MM = (-1);
if ((((7)-(1)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle MM = 1, 2, 7");
L_0062:;
if (MM == 7) goto L_0063;
MM += 2;
                                                                //    277                          TT = VALID MOVE(MM, P, COMP, OPP)
_imp_current_line = 277; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 277 "regression-bugs-tmp/draft4.imp"
TT = VALIDMOVE(MM, P, /*is_array_name_param2 BUG? */ &COMP[0], /*is_array_name_param2 BUG? */ &OPP[0]);
                                                                //    278                          -> ANOTHER TAKE %IF TT > 0
_imp_current_line = 278; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 278 "regression-bugs-tmp/draft4.imp"
if (((TT) <= (0))) goto L_0065;
#line 278 "regression-bugs-tmp/draft4.imp"
goto U_1000;
#line 278 "regression-bugs-tmp/draft4.imp"
L_0065:;
                                                                //    279                       %REPEAT
_imp_current_line = 279; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 279 "regression-bugs-tmp/draft4.imp"
goto L_0062;
#line 279 "regression-bugs-tmp/draft4.imp"
L_0063:;
                                                                //    280                    %FINISH
_imp_current_line = 280; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 280 "regression-bugs-tmp/draft4.imp"
L_0061:;
                                                                //    281                    VALUE = TRY POSSIBLE MOVES(PLY+1, DEPTH+PURSUIT, OPP, COMP)
_imp_current_line = 281; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 281 "regression-bugs-tmp/draft4.imp"
VALUE = TRYPOSSIBLEMOVES((((int)(PLY)) + (1)), (((int)(DEPTH)) + (PURSUIT())), /*is_array_name_param2 BUG? */ &OPP[0], /*is_array_name_param2 BUG? */ &COMP[0]);
                                                                //    282                    COMP(P) = OLDPOS;  COMP(P+12) = OLDTYPE
_imp_current_line = 282; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 282 "regression-bugs-tmp/draft4.imp"
COMP[P] = OLDPOS;
_imp_current_line = 282; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 282 "regression-bugs-tmp/draft4.imp"
COMP[(((int)(P)) + (12))] = OLDTYPE;
                                                                //    283                    OPP(25) = OPP(25)+TAKES
_imp_current_line = 283; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 283 "regression-bugs-tmp/draft4.imp"
OPP[25] = (((int)(OPP[25])) + (TAKES));
                                                                //    284                    %WHILE TAKES > 0 %CYCLE
_imp_current_line = 284; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 284 "regression-bugs-tmp/draft4.imp"
L_0066:;
#line 284 "regression-bugs-tmp/draft4.imp"
if (((TAKES) <= (0))) goto L_0067;
                                                                //    285                       TT = NSTACK(SP)
_imp_current_line = 285; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 285 "regression-bugs-tmp/draft4.imp"
TT = NSTACK[(((int)(SP)) - (1))];
                                                                //    286                       OPP(TT) = PSTACK(SP)
_imp_current_line = 286; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 286 "regression-bugs-tmp/draft4.imp"
OPP[TT] = PSTACK[(((int)(SP)) - (1))];
                                                                //    287                       OPP(TT+12) = TSTACK(SP)
_imp_current_line = 287; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 287 "regression-bugs-tmp/draft4.imp"
OPP[(((int)(TT)) + (12))] = TSTACK[(((int)(SP)) - (1))];
                                                                //    288                       TAKES = TAKES-1
_imp_current_line = 288; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 288 "regression-bugs-tmp/draft4.imp"
TAKES = (((int)(TAKES)) - (1));
                                                                //    289                       SP = SP-1
_imp_current_line = 289; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 289 "regression-bugs-tmp/draft4.imp"
SP = (((int)(SP)) - (1));
                                                                //    290                    %REPEAT
_imp_current_line = 290; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 290 "regression-bugs-tmp/draft4.imp"
goto L_0066;
#line 290 "regression-bugs-tmp/draft4.imp"
L_0067:;
                                                                //    291                    %IF COMP(0) = ME %START
_imp_current_line = 291; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 291 "regression-bugs-tmp/draft4.imp"
if (((COMP[0]) != (ME))) goto L_0069;
                                                                //    292                       %IF VALUE > MAXPLY %START
_imp_current_line = 292; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 292 "regression-bugs-tmp/draft4.imp"
if (((VALUE) <= (*MAXPLY))) goto L_006a;
                                                                //    293                          MAXPLY = VALUE
_imp_current_line = 293; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 293 "regression-bugs-tmp/draft4.imp"
*MAXPLY = VALUE;
                                                                //    294                          %IF PLY = 1 %START
_imp_current_line = 294; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 294 "regression-bugs-tmp/draft4.imp"
if (((PLY) != (1))) goto L_006b;
                                                                //    295                             BEST MOVE = M
_imp_current_line = 295; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 295 "regression-bugs-tmp/draft4.imp"
BESTMOVE = M;
                                                                //    296                             BEST TAKE = T
_imp_current_line = 296; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 296 "regression-bugs-tmp/draft4.imp"
BESTTAKE = T;
                                                                //    297                             BEST PIECE = P
_imp_current_line = 297; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 297 "regression-bugs-tmp/draft4.imp"
BESTPIECE = P;
                                                                //    298                          %FINISH
_imp_current_line = 298; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 298 "regression-bugs-tmp/draft4.imp"
L_006b:;
                                                                //    299                       %FINISH
_imp_current_line = 299; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 299 "regression-bugs-tmp/draft4.imp"
L_006a:;
                                                                //    300                       %RESULT = MAXPLY %IF PLY # 1 %AND MAXPLY >= MIN(PLY-1)
_imp_current_line = 300; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 300 "regression-bugs-tmp/draft4.imp"
if (((PLY) == (1))) goto L_006c;
#line 300 "regression-bugs-tmp/draft4.imp"
if (((*MAXPLY) < (MIN[(((int)((((int)(PLY)) - (1)))) - (1))]))) goto L_006c;
#line 300 "regression-bugs-tmp/draft4.imp"
return *MAXPLY;
#line 300 "regression-bugs-tmp/draft4.imp"
L_006c:;
                                                                //    301                    %FINISH %ELSE %START
_imp_current_line = 301; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 301 "regression-bugs-tmp/draft4.imp"
goto L_006d;
#line 301 "regression-bugs-tmp/draft4.imp"
L_0069:;
                                                                //    302                       MINPLY = VALUE %IF VALUE < MINPLY
_imp_current_line = 302; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 302 "regression-bugs-tmp/draft4.imp"
if (((VALUE) >= (*MINPLY))) goto L_006e;
#line 302 "regression-bugs-tmp/draft4.imp"
*MINPLY = VALUE;
#line 302 "regression-bugs-tmp/draft4.imp"
L_006e:;
                                                                //    303                       %RESULT = MINPLY %IF MINPLY <= MAX(PLY-1)
_imp_current_line = 303; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 303 "regression-bugs-tmp/draft4.imp"
if (((*MINPLY) > (MAX[(((int)((((int)(PLY)) - (1)))) - (1))]))) goto L_006f;
#line 303 "regression-bugs-tmp/draft4.imp"
return *MINPLY;
#line 303 "regression-bugs-tmp/draft4.imp"
L_006f:;
                                                                //    304                    %FINISH
_imp_current_line = 304; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 304 "regression-bugs-tmp/draft4.imp"
L_006d:;
                                                                //    305                 %FINISH
_imp_current_line = 305; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 305 "regression-bugs-tmp/draft4.imp"
L_005f:;
                                                                //    306              %REPEAT
_imp_current_line = 306; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 306 "regression-bugs-tmp/draft4.imp"
goto L_005c;
#line 306 "regression-bugs-tmp/draft4.imp"
L_005d:;
                                                                //    307           %REPEAT
_imp_current_line = 307; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 307 "regression-bugs-tmp/draft4.imp"
goto L_0059;
#line 307 "regression-bugs-tmp/draft4.imp"
L_005a:;
                                                                //    308        %FINISH
_imp_current_line = 308; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 308 "regression-bugs-tmp/draft4.imp"
L_0055:;
                                                                //    309        %RESULT = MAXPLY %IF COMP(0) = ME
_imp_current_line = 309; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 309 "regression-bugs-tmp/draft4.imp"
if (((COMP[0]) != (ME))) goto L_0070;
#line 309 "regression-bugs-tmp/draft4.imp"
return *MAXPLY;
#line 309 "regression-bugs-tmp/draft4.imp"
L_0070:;
                                                                //    310        %RESULT = MINPLY
_imp_current_line = 310; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 310 "regression-bugs-tmp/draft4.imp"
return *MINPLY;
                                                                //    311     %END
_imp_current_line = 311; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 311 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block TRYPOSSIBLEMOVES at level 2
                                                                //    312  
                                                                //    313     %ROUTINE SAY PLEASE
_imp_current_line = 313; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 313 "regression-bugs-tmp/draft4.imp"
void SAYPLEASE( void )
#line 313 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    314        PRINTSTRING("Please re-type your move
_imp_current_line = 314; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 314 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Please re-type your move\n"));
                                                                //    315  ")
                                                                //    316     %END
_imp_current_line = 316; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 316 "regression-bugs-tmp/draft4.imp"
return;
_imp_endofblock: ;
} // End of block SAYPLEASE at level 2
                                                                //    317  
                                                                //    318     %ROUTINE PRINT BOARD
_imp_current_line = 318; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 318 "regression-bugs-tmp/draft4.imp"
void PRINTBOARD( void )
#line 318 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    319     %INTEGER I, J, POS
_imp_current_line = 319; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 319 "regression-bugs-tmp/draft4.imp"
int I;
#line 319 "regression-bugs-tmp/draft4.imp"
int J;
#line 319 "regression-bugs-tmp/draft4.imp"
int POS;
                                                                //    320        %CYCLE I = 0, 1, 7
_imp_current_line = 320; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 320 "regression-bugs-tmp/draft4.imp"
I = (-1);
if ((((7)-(0)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 0, 1, 7");
L_0071:;
if (I == 7) goto L_0072;
I += 1;
                                                                //    321           %CYCLE J = 0, 2, 6
_imp_current_line = 321; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 321 "regression-bugs-tmp/draft4.imp"
J = (-2);
if ((((6)-(0)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle J = 0, 2, 6");
L_0074:;
if (J == 6) goto L_0075;
J += 2;
                                                                //    322              BOARD(10*I+J+I&1) = '#'
_imp_current_line = 322; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 322 "regression-bugs-tmp/draft4.imp"
(BOARD+1)[((((((int)((((int)(10)) * (I)))) + (J)))) + (((I) & (1))))] = 35;
                                                                //    323           %REPEAT
_imp_current_line = 323; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 323 "regression-bugs-tmp/draft4.imp"
goto L_0074;
#line 323 "regression-bugs-tmp/draft4.imp"
L_0075:;
                                                                //    324        %REPEAT
_imp_current_line = 324; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 324 "regression-bugs-tmp/draft4.imp"
goto L_0071;
#line 324 "regression-bugs-tmp/draft4.imp"
L_0072:;
                                                                //    325        %CYCLE I = 1, 1, 12
_imp_current_line = 325; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 325 "regression-bugs-tmp/draft4.imp"
I = 0;
if ((((12)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 12");
L_0077:;
if (I == 12) goto L_0078;
I += 1;
                                                                //    326           %IF I <= COMP(25) %START
_imp_current_line = 326; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 326 "regression-bugs-tmp/draft4.imp"
if (((I) > (COMP[26]))) goto L_007a;
                                                                //    327              POS = COMP(I)
_imp_current_line = 327; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 327 "regression-bugs-tmp/draft4.imp"
POS = COMP[((I) + ((int)(1)))];
                                                                //    328             %IF COMP(I+12) = CROWN %THEN BOARD(POS) = 'X' %C
_imp_current_line = 328; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 328 "regression-bugs-tmp/draft4.imp"
if (((COMP[(((unsigned char)((((int)(I)) + (12)))) + (1))]) != (CROWN))) goto L_007b;
#line 328 "regression-bugs-tmp/draft4.imp"
(BOARD+1)[POS] = 88;
#line 328 "regression-bugs-tmp/draft4.imp"
goto L_007c;
#line 328 "regression-bugs-tmp/draft4.imp"
L_007b:;
#line 328 "regression-bugs-tmp/draft4.imp"
(BOARD+1)[POS] = 120;
#line 328 "regression-bugs-tmp/draft4.imp"
L_007c:;
                                                                //    329               %ELSE BOARD(POS) = 'x'
                                                                //    330           %FINISH
_imp_current_line = 330; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 330 "regression-bugs-tmp/draft4.imp"
L_007a:;
                                                                //    331           %IF I <= OPP(25) %START
_imp_current_line = 331; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 331 "regression-bugs-tmp/draft4.imp"
if (((I) > (OPP[26]))) goto L_007d;
                                                                //    332              POS = OPP(I)
_imp_current_line = 332; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 332 "regression-bugs-tmp/draft4.imp"
POS = OPP[((I) + ((int)(1)))];
                                                                //    333              %IF OPP(I+12) = CROWN %THEN BOARD(POS) = 'O' %C
_imp_current_line = 333; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 333 "regression-bugs-tmp/draft4.imp"
if (((OPP[(((unsigned char)((((int)(I)) + (12)))) + (1))]) != (CROWN))) goto L_007e;
#line 333 "regression-bugs-tmp/draft4.imp"
(BOARD+1)[POS] = 79;
#line 333 "regression-bugs-tmp/draft4.imp"
goto L_007f;
#line 333 "regression-bugs-tmp/draft4.imp"
L_007e:;
#line 333 "regression-bugs-tmp/draft4.imp"
(BOARD+1)[POS] = 111;
#line 333 "regression-bugs-tmp/draft4.imp"
L_007f:;
                                                                //    334               %ELSE BOARD(POS) = 'o'
                                                                //    335           %FINISH
_imp_current_line = 335; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 335 "regression-bugs-tmp/draft4.imp"
L_007d:;
                                                                //    336        %REPEAT
_imp_current_line = 336; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 336 "regression-bugs-tmp/draft4.imp"
goto L_0077;
#line 336 "regression-bugs-tmp/draft4.imp"
L_0078:;
                                                                //    337        PRINTSTRING("
_imp_current_line = 337; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 337 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("\n  A B C D E F G H"));
                                                                //    338    A B C D E F G H")
                                                                //    339        %CYCLE I = 70, -10, 0
_imp_current_line = 339; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 339 "regression-bugs-tmp/draft4.imp"
I = 80;
if ((((0)-(70)) % ((-10))) != 0) _imp_signal(5,1,0,"Illegal cycle I = 70, (-10), 0");
L_0080:;
if (I == 0) goto L_0081;
I += (-10);
                                                                //    340           NEWLINE
_imp_current_line = 340; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 340 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    341           PRINTSYMBOL(I//10+'1')
_imp_current_line = 341; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 341 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(((((long)((long)((int)(I)) / (long)((int)(10))))) + (49)));
                                                                //    342           %CYCLE J = 0, 1, 7
_imp_current_line = 342; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 342 "regression-bugs-tmp/draft4.imp"
J = (-1);
if ((((7)-(0)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle J = 0, 1, 7");
L_0083:;
if (J == 7) goto L_0084;
J += 1;
                                                                //    343              SPACE
_imp_current_line = 343; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 343 "regression-bugs-tmp/draft4.imp"
_imp_SPACE();
                                                                //    344              PRINTSYMBOL(BOARD(J+I))
_imp_current_line = 344; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 344 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL((BOARD+1)[(((int)(J)) + (I))]);
                                                                //    345           %REPEAT
_imp_current_line = 345; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 345 "regression-bugs-tmp/draft4.imp"
goto L_0083;
#line 345 "regression-bugs-tmp/draft4.imp"
L_0084:;
                                                                //    346           SPACE
_imp_current_line = 346; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 346 "regression-bugs-tmp/draft4.imp"
_imp_SPACE();
                                                                //    347           PRINTSYMBOL(I//10+'1')
_imp_current_line = 347; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 347 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(((((long)((long)((int)(I)) / (long)((int)(10))))) + (49)));
                                                                //    348        %REPEAT
_imp_current_line = 348; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 348 "regression-bugs-tmp/draft4.imp"
goto L_0080;
#line 348 "regression-bugs-tmp/draft4.imp"
L_0081:;
                                                                //    349        PRINTSTRING("
_imp_current_line = 349; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 349 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("\n  A B C D E F G H\n"));
                                                                //    350    A B C D E F G H
                                                                //    351  ")
                                                                //    352     %END
_imp_current_line = 352; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 352 "regression-bugs-tmp/draft4.imp"
return;
_imp_endofblock: ;
} // End of block PRINTBOARD at level 2
                                                                //    353  
                                                                //    354     %ROUTINE TROUT(%INTEGER OLDPOS, NEWPOS, %INTEGERNAME MODE)
_imp_current_line = 354; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 354 "regression-bugs-tmp/draft4.imp"
void TROUT( int OLDPOS, int NEWPOS, int /*name*/*MODE )
#line 354 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    355     %INTEGER OLDX, OLDY, NEWX, NEWY
_imp_current_line = 355; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 355 "regression-bugs-tmp/draft4.imp"
int OLDX;
#line 355 "regression-bugs-tmp/draft4.imp"
int OLDY;
#line 355 "regression-bugs-tmp/draft4.imp"
int NEWX;
#line 355 "regression-bugs-tmp/draft4.imp"
int NEWY;
                                                                //    356        OLDY = OLDPOS//10;  OLDX = OLDPOS-10*OLDY
_imp_current_line = 356; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 356 "regression-bugs-tmp/draft4.imp"
OLDY = (long)((long)((int)(OLDPOS)) / (long)((int)(10)));
_imp_current_line = 356; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 356 "regression-bugs-tmp/draft4.imp"
OLDX = ((OLDPOS) - ((int)((((int)(10)) * (OLDY)))));
                                                                //    357        NEWY = NEWPOS//10;  NEWX = NEWPOS-10*NEWY
_imp_current_line = 357; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 357 "regression-bugs-tmp/draft4.imp"
NEWY = (long)((long)((int)(NEWPOS)) / (long)((int)(10)));
_imp_current_line = 357; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 357 "regression-bugs-tmp/draft4.imp"
NEWX = ((NEWPOS) - ((int)((((int)(10)) * (NEWY)))));
                                                                //    358        %IF MODE = 0 %THEN PRINTSTRING("DRAFT4's move is ") %AND MODE = 1  %C
_imp_current_line = 358; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 358 "regression-bugs-tmp/draft4.imp"
if (((*MODE) != (0))) goto L_0086;
#line 358 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("DRAFT4's move is "));
#line 358 "regression-bugs-tmp/draft4.imp"
*MODE = 1;
#line 358 "regression-bugs-tmp/draft4.imp"
goto L_0087;
#line 358 "regression-bugs-tmp/draft4.imp"
L_0086:;
#line 358 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal(" , "));
#line 358 "regression-bugs-tmp/draft4.imp"
L_0087:;
                                                                //    359                     %ELSE PRINTSTRING(" , ")
                                                                //    360        PRINTSYMBOL(OLDX+'A')
_imp_current_line = 360; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 360 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL((((int)(OLDX)) + (65)));
                                                                //    361        PRINTSYMBOL(OLDY+'1')
_imp_current_line = 361; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 361 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL((((int)(OLDY)) + (49)));
                                                                //    362        PRINTSYMBOL('-')
_imp_current_line = 362; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 362 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(45);
                                                                //    363        PRINTSYMBOL(NEWX+'A')
_imp_current_line = 363; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 363 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL((((int)(NEWX)) + (65)));
                                                                //    364        PRINTSYMBOL(NEWY+'1')
_imp_current_line = 364; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 364 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL((((int)(NEWY)) + (49)));
                                                                //    365     %END
_imp_current_line = 365; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 365 "regression-bugs-tmp/draft4.imp"
return;
_imp_endofblock: ;
} // End of block TROUT at level 2
                                                                //    366  
                                                                //    367     %INTEGERFN POSITION OF(%INTEGER S1, S2)
_imp_current_line = 367; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 367 "regression-bugs-tmp/draft4.imp"
int POSITIONOF( int S1, int S2 )
#line 367 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    368        %RESULT = (S1-'A')+10*(S2-'1')
_imp_current_line = 368; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 368 "regression-bugs-tmp/draft4.imp"
return ((((((int)(S1)) - (65)))) + (((10) * ((int)((((int)(S2)) - (49)))))));
                                                                //    369     %END
_imp_current_line = 369; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 369 "regression-bugs-tmp/draft4.imp"
_imp_endofblock: ;
} // End of block POSITIONOF at level 2
                                                                //    370  
                                                                //    371     %ROUTINE SKIP SPACES AND NLS
_imp_current_line = 371; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 371 "regression-bugs-tmp/draft4.imp"
void SKIPSPACESANDNLS( void )
#line 371 "regression-bugs-tmp/draft4.imp"
{
  __label__ _imp_endofblock;
                                                                //    372        SKIP SYMBOL %WHILE NEXT SYMBOL=' ' %OR NEXT SYMBOL=NL
_imp_current_line = 372; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 372 "regression-bugs-tmp/draft4.imp"
L_0088:;
#line 372 "regression-bugs-tmp/draft4.imp"
if (((_imp_NEXTSYMBOL()) == (32))) goto L_008a;
#line 372 "regression-bugs-tmp/draft4.imp"
if (((_imp_NEXTSYMBOL()) != (10))) goto L_0089;
#line 372 "regression-bugs-tmp/draft4.imp"
L_008a:;
#line 372 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
#line 372 "regression-bugs-tmp/draft4.imp"
goto L_0088;
#line 372 "regression-bugs-tmp/draft4.imp"
L_0089:;
                                                                //    373     %END
_imp_current_line = 373; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 373 "regression-bugs-tmp/draft4.imp"
return;
_imp_endofblock: ;
} // End of block SKIPSPACESANDNLS at level 2
                                                                //    374  
                                                                //    375     COMPNUM == COMP(25);  OPPNUM == OPP(25)
_imp_current_line = 375; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 375 "regression-bugs-tmp/draft4.imp"
COMPNUM = &COMP[26];
_imp_current_line = 375; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 375 "regression-bugs-tmp/draft4.imp"
OPPNUM = &OPP[26];
                                                                //    376     !CPULIMIT ("12"); ! FOR EMAS - JGH MOD, AS CS1 WERE RUNNING OUT
                                                                //    377     PRINTSTRING("The Draughts programme  DRAFT4.4
_imp_current_line = 377; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 377 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("The Draughts programme  DRAFT4.4\n\n"));
                                                                //    378  
                                                                //    379  ")
                                                                //    380     PRINT STRING("Do you want some help?"); NEWLINE
_imp_current_line = 380; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 380 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Do you want some help?"));
_imp_current_line = 380; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 380 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    381     PROMPT(":")
_imp_current_line = 381; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 381 "regression-bugs-tmp/draft4.imp"
_imp_PROMPT(_imp_str_literal(":"));
                                                                //    382     READ SYMBOL(REPLY(1)); SKIP SYMBOL %WHILE NEXT SYMBOL#NL; SKIP SYMBOL
_imp_current_line = 382; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 382 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&REPLY[0]);
_imp_current_line = 382; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 382 "regression-bugs-tmp/draft4.imp"
L_008b:;
#line 382 "regression-bugs-tmp/draft4.imp"
if (((_imp_NEXTSYMBOL()) == (10))) goto L_008c;
#line 382 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
#line 382 "regression-bugs-tmp/draft4.imp"
goto L_008b;
#line 382 "regression-bugs-tmp/draft4.imp"
L_008c:;
_imp_current_line = 382; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 382 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
                                                                //    383     REPLY(1) = REPLY(1)-32 %IF REPLY(1)>='a'
_imp_current_line = 383; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 383 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) < (97))) goto L_008e;
#line 383 "regression-bugs-tmp/draft4.imp"
REPLY[0] = (((int)(REPLY[0])) - (32));
#line 383 "regression-bugs-tmp/draft4.imp"
L_008e:;
                                                                //    384     %IF REPLY(1)='Y' %START
_imp_current_line = 384; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 384 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (89))) goto L_008f;
                                                                //    385        PRINTSTRING("
_imp_current_line = 385; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 385 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("\n\n   Moves are typed in in the following form:  (e.g.)\n\n      C3-D4      move the piece on square C3 to square D4."));
                                                                //    386  
                                                                //    387     Moves are typed in in the following form:  (e.g.)
                                                                //    388  
                                                                //    389        C3-D4      move the piece on square C3 to square D4.")
                                                                //    390  PRINTSTRING("
_imp_current_line = 390; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 390 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("\n      C3-E5      move C3 to E5, taking the piece on D4\n"));
                                                                //    391        C3-E5      move C3 to E5, taking the piece on D4
                                                                //    392  "); PRINTSTRING("      C3-E5,
_imp_current_line = 392; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 392 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("      C3-E5,\n      E5-C7      an example of a multiple jump\n\n                                                    e.t.c."));
                                                                //    393        E5-C7      an example of a multiple jump
                                                                //    394  
                                                                //    395                                                      e.t.c.")
                                                                //    396     %FINISH
_imp_current_line = 396; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 396 "regression-bugs-tmp/draft4.imp"
L_008f:;
                                                                //    397  RESTART:
_imp_current_line = 397; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 397 "regression-bugs-tmp/draft4.imp"
U_1001:;
                                                                //    398     EXPECTED MOVE = 0
_imp_current_line = 398; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 398 "regression-bugs-tmp/draft4.imp"
EXPECTEDMOVE = 0;
                                                                //    399     ! setting up the pieces
                                                                //    400     %CYCLE P = -1, 1, 26
_imp_current_line = 400; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 400 "regression-bugs-tmp/draft4.imp"
P = (-2);
if ((((26)-((-1))) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle P = (-1), 1, 26");
L_0090:;
if (P == 26) goto L_0091;
P += 1;
                                                                //    401        COMP(P) = PLAYER1(P)
_imp_current_line = 401; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 401 "regression-bugs-tmp/draft4.imp"
COMP[((P) + ((int)(1)))] = (PLAYER1+1)[P];
                                                                //    402        OPP(P) = PLAYER2(P)
_imp_current_line = 402; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 402 "regression-bugs-tmp/draft4.imp"
OPP[((P) + ((int)(1)))] = (PLAYER2+1)[P];
                                                                //    403     %REPEAT
_imp_current_line = 403; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 403 "regression-bugs-tmp/draft4.imp"
goto L_0090;
#line 403 "regression-bugs-tmp/draft4.imp"
L_0091:;
                                                                //    404     NEWLINE
_imp_current_line = 404; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 404 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    405     PRINT STRING("Do you want to start?")
_imp_current_line = 405; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 405 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Do you want to start?"));
                                                                //    406     NEWLINE
_imp_current_line = 406; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 406 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    407     PROMPT(":")
_imp_current_line = 407; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 407 "regression-bugs-tmp/draft4.imp"
_imp_PROMPT(_imp_str_literal(":"));
                                                                //    408     READ SYMBOL(REPLY(1))
_imp_current_line = 408; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 408 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&REPLY[0]);
                                                                //    409     REPLY(1) = REPLY(1)-32 %IF REPLY(1)>='a'
_imp_current_line = 409; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 409 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) < (97))) goto L_0093;
#line 409 "regression-bugs-tmp/draft4.imp"
REPLY[0] = (((int)(REPLY[0])) - (32));
#line 409 "regression-bugs-tmp/draft4.imp"
L_0093:;
                                                                //    410     SKIP SYMBOL %WHILE NEXT SYMBOL#NL; SKIP SYMBOL
_imp_current_line = 410; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 410 "regression-bugs-tmp/draft4.imp"
L_0094:;
#line 410 "regression-bugs-tmp/draft4.imp"
if (((_imp_NEXTSYMBOL()) == (10))) goto L_0095;
#line 410 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
#line 410 "regression-bugs-tmp/draft4.imp"
goto L_0094;
#line 410 "regression-bugs-tmp/draft4.imp"
L_0095:;
_imp_current_line = 410; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 410 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
                                                                //    411     %IF REPLY(1)='R' %START
_imp_current_line = 411; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 411 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (82))) goto L_0097;
                                                                //    412        ! Read board position
                                                                //    413        %CYCLE P = -1,1,26
_imp_current_line = 413; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 413 "regression-bugs-tmp/draft4.imp"
P = (-2);
if ((((26)-((-1))) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle P = (-1), 1, 26");
L_0098:;
if (P == 26) goto L_0099;
P += 1;
                                                                //    414           COMP(P) = 0
_imp_current_line = 414; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 414 "regression-bugs-tmp/draft4.imp"
COMP[((P) + ((int)(1)))] = 0;
                                                                //    415           OPP(P) = 0
_imp_current_line = 415; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 415 "regression-bugs-tmp/draft4.imp"
OPP[((P) + ((int)(1)))] = 0;
                                                                //    416        %REPEAT
_imp_current_line = 416; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 416 "regression-bugs-tmp/draft4.imp"
goto L_0098;
#line 416 "regression-bugs-tmp/draft4.imp"
L_0099:;
                                                                //    417        PRINT STRING("Where are your pieces?"); NEWLINE
_imp_current_line = 417; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 417 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Where are your pieces?"));
_imp_current_line = 417; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 417 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    418        PROMPT(":")
_imp_current_line = 418; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 418 "regression-bugs-tmp/draft4.imp"
_imp_PROMPT(_imp_str_literal(":"));
                                                                //    419        %CYCLE P = 1,1,12
_imp_current_line = 419; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 419 "regression-bugs-tmp/draft4.imp"
P = 0;
if ((((12)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, 12");
L_009b:;
if (P == 12) goto L_009c;
P += 1;
                                                                //    420           SKIP SPACES AND NLS
_imp_current_line = 420; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 420 "regression-bugs-tmp/draft4.imp"
SKIPSPACESANDNLS();
                                                                //    421           READ SYMBOL(A); %IF A='.' %THEN %EXIT
_imp_current_line = 421; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 421 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&A);
_imp_current_line = 421; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 421 "regression-bugs-tmp/draft4.imp"
if (((A) != (46))) goto L_009e;
#line 421 "regression-bugs-tmp/draft4.imp"
goto L_009c;
#line 421 "regression-bugs-tmp/draft4.imp"
L_009e:;
                                                                //    422           READ SYMBOL(B); READ SYMBOL(C)
_imp_current_line = 422; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 422 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&B);
_imp_current_line = 422; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 422 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&C);
                                                                //    423           A = A-32 %IF A>='a'
_imp_current_line = 423; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 423 "regression-bugs-tmp/draft4.imp"
if (((A) < (97))) goto L_009f;
#line 423 "regression-bugs-tmp/draft4.imp"
A = (((int)(A)) - (32));
#line 423 "regression-bugs-tmp/draft4.imp"
L_009f:;
                                                                //    424           B = B-32 %IF A>='a'
_imp_current_line = 424; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 424 "regression-bugs-tmp/draft4.imp"
if (((A) < (97))) goto L_00a0;
#line 424 "regression-bugs-tmp/draft4.imp"
B = (((int)(B)) - (32));
#line 424 "regression-bugs-tmp/draft4.imp"
L_00a0:;
                                                                //    425           POS = POSITION OF(A,B)
_imp_current_line = 425; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 425 "regression-bugs-tmp/draft4.imp"
POS = POSITIONOF(A, B);
                                                                //    426           OPP(P) = POS
_imp_current_line = 426; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 426 "regression-bugs-tmp/draft4.imp"
OPP[((P) + ((int)(1)))] = POS;
                                                                //    427           %IF C=' ' %THEN OPP(P+12) = 1000 %ELSE OPP(P+12) = CROWN
_imp_current_line = 427; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 427 "regression-bugs-tmp/draft4.imp"
if (((C) != (32))) goto L_00a1;
#line 427 "regression-bugs-tmp/draft4.imp"
OPP[(((unsigned char)((((int)(P)) + (12)))) + (1))] = 1000;
#line 427 "regression-bugs-tmp/draft4.imp"
goto L_00a2;
#line 427 "regression-bugs-tmp/draft4.imp"
L_00a1:;
#line 427 "regression-bugs-tmp/draft4.imp"
OPP[(((unsigned char)((((int)(P)) + (12)))) + (1))] = CROWN;
#line 427 "regression-bugs-tmp/draft4.imp"
L_00a2:;
                                                                //    428        %REPEAT
_imp_current_line = 428; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 428 "regression-bugs-tmp/draft4.imp"
goto L_009b;
#line 428 "regression-bugs-tmp/draft4.imp"
L_009c:;
                                                                //    429        OPP(0) = 2
_imp_current_line = 429; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 429 "regression-bugs-tmp/draft4.imp"
OPP[1] = 2;
                                                                //    430        OPP(25) = P;        ! no of pieces.
_imp_current_line = 430; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 430 "regression-bugs-tmp/draft4.imp"
OPP[26] = P;
                                                                //    431        PRINT STRING("Where are my pieces?"); NEWLINE
_imp_current_line = 431; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 431 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Where are my pieces?"));
_imp_current_line = 431; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 431 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    432        %CYCLE P = 1,1,12
_imp_current_line = 432; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 432 "regression-bugs-tmp/draft4.imp"
P = 0;
if ((((12)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, 12");
L_00a3:;
if (P == 12) goto L_00a4;
P += 1;
                                                                //    433           SKIP SPACES AND NLS
_imp_current_line = 433; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 433 "regression-bugs-tmp/draft4.imp"
SKIPSPACESANDNLS();
                                                                //    434           READ SYMBOL(A); %IF A='.' %THEN %EXIT
_imp_current_line = 434; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 434 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&A);
_imp_current_line = 434; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 434 "regression-bugs-tmp/draft4.imp"
if (((A) != (46))) goto L_00a6;
#line 434 "regression-bugs-tmp/draft4.imp"
goto L_00a4;
#line 434 "regression-bugs-tmp/draft4.imp"
L_00a6:;
                                                                //    435           READ SYMBOL(B); READ SYMBOL(C)
_imp_current_line = 435; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 435 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&B);
_imp_current_line = 435; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 435 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&C);
                                                                //    436           A = A-32 %IF A>='a'
_imp_current_line = 436; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 436 "regression-bugs-tmp/draft4.imp"
if (((A) < (97))) goto L_00a7;
#line 436 "regression-bugs-tmp/draft4.imp"
A = (((int)(A)) - (32));
#line 436 "regression-bugs-tmp/draft4.imp"
L_00a7:;
                                                                //    437           B = B-32 %IF B>='a'
_imp_current_line = 437; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 437 "regression-bugs-tmp/draft4.imp"
if (((B) < (97))) goto L_00a8;
#line 437 "regression-bugs-tmp/draft4.imp"
B = (((int)(B)) - (32));
#line 437 "regression-bugs-tmp/draft4.imp"
L_00a8:;
                                                                //    438           POS = POSITION OF(A,B)
_imp_current_line = 438; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 438 "regression-bugs-tmp/draft4.imp"
POS = POSITIONOF(A, B);
                                                                //    439           COMP(P) = POS
_imp_current_line = 439; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 439 "regression-bugs-tmp/draft4.imp"
COMP[((P) + ((int)(1)))] = POS;
                                                                //    440           %IF C=' ' %THEN COMP(P+12) = 1000 %ELSE COMP(P+12) = CROWN
_imp_current_line = 440; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 440 "regression-bugs-tmp/draft4.imp"
if (((C) != (32))) goto L_00a9;
#line 440 "regression-bugs-tmp/draft4.imp"
COMP[(((unsigned char)((((int)(P)) + (12)))) + (1))] = 1000;
#line 440 "regression-bugs-tmp/draft4.imp"
goto L_00aa;
#line 440 "regression-bugs-tmp/draft4.imp"
L_00a9:;
#line 440 "regression-bugs-tmp/draft4.imp"
COMP[(((unsigned char)((((int)(P)) + (12)))) + (1))] = CROWN;
#line 440 "regression-bugs-tmp/draft4.imp"
L_00aa:;
                                                                //    441        %REPEAT
_imp_current_line = 441; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 441 "regression-bugs-tmp/draft4.imp"
goto L_00a3;
#line 441 "regression-bugs-tmp/draft4.imp"
L_00a4:;
                                                                //    442        COMP(0)  = ME
_imp_current_line = 442; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 442 "regression-bugs-tmp/draft4.imp"
COMP[1] = ME;
                                                                //    443        COMP(25) = P;        ! NO OF PIECES
_imp_current_line = 443; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 443 "regression-bugs-tmp/draft4.imp"
COMP[26] = P;
                                                                //    444        SKIP SYMBOL;       ! NL
_imp_current_line = 444; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 444 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
                                                                //    445        PROMPT("Your move?")
_imp_current_line = 445; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 445 "regression-bugs-tmp/draft4.imp"
_imp_PROMPT(_imp_str_literal("Your move?"));
                                                                //    446        READ SYMBOL(A)
_imp_current_line = 446; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 446 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&A);
                                                                //    447        SKIP SYMBOL %WHILE NEXT SYMBOL#NL; SKIP SYMBOL
_imp_current_line = 447; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 447 "regression-bugs-tmp/draft4.imp"
L_00ab:;
#line 447 "regression-bugs-tmp/draft4.imp"
if (((_imp_NEXTSYMBOL()) == (10))) goto L_00ac;
#line 447 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
#line 447 "regression-bugs-tmp/draft4.imp"
goto L_00ab;
#line 447 "regression-bugs-tmp/draft4.imp"
L_00ac:;
_imp_current_line = 447; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 447 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
                                                                //    448        A = A-32 %IF A>='a'
_imp_current_line = 448; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 448 "regression-bugs-tmp/draft4.imp"
if (((A) < (97))) goto L_00ae;
#line 448 "regression-bugs-tmp/draft4.imp"
A = (((int)(A)) - (32));
#line 448 "regression-bugs-tmp/draft4.imp"
L_00ae:;
                                                                //    449        %IF A='Y' %THEN -> READ MOVE %ELSE -> COMP MOVE
_imp_current_line = 449; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 449 "regression-bugs-tmp/draft4.imp"
if (((A) != (89))) goto L_00af;
#line 449 "regression-bugs-tmp/draft4.imp"
goto U_1002;
#line 449 "regression-bugs-tmp/draft4.imp"
L_00af:;
#line 449 "regression-bugs-tmp/draft4.imp"
goto U_1003;
                                                                //    450     %FINISH
_imp_current_line = 450; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 450 "regression-bugs-tmp/draft4.imp"
L_0097:;
                                                                //    451     %IF REPLY(1) = 'N' %START
_imp_current_line = 451; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 451 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (78))) goto L_00b0;
                                                                //    452        PRINT STRING("Think of a number please"); NEWLINE
_imp_current_line = 452; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 452 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Think of a number please"));
_imp_current_line = 452; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 452 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    453        READ SYMBOL(I); SKIP SYMBOL
_imp_current_line = 453; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 453 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&I);
_imp_current_line = 453; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 453 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
                                                                //    454        I = (I-'0')&3
_imp_current_line = 454; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 454 "regression-bugs-tmp/draft4.imp"
I = (((((int)(I)) - (48))) & (3));
                                                                //    455        COMP(-1) = 'B';  OPP(-1) = 'W'
_imp_current_line = 455; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 455 "regression-bugs-tmp/draft4.imp"
COMP[0] = 66;
_imp_current_line = 455; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 455 "regression-bugs-tmp/draft4.imp"
OPP[0] = 87;
                                                                //    456        PRINTSTRING("DRAFT4's opening move is ")
_imp_current_line = 456; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 456 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("DRAFT4's opening move is "));
                                                                //    457        %IF I = 1 %THEN PRINTSTRING("D6-C5") %AND COMP(11) = 42
_imp_current_line = 457; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 457 "regression-bugs-tmp/draft4.imp"
if (((I) != (1))) goto L_00b1;
#line 457 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("D6-C5"));
#line 457 "regression-bugs-tmp/draft4.imp"
COMP[12] = 42;
#line 457 "regression-bugs-tmp/draft4.imp"
L_00b1:;
                                                                //    458        %IF I = 2 %THEN PRINTSTRING("D6-E5") %AND COMP(11) = 44
_imp_current_line = 458; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 458 "regression-bugs-tmp/draft4.imp"
if (((I) != (2))) goto L_00b2;
#line 458 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("D6-E5"));
#line 458 "regression-bugs-tmp/draft4.imp"
COMP[12] = 44;
#line 458 "regression-bugs-tmp/draft4.imp"
L_00b2:;
                                                                //    459        %IF I = 3 %THEN PRINTSTRING("F6-E5") %AND COMP(10) = 44
_imp_current_line = 459; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 459 "regression-bugs-tmp/draft4.imp"
if (((I) != (3))) goto L_00b3;
#line 459 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("F6-E5"));
#line 459 "regression-bugs-tmp/draft4.imp"
COMP[11] = 44;
#line 459 "regression-bugs-tmp/draft4.imp"
L_00b3:;
                                                                //    460        NEWLINE
_imp_current_line = 460; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 460 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    461     %FINISH
_imp_current_line = 461; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 461 "regression-bugs-tmp/draft4.imp"
L_00b0:;
                                                                //    462  READ MOVE:
_imp_current_line = 462; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 462 "regression-bugs-tmp/draft4.imp"
U_1002:;
                                                                //    463     PRINT BOARD
_imp_current_line = 463; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 463 "regression-bugs-tmp/draft4.imp"
PRINTBOARD();
                                                                //    464     PROMPT("Your move:")
_imp_current_line = 464; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 464 "regression-bugs-tmp/draft4.imp"
_imp_PROMPT(_imp_str_literal("Your move:"));
                                                                //    465     SKIP SYMBOL %WHILE NEXT SYMBOL <= ' '
_imp_current_line = 465; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 465 "regression-bugs-tmp/draft4.imp"
L_00b4:;
#line 465 "regression-bugs-tmp/draft4.imp"
if (((_imp_NEXTSYMBOL()) > (32))) goto L_00b5;
#line 465 "regression-bugs-tmp/draft4.imp"
_imp_SKIPSYMBOL();
#line 465 "regression-bugs-tmp/draft4.imp"
goto L_00b4;
#line 465 "regression-bugs-tmp/draft4.imp"
L_00b5:;
                                                                //    466     %CYCLE I = 1, 1, 8
_imp_current_line = 466; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 466 "regression-bugs-tmp/draft4.imp"
I = 0;
if ((((8)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 8");
L_00b7:;
if (I == 8) goto L_00b8;
I += 1;
                                                                //    467        READ SYMBOL(REPLY(I))
_imp_current_line = 467; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 467 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&REPLY[(((int)(I)) - (1))]);
                                                                //    468        REPLY(I) = REPLY(I)-32 %IF REPLY(I)>='a'
_imp_current_line = 468; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 468 "regression-bugs-tmp/draft4.imp"
if (((REPLY[(((int)(I)) - (1))]) < (97))) goto L_00ba;
#line 468 "regression-bugs-tmp/draft4.imp"
REPLY[(((int)(I)) - (1))] = (((int)(REPLY[(((int)(I)) - (1))])) - (32));
#line 468 "regression-bugs-tmp/draft4.imp"
L_00ba:;
                                                                //    469        %EXIT %IF REPLY(I) = NL
_imp_current_line = 469; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 469 "regression-bugs-tmp/draft4.imp"
if (((REPLY[(((int)(I)) - (1))]) != (10))) goto L_00bb;
#line 469 "regression-bugs-tmp/draft4.imp"
goto L_00b8;
#line 469 "regression-bugs-tmp/draft4.imp"
L_00bb:;
                                                                //    470     %REPEAT
_imp_current_line = 470; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 470 "regression-bugs-tmp/draft4.imp"
goto L_00b7;
#line 470 "regression-bugs-tmp/draft4.imp"
L_00b8:;
                                                                //    471     REPLY(I) = ' ' %AND I = I+1 %UNTIL I = 9
_imp_current_line = 471; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 471 "regression-bugs-tmp/draft4.imp"
L_00bc:;
#line 471 "regression-bugs-tmp/draft4.imp"
REPLY[(((int)(I)) - (1))] = 32;
#line 471 "regression-bugs-tmp/draft4.imp"
I = (((int)(I)) + (1));
#line 471 "regression-bugs-tmp/draft4.imp"
if (((I) == (9))) goto L_00bd;
#line 471 "regression-bugs-tmp/draft4.imp"
goto L_00bc;
#line 471 "regression-bugs-tmp/draft4.imp"
L_00bd:;
                                                                //    472     %IF REPLY(1) = 'M' %THEN MON = 'M' %AND -> READ MOVE
_imp_current_line = 472; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 472 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (77))) goto L_00bf;
#line 472 "regression-bugs-tmp/draft4.imp"
MON = 77;
#line 472 "regression-bugs-tmp/draft4.imp"
goto U_1002;
#line 472 "regression-bugs-tmp/draft4.imp"
L_00bf:;
                                                                //    473     %IF REPLY(1) = 'Q' %THEN MON = 'Q' %AND -> READ MOVE
_imp_current_line = 473; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 473 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (81))) goto L_00c0;
#line 473 "regression-bugs-tmp/draft4.imp"
MON = 81;
#line 473 "regression-bugs-tmp/draft4.imp"
goto U_1002;
#line 473 "regression-bugs-tmp/draft4.imp"
L_00c0:;
                                                                //    474  TRANS:
_imp_current_line = 474; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 474 "regression-bugs-tmp/draft4.imp"
U_1004:;
                                                                //    475     %IF REPLY(1) = 'I' %THEN -> STOP
_imp_current_line = 475; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 475 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (73))) goto L_00c1;
#line 475 "regression-bugs-tmp/draft4.imp"
goto U_1005;
#line 475 "regression-bugs-tmp/draft4.imp"
L_00c1:;
                                                                //    476     %IF REPLY(6) = ','%THEN MORE = 'M' %ELSE MORE = ' '
_imp_current_line = 476; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 476 "regression-bugs-tmp/draft4.imp"
if (((REPLY[5]) != (44))) goto L_00c2;
#line 476 "regression-bugs-tmp/draft4.imp"
MORE = 77;
#line 476 "regression-bugs-tmp/draft4.imp"
goto L_00c3;
#line 476 "regression-bugs-tmp/draft4.imp"
L_00c2:;
#line 476 "regression-bugs-tmp/draft4.imp"
MORE = 32;
#line 476 "regression-bugs-tmp/draft4.imp"
L_00c3:;
                                                                //    477     OLDPOS = POSITION OF(REPLY(1), REPLY(2))
_imp_current_line = 477; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 477 "regression-bugs-tmp/draft4.imp"
OLDPOS = POSITIONOF(REPLY[0], REPLY[1]);
                                                                //    478     NEWPOS = POSITION OF(REPLY(4), REPLY(5))
_imp_current_line = 478; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 478 "regression-bugs-tmp/draft4.imp"
NEWPOS = POSITIONOF(REPLY[3], REPLY[4]);
                                                                //    479     %IF VALID POS(OLDPOS) = -1 %START
_imp_current_line = 479; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 479 "regression-bugs-tmp/draft4.imp"
if (((VALIDPOS(OLDPOS)) != ((-1)))) goto L_00c4;
                                                                //    480        PRINTSTRING("The square ")
_imp_current_line = 480; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 480 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("The square "));
                                                                //    481        PRINT SYMBOL(REPLY(1));  PRINT SYMBOL(REPLY(2))
_imp_current_line = 481; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 481 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[0]);
_imp_current_line = 481; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 481 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[1]);
                                                                //    482        PRINTSTRING(" does not exist!
_imp_current_line = 482; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 482 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal(" does not exist!\n"));
                                                                //    483  ")
                                                                //    484        SAY PLEASE
_imp_current_line = 484; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 484 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    485        -> READ MOVE
_imp_current_line = 485; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 485 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    486     %FINISH
_imp_current_line = 486; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 486 "regression-bugs-tmp/draft4.imp"
L_00c4:;
                                                                //    487     M = VALID POS(NEWPOS)
_imp_current_line = 487; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 487 "regression-bugs-tmp/draft4.imp"
M = VALIDPOS(NEWPOS);
                                                                //    488     %IF M = -1 %START
_imp_current_line = 488; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 488 "regression-bugs-tmp/draft4.imp"
if (((M) != ((-1)))) goto L_00c5;
                                                                //    489        PRINTSTRING("You cannot move to square ")
_imp_current_line = 489; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 489 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You cannot move to square "));
                                                                //    490        PRINTSYMBOL(REPLY(4));  PRINTSYMBOL(REPLY(5))
_imp_current_line = 490; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 490 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[3]);
_imp_current_line = 490; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 490 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[4]);
                                                                //    491        PRINTSTRING(";  it does not exist!
_imp_current_line = 491; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 491 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal(";  it does not exist!\n"));
                                                                //    492  ")
                                                                //    493        SAY PLEASE
_imp_current_line = 493; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 493 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    494        -> READ MOVE
_imp_current_line = 494; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 494 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    495     %FINISH
_imp_current_line = 495; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 495 "regression-bugs-tmp/draft4.imp"
L_00c5:;
                                                                //    496     %IF M = 1 %START
_imp_current_line = 496; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 496 "regression-bugs-tmp/draft4.imp"
if (((M) != (1))) goto L_00c6;
                                                                //    497        PRINTSTRING("You cannot move to square ")
_imp_current_line = 497; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 497 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You cannot move to square "));
                                                                //    498        PRINT SYMBOL(REPLY(4));  PRINT SYMBOL(REPLY(5))
_imp_current_line = 498; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 498 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[3]);
_imp_current_line = 498; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 498 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[4]);
                                                                //    499        PRINTSTRING(";  it is already occupied!
_imp_current_line = 499; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 499 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal(";  it is already occupied!\n"));
                                                                //    500  ")
                                                                //    501        SAY PLEASE
_imp_current_line = 501; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 501 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    502        -> READ MOVE
_imp_current_line = 502; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 502 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    503     %FINISH
_imp_current_line = 503; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 503 "regression-bugs-tmp/draft4.imp"
L_00c6:;
                                                                //    504     %CYCLE P = 1, 1, OPP(25)
_imp_current_line = 504; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 504 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = OPP[26]; P = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle P = 1, 1, OPP[26]");
P -= _increment; _control -= _increment;
L_00c7:;
if (P == _final) goto L_00c8;
P += _increment; _control += _increment;
if (P != _control) _imp_signal(4,2,0,"Corrupt control variable P"); /* FOR loop control variable corrupted */
}
                                                                //    505        %IF OLDPOS = OPP(P) %THENEXIT
_imp_current_line = 505; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 505 "regression-bugs-tmp/draft4.imp"
if (((OLDPOS) != (OPP[((P) + ((int)(1)))]))) goto L_00ca;
#line 505 "regression-bugs-tmp/draft4.imp"
goto L_00c8;
#line 505 "regression-bugs-tmp/draft4.imp"
L_00ca:;
                                                                //    506     %REPEAT
_imp_current_line = 506; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 506 "regression-bugs-tmp/draft4.imp"
goto L_00c7;
#line 506 "regression-bugs-tmp/draft4.imp"
L_00c8:;
                                                                //    507     %UNLESS OLDPOS = OPP(P) %START
_imp_current_line = 507; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 507 "regression-bugs-tmp/draft4.imp"
if (((OLDPOS) == (OPP[((P) + ((int)(1)))]))) goto L_00cb;
                                                                //    508        PRINTSTRING("You do not have a piece on square ")
_imp_current_line = 508; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 508 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You do not have a piece on square "));
                                                                //    509        PRINT SYMBOL(REPLY(1));  PRINT SYMBOL(REPLY(2))
_imp_current_line = 509; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 509 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[0]);
_imp_current_line = 509; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 509 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSYMBOL(REPLY[1]);
                                                                //    510        NEWLINE
_imp_current_line = 510; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 510 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    511        SAY PLEASE
_imp_current_line = 511; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 511 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    512        -> READ MOVE
_imp_current_line = 512; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 512 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    513     %FINISH
_imp_current_line = 513; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 513 "regression-bugs-tmp/draft4.imp"
L_00cb:;
                                                                //    514     PIECE = P
_imp_current_line = 514; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 514 "regression-bugs-tmp/draft4.imp"
PIECE = P;
                                                                //    515     DIF = NEWPOS-OLDPOS
_imp_current_line = 515; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 515 "regression-bugs-tmp/draft4.imp"
DIF = (((int)(NEWPOS)) - (OLDPOS));
                                                                //    516     MODIF = MOD(DIF)
_imp_current_line = 516; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 516 "regression-bugs-tmp/draft4.imp"
MODIF = MOD(DIF);
                                                                //    517     %IF MODIF < 12 %AND EXPECTED MOVE > 0 %START
_imp_current_line = 517; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 517 "regression-bugs-tmp/draft4.imp"
if (((MODIF) >= (12))) goto L_00cc;
#line 517 "regression-bugs-tmp/draft4.imp"
if (((EXPECTEDMOVE) <= (0))) goto L_00cc;
                                                                //    518        PRINTSTRING("You MUST take the piece that I am offering you
_imp_current_line = 518; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 518 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You MUST take the piece that I am offering you\n"));
                                                                //    519  ")
                                                                //    520        SAY PLEASE
_imp_current_line = 520; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 520 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    521        -> READ MOVE
_imp_current_line = 521; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 521 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    522     %FINISH
_imp_current_line = 522; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 522 "regression-bugs-tmp/draft4.imp"
L_00cc:;
                                                                //    523     %IF MODIF < 12 %AND MORE = 'M' %START
_imp_current_line = 523; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 523 "regression-bugs-tmp/draft4.imp"
if (((MODIF) >= (12))) goto L_00cd;
#line 523 "regression-bugs-tmp/draft4.imp"
if (((MORE) != (77))) goto L_00cd;
                                                                //    524        PRINTSTRING("That's not part of a multiple jump move
_imp_current_line = 524; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 524 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("That's not part of a multiple jump move\n"));
                                                                //    525  ")
                                                                //    526        SAY PLEASE
_imp_current_line = 526; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 526 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    527        -> READ MOVE
_imp_current_line = 527; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 527 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    528     %FINISH
_imp_current_line = 528; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 528 "regression-bugs-tmp/draft4.imp"
L_00cd:;
                                                                //    529     %IF DIF < 0 %AND OPP(PIECE+12) # CROWN %START
_imp_current_line = 529; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 529 "regression-bugs-tmp/draft4.imp"
if (((DIF) >= (0))) goto L_00ce;
#line 529 "regression-bugs-tmp/draft4.imp"
if (((OPP[(((unsigned char)((((int)(PIECE)) + (12)))) + (1))]) == (CROWN))) goto L_00ce;
                                                                //    530        PRINTSTRING("You cannot move that piece backwards!
_imp_current_line = 530; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 530 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You cannot move that piece backwards!\n"));
                                                                //    531  ")
                                                                //    532        SAY PLEASE
_imp_current_line = 532; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 532 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    533        -> READ MOVE
_imp_current_line = 533; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 533 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    534     %FINISH
_imp_current_line = 534; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 534 "regression-bugs-tmp/draft4.imp"
L_00ce:;
                                                                //    535     %UNLESS MODIF = 11 %OR MODIF = 9 %OR MODIF = 22 %OR MODIF = 18 %START
_imp_current_line = 535; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 535 "regression-bugs-tmp/draft4.imp"
if (((MODIF) == (11))) goto L_00cf;
#line 535 "regression-bugs-tmp/draft4.imp"
if (((MODIF) == (9))) goto L_00cf;
#line 535 "regression-bugs-tmp/draft4.imp"
if (((MODIF) == (22))) goto L_00cf;
#line 535 "regression-bugs-tmp/draft4.imp"
if (((MODIF) == (18))) goto L_00cf;
                                                                //    536        PRINTSTRING("That move does not exist in my rule book!
_imp_current_line = 536; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 536 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("That move does not exist in my rule book!\n"));
                                                                //    537  ")
                                                                //    538        SAY PLEASE
_imp_current_line = 538; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 538 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    539        -> READ MOVE
_imp_current_line = 539; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 539 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    540     %FINISH
_imp_current_line = 540; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 540 "regression-bugs-tmp/draft4.imp"
L_00cf:;
                                                                //    541     %IF MODIF > 11 %START
_imp_current_line = 541; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 541 "regression-bugs-tmp/draft4.imp"
if (((MODIF) <= (11))) goto L_00d0;
                                                                //    542        JUMP = DIF//2
_imp_current_line = 542; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 542 "regression-bugs-tmp/draft4.imp"
JUMP = (long)((long)((int)(DIF)) / (long)((int)(2)));
                                                                //    543        COMPOS = OLDPOS+JUMP
_imp_current_line = 543; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 543 "regression-bugs-tmp/draft4.imp"
COMPOS = (((int)(OLDPOS)) + (JUMP));
                                                                //    544        %CYCLE I = 1, 1, COMP(25)
_imp_current_line = 544; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 544 "regression-bugs-tmp/draft4.imp"
{static int _initial, _increment, _final, _control;
_initial = 1; _increment = 1; _final = COMP[26]; I = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, COMP[26]");
I -= _increment; _control -= _increment;
L_00d1:;
if (I == _final) goto L_00d2;
I += _increment; _control += _increment;
if (I != _control) _imp_signal(4,2,0,"Corrupt control variable I"); /* FOR loop control variable corrupted */
}
                                                                //    545           %EXIT %IF COMPOS = COMP(I)
_imp_current_line = 545; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 545 "regression-bugs-tmp/draft4.imp"
if (((COMPOS) != (COMP[((I) + ((int)(1)))]))) goto L_00d4;
#line 545 "regression-bugs-tmp/draft4.imp"
goto L_00d2;
#line 545 "regression-bugs-tmp/draft4.imp"
L_00d4:;
                                                                //    546        %REPEAT
_imp_current_line = 546; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 546 "regression-bugs-tmp/draft4.imp"
goto L_00d1;
#line 546 "regression-bugs-tmp/draft4.imp"
L_00d2:;
                                                                //    547        %UNLESS COMPOS = COMP(I) %START
_imp_current_line = 547; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 547 "regression-bugs-tmp/draft4.imp"
if (((COMPOS) == (COMP[((I) + ((int)(1)))]))) goto L_00d5;
                                                                //    548           PRINTSTRING("You cannot do that.  You are not jumping one of my pieces
_imp_current_line = 548; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 548 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You cannot do that.  You are not jumping one of my pieces\n"));
                                                                //    549  ")
                                                                //    550           SAY PLEASE
_imp_current_line = 550; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 550 "regression-bugs-tmp/draft4.imp"
SAYPLEASE();
                                                                //    551           -> READ MOVE
_imp_current_line = 551; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 551 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    552        %FINISH
_imp_current_line = 552; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 552 "regression-bugs-tmp/draft4.imp"
L_00d5:;
                                                                //    553        JMAN = I
_imp_current_line = 553; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 553 "regression-bugs-tmp/draft4.imp"
JMAN = I;
                                                                //    554     %FINISH %ELSE JMAN = 0
_imp_current_line = 554; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 554 "regression-bugs-tmp/draft4.imp"
goto L_00d6;
#line 554 "regression-bugs-tmp/draft4.imp"
L_00d0:;
#line 554 "regression-bugs-tmp/draft4.imp"
JMAN = 0;
#line 554 "regression-bugs-tmp/draft4.imp"
L_00d6:;
                                                                //    555     MAKE MOVE(DIF, PIECE, JMAN, OPP, COMP)
_imp_current_line = 555; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 555 "regression-bugs-tmp/draft4.imp"
MAKEMOVE(DIF, PIECE, &JMAN, &OPP[-((-1))], &COMP[-((-1))]);
                                                                //    556     %IF MORE = 'M' %START
_imp_current_line = 556; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 556 "regression-bugs-tmp/draft4.imp"
if (((MORE) != (77))) goto L_00d7;
                                                                //    557        LASTPOS = NEWPOS
_imp_current_line = 557; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 557 "regression-bugs-tmp/draft4.imp"
LASTPOS = NEWPOS;
                                                                //    558  READ AGAIN:
_imp_current_line = 558; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 558 "regression-bugs-tmp/draft4.imp"
U_1006:;
                                                                //    559        PROMPT("and:")
_imp_current_line = 559; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 559 "regression-bugs-tmp/draft4.imp"
_imp_PROMPT(_imp_str_literal("and:"));
                                                                //    560        %CYCLE I = 1, 1, 8
_imp_current_line = 560; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 560 "regression-bugs-tmp/draft4.imp"
I = 0;
if ((((8)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 8");
L_00d8:;
if (I == 8) goto L_00d9;
I += 1;
                                                                //    561           READ SYMBOL(REPLY(I))
_imp_current_line = 561; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 561 "regression-bugs-tmp/draft4.imp"
_imp_READSYMBOL(&REPLY[(((int)(I)) - (1))]);
                                                                //    562           REPLY(I) = REPLY(I)-32 %IF REPLY(I)>='a'
_imp_current_line = 562; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 562 "regression-bugs-tmp/draft4.imp"
if (((REPLY[(((int)(I)) - (1))]) < (97))) goto L_00db;
#line 562 "regression-bugs-tmp/draft4.imp"
REPLY[(((int)(I)) - (1))] = (((int)(REPLY[(((int)(I)) - (1))])) - (32));
#line 562 "regression-bugs-tmp/draft4.imp"
L_00db:;
                                                                //    563           %EXIT %IF REPLY(I) = NL
_imp_current_line = 563; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 563 "regression-bugs-tmp/draft4.imp"
if (((REPLY[(((int)(I)) - (1))]) != (10))) goto L_00dc;
#line 563 "regression-bugs-tmp/draft4.imp"
goto L_00d9;
#line 563 "regression-bugs-tmp/draft4.imp"
L_00dc:;
                                                                //    564        %REPEAT
_imp_current_line = 564; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 564 "regression-bugs-tmp/draft4.imp"
goto L_00d8;
#line 564 "regression-bugs-tmp/draft4.imp"
L_00d9:;
                                                                //    565        %IF REPLY(1) = '.'%THEN -> COMP MOVE
_imp_current_line = 565; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 565 "regression-bugs-tmp/draft4.imp"
if (((REPLY[0]) != (46))) goto L_00dd;
#line 565 "regression-bugs-tmp/draft4.imp"
goto U_1003;
#line 565 "regression-bugs-tmp/draft4.imp"
L_00dd:;
                                                                //    566        REPLY(I) = ' ' %AND I = I+1 %UNTIL I = 9
_imp_current_line = 566; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 566 "regression-bugs-tmp/draft4.imp"
L_00de:;
#line 566 "regression-bugs-tmp/draft4.imp"
REPLY[(((int)(I)) - (1))] = 32;
#line 566 "regression-bugs-tmp/draft4.imp"
I = (((int)(I)) + (1));
#line 566 "regression-bugs-tmp/draft4.imp"
if (((I) == (9))) goto L_00df;
#line 566 "regression-bugs-tmp/draft4.imp"
goto L_00de;
#line 566 "regression-bugs-tmp/draft4.imp"
L_00df:;
                                                                //    567        OLDPOS = POSITION OF(REPLY(1), REPLY(2))
_imp_current_line = 567; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 567 "regression-bugs-tmp/draft4.imp"
OLDPOS = POSITIONOF(REPLY[0], REPLY[1]);
                                                                //    568        NEWPOS = POSITION OF(REPLY(4), REPLY(5))
_imp_current_line = 568; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 568 "regression-bugs-tmp/draft4.imp"
NEWPOS = POSITIONOF(REPLY[3], REPLY[4]);
                                                                //    569        DIF = NEWPOS-OLDPOS
_imp_current_line = 569; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 569 "regression-bugs-tmp/draft4.imp"
DIF = (((int)(NEWPOS)) - (OLDPOS));
                                                                //    570        DIF = MOD(DIF)
_imp_current_line = 570; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 570 "regression-bugs-tmp/draft4.imp"
DIF = MOD(DIF);
                                                                //    571        %IF DIF > 11 %AND OLDPOS = LASTPOS %THEN -> TRANS
_imp_current_line = 571; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 571 "regression-bugs-tmp/draft4.imp"
if (((DIF) <= (11))) goto L_00e1;
#line 571 "regression-bugs-tmp/draft4.imp"
if (((OLDPOS) != (LASTPOS))) goto L_00e1;
#line 571 "regression-bugs-tmp/draft4.imp"
goto U_1004;
#line 571 "regression-bugs-tmp/draft4.imp"
L_00e1:;
                                                                //    572        PRINTSTRING("That's not part of a multiple jump
_imp_current_line = 572; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 572 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("That's not part of a multiple jump\nPlease re-type that part\n"));
                                                                //    573  Please re-type that part
                                                                //    574  ")
                                                                //    575        -> READ AGAIN
_imp_current_line = 575; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 575 "regression-bugs-tmp/draft4.imp"
goto U_1006;
                                                                //    576     %FINISH
_imp_current_line = 576; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 576 "regression-bugs-tmp/draft4.imp"
L_00d7:;
                                                                //    577  COMP MOVE: ! COMPUTER MAKES MOVE.
_imp_current_line = 577; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 577 "regression-bugs-tmp/draft4.imp"
U_1003:;
                                                                //    578     %IF COMPNUM = 0 %START
_imp_current_line = 578; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 578 "regression-bugs-tmp/draft4.imp"
if (((*COMPNUM) != (0))) goto L_00e2;
                                                                //    579        PRINTSTRING(" I have no pieces left so I suppose you have won
_imp_current_line = 579; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 579 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal(" I have no pieces left so I suppose you have won\n"));
                                                                //    580  ")
                                                                //    581        -> STOP
_imp_current_line = 581; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 581 "regression-bugs-tmp/draft4.imp"
goto U_1005;
                                                                //    582     %FINISH
_imp_current_line = 582; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 582 "regression-bugs-tmp/draft4.imp"
L_00e2:;
                                                                //    583     %IF PENDING MOVE(COMP, OPP) = -1 %START
_imp_current_line = 583; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 583 "regression-bugs-tmp/draft4.imp"
if (((PENDINGMOVE(&COMP[-((-1))], &OPP[-((-1))])) != ((-1)))) goto L_00e3;
                                                                //    584        PRINTSTRING("I cannot move any of my pieces so you win
_imp_current_line = 584; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 584 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("I cannot move any of my pieces so you win\n"));
                                                                //    585  ")
                                                                //    586         -> STOP
_imp_current_line = 586; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 586 "regression-bugs-tmp/draft4.imp"
goto U_1005;
                                                                //    587     %FINISH
_imp_current_line = 587; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 587 "regression-bugs-tmp/draft4.imp"
L_00e3:;
                                                                //    588     ! If in end game then increase search.
                                                                //    589     I = COMPNUM+OPPNUM
_imp_current_line = 589; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 589 "regression-bugs-tmp/draft4.imp"
I = ((*(int *)(COMPNUM)) + (*OPPNUM));
                                                                //    590     %IF I <= 6 %THEN SEARCH LIMIT = 4
_imp_current_line = 590; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 590 "regression-bugs-tmp/draft4.imp"
if (((I) > (6))) goto L_00e4;
#line 590 "regression-bugs-tmp/draft4.imp"
SEARCHLIMIT = 4;
#line 590 "regression-bugs-tmp/draft4.imp"
L_00e4:;
                                                                //    591     ! FIND BEST MOVE.
                                                                //    592     NODES = 0;  SP = 0
_imp_current_line = 592; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 592 "regression-bugs-tmp/draft4.imp"
NODES = 0;
_imp_current_line = 592; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 592 "regression-bugs-tmp/draft4.imp"
SP = 0;
                                                                //    593     VALUEB = TRY POSSIBLE MOVES(1, 1, COMP, OPP)
_imp_current_line = 593; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 593 "regression-bugs-tmp/draft4.imp"
VALUEB = TRYPOSSIBLEMOVES(1, 1, &COMP[-((-1))], &OPP[-((-1))]);
                                                                //    594     %IF VALUEB <= -99990 %START
_imp_current_line = 594; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 594 "regression-bugs-tmp/draft4.imp"
if (((VALUEB) > ((-99990)))) goto L_00e5;
                                                                //    595         PRINTSTRING("I resign
_imp_current_line = 595; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 595 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("I resign\n"));
                                                                //    596  ")
                                                                //    597         -> STOP
_imp_current_line = 597; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 597 "regression-bugs-tmp/draft4.imp"
goto U_1005;
                                                                //    598     %FINISH
_imp_current_line = 598; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 598 "regression-bugs-tmp/draft4.imp"
L_00e5:;
                                                                //    599     I = 0
_imp_current_line = 599; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 599 "regression-bugs-tmp/draft4.imp"
I = 0;
                                                                //    600  ANOTHER TAKE:
_imp_current_line = 600; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 600 "regression-bugs-tmp/draft4.imp"
U_1007:;
                                                                //    601     TROUT(COMP(BEST PIECE), COMP(BEST PIECE)+MOVE(BEST MOVE), I)
_imp_current_line = 601; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 601 "regression-bugs-tmp/draft4.imp"
TROUT(COMP[((BESTPIECE) + ((int)(1)))], (((int)(COMP[((BESTPIECE) + ((int)(1)))])) + (MOVE[BESTMOVE])), &I);
                                                                //    602     MAKE MOVE(MOVE(BEST MOVE), BEST PIECE, BEST TAKE, COMP, OPP)
_imp_current_line = 602; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 602 "regression-bugs-tmp/draft4.imp"
MAKEMOVE(MOVE[BESTMOVE], BESTPIECE, &BESTTAKE, &COMP[-((-1))], &OPP[-((-1))]);
                                                                //    603     %IF BEST TAKE > 0 %START
_imp_current_line = 603; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 603 "regression-bugs-tmp/draft4.imp"
if (((BESTTAKE) <= (0))) goto L_00e6;
                                                                //    604        %CYCLE BEST MOVE = 1, 2, 7
_imp_current_line = 604; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 604 "regression-bugs-tmp/draft4.imp"
BESTMOVE = (-1);
if ((((7)-(1)) % (2)) != 0) _imp_signal(5,1,0,"Illegal cycle BESTMOVE = 1, 2, 7");
L_00e7:;
if (BESTMOVE == 7) goto L_00e8;
BESTMOVE += 2;
                                                                //    605           BEST TAKE = VALID MOVE(BEST MOVE, BEST PIECE, COMP, OPP)
_imp_current_line = 605; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 605 "regression-bugs-tmp/draft4.imp"
BESTTAKE = VALIDMOVE(BESTMOVE, BESTPIECE, &COMP[-((-1))], &OPP[-((-1))]);
                                                                //    606           -> ANOTHER TAKE %IF BEST TAKE>0
_imp_current_line = 606; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 606 "regression-bugs-tmp/draft4.imp"
if (((BESTTAKE) <= (0))) goto L_00ea;
#line 606 "regression-bugs-tmp/draft4.imp"
goto U_1007;
#line 606 "regression-bugs-tmp/draft4.imp"
L_00ea:;
                                                                //    607        %REPEAT
_imp_current_line = 607; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 607 "regression-bugs-tmp/draft4.imp"
goto L_00e7;
#line 607 "regression-bugs-tmp/draft4.imp"
L_00e8:;
                                                                //    608     %FINISH
_imp_current_line = 608; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 608 "regression-bugs-tmp/draft4.imp"
L_00e6:;
                                                                //    609     NEWLINE
_imp_current_line = 609; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 609 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    610     %IF MON = 'M' %START
_imp_current_line = 610; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 610 "regression-bugs-tmp/draft4.imp"
if (((MON) != (77))) goto L_00eb;
                                                                //    611        PRINTSTRING("Nodes considered =");  WRITE(NODES, 4)
_imp_current_line = 611; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 611 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("Nodes considered ="));
_imp_current_line = 611; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 611 "regression-bugs-tmp/draft4.imp"
_imp_WRITE(NODES, 4);
                                                                //    612        PRINTSTRING("
_imp_current_line = 612; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 612 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("\nValue of board ="));
                                                                //    613  Value of board =");  WRITE(VALUEB, 4)
_imp_current_line = 613; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 613 "regression-bugs-tmp/draft4.imp"
_imp_WRITE(VALUEB, 4);
                                                                //    614        NEWLINE
_imp_current_line = 614; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 614 "regression-bugs-tmp/draft4.imp"
_imp_NEWLINE();
                                                                //    615     %FINISH
_imp_current_line = 615; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 615 "regression-bugs-tmp/draft4.imp"
L_00eb:;
                                                                //    616     %IF OPPNUM = 0 %START
_imp_current_line = 616; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 616 "regression-bugs-tmp/draft4.imp"
if (((*OPPNUM) != (0))) goto L_00ec;
                                                                //    617         PRINTSTRING("You have no pieces left so I win
_imp_current_line = 617; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 617 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You have no pieces left so I win\n"));
                                                                //    618  ")
                                                                //    619        -> STOP
_imp_current_line = 619; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 619 "regression-bugs-tmp/draft4.imp"
goto U_1005;
                                                                //    620     %FINISH
_imp_current_line = 620; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 620 "regression-bugs-tmp/draft4.imp"
L_00ec:;
                                                                //    621     EXPECTED MOVE = PENDING MOVE(OPP, COMP)
_imp_current_line = 621; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 621 "regression-bugs-tmp/draft4.imp"
EXPECTEDMOVE = PENDINGMOVE(&OPP[-((-1))], &COMP[-((-1))]);
                                                                //    622     %IF EXPECTED MOVE = -1 %START
_imp_current_line = 622; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 622 "regression-bugs-tmp/draft4.imp"
if (((EXPECTEDMOVE) != ((-1)))) goto L_00ed;
                                                                //    623        PRINTSTRING("You cannot move any of your pieces so I win
_imp_current_line = 623; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 623 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("You cannot move any of your pieces so I win\n"));
                                                                //    624  ")
                                                                //    625        -> STOP
_imp_current_line = 625; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 625 "regression-bugs-tmp/draft4.imp"
goto U_1005;
                                                                //    626     %FINISH
_imp_current_line = 626; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 626 "regression-bugs-tmp/draft4.imp"
L_00ed:;
                                                                //    627     %IF VALUEB >= 99990  %AND AWIN = 0 %START
_imp_current_line = 627; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 627 "regression-bugs-tmp/draft4.imp"
if (((VALUEB) < (99990))) goto L_00ee;
#line 627 "regression-bugs-tmp/draft4.imp"
if (((AWIN) != (0))) goto L_00ee;
                                                                //    628        PRINTSTRING("He-He!  I am going to win!!
_imp_current_line = 628; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 628 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("He-He!  I am going to win!!\n"));
                                                                //    629  ")
                                                                //    630        AWIN = 1
_imp_current_line = 630; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 630 "regression-bugs-tmp/draft4.imp"
AWIN = 1;
                                                                //    631     %FINISH
_imp_current_line = 631; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 631 "regression-bugs-tmp/draft4.imp"
L_00ee:;
                                                                //    632     -> READ MOVE
_imp_current_line = 632; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 632 "regression-bugs-tmp/draft4.imp"
goto U_1002;
                                                                //    633  STOP:
_imp_current_line = 633; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 633 "regression-bugs-tmp/draft4.imp"
U_1005:;
                                                                //    634     PRINTSTRING("
_imp_current_line = 634; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 634 "regression-bugs-tmp/draft4.imp"
_imp_PRINTSTRING(_imp_str_literal("\nThe final board position is -\n"));
                                                                //    635  The final board position is -
                                                                //    636  ")
                                                                //    637     PRINT BOARD
_imp_current_line = 637; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 637 "regression-bugs-tmp/draft4.imp"
PRINTBOARD();
                                                                //    638  %END
_imp_current_line = 638; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 638 "regression-bugs-tmp/draft4.imp"
return;
_imp_endofblock: ;
} // End of block DRAUGHTS at level 1
                                                                //    639  
                                                                //    640  %begin
#line 640 "regression-bugs-tmp/draft4.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //    641    select input(0)
_imp_current_line = 641; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 641 "regression-bugs-tmp/draft4.imp"
_imp_SELECTINPUT(0);
                                                                //    642    select output(0)
_imp_current_line = 642; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 642 "regression-bugs-tmp/draft4.imp"
_imp_SELECTOUTPUT(0);
                                                                //    643    DRAUGHTS("")
_imp_current_line = 643; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 643 "regression-bugs-tmp/draft4.imp"
DRAUGHTS(_imp_str_literal(""));
                                                                //    644  %end
_imp_current_line = 644; _imp_current_file = "regression-bugs-tmp/draft4.imp";
#line 644 "regression-bugs-tmp/draft4.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
                                                                //    645  
                                                                //    646  %ENDOFFILE
#line 646 "regression-bugs-tmp/draft4.imp"
// End of file
