ReadCS

decompiled_code:
__int64 ReadCS()
{
char v0; // al
int v1; // ebx
unsigned __int8 v2; // al
__int64 result; // rax
__int64 v4; // rdx
unsigned __int64 i; // rbx
__int64 v6; // rdx
__int64 v7; // rcx
__int64 v8; // rbx
__int64 v9; // rbx
__int64 v10; // rax
__int64 v11; // rdx
__int64 v12; // rcx
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rdx
__int64 v17; // rcx
__int64 v18; // rdx
__int64 v19; // rcx
char v20; // [rsp+Dh] [rbp-Bh] BYREF
char v21; // [rsp+Eh] [rbp-Ah]
char v22; // [rsp+Fh] [rbp-9h]

v20 = 94;
v22 = 0;
CRCnt = 0LL;
v0 = FirstChar();
CBfPtr = CBfBeg;
*CBfBeg = v0;
LstErr = -1;
v1 = 3;
while ( 1 )
{
v2 = *CBfPtr;
if ( *CBfPtr != 27 )
break;
if ( (*((_BYTE *)&EtFlag + 1) & 0x40) != 0 )
{
*CBfPtr = ZChIn(0LL);
if ( *CBfPtr != 91 || (*CBfPtr = ZChIn(0LL), *CBfPtr != 50) )
{
LABEL_4:
ZDspBf("\r\n\n\tInvalid escape sequence.\r\n\n", 31LL);
ZDspBf("\tThe 16384 bit of the ET flag is set, which means\r\n", 52LL);
ZDspBf("\tthat you are in VT200 mode. In this mode, the\r\n", 50LL);
ZDspBf("\tescape character is not used to terminate commands.\r\n", 54LL);
ZDspBf("\tIt is used to introduce escape sequences. This\r\n", 50LL);
ZDspBf("\tallows the function keys to take on meanings. The\r\n", 53LL);
ZDspBf("\taccent grave (~) character is the command terminator.\r\n", 56LL);
ZDspBf("\tIf you want to turn off VT200 mode, say 16384,0ET``\r\n", 55LL);
ZDspBf("\tNote that the recognition of accent grave as a\r\n", 49LL);
ZDspBf("\tcommand terminator is controlled by the 8192 bit\r\n", 51LL);
ZDspBf("\tof the ET flag, separate from the VT200 bit.\r\n\n", 49LL);
ZDspBf("\tThere may be a part of the unrecognized escape\r\n", 49LL);
ZDspBf("\tsequence in the command string. The last line of\r\n", 52LL);
ZDspBf("\tthe command string is shown to help you recover.\r\n", 51LL);
++CBfPtr;
*CBfPtr = 32;
v1 = 2;
goto LABEL_5;
}
*CBfPtr = ZChIn(0LL);
if ( *CBfPtr == 52 )
{
if ( (unsigned __int8)ZChIn(0LL) != 126 )
goto LABEL_4;
*CBfPtr = 8;
}
else
{
if ( *CBfPtr != 53 || (unsigned __int8)ZChIn(0LL) != 126 )
goto LABEL_4;
*CBfPtr = 10;
}
}
else
{
ZDspCh(36LL);
if ( v1 == 4 )
goto LABEL_19;
v1 = 4;
}
LABEL_5:
if ( ++CBfPtr > CBfEnd )
{
ZDspBf("command buffer overflow\r\n", 25LL);
TAbort(1LL);
}
*CBfPtr = ZChIn(0LL);
}
switch ( *((_BYTE *)&ChrMsk + v2) & 0xF )
{
case 0:
goto LABEL_5;
case 1:
ZDspCh(42LL);
if ( v1 == 2 )
{
CBfPtr -= 2LL;
ZDspBf(&unk_E78, 3LL);
CRCnt = 0LL;
TypBuf(CBfBeg, CBfPtr, v18, v19);
}
v1 = 3;
goto LABEL_5;
case 2:
if ( CBfPtr != CBfBeg )
{
ZDspCh(8LL);
v1 = 3;
goto LABEL_5;
}
if ( (EtFlag & 2) != 0 )
{
ZDspCh(13LL);
ZScrOp(2LL);
}
v13 = Ln2Chr(-1LL);
GapBeg += v13;
GapEnd += v13;
ZCpyBl(GapEnd + 1LL, GapBeg, (unsigned int)-(int)v13);
if ( EvFlag )
goto LABEL_61;
v14 = GapEnd;
v15 = Ln2Chr(1LL);
TypBuf(GapEnd + 1LL, v14 + v15 + 1, v16, v17);
goto LABEL_62;
case 3:
v21 = v2 | 0x40;
ZDspBf(&v20, 2LL);
v1 = 3;
goto LABEL_5;
case 4:
ZDspCh(13LL);
if ( !CRCnt && (unsigned int)ChkHlp(CBfPtr) )
goto LABEL_62;
++CRCnt;
v1 = 3;
goto LABEL_5;
case 5:
ZBell();
ZDspBf("^G", 2LL);
if ( v1 == 2 )
{
CBfPtr = CBfBeg - 1LL;
ZDspBf(&unk_E78, 3LL);
CRCnt = 0LL;
v1 = 3;
}
else
{
v1 = 2;
}
goto LABEL_5;
case 6:
do
v4 = CBfPtr--;
while ( CBfPtr >= CBfBeg && (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(v4 - 1)) & 0x20) == 0 );
ZDspCh(13LL);
if ( (EtFlag & 2) != 0 )
ZScrOp(2LL);
else
ZDspCh(10LL);
v1 = 3;
if ( CBfPtr < CBfBeg )
ZDspCh(42LL);
goto LABEL_5;
case 7:
v21 = 90;
ZDspBf(&v20, 2LL);
if ( v1 == 6 )
TAbort(0LL);
else
v1 = (v1 == 5) + 5;
goto LABEL_5;
case 8:
goto LABEL_28;
case 9:
InpDel();
v1 = 3;
goto LABEL_5;
case 0xA:
ZDspCh(96LL);
if ( (*((_BYTE *)&EtFlag + 1) & 0x20) == 0 )
{
v1 = 3;
goto LABEL_5;
}
*CBfPtr = 27;
if ( v1 != 4 )
{
v1 = 4;
goto LABEL_5;
}
LABEL_19:
ZDspBf("\r\n", 2LL);
result = CBfPtr;
CStEnd = CBfPtr;
return result;
case 0xB:
if ( CBfPtr == CBfBeg )
{
if ( (EtFlag & 2) != 0 )
{
ZDspCh(13LL);
ZScrOp(2LL);
}
v8 = Ln2Chr(1LL);
ZCpyBl(GapBeg, GapEnd + 1LL, (unsigned int)v8);
GapBeg += v8;
v9 = GapEnd + v8;
GapEnd = v9;
if ( EvFlag )
{
LABEL_61:
DoEvEs((unsigned int)EvFlag);
}
else
{
v10 = Ln2Chr(1LL);
TypBuf(GapEnd + 1LL, v9 + v10 + 1, v11, v12);
}
LABEL_62:
ZDspCh(42LL);
CBfPtr = CBfBeg - 1LL;
v1 = 3;
}
else
{
ZDspCh(10LL);
v1 = 3;
}
goto LABEL_5;
case 0xC:
if ( (EtFlag & 4) == 0 )
*CBfPtr = v2 & 0x5F;
LABEL_28:
ZDspCh((unsigned __int8)*CBfPtr);
v1 = 3;
goto LABEL_5;
case 0xD:
if ( v1 == 2 )
{
for ( i = --CBfPtr; CBfBeg < i && (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(i - 1)) & 0x20) == 0; --i )
;
ZDspBf("\r\n", 2LL);
if ( CBfBeg == i )
ZDspCh(42LL);
TypBuf(i, CBfPtr, v6, v7);
--CBfPtr;
v1 = 3;
}
else
{
ZDspCh(32LL);
v1 = 3;
}
goto LABEL_5;
case 0xE:
ZDspCh(13LL);
ZDspCh(10LL);
ZDspCh(10LL);
ZDspCh(10LL);
ZDspCh(10LL);
ZDspCh(10LL);
v1 = 3;
goto LABEL_5;
case 0xF:
GotCtC = 0;
v21 = 67;
ZDspBf(&v20, 2LL);
if ( v1 == 1 )
TAbort(0LL);
ZDspBf(&unk_E78, 3LL);
CBfPtr = CBfBeg - 1LL;
CRCnt = 0LL;
v1 = 1;
goto LABEL_5;
}
}

canonical_decompiled_code:
__int64 func3()
{
char v0; // al
int v1; // ebx
unsigned __int8 v2; // al
__int64 result; // rax
__int64 v4; // rdx
unsigned __int64 i; // rbx
__int64 v6; // rdx
__int64 v7; // rcx
__int64 v8; // rbx
__int64 v9; // rbx
__int64 v10; // rax
__int64 v11; // rdx
__int64 v12; // rcx
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rdx
__int64 v17; // rcx
__int64 v18; // rdx
__int64 v19; // rcx
char v20; // [rsp+Dh] [rbp-Bh] BYREF
char v21; // [rsp+Eh] [rbp-Ah]
char v22; // [rsp+Fh] [rbp-9h]

v20 = 94;
v22 = 0;
CRCnt = 0LL;
v0 = func1();
CBfPtr = CBfBeg;
*CBfBeg = v0;
LstErr = -1;
v1 = 3;
while ( 1 )
{
v2 = *CBfPtr;
if ( *CBfPtr != 27 )
break;
if ( (*((_BYTE *)&EtFlag + 1) & 0x40) != 0 )
{
*CBfPtr = ZChIn(0LL);
if ( *CBfPtr != 91 || (*CBfPtr = ZChIn(0LL), *CBfPtr != 50) )
{
LABEL_4:
ZDspBf("\r\n\n\tInvalid escape sequence.\r\n\n", 31LL);
ZDspBf("\tThe 16384 bit of the ET flag is set, which means\r\n", 52LL);
ZDspBf("\tthat you are in VT200 mode. In this mode, the\r\n", 50LL);
ZDspBf("\tescape character is not used to terminate commands.\r\n", 54LL);
ZDspBf("\tIt is used to introduce escape sequences. This\r\n", 50LL);
ZDspBf("\tallows the function keys to take on meanings. The\r\n", 53LL);
ZDspBf("\taccent grave (~) character is the command terminator.\r\n", 56LL);
ZDspBf("\tIf you want to turn off VT200 mode, say 16384,0ET``\r\n", 55LL);
ZDspBf("\tNote that the recognition of accent grave as a\r\n", 49LL);
ZDspBf("\tcommand terminator is controlled by the 8192 bit\r\n", 51LL);
ZDspBf("\tof the ET flag, separate from the VT200 bit.\r\n\n", 49LL);
ZDspBf("\tThere may be a part of the unrecognized escape\r\n", 49LL);
ZDspBf("\tsequence in the command string. The last line of\r\n", 52LL);
ZDspBf("\tthe command string is shown to help you recover.\r\n", 51LL);
++CBfPtr;
*CBfPtr = 32;
v1 = 2;
goto LABEL_5;
}
*CBfPtr = ZChIn(0LL);
if ( *CBfPtr == 52 )
{
if ( (unsigned __int8)ZChIn(0LL) != 126 )
goto LABEL_4;
*CBfPtr = 8;
}
else
{
if ( *CBfPtr != 53 || (unsigned __int8)ZChIn(0LL) != 126 )
goto LABEL_4;
*CBfPtr = 10;
}
}
else
{
ZDspCh(36LL);
if ( v1 == 4 )
goto LABEL_19;
v1 = 4;
}
LABEL_5:
if ( ++CBfPtr > CBfEnd )
{
ZDspBf("command buffer overflow\r\n", 25LL);
TAbort(1LL);
}
*CBfPtr = ZChIn(0LL);
}
switch ( *((_BYTE *)&ChrMsk + v2) & 0xF )
{
case 0:
goto LABEL_5;
case 1:
ZDspCh(42LL);
if ( v1 == 2 )
{
CBfPtr -= 2LL;
ZDspBf(&unk_E78, 3LL);
CRCnt = 0LL;
TypBuf(CBfBeg, CBfPtr, v18, v19);
}
v1 = 3;
goto LABEL_5;
case 2:
if ( CBfPtr != CBfBeg )
{
ZDspCh(8LL);
v1 = 3;
goto LABEL_5;
}
if ( (EtFlag & 2) != 0 )
{
ZDspCh(13LL);
ZScrOp(2LL);
}
v13 = Ln2Chr(-1LL);
GapBeg += v13;
GapEnd += v13;
ZCpyBl(GapEnd + 1LL, GapBeg, (unsigned int)-(int)v13);
if ( EvFlag )
goto LABEL_61;
v14 = GapEnd;
v15 = Ln2Chr(1LL);
TypBuf(GapEnd + 1LL, v14 + v15 + 1, v16, v17);
goto LABEL_62;
case 3:
v21 = v2 | 0x40;
ZDspBf(&v20, 2LL);
v1 = 3;
goto LABEL_5;
case 4:
ZDspCh(13LL);
if ( !CRCnt && (unsigned int)func2(CBfPtr) )
goto LABEL_62;
++CRCnt;
v1 = 3;
goto LABEL_5;
case 5:
ZBell();
ZDspBf("^G", 2LL);
if ( v1 == 2 )
{
CBfPtr = CBfBeg - 1LL;
ZDspBf(&unk_E78, 3LL);
CRCnt = 0LL;
v1 = 3;
}
else
{
v1 = 2;
}
goto LABEL_5;
case 6:
do
v4 = CBfPtr--;
while ( CBfPtr >= CBfBeg && (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(v4 - 1)) & 0x20) == 0 );
ZDspCh(13LL);
if ( (EtFlag & 2) != 0 )
ZScrOp(2LL);
else
ZDspCh(10LL);
v1 = 3;
if ( CBfPtr < CBfBeg )
ZDspCh(42LL);
goto LABEL_5;
case 7:
v21 = 90;
ZDspBf(&v20, 2LL);
if ( v1 == 6 )
TAbort(0LL);
else
v1 = (v1 == 5) + 5;
goto LABEL_5;
case 8:
goto LABEL_28;
case 9:
func0();
v1 = 3;
goto LABEL_5;
case 0xA:
ZDspCh(96LL);
if ( (*((_BYTE *)&EtFlag + 1) & 0x20) == 0 )
{
v1 = 3;
goto LABEL_5;
}
*CBfPtr = 27;
if ( v1 != 4 )
{
v1 = 4;
goto LABEL_5;
}
LABEL_19:
ZDspBf("\r\n", 2LL);
result = CBfPtr;
CStEnd = CBfPtr;
return result;
case 0xB:
if ( CBfPtr == CBfBeg )
{
if ( (EtFlag & 2) != 0 )
{
ZDspCh(13LL);
ZScrOp(2LL);
}
v8 = Ln2Chr(1LL);
ZCpyBl(GapBeg, GapEnd + 1LL, (unsigned int)v8);
GapBeg += v8;
v9 = GapEnd + v8;
GapEnd = v9;
if ( EvFlag )
{
LABEL_61:
DoEvEs((unsigned int)EvFlag);
}
else
{
v10 = Ln2Chr(1LL);
TypBuf(GapEnd + 1LL, v9 + v10 + 1, v11, v12);
}
LABEL_62:
ZDspCh(42LL);
CBfPtr = CBfBeg - 1LL;
v1 = 3;
}
else
{
ZDspCh(10LL);
v1 = 3;
}
goto LABEL_5;
case 0xC:
if ( (EtFlag & 4) == 0 )
*CBfPtr = v2 & 0x5F;
LABEL_28:
ZDspCh((unsigned __int8)*CBfPtr);
v1 = 3;
goto LABEL_5;
case 0xD:
if ( v1 == 2 )
{
for ( i = --CBfPtr; CBfBeg < i && (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(i - 1)) & 0x20) == 0; --i )
;
ZDspBf("\r\n", 2LL);
if ( CBfBeg == i )
ZDspCh(42LL);
TypBuf(i, CBfPtr, v6, v7);
--CBfPtr;
v1 = 3;
}
else
{
ZDspCh(32LL);
v1 = 3;
}
goto LABEL_5;
case 0xE:
ZDspCh(13LL);
ZDspCh(10LL);
ZDspCh(10LL);
ZDspCh(10LL);
ZDspCh(10LL);
ZDspCh(10LL);
v1 = 3;
goto LABEL_5;
case 0xF:
GotCtC = 0;
v21 = 67;
ZDspBf(&v20, 2LL);
if ( v1 == 1 )
TAbort(0LL);
ZDspBf(&unk_E78, 3LL);
CBfPtr = CBfBeg - 1LL;
CRCnt = 0LL;
v1 = 1;
goto LABEL_5;
}
}

original_code:
void ReadCS()
{
    BOOLEAN BadSeq;
    unsigned char ctrstr[3];
    LONG HowFar;
    int PrvChr;
    unsigned char TmpChr;
    charptr TmpPtr;
    int i;
    ctrstr[0] = '^';
    ctrstr[2] = '\0';
    CRCnt = 0;
    PrvChr = 3;
    TmpChr = FirstChar();
    CBfPtr = CBfBeg;
    *CBfPtr = TmpChr;
    LstErr = -1;
    for(;;) {
 if (*CBfPtr == '\033') {
     if (EtFlag & 16384) {
  *CBfPtr = (unsigned char)ZChIn(0);
  BadSeq = 0;
  if (*CBfPtr != '[') {
      BadSeq = 1;
  } else {
      *CBfPtr = (unsigned char)ZChIn(0);
      switch (*CBfPtr) {
   case '2':
       *CBfPtr = (unsigned char)ZChIn(0);
       if (*CBfPtr == '4') {
    TmpChr = (unsigned char)ZChIn(0);
    if (TmpChr != '~') {
        BadSeq = 1;
    } else {
        *CBfPtr = '\010';
    }
       } else if (*CBfPtr == '5') {
    TmpChr = (unsigned char)ZChIn(0);
    if (TmpChr != '~') {
        BadSeq = 1;
    } else {
        *CBfPtr = '\012';
    }
       } else {
    BadSeq = 1;
       }
       break;
   default:
       BadSeq = 1;
      }
  }
  if (BadSeq) {
    ZDspBf("\r\n\n\tInvalid escape sequence.\r\n\n", 31);
    ZDspBf("\tThe 16384 bit of the ET flag is set,  which means\r\n", 52);
    ZDspBf("\tthat you are in VT200 mode.  In this mode,  the\r\n", 50);
    ZDspBf("\tescape character is not used to terminate commands.\r\n", 54);
    ZDspBf("\tIt is used to introduce escape sequences.  This\r\n", 50);
    ZDspBf("\tallows the function keys to take on meanings.  The\r\n", 53);
    ZDspBf("\taccent grave (~) character is the command terminator.\r\n", 56);
    ZDspBf("\tIf you want to turn off VT200 mode,  say 16384,0ET``\r\n", 55);
    ZDspBf("\tNote that the recognition of accent grave as a\r\n", 49);
    ZDspBf("\tcommand terminator is controlled by the 8192 bit\r\n", 51);
    ZDspBf("\tof the ET flag,  separate from the VT200 bit.\r\n\n", 49);
    ZDspBf("\tThere may be a part of the unrecognized escape\r\n", 49);
    ZDspBf("\tsequence in the command string.  The last line of\r\n", 52);
    ZDspBf("\tthe command string is shown to help you recover.\r\n", 51);
      PrvChr = 2;
      CBfPtr++;
      *CBfPtr = ' ';
  }
     } else {
  ZDspCh('$');
  if (PrvChr == 4) {
      ZDspBf("\r\n", 2);
      CStEnd = CBfPtr;
      return;
  }
  PrvChr = 4;
     }
 } else {
     switch (ChrMsk[(unsigned char)*CBfPtr] & '\17') {
  case '\14':
      if ((EtFlag & 4) == 0) {
   *CBfPtr &= '\137';
      }
  case '\10':
      ZDspCh(*CBfPtr);
      PrvChr = 3;
      break;
  case '\12':
      ZDspCh('`');
      if (EtFlag & 8192) {
   *CBfPtr = '\033';
   if (PrvChr == 4) {
       ZDspBf("\r\n", 2);
       CStEnd = CBfPtr;
       return;
   }
   PrvChr = 4;
      } else {
   PrvChr = 3;
      }
      break;
  case '\15':
      if (PrvChr == 2) {
   CBfPtr--;
   TmpPtr = CBfPtr;
   while (TmpPtr > CBfBeg) {
       TmpPtr--;
       if ((ChrMsk[(*TmpPtr)] & '\40')) {
    ++TmpPtr;
    break;
       }
   }
   ZDspBf("\r\n", 2);
   if (TmpPtr == CBfBeg) {
       ZDspCh('*');
   }
   TypBuf(TmpPtr, CBfPtr);
   CBfPtr--;
      } else {
   ZDspCh('\040');
      }
      PrvChr = 3;
      break;
  case '\11':
      InpDel();
      PrvChr = 3;
      break;
  case '\4':
      ZDspCh('\015');
      if ((CRCnt == 0) && ChkHlp(CBfPtr)) {
   ZDspCh('*');
   CBfPtr = CBfBeg - 1;
      } else {
   ++CRCnt;
      }
      PrvChr = 3;
      break;
  case '\13':
      if (CBfPtr == CBfBeg) {
       if (EtFlag & 2) {
        ZDspCh('\015');
        ZScrOp(2);
       }
   HowFar = Ln2Chr((LONG)1);
   ZCpyBl((GapBeg),(GapEnd+1),((SIZE_T)HowFar));
   GapBeg += HowFar;
   GapEnd += HowFar;
   if (EvFlag) {
       DoEvEs(EvFlag);
   } else {
    TypBuf(GapEnd+1, GapEnd+Ln2Chr((LONG)1)+1);
   }
       ZDspCh('*');
   CBfPtr = CBfBeg - 1;
      } else {
   ZDspCh('\012');
      }
      PrvChr = 3;
      break;
  case '\17':
      GotCtC = 0;
      ctrstr[1] = 'C';
      ZDspBf(ctrstr, 2);
      if (PrvChr == 1) {
   TAbort(0);
      } else {
   PrvChr = 1;
      }
      ZDspBf(Prompt, 3);
      CBfPtr = CBfBeg - 1;
      CRCnt = 0;
      break;
  case '\2':
      if (CBfPtr == CBfBeg) {
       if (EtFlag & 2) {
        ZDspCh('\015');
        ZScrOp(2);
       }
   HowFar = Ln2Chr(-1L);
   GapBeg += HowFar;
   GapEnd += HowFar;
   ZCpyBl((GapEnd+1),(GapBeg),((SIZE_T)-HowFar));
   if (EvFlag) {
       DoEvEs(EvFlag);
   } else {
    TypBuf(GapEnd+1, GapEnd+Ln2Chr((LONG)1)+1);
   }
       ZDspCh('*');
   CBfPtr = CBfBeg - 1;
      } else {
   ZDspCh('\010');
      }
      PrvChr = 3;
      break;
  case '\5':
      ZBell();
      ZDspBf("^G", 2);
      if (PrvChr == 2) {
   CBfPtr = CBfBeg - 1;
   ZDspBf(Prompt, 3);
   CRCnt = 0;
   PrvChr = 3;
      } else {
   PrvChr = 2;
      }
      break;
  case '\1':
      ZDspCh('*');
      if (PrvChr == 2) {
   CBfPtr -= 2;
   ZDspBf(Prompt, 3);
   CRCnt = 0;
   TypBuf(CBfBeg, CBfPtr);
      }
      PrvChr = 3;
      break;
  case '\7':
      ctrstr[1] = 'Z';
      ZDspBf(ctrstr, 2);
      if (PrvChr == 6) {
   TAbort(0);
      } else if (PrvChr == 5) {
   PrvChr = 6;
      } else {
   PrvChr = 5;
      }
      break;
  case '\3':
      ctrstr[1] = *CBfPtr | '\100';
      ZDspBf(ctrstr, 2);
      PrvChr = 3;
      break;
  case '\6':
      while (--CBfPtr >= CBfBeg) {
   if ((ChrMsk[(*CBfPtr)] & '\40')) {
       break;
   }
      }
      ZDspCh('\015');
      if (EtFlag & 2) {
   ZScrOp(2);
      } else {
   ZDspCh('\012');
      }
      if (CBfPtr < CBfBeg) {
   ZDspCh('*');
      }
      PrvChr = 3;
      break;
  case '\16':
      ZDspCh('\015');
      for (i = 1; i <= 5; i++) {
   ZDspCh('\012');
      }
      PrvChr = 3;
      break;
     }
 }
 if (++CBfPtr > CBfEnd) {
     ZDspBf("command buffer overflow\r\n", 25);
     TAbort(1);
 }
 *CBfPtr = (unsigned char)ZChIn(0);
    }
}

canonical_original_code:
void ReadCS()
{
    int BadSeq;
    unsigned char ctrstr[3];
    long HowFar;
    int PrvChr;
    unsigned char TmpChr;
    unsigned char *TmpPtr;
    int i;
    ctrstr[0] = '^';
    ctrstr[2] = '\0';
    CRCnt = 0;
    PrvChr = 3;
    TmpChr = FirstChar();
    CBfPtr = CBfBeg;
    *CBfPtr = TmpChr;
    LstErr = -1;
    for(;;) {
 if (*CBfPtr == '\033') {
     if (EtFlag & 16384) {
  *CBfPtr = (unsigned char)ZChIn(0);
  BadSeq = 0;
  if (*CBfPtr != '[') {
      BadSeq = 1;
  } else {
      *CBfPtr = (unsigned char)ZChIn(0);
      switch (*CBfPtr) {
   case '2':
       *CBfPtr = (unsigned char)ZChIn(0);
       if (*CBfPtr == '4') {
    TmpChr = (unsigned char)ZChIn(0);
    if (TmpChr != '~') {
        BadSeq = 1;
    } else {
        *CBfPtr = '\010';
    }
       } else if (*CBfPtr == '5') {
    TmpChr = (unsigned char)ZChIn(0);
    if (TmpChr != '~') {
        BadSeq = 1;
    } else {
        *CBfPtr = '\012';
    }
       } else {
    BadSeq = 1;
       }
       break;
   default:
       BadSeq = 1;
      }
  }
  if (BadSeq) {
    ZDspBf("\r\n\n\tInvalid escape sequence.\r\n\n", 31);
    ZDspBf("\tThe 16384 bit of the ET flag is set,  which means\r\n", 52);
    ZDspBf("\tthat you are in VT200 mode.  In this mode,  the\r\n", 50);
    ZDspBf("\tescape character is not used to terminate commands.\r\n", 54);
    ZDspBf("\tIt is used to introduce escape sequences.  This\r\n", 50);
    ZDspBf("\tallows the function keys to take on meanings.  The\r\n", 53);
    ZDspBf("\taccent grave (~) character is the command terminator.\r\n", 56);
    ZDspBf("\tIf you want to turn off VT200 mode,  say 16384,0ET``\r\n", 55);
    ZDspBf("\tNote that the recognition of accent grave as a\r\n", 49);
    ZDspBf("\tcommand terminator is controlled by the 8192 bit\r\n", 51);
    ZDspBf("\tof the ET flag,  separate from the VT200 bit.\r\n\n", 49);
    ZDspBf("\tThere may be a part of the unrecognized escape\r\n", 49);
    ZDspBf("\tsequence in the command string.  The last line of\r\n", 52);
    ZDspBf("\tthe command string is shown to help you recover.\r\n", 51);
      PrvChr = 2;
      CBfPtr++;
      *CBfPtr = ' ';
  }
     } else {
  ZDspCh('$');
  if (PrvChr == 4) {
      ZDspBf("\r\n", 2);
      CStEnd = CBfPtr;
      return;
  }
  PrvChr = 4;
     }
 } else {
     switch (ChrMsk[(unsigned char)*CBfPtr] & '\17') {
  case '\14':
      if ((EtFlag & 4) == 0) {
   *CBfPtr &= '\137';
      }
  case '\10':
      ZDspCh(*CBfPtr);
      PrvChr = 3;
      break;
  case '\12':
      ZDspCh('`');
      if (EtFlag & 8192) {
   *CBfPtr = '\033';
   if (PrvChr == 4) {
       ZDspBf("\r\n", 2);
       CStEnd = CBfPtr;
       return;
   }
   PrvChr = 4;
      } else {
   PrvChr = 3;
      }
      break;
  case '\15':
      if (PrvChr == 2) {
   CBfPtr--;
   TmpPtr = CBfPtr;
   while (TmpPtr > CBfBeg) {
       TmpPtr--;
       if ((ChrMsk[(*TmpPtr)] & '\40')) {
    ++TmpPtr;
    break;
       }
   }
   ZDspBf("\r\n", 2);
   if (TmpPtr == CBfBeg) {
       ZDspCh('*');
   }
   TypBuf(TmpPtr, CBfPtr);
   CBfPtr--;
      } else {
   ZDspCh('\040');
      }
      PrvChr = 3;
      break;
  case '\11':
      InpDel();
      PrvChr = 3;
      break;
  case '\4':
      ZDspCh('\015');
      if ((CRCnt == 0) && ChkHlp(CBfPtr)) {
   ZDspCh('*');
   CBfPtr = CBfBeg - 1;
      } else {
   ++CRCnt;
      }
      PrvChr = 3;
      break;
  case '\13':
      if (CBfPtr == CBfBeg) {
       if (EtFlag & 2) {
        ZDspCh('\015');
        ZScrOp(2);
       }
   HowFar = Ln2Chr((long)1);
   ZCpyBl((GapBeg),(GapEnd+1),((unsigned int)HowFar));
   GapBeg += HowFar;
   GapEnd += HowFar;
   if (EvFlag) {
       DoEvEs(EvFlag);
   } else {
    TypBuf(GapEnd+1, GapEnd+Ln2Chr((long)1)+1);
   }
       ZDspCh('*');
   CBfPtr = CBfBeg - 1;
      } else {
   ZDspCh('\012');
      }
      PrvChr = 3;
      break;
  case '\17':
      GotCtC = 0;
      ctrstr[1] = 'C';
      ZDspBf(ctrstr, 2);
      if (PrvChr == 1) {
   TAbort(0);
      } else {
   PrvChr = 1;
      }
      ZDspBf(Prompt, 3);
      CBfPtr = CBfBeg - 1;
      CRCnt = 0;
      break;
  case '\2':
      if (CBfPtr == CBfBeg) {
       if (EtFlag & 2) {
        ZDspCh('\015');
        ZScrOp(2);
       }
   HowFar = Ln2Chr(-1L);
   GapBeg += HowFar;
   GapEnd += HowFar;
   ZCpyBl((GapEnd+1),(GapBeg),((SIZE_T)-HowFar));
   if (EvFlag) {
       DoEvEs(EvFlag);
   } else {
    TypBuf(GapEnd+1, GapEnd+Ln2Chr((long)1)+1);
   }
       ZDspCh('*');
   CBfPtr = CBfBeg - 1;
      } else {
   ZDspCh('\010');
      }
      PrvChr = 3;
      break;
  case '\5':
      ZBell();
      ZDspBf("^G", 2);
      if (PrvChr == 2) {
   CBfPtr = CBfBeg - 1;
   ZDspBf(Prompt, 3);
   CRCnt = 0;
   PrvChr = 3;
      } else {
   PrvChr = 2;
      }
      break;
  case '\1':
      ZDspCh('*');
      if (PrvChr == 2) {
   CBfPtr -= 2;
   ZDspBf(Prompt, 3);
   CRCnt = 0;
   TypBuf(CBfBeg, CBfPtr);
      }
      PrvChr = 3;
      break;
  case '\7':
      ctrstr[1] = 'Z';
      ZDspBf(ctrstr, 2);
      if (PrvChr == 6) {
   TAbort(0);
      } else if (PrvChr == 5) {
   PrvChr = 6;
      } else {
   PrvChr = 5;
      }
      break;
  case '\3':
      ctrstr[1] = *CBfPtr | '\100';
      ZDspBf(ctrstr, 2);
      PrvChr = 3;
      break;
  case '\6':
      while (--CBfPtr >= CBfBeg) {
   if ((ChrMsk[(*CBfPtr)] & '\40')) {
       break;
   }
      }
      ZDspCh('\015');
      if (EtFlag & 2) {
   ZScrOp(2);
      } else {
   ZDspCh('\012');
      }
      if (CBfPtr < CBfBeg) {
   ZDspCh('*');
      }
      PrvChr = 3;
      break;
  case '\16':
      ZDspCh('\015');
      for (i = 1; i <= 5; i++) {
   ZDspCh('\012');
      }
      PrvChr = 3;
      break;
     }
 }
 if (++CBfPtr > CBfEnd) {
     ZDspBf("command buffer overflow\r\n", 25);
     TAbort(1);
 }
 *CBfPtr = (unsigned char)ZChIn(0);
    }
}

variable_types: BadSeq int

variable_types:
ctrstr
unsigned char [3]

variable_types: HowFar long

variable_types: PrvChr int


ExePrc

repo: rmblair/tecoc

decompiled_code:
__int64 ExePrc()
{
__int64 result; // rax
__int64 v1; // rdi

if ( EStTop == EStBot )
{
NArgmt = 1LL;
}
else
{
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
}
result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = FindQR();
if ( (_DWORD)result != -1 )
{
v1 = *(_QWORD *)(QR + 16LL) + NArgmt;
*(_QWORD *)(QR + 16LL) = v1;
result = PushEx(v1, 0LL);
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax
__int64 v1; // rdi

if ( EStTop == EStBot )
{
NArgmt = 1LL;
}
else
{
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
}
result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = FindQR();
if ( (_DWORD)result != -1 )
{
v1 = *(_QWORD *)(QR + 16LL) + NArgmt;
*(_QWORD *)(QR + 16LL) = v1;
result = PushEx(v1, 0LL);
}
}
return result;
}

original_code:
DEFAULT ExePrc()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 if (FindQR() == (-1)) {
  ;
  return (-1);
 }
 QR->Number += NArgmt;
 return PushEx(QR->Number, 0);
}

canonical_original_code:
int ExePrc()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 if (FindQR() == (-1)) {
  ;
  return (-1);
 }
 QR->Number += NArgmt;
 return PushEx(QR->Number, 0);
}

return_type: int


FlowEE

decompiled_code:
__int64 FlowEE()
{
int v0; // ebx
__int64 result; // rax
__int64 v2; // rax
char v3; // al

v0 = 1;
do
{
v2 = CBfPtr;
if ( CBfPtr == CStEnd )
{
ErrUTC();
return 0xFFFFFFFFLL;
}
++CBfPtr;
v3 = *(_BYTE *)(v2 + 1);
if ( (_WORD)v0 == 1 && v3 == 124 )
break;
if ( v3 == 34 )
{
++v0;
}
else if ( v3 == 39 )
{
--v0;
}
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
while ( (__int16)v0 > 0 );
result = TraceM;
if ( TraceM )
{
EchoIt((unsigned __int8)*CBfPtr);
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
int v0; // ebx
__int64 result; // rax
__int64 v2; // rax
char v3; // al

v0 = 1;
do
{
v2 = CBfPtr;
if ( CBfPtr == CStEnd )
{
ErrUTC();
return 0xFFFFFFFFLL;
}
++CBfPtr;
v3 = *(_BYTE *)(v2 + 1);
if ( (_WORD)v0 == 1 && v3 == 124 )
break;
if ( v3 == 34 )
{
++v0;
}
else if ( v3 == 39 )
{
--v0;
}
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
while ( (__int16)v0 > 0 );
result = TraceM;
if ( TraceM )
{
EchoIt((unsigned __int8)*CBfPtr);
result = 0LL;
}
return result;
}

original_code:
DEFAULT FlowEE()
{
 WORD TmpNst;
 TmpNst = 1;
 do {
  if (CBfPtr == CStEnd) {
   ErrUTC();
   return (-1);
  }
  ++CBfPtr;
  if ((*CBfPtr == '|') && (TmpNst == 1)) {
   break;
  }
  if (*CBfPtr == '"') {
   ++TmpNst;
  } else if (*CBfPtr == '\'') {
   --TmpNst;
  }
  if (SkpCmd() == (-1)) {
   return (-1);
  }
 } while (TmpNst > 0);
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 return 0;
}

canonical_original_code:
int FlowEE()
{
 short TmpNst;
 TmpNst = 1;
 do {
  if (CBfPtr == CStEnd) {
   ErrUTC();
   return (-1);
  }
  ++CBfPtr;
  if ((*CBfPtr == '|') && (TmpNst == 1)) {
   break;
  }
  if (*CBfPtr == '"') {
   ++TmpNst;
  } else if (*CBfPtr == '\'') {
   --TmpNst;
  }
  if (SkpCmd() == (-1)) {
   return (-1);
  }
 } while (TmpNst > 0);
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 return 0;
}

variable_types: TmpNst short


ExeRtP

decompiled_code:
__int64 ExeRtP()
{
if ( EStTop != EStBot && !EStack[4 * EStTop + 2] )
return PushEx(41LL, 1LL);
ErrMsg(22LL);
return 0xFFFFFFFFLL;
}

canonical_decompiled_code:
__int64 func0()
{
if ( EStTop != EStBot && !EStack[4 * EStTop + 2] )
return PushEx(41LL, 1LL);
ErrMsg(22LL);
return 0xFFFFFFFFLL;
}

original_code:
DEFAULT ExeRtP()
{
 ;
 if ((EStTop == EStBot) || (EStack[EStTop].ElType != 0)) {
  ErrMsg(22);
  ;
  return (-1);
 }
 ;
 return PushEx((LONG)')', 1);
}

canonical_original_code:
int ExeRtP()
{
 ;
 if ((EStTop == EStBot) || (EStack[EStTop].ElType != 0)) {
  ErrMsg(22);
  ;
  return (-1);
 }
 ;
 return PushEx((long)')', 1);
}


ExeCtU

decompiled_code:
__int64 ExeCtU()
{
__int64 result; // rax
_QWORD *v1; // rax
unsigned int v2; // ebx

result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = FindQR();
if ( (_DWORD)result != -1 )
{
if ( (CmdMod & 2) == 0 && *QR )
{
ZFree();
v1 = (_QWORD *)QR;
*(_QWORD *)(QR + 8LL) = 0LL;
*v1 = 0LL;
}
if ( EStTop <= EStBot )
{
result = FindES(27LL);
if ( (_DWORD)result == -1 )
return result;
v2 = CBfPtr - ArgPtr;
if ( CBfPtr - ArgPtr > 0 )
{
result = MakRom(v2);
if ( (_DWORD)result == -1 )
return result;
ZCpyBl(*(_QWORD *)(QR + 8LL), ArgPtr, v2);
*(_QWORD *)(QR + 8LL) += (int)v2;
}
LABEL_14:
CmdMod = 0;
return 0LL;
}
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
if ( (CmdMod & 1) == 0 )
goto LABEL_12;
result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = IncCBP();
if ( (_DWORD)result != -1 )
{
if ( *CBfPtr != *(_BYTE *)(CBfPtr - 1LL) )
{
ErrMsg(7LL);
return 0xFFFFFFFFLL;
}
LABEL_12:
result = MakRom(1LL);
if ( (_DWORD)result == -1 )
return result;
*(_BYTE *)(*(_QWORD *)(QR + 8LL))++ = NArgmt;
goto LABEL_14;
}
}
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax
_QWORD *v1; // rax
unsigned int v2; // ebx

result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = FindQR();
if ( (_DWORD)result != -1 )
{
if ( (CmdMod & 2) == 0 && *QR )
{
ZFree();
v1 = (_QWORD *)QR;
*(_QWORD *)(QR + 8LL) = 0LL;
*v1 = 0LL;
}
if ( EStTop <= EStBot )
{
result = FindES(27LL);
if ( (_DWORD)result == -1 )
return result;
v2 = CBfPtr - ArgPtr;
if ( CBfPtr - ArgPtr > 0 )
{
result = MakRom(v2);
if ( (_DWORD)result == -1 )
return result;
ZCpyBl(*(_QWORD *)(QR + 8LL), ArgPtr, v2);
*(_QWORD *)(QR + 8LL) += (int)v2;
}
LABEL_14:
CmdMod = 0;
return 0LL;
}
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
if ( (CmdMod & 1) == 0 )
goto LABEL_12;
result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = IncCBP();
if ( (_DWORD)result != -1 )
{
if ( *CBfPtr != *(_BYTE *)(CBfPtr - 1LL) )
{
ErrMsg(7LL);
return 0xFFFFFFFFLL;
}
LABEL_12:
result = MakRom(1LL);
if ( (_DWORD)result == -1 )
return result;
*(_BYTE *)(*(_QWORD *)(QR + 8LL))++ = NArgmt;
goto LABEL_14;
}
}
}
}
return result;
}

original_code:
DEFAULT ExeCtU()
{
 int TmpSiz;
 ;
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 if (FindQR() == (-1)) {
  ;
  return (-1);
 }
 if (!(CmdMod & '\2')) {
  if (QR->Start != (void *)0) {
   ZFree((voidptr)QR->Start);
   QR->Start = QR->End_P1 = (void *)0;
  }
 }
 if (EStTop > EStBot) {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
  if (CmdMod & '\1') {
   if (IncCBP() == (-1)) {
    ;
    return (-1);
   }
   if (IncCBP() == (-1)) {
    ;
    return (-1);
   }
   if (*CBfPtr != *(CBfPtr-1)) {
    ErrMsg(7);
    ;
    return (-1);
   }
  }
  if (MakRom((SIZE_T) 1) == (-1)) {
   ;
   return (-1);
  }
  *(QR->End_P1) = (char) NArgmt;
  QR->End_P1++;
 } else {
  if (FindES('\033') == (-1)) {
   ;
   return (-1);
  }
  TmpSiz = CBfPtr - ArgPtr;
  if (TmpSiz > 0) {
   if (MakRom((SIZE_T)TmpSiz) == (-1)) {
    ;
    return (-1);
   }
   ZCpyBl((QR->End_P1),(ArgPtr),((SIZE_T)TmpSiz));
   QR->End_P1 += TmpSiz;
  }
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeCtU()
{
 int TmpSiz;
 ;
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 if (FindQR() == (-1)) {
  ;
  return (-1);
 }
 if (!(CmdMod & '\2')) {
  if (QR->Start != (void *)0) {
   ZFree((unsigned char *)QR->Start);
   QR->Start = QR->End_P1 = (void *)0;
  }
 }
 if (EStTop > EStBot) {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
  if (CmdMod & '\1') {
   if (IncCBP() == (-1)) {
    ;
    return (-1);
   }
   if (IncCBP() == (-1)) {
    ;
    return (-1);
   }
   if (*CBfPtr != *(CBfPtr-1)) {
    ErrMsg(7);
    ;
    return (-1);
   }
  }
  if (MakRom((unsigned int) 1) == (-1)) {
   ;
   return (-1);
  }
  *(QR->End_P1) = (char) NArgmt;
  QR->End_P1++;
 } else {
  if (FindES('\033') == (-1)) {
   ;
   return (-1);
  }
  TmpSiz = CBfPtr - ArgPtr;
  if (TmpSiz > 0) {
   if (MakRom((unsigned int)TmpSiz) == (-1)) {
    ;
    return (-1);
   }
   ZCpyBl((QR->End_P1),(ArgPtr),((unsigned int)TmpSiz));
   QR->End_P1 += TmpSiz;
  }
 }
 CmdMod = '\0';
 ;
 return 0;
}

variable_types: TmpSiz int


ExeCtT

decompiled_code:
__int64 ExeCtT()
{
unsigned int v0; // ebx
int v1; // ebx

if ( EStTop == EStBot || (v0 = EStack[4 * EStTop + 2]) != 0 )
{
v1 = ZChIn(EtFlag & 0x20);
if ( GotCtC )
{
v0 = -1;
}
else
{
if ( (EtFlag & 8) == 0 && v1 != -1 )
EchoIt((unsigned __int8)v1);
v0 = PushEx(v1, 0LL);
}
}
else if ( (unsigned int)GetNmA() == -1 )
{
v0 = -1;
}
else
{
if ( (CmdMod & 2) != 0 || (EtFlag & 1) != 0 )
ZDspCh((unsigned int)NArgmt);
else
EchoIt(NArgmt);
CmdMod = 0;
}
return v0;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned int v0; // ebx
int v1; // ebx

if ( EStTop == EStBot || (v0 = EStack[4 * EStTop + 2]) != 0 )
{
v1 = ZChIn(EtFlag & 0x20);
if ( GotCtC )
{
v0 = -1;
}
else
{
if ( (EtFlag & 8) == 0 && v1 != -1 )
EchoIt((unsigned __int8)v1);
v0 = PushEx(v1, 0LL);
}
}
else if ( (unsigned int)GetNmA() == -1 )
{
v0 = -1;
}
else
{
if ( (CmdMod & 2) != 0 || (EtFlag & 1) != 0 )
ZDspCh((unsigned int)NArgmt);
else
EchoIt(NArgmt);
CmdMod = 0;
}
return v0;
}

original_code:
DEFAULT ExeCtT()
{
 DEFAULT lchar;
 ;
 if ((EStTop == EStBot) ||
     (EStack[EStTop].ElType != 0)) {
     lchar = ZChIn(EtFlag & 32);
     if (GotCtC) {
  ;
  return (-1);
     }
     if (((EtFlag & 8) == 0) && (lchar != -1)) {
  EchoIt((unsigned char)lchar);
     }
     ;
     return PushEx((LONG)lchar, 0);
 }
 if (GetNmA() == (-1)) {
     ;
     return (-1);
 }
 if ((CmdMod & '\2') || (EtFlag & 1)) {
     ZDspCh((char)NArgmt);
 } else {
     EchoIt((unsigned char)NArgmt);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeCtT()
{
 int lchar;
 ;
 if ((EStTop == EStBot) ||
     (EStack[EStTop].ElType != 0)) {
     lchar = ZChIn(EtFlag & 32);
     if (GotCtC) {
  ;
  return (-1);
     }
     if (((EtFlag & 8) == 0) && (lchar != -1)) {
  EchoIt((unsigned char)lchar);
     }
     ;
     return PushEx((long)lchar, 0);
 }
 if (GetNmA() == (-1)) {
     ;
     return (-1);
 }
 if ((CmdMod & '\2') || (EtFlag & 1)) {
     ZDspCh((char)NArgmt);
 } else {
     EchoIt((unsigned char)NArgmt);
 }
 CmdMod = '\0';
 ;
 return 0;
}

variable_types: lchar int


ExeCCC

decompiled_code:
__int64 ExeCCC()
{
__int64 result; // rax

result = IncCBP();
if ( (_DWORD)result != -1 )
result = PushEx((unsigned __int8)*CBfPtr, 0LL);
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

result = IncCBP();
if ( (_DWORD)result != -1 )
result = PushEx((unsigned __int8)*CBfPtr, 0LL);
return result;
}

original_code:
DEFAULT ExeCCC()
{
 ;
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 ;
 return PushEx((LONG)*CBfPtr, 0);
}

canonical_original_code:
int ExeCCC()
{
 ;
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 ;
 return PushEx((LONG)*CBfPtr, 0);
}


ExeCtW

decompiled_code:
__int64 ExeCtW()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
IniSrM = 2;
CmdMod = 0;
result = 0LL;
}
else
{
result = GetNmA();
if ( (_DWORD)result != -1 )
{
if ( NArgmt )
{
ErrMsg(0LL);
result = 0xFFFFFFFFLL;
}
else
{
IniSrM = 1;
CmdMod = 0;
result = 0LL;
}
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
IniSrM = 2;
CmdMod = 0;
result = 0LL;
}
else
{
result = GetNmA();
if ( (_DWORD)result != -1 )
{
if ( NArgmt )
{
ErrMsg(0LL);
result = 0xFFFFFFFFLL;
}
else
{
IniSrM = 1;
CmdMod = 0;
result = 0LL;
}
}
}
return result;
}

original_code:
DEFAULT ExeCtW()
{
 ;
 if (EStTop == EStBot) {
  IniSrM = 2;
 } else {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
  if (NArgmt) {
   ErrMsg(0);
   ;
   return (-1);
  }
  IniSrM = 1;
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeCtW()
{
 ;
 if (EStTop == EStBot) {
  IniSrM = 2;
 } else {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
  if (NArgmt) {
   ErrMsg(0);
   ;
   return (-1);
  }
  IniSrM = 1;
 }
 CmdMod = '\0';
 ;
 return 0;
}


FlowEL

decompiled_code:
__int64 FlowEL()
{
int v0; // ebx
__int64 result; // rax
__int64 v2; // rax
char v3; // al

v0 = 1;
do
{
v2 = CBfPtr;
if ( CBfPtr == CStEnd )
{
ErrUTC();
return 0xFFFFFFFFLL;
}
++CBfPtr;
v3 = *(_BYTE *)(v2 + 1);
if ( v3 == 60 )
{
++v0;
}
else if ( v3 == 62 )
{
--v0;
}
else
{
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
}
while ( (__int16)v0 > 0 );
if ( TraceM )
EchoIt((unsigned __int8)*CBfPtr);
--LStTop;
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
int v0; // ebx
__int64 result; // rax
__int64 v2; // rax
char v3; // al

v0 = 1;
do
{
v2 = CBfPtr;
if ( CBfPtr == CStEnd )
{
ErrUTC();
return 0xFFFFFFFFLL;
}
++CBfPtr;
v3 = *(_BYTE *)(v2 + 1);
if ( v3 == 60 )
{
++v0;
}
else if ( v3 == 62 )
{
--v0;
}
else
{
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
}
while ( (__int16)v0 > 0 );
if ( TraceM )
EchoIt((unsigned __int8)*CBfPtr);
--LStTop;
return 0LL;
}

original_code:
DEFAULT FlowEL()
{
 WORD TmpNst;
 ;
 TmpNst = 1;
 do {
  if (CBfPtr == CStEnd) {
   ErrUTC();
   ;
   return (-1);
  }
  ++CBfPtr;
  if (*CBfPtr == '<') {
   ++TmpNst;
  } else if (*CBfPtr == '>') {
   --TmpNst;
  } else {
   if (SkpCmd() == (-1)) {
    ;
    return (-1);
   }
  }
 } while (TmpNst > 0);
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 --LStTop;
 ;
 return 0;
}

canonical_original_code:
int FlowEL()
{
 short TmpNst;
 ;
 TmpNst = 1;
 do {
  if (CBfPtr == CStEnd) {
   ErrUTC();
   ;
   return (-1);
  }
  ++CBfPtr;
  if (*CBfPtr == '<') {
   ++TmpNst;
  } else if (*CBfPtr == '>') {
   --TmpNst;
  } else {
   if (SkpCmd() == (-1)) {
    ;
    return (-1);
   }
  }
 } while (TmpNst > 0);
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 --LStTop;
 ;
 return 0;
}


ExeGtr

decompiled_code:
__int64 ExeGtr()
{
__int16 v0; // ax
__int64 v1; // rdx
__int64 v2; // rdx
__int64 result; // rax

v0 = LStTop;
if ( LStTop == LStBot )
{
ErrMsg(1LL);
result = 0xFFFFFFFFLL;
}
else
{
v1 = LStack[2 * LStTop];
if ( v1 == -1 || (v2 = v1 - 1, LStack[2 * LStTop] = v2, v2 == -1) || v2 > 0 )
CBfPtr = LStack[2 * v0 + 1];
else
LStTop = v0 - 1;
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int16 v0; // ax
__int64 v1; // rdx
__int64 v2; // rdx
__int64 result; // rax

v0 = LStTop;
if ( LStTop == LStBot )
{
ErrMsg(1LL);
result = 0xFFFFFFFFLL;
}
else
{
v1 = LStack[2 * LStTop];
if ( v1 == -1 || (v2 = v1 - 1, LStack[2 * LStTop] = v2, v2 == -1) || v2 > 0 )
CBfPtr = LStack[2 * v0 + 1];
else
LStTop = v0 - 1;
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

original_code:
DEFAULT ExeGtr()
{
 ;
 if (LStTop == LStBot) {
  ErrMsg(1);
  ;
  return (-1);
 }
 if (LStack[LStTop].LIndex != -1L) {
  --LStack[LStTop].LIndex;
 }
 if ((LStack[LStTop].LIndex == -1L) ||
     (LStack[LStTop].LIndex > 0)) {
  CBfPtr = LStack[LStTop].LAddr;
 } else {
  --LStTop;
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}

canonical_original_code:
int ExeGtr()
{
 ;
 if (LStTop == LStBot) {
  ErrMsg(1);
  ;
  return (-1);
 }
 if (LStack[LStTop].LIndex != -1L) {
  --LStack[LStTop].LIndex;
 }
 if ((LStack[LStTop].LIndex == -1L) ||
     (LStack[LStTop].LIndex > 0)) {
  CBfPtr = LStack[LStTop].LAddr;
 } else {
  --LStTop;
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}


ExeC

decompiled_code:
__int64 ExeC()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
return DoCJR(NArgmt);
}
UMinus();
result = GetNmA();
if ( (_DWORD)result != -1 )
return DoCJR(NArgmt);
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
return DoCJR(NArgmt);
}
UMinus();
result = GetNmA();
if ( (_DWORD)result != -1 )
return DoCJR(NArgmt);
return result;
}

original_code:
DEFAULT ExeC()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 ;
 return DoCJR(NArgmt);
}

canonical_original_code:
int ExeC()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 ;
 return DoCJR(NArgmt);
}


ExeO

decompiled_code:
__int64 ExeO()
{
__int64 result; // rax
__int64 v1; // rdx
char *v2; // rdx
char v3; // al
char *v4; // rdx
__int64 v5; // rdx
char *v6; // rax
char v7; // si
char v8; // cl
char *v9; // rdx
char *v10; // rsi
__int16 v11; // ax
__int64 v12; // rax
char *v13; // [rsp+8h] [rbp-400h] BYREF
char v14[1000]; // [rsp+10h] [rbp-3F8h] BYREF
char v15[16]; // [rsp+3F8h] [rbp-10h] BYREF

result = BldStr(v14, v15, &v13);
if ( (_DWORD)result != -1 )
{
if ( EStTop <= EStBot )
goto LABEL_3;
result = GetNmA();
if ( (_DWORD)result != -1 )
{
v5 = NArgmt;
if ( NArgmt < 0 )
goto LABEL_29;
if ( NArgmt <= 0 )
{
v6 = v14;
goto LABEL_31;
}
v6 = v14;
if ( v13 <= v14 )
{
v6 = v14;
goto LABEL_31;
}
v7 = 0;
while ( 1 )
{
if ( *v6++ == 44 )
{
if ( !--v5 )
{
NArgmt = 0LL;
LABEL_31:
if ( v13 != v6 )
{
v8 = *v6;
if ( *v6 != 44 )
{
v9 = v14;
if ( v13 > v6 )
{
v10 = &v14[v13 - v6];
v9 = v14;
while ( 1 )
{
++v6;
*v9++ = v8;
if ( v10 == v9 )
break;
v8 = *v6;
if ( *v6 == 44 )
goto LABEL_37;
}
v9 = v10;
}
LABEL_37:
v13 = v9;
LABEL_3:
v1 = CStBeg;
if ( LStTop != LStBot )
v1 = LStack[2 * LStTop + 1] + 1LL;
CBfPtr = v1;
CmdMod = 0;
while ( 1 )
{
v2 = (char *)CBfPtr;
v3 = *CBfPtr;
if ( *CBfPtr != 33 )
{
do
{
if ( (char *)CStEnd == v2 )
{
ErrPSt(38LL, v14, v13);
return 0xFFFFFFFFLL;
}
if ( v3 == 60 )
{
v11 = LStTop + 1;
LStTop = v11;
if ( v11 > 31 )
{
ErrMsg(32LL);
return 0xFFFFFFFFLL;
}
v12 = 2LL * v11;
LStack[v12] = -1LL;
LStack[v12 + 1] = v2;
CmdMod = 0;
}
else if ( v3 == 62 )
{
if ( LStTop == LStBot )
{
ErrMsg(1LL);
return 0xFFFFFFFFLL;
}
--LStTop;
CmdMod = 0;
}
else
{
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
v2 = (char *)(CBfPtr + 1LL);
CBfPtr = v2;
v3 = *v2;
}
while ( *v2 != 33 );
}
if ( TraceM )
{
if ( (CmdMod & 1) != 0 )
ZDspCh(64LL);
ZDspCh(33LL);
}
result = FindES(33LL);
if ( (_DWORD)result == -1 )
return result;
v4 = v14;
if ( v13 > v14 )
{
while ( *ArgPtr == *v4 )
{
++ArgPtr;
if ( ++v4 == v13 )
goto LABEL_15;
}
}
if ( v13 == v4 )
{
LABEL_15:
if ( *ArgPtr == 33 )
{
CmdMod = 0;
return 0LL;
}
}
++CBfPtr;
}
}
}
LABEL_29:
CmdMod = 0;
return 0LL;
}
v7 = 1;
}
if ( v6 == v13 )
{
if ( v7 )
NArgmt = v5;
goto LABEL_29;
}
}
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax
__int64 v1; // rdx
char *v2; // rdx
char v3; // al
char *v4; // rdx
__int64 v5; // rdx
char *v6; // rax
char v7; // si
char v8; // cl
char *v9; // rdx
char *v10; // rsi
__int16 v11; // ax
__int64 v12; // rax
char *v13; // [rsp+8h] [rbp-400h] BYREF
char v14[1000]; // [rsp+10h] [rbp-3F8h] BYREF
char v15[16]; // [rsp+3F8h] [rbp-10h] BYREF

result = BldStr(v14, v15, &v13);
if ( (_DWORD)result != -1 )
{
if ( EStTop <= EStBot )
goto LABEL_3;
result = GetNmA();
if ( (_DWORD)result != -1 )
{
v5 = NArgmt;
if ( NArgmt < 0 )
goto LABEL_29;
if ( NArgmt <= 0 )
{
v6 = v14;
goto LABEL_31;
}
v6 = v14;
if ( v13 <= v14 )
{
v6 = v14;
goto LABEL_31;
}
v7 = 0;
while ( 1 )
{
if ( *v6++ == 44 )
{
if ( !--v5 )
{
NArgmt = 0LL;
LABEL_31:
if ( v13 != v6 )
{
v8 = *v6;
if ( *v6 != 44 )
{
v9 = v14;
if ( v13 > v6 )
{
v10 = &v14[v13 - v6];
v9 = v14;
while ( 1 )
{
++v6;
*v9++ = v8;
if ( v10 == v9 )
break;
v8 = *v6;
if ( *v6 == 44 )
goto LABEL_37;
}
v9 = v10;
}
LABEL_37:
v13 = v9;
LABEL_3:
v1 = CStBeg;
if ( LStTop != LStBot )
v1 = LStack[2 * LStTop + 1] + 1LL;
CBfPtr = v1;
CmdMod = 0;
while ( 1 )
{
v2 = (char *)CBfPtr;
v3 = *CBfPtr;
if ( *CBfPtr != 33 )
{
do
{
if ( (char *)CStEnd == v2 )
{
ErrPSt(38LL, v14, v13);
return 0xFFFFFFFFLL;
}
if ( v3 == 60 )
{
v11 = LStTop + 1;
LStTop = v11;
if ( v11 > 31 )
{
ErrMsg(32LL);
return 0xFFFFFFFFLL;
}
v12 = 2LL * v11;
LStack[v12] = -1LL;
LStack[v12 + 1] = v2;
CmdMod = 0;
}
else if ( v3 == 62 )
{
if ( LStTop == LStBot )
{
ErrMsg(1LL);
return 0xFFFFFFFFLL;
}
--LStTop;
CmdMod = 0;
}
else
{
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
v2 = (char *)(CBfPtr + 1LL);
CBfPtr = v2;
v3 = *v2;
}
while ( *v2 != 33 );
}
if ( TraceM )
{
if ( (CmdMod & 1) != 0 )
ZDspCh(64LL);
ZDspCh(33LL);
}
result = FindES(33LL);
if ( (_DWORD)result == -1 )
return result;
v4 = v14;
if ( v13 > v14 )
{
while ( *ArgPtr == *v4 )
{
++ArgPtr;
if ( ++v4 == v13 )
goto LABEL_15;
}
}
if ( v13 == v4 )
{
LABEL_15:
if ( *ArgPtr == 33 )
{
CmdMod = 0;
return 0LL;
}
}
++CBfPtr;
}
}
}
LABEL_29:
CmdMod = 0;
return 0LL;
}
v7 = 1;
}
if ( v6 == v13 )
{
if ( v7 )
NArgmt = v5;
goto LABEL_29;
}
}
}
}
return result;
}

original_code:
DEFAULT ExeO()
{
    BOOLEAN Found;
    unsigned char TBfBeg[1000];
    charptr TBfEnd;
    charptr TBfPtr;
    charptr TagPtr;
    charptr TmpPtr;
    ;
    TBfEnd = TBfBeg + 1000;
    if (BldStr(TBfBeg, TBfEnd, &TBfPtr) == (-1)) {
 ;
 return (-1);
    }
    if (EStTop > EStBot) {
 if (GetNmA () == (-1)) {
     ;
     return (-1);
 }
 if (NArgmt < 0) {
     TagPtr = TBfPtr;
 } else {
     TagPtr = TBfBeg;
     if (NArgmt > 0) {
  while (TagPtr < TBfPtr) {
      if (*TagPtr++ == ',') {
   if (--NArgmt == 0) {
       break;
   }
      }
  }
     }
 }
 if (TagPtr == TBfPtr || *TagPtr == ',') {
     ;
     CmdMod = '\0';
     return 0;
 }
 TmpPtr = TBfBeg;
 while (TagPtr < TBfPtr && *TagPtr != ',') {
     *TmpPtr++ = *TagPtr++;
 }
 TBfPtr = TmpPtr;
    }
    CBfPtr = (LStTop == LStBot) ? CStBeg : LStack[LStTop].LAddr + 1;
    Found = 0;
    CmdMod = '\0';
    while (!Found) {
 while (*CBfPtr != '!') {
     if (CBfPtr == CStEnd) {
  ErrPSt(38, TBfBeg, TBfPtr);
  ;
  return (-1);
     }
     switch (*CBfPtr) {
     case '<':
  if (++LStTop >= 32) {
      ErrMsg(32);
      ;
      return (-1);
  }
  LStack[LStTop].LIndex = -1L;
  LStack[LStTop].LAddr = CBfPtr;
  CmdMod = '\0';
  break;
     case '>':
  if (LStTop == LStBot) {
      ErrMsg(1);
      ;
      return (-1);
  }
  --LStTop;
  CmdMod = '\0';
  break;
     default:
  if (SkpCmd() == (-1)) {
      ;
      return (-1);
  }
     }
     ++CBfPtr;
 }
 if (TraceM) {
     if (CmdMod & '\1') {
  ZDspCh('@');
     }
     ZDspCh('!');
 }
 if (FindES('!') == (-1)) {
     ;
     return (-1);
 }
 TagPtr = TBfBeg;
 while ((TagPtr < TBfPtr) && (*ArgPtr == *TagPtr)) {
     ++ArgPtr;
     ++TagPtr;
 }
 Found = ((TagPtr == TBfPtr) && (*ArgPtr == '!'));
 ++CBfPtr;
    }
    --CBfPtr;
    CmdMod = '\0';
    ;
    return 0;
}

canonical_original_code:
int ExeO()
{
    int Found;
    unsigned char TBfBeg[1000];
    unsigned char *TBfEnd;
    unsigned char *TBfPtr;
    unsigned char *TagPtr;
    unsigned char *TmpPtr;
    ;
    TBfEnd = TBfBeg + 1000;
    if (BldStr(TBfBeg, TBfEnd, &TBfPtr) == (-1)) {
 ;
 return (-1);
    }
    if (EStTop > EStBot) {
 if (GetNmA () == (-1)) {
     ;
     return (-1);
 }
 if (NArgmt < 0) {
     TagPtr = TBfPtr;
 } else {
     TagPtr = TBfBeg;
     if (NArgmt > 0) {
  while (TagPtr < TBfPtr) {
      if (*TagPtr++ == ',') {
   if (--NArgmt == 0) {
       break;
   }
      }
  }
     }
 }
 if (TagPtr == TBfPtr || *TagPtr == ',') {
     ;
     CmdMod = '\0';
     return 0;
 }
 TmpPtr = TBfBeg;
 while (TagPtr < TBfPtr && *TagPtr != ',') {
     *TmpPtr++ = *TagPtr++;
 }
 TBfPtr = TmpPtr;
    }
    CBfPtr = (LStTop == LStBot) ? CStBeg : LStack[LStTop].LAddr + 1;
    Found = 0;
    CmdMod = '\0';
    while (!Found) {
 while (*CBfPtr != '!') {
     if (CBfPtr == CStEnd) {
  ErrPSt(38, TBfBeg, TBfPtr);
  ;
  return (-1);
     }
     switch (*CBfPtr) {
     case '<':
  if (++LStTop >= 32) {
      ErrMsg(32);
      ;
      return (-1);
  }
  LStack[LStTop].LIndex = -1L;
  LStack[LStTop].LAddr = CBfPtr;
  CmdMod = '\0';
  break;
     case '>':
  if (LStTop == LStBot) {
      ErrMsg(1);
      ;
      return (-1);
  }
  --LStTop;
  CmdMod = '\0';
  break;
     default:
  if (SkpCmd() == (-1)) {
      ;
      return (-1);
  }
     }
     ++CBfPtr;
 }
 if (TraceM) {
     if (CmdMod & '\1') {
  ZDspCh('@');
     }
     ZDspCh('!');
 }
 if (FindES('!') == (-1)) {
     ;
     return (-1);
 }
 TagPtr = TBfBeg;
 while ((TagPtr < TBfPtr) && (*ArgPtr == *TagPtr)) {
     ++ArgPtr;
     ++TagPtr;
 }
 Found = ((TagPtr == TBfPtr) && (*ArgPtr == '!'));
 ++CBfPtr;
    }
    --CBfPtr;
    CmdMod = '\0';
    ;
    return 0;
}

variable_types: Found int

variable_types:
TBfBeg
unsigned char [1000]

variable_types:
TBfEnd
unsigned char *

variable_types:
TBfPtr
unsigned char *

variable_types:
TagPtr
unsigned char *

variable_types:
TmpPtr
unsigned char *


ExeJ

decompiled_code:
__int64 ExeJ()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
NArgmt = 0LL;
return DoCJR(NArgmt + EBfBeg - GapBeg);
}
result = GetNmA();
if ( (_DWORD)result != -1 )
return DoCJR(NArgmt + EBfBeg - GapBeg);
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
NArgmt = 0LL;
return DoCJR(NArgmt + EBfBeg - GapBeg);
}
result = GetNmA();
if ( (_DWORD)result != -1 )
return DoCJR(NArgmt + EBfBeg - GapBeg);
return result;
}

original_code:
DEFAULT ExeJ()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 0;
 } else {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 ;
 return DoCJR(EBfBeg-GapBeg+NArgmt);
}

canonical_original_code:
int ExeJ()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 0;
 } else {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 ;
 return DoCJR(EBfBeg-GapBeg+NArgmt);
}


ExeDot

decompiled_code:
__int64 ExeDot()
{
return PushEx(GapBeg - EBfBeg, 0LL);
}

canonical_decompiled_code:
__int64 func0()
{
return PushEx(GapBeg - EBfBeg, 0LL);
}

original_code:
DEFAULT ExeDot()
{
 return PushEx((LONG)(GapBeg-EBfBeg), 0);
}

canonical_original_code:
int ExeDot()
{
 return PushEx((LONG)(GapBeg-EBfBeg), 0);
}


ExeSCl

decompiled_code:
__int64 ExeSCl()
{
__int64 result; // rax

if ( LStTop == LStBot )
{
ErrMsg(35LL);
return 0xFFFFFFFFLL;
}
if ( EStTop == EStBot )
{
ErrMsg(24LL);
return 0xFFFFFFFFLL;
}
result = GetNmA();
if ( (_DWORD)result != -1 )
{
if ( (CmdMod & 2) != 0 )
{
if ( NArgmt < 0 )
{
LABEL_6:
result = FlowEL();
if ( (_DWORD)result == -1 )
return result;
goto LABEL_7;
}
}
else if ( NArgmt >= 0 )
{
goto LABEL_6;
}
LABEL_7:
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( LStTop == LStBot )
{
ErrMsg(35LL);
return 0xFFFFFFFFLL;
}
if ( EStTop == EStBot )
{
ErrMsg(24LL);
return 0xFFFFFFFFLL;
}
result = GetNmA();
if ( (_DWORD)result != -1 )
{
if ( (CmdMod & 2) != 0 )
{
if ( NArgmt < 0 )
{
LABEL_6:
result = FlowEL();
if ( (_DWORD)result == -1 )
return result;
goto LABEL_7;
}
}
else if ( NArgmt >= 0 )
{
goto LABEL_6;
}
LABEL_7:
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

original_code:
DEFAULT ExeSCl()
{
 if (LStTop == LStBot) {
  ErrMsg(35);
  ;
  return (-1);
 }
 if (EStTop == EStBot) {
  ErrMsg(24);
  ;
  return (-1);
 }
 if (GetNmA() == (-1)) {
  ;
  return (-1);
 }
 if ( (!(CmdMod & '\2') && (NArgmt >= 0) ) ||
      ( (CmdMod & '\2') && (NArgmt < 0) ) ) {
  if (FlowEL() == (-1)) {
   ;
   return (-1);
  }
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}

canonical_original_code:
int ExeSCl()
{
 if (LStTop == LStBot) {
  ErrMsg(35);
  ;
  return (-1);
 }
 if (EStTop == EStBot) {
  ErrMsg(24);
  ;
  return (-1);
 }
 if (GetNmA() == (-1)) {
  ;
  return (-1);
 }
 if ( (!(CmdMod & '\2') && (NArgmt >= 0) ) ||
      ( (CmdMod & '\2') && (NArgmt < 0) ) ) {
  if (FlowEL() == (-1)) {
   ;
   return (-1);
  }
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}


ExeCSt

decompiled_code:
__int64 ExeCSt()
{
unsigned __int8 *v0; // rax
__int64 result; // rax

v0 = (unsigned __int8 *)CBfPtr;
if ( CBfPtr <= CStEnd )
{
while ( 1 )
{
if ( TraceM )
EchoIt(*v0);
result = (*(&FArray_0 + (unsigned __int8)*CBfPtr))();
if ( GotCtC )
break;
if ( (_DWORD)result == -1 )
{
if ( EtFlag >= 0 )
return result;
TAbort(1LL);
}
v0 = (unsigned __int8 *)(CBfPtr + 1LL);
CBfPtr = v0;
if ( (unsigned __int64)v0 > CStEnd )
goto LABEL_2;
}
GotCtC = 0;
ErrMsg(41LL);
result = 0LL;
}
else
{
LABEL_2:
result = 0LL;
if ( LStTop != LStBot )
{
ErrUTC();
result = 0LL;
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned __int8 *v0; // rax
__int64 result; // rax

v0 = (unsigned __int8 *)CBfPtr;
if ( CBfPtr <= CStEnd )
{
while ( 1 )
{
if ( TraceM )
EchoIt(*v0);
result = (*(&FArray_0 + (unsigned __int8)*CBfPtr))();
if ( GotCtC )
break;
if ( (_DWORD)result == -1 )
{
if ( EtFlag >= 0 )
return result;
TAbort(1LL);
}
v0 = (unsigned __int8 *)(CBfPtr + 1LL);
CBfPtr = v0;
if ( (unsigned __int64)v0 > CStEnd )
goto LABEL_2;
}
GotCtC = 0;
ErrMsg(41LL);
result = 0LL;
}
else
{
LABEL_2:
result = 0LL;
if ( LStTop != LStBot )
{
ErrUTC();
result = 0LL;
}
}
return result;
}

original_code:
DEFAULT ExeCSt()
{
 DEFAULT status;
 static DEFAULT (*FArray[])(void) = {
        ExeNul, ExeCtA, ZExCtB, ExeCtC,
        ExeCtD, ExeCtE, ExeNYI, ExeIll,
        ZExCtH, ExeCtI, ExeNul, ExeIll,
        ExeCtL, ExeNul, ExeCtN, ExeCtO,
        ExeCtP, ExeCtQ, ExeCtR, ExeCtS,
        ExeCtT, ExeCtU, ExeCtV, ExeCtW,
        ExeCtX, ExeCtY, ExeCtZ, ExeEsc,
        ExeIll, ExeIll, ExeCCC, ExeUsc,
        ExeNul, ExeExc, ExeDQu, ExeOpr,
        ExeEsc, ExePrc, ExeOpr, ExeNul,
        ExeOpr, ExeRtP, ExeOpr, ExeOpr,
        ExeCom, ExeOpr, ExeDot, ExeOpr,
        ExeDgt, ExeDgt, ExeDgt, ExeDgt,
        ExeDgt, ExeDgt, ExeDgt, ExeDgt,
        ExeDgt, ExeDgt, ExeCln, ExeSCl,
        ExeLst, ExeEqu, ExeGtr, ExeQes,
        ExeAtS, ExeA, ExeB, ExeC,
        ExeD, ExeE, ExeF, ExeG,
        ExeH, ExeI, ExeJ, ExeK,
        ExeL, ExeM, ExeN, ExeO,
        ExeP, ExeQ, ExeR, ExeS,
        ExeT, ExeU, ExeV, ExeW,
        ExeX, ExeY, ExeZ, ExeLBr,
        ExeBSl, ExeRBr, ExeCrt, ExeUnd,
        ExeIll, ExeA, ExeB, ExeC,
        ExeD, ExeE, ExeF, ExeG,
        ExeH, ExeI, ExeJ, ExeK,
        ExeL, ExeM, ExeN, ExeO,
        ExeP, ExeQ, ExeR, ExeS,
        ExeT, ExeU, ExeV, ExeW,
        ExeX, ExeY, ExeZ, ExeIll,
        ExeBar, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll
 };
 ;
 while (CBfPtr <= CStEnd) {
  if (TraceM) {
   EchoIt(*CBfPtr);
  }
  status = (*FArray[*CBfPtr])();
  ;
  if (GotCtC) {
   GotCtC = 0;
   ErrMsg(41);
   ;
   return 0;
  }
  if (status == (-1)) {
   if (EtFlag & 128) {
    TAbort(1);
   } else {
    ;
    return (-1);
   }
  }
  CBfPtr++;
 }
 if (LStTop != LStBot) {
  ErrUTC();
 }
 ;
 return 0;
}

canonical_original_code:
int ExeCSt()
{
 int status;
 static int (*FArray[])() = {
        ExeNul, ExeCtA, ZExCtB, ExeCtC,
        ExeCtD, ExeCtE, ExeNYI, ExeIll,
        ZExCtH, ExeCtI, ExeNul, ExeIll,
        ExeCtL, ExeNul, ExeCtN, ExeCtO,
        ExeCtP, ExeCtQ, ExeCtR, ExeCtS,
        ExeCtT, ExeCtU, ExeCtV, ExeCtW,
        ExeCtX, ExeCtY, ExeCtZ, ExeEsc,
        ExeIll, ExeIll, ExeCCC, ExeUsc,
        ExeNul, ExeExc, ExeDQu, ExeOpr,
        ExeEsc, ExePrc, ExeOpr, ExeNul,
        ExeOpr, ExeRtP, ExeOpr, ExeOpr,
        ExeCom, ExeOpr, ExeDot, ExeOpr,
        ExeDgt, ExeDgt, ExeDgt, ExeDgt,
        ExeDgt, ExeDgt, ExeDgt, ExeDgt,
        ExeDgt, ExeDgt, ExeCln, ExeSCl,
        ExeLst, ExeEqu, ExeGtr, ExeQes,
        ExeAtS, ExeA, ExeB, ExeC,
        ExeD, ExeE, ExeF, ExeG,
        ExeH, ExeI, ExeJ, ExeK,
        ExeL, ExeM, ExeN, ExeO,
        ExeP, ExeQ, ExeR, ExeS,
        ExeT, ExeU, ExeV, ExeW,
        ExeX, ExeY, ExeZ, ExeLBr,
        ExeBSl, ExeRBr, ExeCrt, ExeUnd,
        ExeIll, ExeA, ExeB, ExeC,
        ExeD, ExeE, ExeF, ExeG,
        ExeH, ExeI, ExeJ, ExeK,
        ExeL, ExeM, ExeN, ExeO,
        ExeP, ExeQ, ExeR, ExeS,
        ExeT, ExeU, ExeV, ExeW,
        ExeX, ExeY, ExeZ, ExeIll,
        ExeBar, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll,
        ExeIll, ExeIll, ExeIll, ExeIll
 };
 ;
 while (CBfPtr <= CStEnd) {
  if (TraceM) {
   EchoIt(*CBfPtr);
  }
  status = (*FArray[*CBfPtr])();
  ;
  if (GotCtC) {
   GotCtC = 0;
   ErrMsg(41);
   ;
   return 0;
  }
  if (status == (-1)) {
   if (EtFlag & 128) {
    TAbort(1);
   } else {
    ;
    return (-1);
   }
  }
  CBfPtr++;
 }
 if (LStTop != LStBot) {
  ErrUTC();
 }
 ;
 return 0;
}

variable_types: status int

variable_types:
FArray
int (*[])()


Reduce

original_code:
static DEFAULT Reduce()
{
 ESptr ESp1;
 ESptr ESp2;
 ESptr ESp3;
 WORD OnStack;
 LONG x;
 LONG y;
 for(;;) {
  OnStack = EStTop - EStBot;
  if (OnStack < 0) {
   break;
  }
  ESp1 = &(EStack[EStTop]);
  ESp2 = ESp1 - 1;
  ESp3 = ESp2 - 1;
  if (OnStack >= 3) {
   if (ESp1->ElType == 0 &&
       ESp2->ElType == 1 &&
       ESp3->ElType == 0 &&
       ESp2->Elemnt != ')' &&
       ESp2->Elemnt != '(') {
    x = ESp3->Elemnt;
    y = ESp1->Elemnt;
    switch ((char)ESp2->Elemnt) {
    case '+': x += y; break;
    case '-': x -= y; break;
    case '*': x *= y; break;
    case '/': x /= y; break;
    case '&': x &= y; break;
    case '#': x |= y; break;
    }
    ESp3->Elemnt = x;
    EStTop -= 2;
    continue;
   } else {
    if (ESp1->ElType == 1 &&
        ESp2->ElType == 0 &&
        ESp3->ElType == 1 &&
        ESp1->Elemnt == ')' &&
        ESp3->Elemnt == '(') {
     ESp3->Elemnt = ESp2->Elemnt;
     ESp3->ElType = 0;
     EStTop -= 2;
     continue;
    }
   }
  }
  if (OnStack >= 2) {
   if (ESp1->ElType == 0 &&
       ESp2->ElType == 1 &&
       (ESp2->Elemnt == '+' || ESp2->Elemnt == '-')) {
    x = ESp1->Elemnt;
    if (ESp2->Elemnt == '-') {
     x = -x;
    }
    ESp2->Elemnt = x;
    ESp2->ElType = 0;
    --EStTop;
    continue;
   }
  }
  if (OnStack >= 1) {
   if (ESp1->ElType == 1 &&
       ESp1->Elemnt == '\037') {
    if (OnStack == 1 || ESp2->ElType != 0) {
     ErrMsg(19);
     return (-1);
    }
    ESp2->Elemnt = ~(ESp2->Elemnt);
    --EStTop;
    continue;
   }
  }
  break;
 }
 return (0);
}

canonical_original_code:
static int Reduce()
{
 struct EStck *ESp1;
 struct EStck *ESp2;
 struct EStck *ESp3;
 short OnStack;
 long x;
 long y;
 for(;;) {
  OnStack = EStTop - EStBot;
  if (OnStack < 0) {
   break;
  }
  ESp1 = &(EStack[EStTop]);
  ESp2 = ESp1 - 1;
  ESp3 = ESp2 - 1;
  if (OnStack >= 3) {
   if (ESp1->ElType == 0 &&
       ESp2->ElType == 1 &&
       ESp3->ElType == 0 &&
       ESp2->Elemnt != ')' &&
       ESp2->Elemnt != '(') {
    x = ESp3->Elemnt;
    y = ESp1->Elemnt;
    switch ((char)ESp2->Elemnt) {
    case '+': x += y; break;
    case '-': x -= y; break;
    case '*': x *= y; break;
    case '/': x /= y; break;
    case '&': x &= y; break;
    case '#': x |= y; break;
    }
    ESp3->Elemnt = x;
    EStTop -= 2;
    continue;
   } else {
    if (ESp1->ElType == 1 &&
        ESp2->ElType == 0 &&
        ESp3->ElType == 1 &&
        ESp1->Elemnt == ')' &&
        ESp3->Elemnt == '(') {
     ESp3->Elemnt = ESp2->Elemnt;
     ESp3->ElType = 0;
     EStTop -= 2;
     continue;
    }
   }
  }
  if (OnStack >= 2) {
   if (ESp1->ElType == 0 &&
       ESp2->ElType == 1 &&
       (ESp2->Elemnt == '+' || ESp2->Elemnt == '-')) {
    x = ESp1->Elemnt;
    if (ESp2->Elemnt == '-') {
     x = -x;
    }
    ESp2->Elemnt = x;
    ESp2->ElType = 0;
    --EStTop;
    continue;
   }
  }
  if (OnStack >= 1) {
   if (ESp1->ElType == 1 &&
       ESp1->Elemnt == '\037') {
    if (OnStack == 1 || ESp2->ElType != 0) {
     ErrMsg(19);
     return (-1);
    }
    ESp2->Elemnt = ~(ESp2->Elemnt);
    --EStTop;
    continue;
   }
  }
  break;
 }
 return (0);
}

variable_types: struct EStck { long Elemnt; int ElType; } *

variable_types: OnStack short

variable_types: x long

variable_types: y long


ExeT

decompiled_code:
__int64 ExeT()
{
__int64 v0; // rdi
__int64 result; // rax
__int64 v2; // rbx
__int64 v3; // rax
__int64 v4; // rbx
__int64 v5; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
v0 = 1LL;
if ( (CmdMod & 8) != 0 )
{
LABEL_3:
if ( NArgmt != MArgmt )
{
ZCpyBl(&ErrTxt, "m,nT", 5LL);
result = GetAra();
if ( (_DWORD)result == -1 )
return result;
if ( AraBeg < GapBeg && AraEnd > GapEnd )
{
TypBuf(AraBeg, GapBeg);
TypBuf(GapEnd + 1LL, AraEnd + 1LL);
}
else
{
TypBuf(AraBeg, AraEnd + 1LL);
}
}
goto LABEL_14;
}
LABEL_13:
v4 = GapEnd;
v5 = Ln2Chr(v0);
TypBuf(GapEnd + 1LL, v4 + v5 + 1);
goto LABEL_14;
}
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
if ( (CmdMod & 8) != 0 )
goto LABEL_3;
v0 = NArgmt;
if ( NArgmt > 0 )
goto LABEL_13;
v2 = GapBeg;
v3 = ((__int64 (*)(void))Ln2Chr)();
TypBuf(v2 + v3, v2);
LABEL_14:
CmdMod = 0;
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 v0; // rdi
__int64 result; // rax
__int64 v2; // rbx
__int64 v3; // rax
__int64 v4; // rbx
__int64 v5; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
v0 = 1LL;
if ( (CmdMod & 8) != 0 )
{
LABEL_3:
if ( NArgmt != MArgmt )
{
ZCpyBl(&ErrTxt, "m,nT", 5LL);
result = GetAra();
if ( (_DWORD)result == -1 )
return result;
if ( AraBeg < GapBeg && AraEnd > GapEnd )
{
TypBuf(AraBeg, GapBeg);
TypBuf(GapEnd + 1LL, AraEnd + 1LL);
}
else
{
TypBuf(AraBeg, AraEnd + 1LL);
}
}
goto LABEL_14;
}
LABEL_13:
v4 = GapEnd;
v5 = Ln2Chr(v0);
TypBuf(GapEnd + 1LL, v4 + v5 + 1);
goto LABEL_14;
}
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
if ( (CmdMod & 8) != 0 )
goto LABEL_3;
v0 = NArgmt;
if ( NArgmt > 0 )
goto LABEL_13;
v2 = GapBeg;
v3 = ((__int64 (*)(void))Ln2Chr)();
TypBuf(v2 + v3, v2);
LABEL_14:
CmdMod = 0;
return 0LL;
}

original_code:
DEFAULT ExeT()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 if (CmdMod & '\10') {
  if (NArgmt != MArgmt) {
   ZCpyBl((ErrTxt),("m,nT"),(5));
   if (GetAra() == (-1)) {
    ;
    return (-1);
   }
   if ((AraBeg < GapBeg) && (AraEnd > GapEnd)) {
    TypBuf(AraBeg, GapBeg);
    TypBuf(GapEnd+1, AraEnd+1);
   } else {
    TypBuf(AraBeg, AraEnd+1);
   }
  }
 } else {
  if (NArgmt <= 0) {
   TypBuf(GapBeg+Ln2Chr(NArgmt), GapBeg);
  } else {
   TypBuf(GapEnd+1, GapEnd+Ln2Chr(NArgmt)+1);
  }
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeT()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 if (CmdMod & '\10') {
  if (NArgmt != MArgmt) {
   ZCpyBl((ErrTxt),("m,nT"),(5));
   if (GetAra() == (-1)) {
    ;
    return (-1);
   }
   if ((AraBeg < GapBeg) && (AraEnd > GapEnd)) {
    TypBuf(AraBeg, GapBeg);
    TypBuf(GapEnd+1, AraEnd+1);
   } else {
    TypBuf(AraBeg, AraEnd+1);
   }
  }
 } else {
  if (NArgmt <= 0) {
   TypBuf(GapBeg+Ln2Chr(NArgmt), GapBeg);
  } else {
   TypBuf(GapEnd+1, GapEnd+Ln2Chr(NArgmt)+1);
  }
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeCtN

decompiled_code:
__int64 ExeCtN()
{
return PushEx(-(__int64)(*((_DWORD *)&IsEofI + CurInp) != 0), 0LL);
}

canonical_decompiled_code:
__int64 func0()
{
return PushEx(-(__int64)(*((_DWORD *)&IsEofI + CurInp) != 0), 0LL);
}

original_code:
DEFAULT ExeCtN()
{
 ;
 ;
 return PushEx((IsEofI[CurInp] ? -1L : 0L), 0);
}

canonical_original_code:
int ExeCtN()
{
 ;
 ;
 return PushEx((IsEofI[CurInp] ? -1L : 0L), 0);
}


ExeOpr

decompiled_code:
__int64 ExeOpr()
{
return (unsigned int)-((unsigned int)PushEx((unsigned __int8)*CBfPtr, 1LL) == -1);
}

canonical_decompiled_code:
__int64 func0()
{
return (unsigned int)-((unsigned int)PushEx((unsigned __int8)*CBfPtr, 1LL) == -1);
}

original_code:
DEFAULT ExeOpr()
{
 ;
 if (PushEx((LONG)*CBfPtr, 1) == (-1)) {
  ;
  return (-1);
 }
 ;
 return 0;
}

canonical_original_code:
int ExeOpr()
{
 ;
 if (PushEx((LONG)*CBfPtr, 1) == (-1)) {
  ;
  return (-1);
 }
 ;
 return 0;
}


ExeCtS

decompiled_code:
__int64 ExeCtS()
{
return PushEx(RefLen, 0LL);
}

canonical_decompiled_code:
__int64 func0()
{
return PushEx(RefLen, 0LL);
}

original_code:
DEFAULT ExeCtS()
{
 ;
 ;
 return PushEx(RefLen, 0);
}

canonical_original_code:
int ExeCtS()
{
 ;
 ;
 return PushEx(RefLen, 0);
}


FlowEC

decompiled_code:
__int64 FlowEC()
{
int v0; // ebx
__int64 result; // rax
__int64 v2; // rax
char v3; // al

v0 = 1;
do
{
v2 = CBfPtr;
if ( CBfPtr == CStEnd )
{
ErrMsg(17LL);
return 0xFFFFFFFFLL;
}
++CBfPtr;
v3 = *(_BYTE *)(v2 + 1);
if ( v3 == 34 )
{
++v0;
}
else if ( v3 == 39 )
{
--v0;
}
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
while ( (__int16)v0 > 0 );
result = TraceM;
if ( TraceM )
{
EchoIt((unsigned __int8)*CBfPtr);
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
int v0; // ebx
__int64 result; // rax
__int64 v2; // rax
char v3; // al

v0 = 1;
do
{
v2 = CBfPtr;
if ( CBfPtr == CStEnd )
{
ErrMsg(17LL);
return 0xFFFFFFFFLL;
}
++CBfPtr;
v3 = *(_BYTE *)(v2 + 1);
if ( v3 == 34 )
{
++v0;
}
else if ( v3 == 39 )
{
--v0;
}
result = SkpCmd();
if ( (_DWORD)result == -1 )
return result;
}
while ( (__int16)v0 > 0 );
result = TraceM;
if ( TraceM )
{
EchoIt((unsigned __int8)*CBfPtr);
result = 0LL;
}
return result;
}

original_code:
DEFAULT FlowEC()
{
 WORD TmpNst;
 TmpNst = 1;
 do {
  if (CBfPtr == CStEnd) {
   ErrMsg(17);
   return (-1);
  }
  ++CBfPtr;
  if (*CBfPtr == '"') {
   ++TmpNst;
  } else if (*CBfPtr == '\'') {
   --TmpNst;
  }
  if (SkpCmd() == (-1)) {
   return (-1);
  }
 } while (TmpNst > 0);
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 return 0;
}

canonical_original_code:
int FlowEC()
{
 short TmpNst;
 TmpNst = 1;
 do {
  if (CBfPtr == CStEnd) {
   ErrMsg(17);
   return (-1);
  }
  ++CBfPtr;
  if (*CBfPtr == '"') {
   ++TmpNst;
  } else if (*CBfPtr == '\'') {
   --TmpNst;
  }
  if (SkpCmd() == (-1)) {
   return (-1);
  }
 } while (TmpNst > 0);
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 return 0;
}


IncCBP

decompiled_code:
__int64 IncCBP()
{
__int64 v0; // rax
unsigned int v1; // edx

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
v1 = -1;
}
else
{
v1 = 0;
}
}
else
{
++CBfPtr;
v1 = TraceM;
if ( TraceM )
{
EchoIt(*(unsigned __int8 *)(v0 + 1));
v1 = 0;
}
}
return v1;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 v0; // rax
unsigned int v1; // edx

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
v1 = -1;
}
else
{
v1 = 0;
}
}
else
{
++CBfPtr;
v1 = TraceM;
if ( TraceM )
{
EchoIt(*(unsigned __int8 *)(v0 + 1));
v1 = 0;
}
}
return v1;
}

original_code:
DEFAULT IncCBP()
{
 if (CBfPtr == CStEnd) {
  if (MStTop < 0) {
   ErrUTC();
   return (-1);
  }
  return 0;
 }
 ++CBfPtr;
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 return 0;
}

canonical_original_code:
int IncCBP()
{
 if (CBfPtr == CStEnd) {
  if (MStTop < 0) {
   ErrUTC();
   return (-1);
  }
  return 0;
 }
 ++CBfPtr;
 if (TraceM) {
  EchoIt(*CBfPtr);
 }
 return 0;
}


ExeN

decompiled_code:
__int64 ExeN()
{
__int64 result; // rax

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nN");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::N");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 4;
result = Search(0LL);
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nN");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::N");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 4;
result = Search(0LL);
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
DEFAULT ExeN()
{
    ;
    if (CmdMod & '\10') {
        ErrStr(8, "m,nN");
 ;
 return (-1);
    }
    if (CmdMod & '\4') {
        ErrStr(8, "::N");
 ;
 return (-1);
    }
    SrcTyp = 4;
    if (Search(0) == (-1)) {
        ;
 return (-1);
    }
    CmdMod = '\0';
    ;
    return 0;
}


ExeQ

decompiled_code:
__int64 ExeQ()
{
__int64 result; // rax
__int64 v1; // rdi

result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = FindQR();
if ( (_DWORD)result != -1 )
{
if ( EStTop <= EStBot || EStack[4 * EStTop + 2] )
{
if ( (CmdMod & 2) != 0 )
{
v1 = *(_QWORD *)(QR + 8LL) - *QR;
CmdMod &= 0xFDu;
}
else
{
v1 = *(_QWORD *)(QR + 16LL);
}
return PushEx(v1, 0LL);
}
result = GetNmA();
if ( (_DWORD)result != -1 )
{
v1 = -1LL;
if ( NArgmt >= 0 && NArgmt < *(_QWORD *)(QR + 8LL) - *QR )
v1 = *(unsigned __int8 *)(*QR + NArgmt);
EStTop = EStBot;
return PushEx(v1, 0LL);
}
}
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax
__int64 v1; // rdi

result = IncCBP();
if ( (_DWORD)result != -1 )
{
result = FindQR();
if ( (_DWORD)result != -1 )
{
if ( EStTop <= EStBot || EStack[4 * EStTop + 2] )
{
if ( (CmdMod & 2) != 0 )
{
v1 = *(_QWORD *)(QR + 8LL) - *QR;
CmdMod &= 0xFDu;
}
else
{
v1 = *(_QWORD *)(QR + 16LL);
}
return PushEx(v1, 0LL);
}
result = GetNmA();
if ( (_DWORD)result != -1 )
{
v1 = -1LL;
if ( NArgmt >= 0 && NArgmt < *(_QWORD *)(QR + 8LL) - *QR )
v1 = *(unsigned __int8 *)(*QR + NArgmt);
EStTop = EStBot;
return PushEx(v1, 0LL);
}
}
}
return result;
}

original_code:
DEFAULT ExeQ()
{
 LONG TmpVal;
 ;
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 if (FindQR() == (-1)) {
  ;
  return (-1);
 }
 if ((EStTop > EStBot) && (EStack[EStTop].ElType == 0)) {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
  TmpVal = (NArgmt >= 0 && NArgmt < (QR->End_P1 - QR->Start))
    ? *(QR->Start + NArgmt)
    : -1;
  EStTop = EStBot;
 } else {
  if (CmdMod & '\2') {
   TmpVal = QR->End_P1 - QR->Start;
   CmdMod &= ~'\2';
  } else {
   TmpVal = QR->Number;
  }
 }
 return PushEx(TmpVal,0);
}

canonical_original_code:
int ExeQ()
{
 long TmpVal;
 ;
 if (IncCBP() == (-1)) {
  ;
  return (-1);
 }
 if (FindQR() == (-1)) {
  ;
  return (-1);
 }
 if ((EStTop > EStBot) && (EStack[EStTop].ElType == 0)) {
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
  TmpVal = (NArgmt >= 0 && NArgmt < (QR->End_P1 - QR->Start))
    ? *(QR->Start + NArgmt)
    : -1;
  EStTop = EStBot;
 } else {
  if (CmdMod & '\2') {
   TmpVal = QR->End_P1 - QR->Start;
   CmdMod &= ~'\2';
  } else {
   TmpVal = QR->Number;
  }
 }
 return PushEx(TmpVal,0);
}

variable_types: TmpVal long


ExeR

decompiled_code:
__int64 ExeR()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
return DoCJR(-NArgmt);
}
UMinus();
result = GetNmA();
if ( (_DWORD)result != -1 )
return DoCJR(-NArgmt);
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
return DoCJR(-NArgmt);
}
UMinus();
result = GetNmA();
if ( (_DWORD)result != -1 )
return DoCJR(-NArgmt);
return result;
}

original_code:
DEFAULT ExeR()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 ;
 return DoCJR(-NArgmt);
}

canonical_original_code:
int ExeR()
{
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 ;
 return DoCJR(-NArgmt);
}


ExeNYI

decompiled_code:
__int64 ExeNYI()
{
ErrMsg(30LL);
return 0xFFFFFFFFLL;
}

canonical_decompiled_code:
__int64 func0()
{
ErrMsg(30LL);
return 0xFFFFFFFFLL;
}

original_code:
DEFAULT ExeNYI()
{
 ErrMsg(30);
 return (-1);
}

canonical_original_code:
int ExeNYI()
{
 ErrMsg(30);
 return (-1);
}


ExeW

decompiled_code:
__int64 ExeW()
{
__int64 result; // rax

if ( (EtFlag[1] & 2) != 0 )
{
CmdMod = 0;
result = ExeNYI();
}
else
{
CmdMod = 0;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

if ( (EtFlag[1] & 2) != 0 )
{
CmdMod = 0;
result = ExeNYI();
}
else
{
CmdMod = 0;
result = 0LL;
}
return result;
}

original_code:
DEFAULT ExeW()
{
 ;
 if (!(EtFlag & 512)) {
  CmdMod = '\0';
  ;
  return 0;
 }
 CmdMod = '\0';
 ;
 return ExeNYI();
}

canonical_original_code:
int ExeW()
{
 ;
 if (!(EtFlag & 512)) {
  CmdMod = '\0';
  ;
  return 0;
 }
 CmdMod = '\0';
 ;
 return ExeNYI();
}


BakSrc

decompiled_code:
__int64 BakSrc()
{
__int64 v0; // rdx
unsigned __int8 v1; // al
__int64 v2; // rbx
unsigned __int64 v3; // rax
__int64 result; // rax
unsigned __int8 *v5; // rax
int v6; // eax
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
_BYTE *v9; // rax
unsigned __int8 *v10; // rax
unsigned __int8 *v11; // rax
unsigned __int8 *v12; // rax
_BYTE *v13; // rax
unsigned __int8 *v14; // rax
unsigned __int8 *v15; // rax
unsigned __int8 v16; // cl
char v17; // dl
__int64 v18; // rdx
__int64 v19; // rbp
__int64 v20; // rbx
_BYTE *v21; // rdx
unsigned __int64 v22; // rcx
_BYTE *v23; // rax
__int64 v24; // rbx
__int64 v25; // rbp
__int64 v26; // rax
char v27; // dl
__int64 v28; // rsi
_BYTE *v29; // rax
__int64 v30; // rbx
__int64 v31; // rax
char v32; // dl
_BYTE *v33; // rax
char v34; // cl
_BYTE *v35; // rcx
int v36[7]; // [rsp+Ch] [rbp-1Ch] BYREF

v0 = SStPtr;
v1 = *SStPtr;
if ( *SStPtr == 19 )
{
v5 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v5) & 0xD0) == 0 )
break;
EBPtr1 = --v5;
}
while ( (unsigned __int64)v5 >= EndSAr );
}
goto LABEL_12;
}
if ( v1 > 0x13u )
{
if ( v1 == 24 )
goto LABEL_12;
goto LABEL_122;
}
if ( v1 != 5 )
{
if ( v1 == 14 )
{
v2 = ++SStPtr;
if ( v0 + 1 == SBfPtr )
{
ErrMsg(15LL);
return 0xFFFFFFFFLL;
}
v3 = EBPtr1;
if ( EBPtr1 >= EndSAr )
{
while ( 1 )
{
EBPtr2 = v3;
SStPtr = v2;
result = CMatch(v36);
if ( (_DWORD)result == -1 )
return result;
if ( v36[0] )
{
v3 = EBPtr1 - 1LL;
EBPtr1 = v3;
if ( v3 >= EndSAr )
continue;
}
break;
}
}
LABEL_12:
EBPtr2 = EBPtr1;
return 0LL;
}
LABEL_122:
if ( SMFlag )
{
v33 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *v33 == *SStPtr )
break;
EBPtr1 = --v33;
}
while ( (unsigned __int64)v33 >= EndSAr );
}
}
else
{
v34 = *((_BYTE *)&ChrMsk + v1);
if ( v34 >= 0 )
{
if ( (v34 & 0x40) != 0 )
v1 -= 32;
}
else
{
v1 += 32;
}
v35 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *v35 == *SStPtr )
break;
if ( (unsigned __int8)*v35 == (char)v1 )
break;
EBPtr1 = --v35;
}
while ( (unsigned __int64)v35 >= EndSAr );
}
}
goto LABEL_12;
}
++SStPtr;
if ( v0 + 1 == SBfPtr )
{
LABEL_95:
ErrMsg(4LL);
return 0xFFFFFFFFLL;
}
v6 = *(unsigned __int8 *)(v0 + 1);
if ( (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(v0 + 1)) & 0x40) != 0 )
v6 -= 32;
switch ( v6 )
{
case '<':
SStPtr = v0 + 2;
if ( SBfPtr == v0 + 2 )
goto LABEL_95;
v28 = 0LL;
while ( (*((_BYTE *)&ChrMsk + (unsigned __int8)*SStPtr) & 0x10) != 0 )
{
v28 = (unsigned __int8)*SStPtr - 48 + 8 * v28;
if ( v28 <= 127 && SBfPtr != ++SStPtr )
continue;
goto LABEL_95;
}
if ( *SStPtr != 62 )
goto LABEL_95;
v29 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *v29 == (_BYTE)v28 )
break;
EBPtr1 = --v29;
}
while ( (unsigned __int64)v29 >= EndSAr );
}
goto LABEL_12;
case 'A':
v15 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v15) & 0xC0) != 0 )
break;
EBPtr1 = --v15;
}
while ( (unsigned __int64)v15 >= EndSAr );
}
goto LABEL_12;
case 'B':
v14 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v14) & 0xD0) == 0 )
break;
EBPtr1 = --v14;
}
while ( (unsigned __int64)v14 >= EndSAr );
}
goto LABEL_12;
case 'C':
v13 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
v16 = *v13 - 36;
v17 = 1;
if ( v16 <= 0x3Bu )
v17 = ((0x800000000000401uLL >> v16) ^ 1) & 1;
if ( !v17 )
break;
if ( (*((_BYTE *)&ChrMsk + (unsigned __int8)*v13) & 0xD0) != 0 )
break;
EBPtr1 = --v13;
}
while ( (unsigned __int64)v13 >= EndSAr );
}
goto LABEL_12;
case 'D':
v12 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v12) & 0x10) != 0 )
break;
EBPtr1 = --v12;
}
while ( (unsigned __int64)v12 >= EndSAr );
}
goto LABEL_12;
case 'G':
v18 = v0 + 2;
SStPtr = v18;
if ( SBfPtr == v18 )
goto LABEL_95;
v19 = CBfPtr;
v20 = CStEnd;
CBfPtr = v18;
CStEnd = SBfPtr;
result = FindQR();
SStPtr = CBfPtr;
SBfPtr = CStEnd;
CBfPtr = v19;
CStEnd = v20;
if ( (_DWORD)result == -1 )
return result;
v21 = (_BYTE *)EBPtr1;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
v22 = *(_QWORD *)(QR + 8LL);
do
{
v23 = (_BYTE *)*QR;
while ( v22 > (unsigned __int64)v23 )
{
if ( *v23++ == *v21 )
goto LABEL_12;
}
EBPtr1 = --v21;
}
while ( (unsigned __int64)v21 >= EndSAr );
goto LABEL_12;
case 'L':
v11 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v11) & 0x20) != 0 )
break;
EBPtr1 = --v11;
}
while ( (unsigned __int64)v11 >= EndSAr );
}
goto LABEL_12;
case 'M':
v24 = v0 + 2;
SStPtr = v0 + 2;
if ( SBfPtr == v0 + 2 )
goto LABEL_95;
result = BakSrc();
if ( (_DWORD)result == -1 )
return result;
v25 = EBPtr2;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
while ( EBPtr1 > EndSAr )
{
EBPtr2 = --EBPtr1;
SStPtr = v24;
result = CMatch(v36);
if ( (_DWORD)result == -1 )
return result;
result = (unsigned int)v36[0];
if ( !v36[0] )
{
++EBPtr1;
EBPtr2 = v25;
return result;
}
}
return 0LL;
case 'R':
v10 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v10) & 0xD0) != 0 )
break;
EBPtr1 = --v10;
}
while ( (unsigned __int64)v10 >= EndSAr );
}
goto LABEL_12;
case 'S':
v9 = (_BYTE *)EBPtr1;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
while ( *v9 != 32 && *v9 != 9 )
{
EBPtr1 = --v9;
if ( (unsigned __int64)v9 < EndSAr )
goto LABEL_12;
}
EBPtr2 = v9;
while ( 1 )
{
v26 = EBPtr1;
if ( EBPtr1 <= EndSAr )
break;
--EBPtr1;
v27 = *(_BYTE *)(v26 - 1);
if ( v27 != 32 && v27 != 9 )
{
EBPtr1 = v26;
return 0LL;
}
}
return 0LL;
case 'V':
v8 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v8) & 0x40) != 0 )
break;
EBPtr1 = --v8;
}
while ( (unsigned __int64)v8 >= EndSAr );
}
goto LABEL_12;
case 'W':
v7 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *((char *)&ChrMsk + *v7) < 0 )
break;
EBPtr1 = --v7;
}
while ( (unsigned __int64)v7 >= EndSAr );
}
goto LABEL_12;
case 'X':
goto LABEL_12;
case '[':
v30 = v0 + 2;
SStPtr = v0 + 2;
if ( SBfPtr == v0 + 2 )
goto LABEL_95;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
break;
default:
goto LABEL_95;
}
while ( 1 )
{
v31 = SStPtr;
v32 = *SStPtr;
if ( *SStPtr != 93 )
break;
LABEL_107:
SStPtr = v30;
if ( --EBPtr1 < EndSAr )
goto LABEL_12;
}
while ( v32 == 44 )
{
SStPtr = v31 + 1;
if ( v31 + 1 == SBfPtr )
{
LABEL_116:
ErrMsg(4LL);
return 0xFFFFFFFFLL;
}
LABEL_113:
v31 = SStPtr;
v32 = *SStPtr;
if ( *SStPtr == 93 )
goto LABEL_107;
}
EBPtr2 = EBPtr1;
result = CMatch(v36);
if ( (_DWORD)result == -1 )
return result;
if ( !v36[0] )
{
if ( ++SStPtr == SBfPtr )
goto LABEL_116;
goto LABEL_113;
}
while ( *SStPtr != 93 )
{
if ( ++SStPtr == SBfPtr )
goto LABEL_116;
}
EBPtr2 = EBPtr1;
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 v0; // rdx
unsigned __int8 v1; // al
__int64 v2; // rbx
unsigned __int64 v3; // rax
__int64 result; // rax
unsigned __int8 *v5; // rax
int v6; // eax
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
_BYTE *v9; // rax
unsigned __int8 *v10; // rax
unsigned __int8 *v11; // rax
unsigned __int8 *v12; // rax
_BYTE *v13; // rax
unsigned __int8 *v14; // rax
unsigned __int8 *v15; // rax
unsigned __int8 v16; // cl
char v17; // dl
__int64 v18; // rdx
__int64 v19; // rbp
__int64 v20; // rbx
_BYTE *v21; // rdx
unsigned __int64 v22; // rcx
_BYTE *v23; // rax
__int64 v24; // rbx
__int64 v25; // rbp
__int64 v26; // rax
char v27; // dl
__int64 v28; // rsi
_BYTE *v29; // rax
__int64 v30; // rbx
__int64 v31; // rax
char v32; // dl
_BYTE *v33; // rax
char v34; // cl
_BYTE *v35; // rcx
int v36[7]; // [rsp+Ch] [rbp-1Ch] BYREF

v0 = SStPtr;
v1 = *SStPtr;
if ( *SStPtr == 19 )
{
v5 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v5) & 0xD0) == 0 )
break;
EBPtr1 = --v5;
}
while ( (unsigned __int64)v5 >= EndSAr );
}
goto LABEL_12;
}
if ( v1 > 0x13u )
{
if ( v1 == 24 )
goto LABEL_12;
goto LABEL_122;
}
if ( v1 != 5 )
{
if ( v1 == 14 )
{
v2 = ++SStPtr;
if ( v0 + 1 == SBfPtr )
{
ErrMsg(15LL);
return 0xFFFFFFFFLL;
}
v3 = EBPtr1;
if ( EBPtr1 >= EndSAr )
{
while ( 1 )
{
EBPtr2 = v3;
SStPtr = v2;
result = CMatch(v36);
if ( (_DWORD)result == -1 )
return result;
if ( v36[0] )
{
v3 = EBPtr1 - 1LL;
EBPtr1 = v3;
if ( v3 >= EndSAr )
continue;
}
break;
}
}
LABEL_12:
EBPtr2 = EBPtr1;
return 0LL;
}
LABEL_122:
if ( SMFlag )
{
v33 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *v33 == *SStPtr )
break;
EBPtr1 = --v33;
}
while ( (unsigned __int64)v33 >= EndSAr );
}
}
else
{
v34 = *((_BYTE *)&ChrMsk + v1);
if ( v34 >= 0 )
{
if ( (v34 & 0x40) != 0 )
v1 -= 32;
}
else
{
v1 += 32;
}
v35 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *v35 == *SStPtr )
break;
if ( (unsigned __int8)*v35 == (char)v1 )
break;
EBPtr1 = --v35;
}
while ( (unsigned __int64)v35 >= EndSAr );
}
}
goto LABEL_12;
}
++SStPtr;
if ( v0 + 1 == SBfPtr )
{
LABEL_95:
ErrMsg(4LL);
return 0xFFFFFFFFLL;
}
v6 = *(unsigned __int8 *)(v0 + 1);
if ( (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(v0 + 1)) & 0x40) != 0 )
v6 -= 32;
switch ( v6 )
{
case '<':
SStPtr = v0 + 2;
if ( SBfPtr == v0 + 2 )
goto LABEL_95;
v28 = 0LL;
while ( (*((_BYTE *)&ChrMsk + (unsigned __int8)*SStPtr) & 0x10) != 0 )
{
v28 = (unsigned __int8)*SStPtr - 48 + 8 * v28;
if ( v28 <= 127 && SBfPtr != ++SStPtr )
continue;
goto LABEL_95;
}
if ( *SStPtr != 62 )
goto LABEL_95;
v29 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *v29 == (_BYTE)v28 )
break;
EBPtr1 = --v29;
}
while ( (unsigned __int64)v29 >= EndSAr );
}
goto LABEL_12;
case 'A':
v15 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v15) & 0xC0) != 0 )
break;
EBPtr1 = --v15;
}
while ( (unsigned __int64)v15 >= EndSAr );
}
goto LABEL_12;
case 'B':
v14 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v14) & 0xD0) == 0 )
break;
EBPtr1 = --v14;
}
while ( (unsigned __int64)v14 >= EndSAr );
}
goto LABEL_12;
case 'C':
v13 = (_BYTE *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
v16 = *v13 - 36;
v17 = 1;
if ( v16 <= 0x3Bu )
v17 = ((0x800000000000401uLL >> v16) ^ 1) & 1;
if ( !v17 )
break;
if ( (*((_BYTE *)&ChrMsk + (unsigned __int8)*v13) & 0xD0) != 0 )
break;
EBPtr1 = --v13;
}
while ( (unsigned __int64)v13 >= EndSAr );
}
goto LABEL_12;
case 'D':
v12 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v12) & 0x10) != 0 )
break;
EBPtr1 = --v12;
}
while ( (unsigned __int64)v12 >= EndSAr );
}
goto LABEL_12;
case 'G':
v18 = v0 + 2;
SStPtr = v18;
if ( SBfPtr == v18 )
goto LABEL_95;
v19 = CBfPtr;
v20 = CStEnd;
CBfPtr = v18;
CStEnd = SBfPtr;
result = FindQR();
SStPtr = CBfPtr;
SBfPtr = CStEnd;
CBfPtr = v19;
CStEnd = v20;
if ( (_DWORD)result == -1 )
return result;
v21 = (_BYTE *)EBPtr1;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
v22 = *(_QWORD *)(QR + 8LL);
do
{
v23 = (_BYTE *)*QR;
while ( v22 > (unsigned __int64)v23 )
{
if ( *v23++ == *v21 )
goto LABEL_12;
}
EBPtr1 = --v21;
}
while ( (unsigned __int64)v21 >= EndSAr );
goto LABEL_12;
case 'L':
v11 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v11) & 0x20) != 0 )
break;
EBPtr1 = --v11;
}
while ( (unsigned __int64)v11 >= EndSAr );
}
goto LABEL_12;
case 'M':
v24 = v0 + 2;
SStPtr = v0 + 2;
if ( SBfPtr == v0 + 2 )
goto LABEL_95;
result = func0();
if ( (_DWORD)result == -1 )
return result;
v25 = EBPtr2;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
while ( EBPtr1 > EndSAr )
{
EBPtr2 = --EBPtr1;
SStPtr = v24;
result = CMatch(v36);
if ( (_DWORD)result == -1 )
return result;
result = (unsigned int)v36[0];
if ( !v36[0] )
{
++EBPtr1;
EBPtr2 = v25;
return result;
}
}
return 0LL;
case 'R':
v10 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v10) & 0xD0) != 0 )
break;
EBPtr1 = --v10;
}
while ( (unsigned __int64)v10 >= EndSAr );
}
goto LABEL_12;
case 'S':
v9 = (_BYTE *)EBPtr1;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
while ( *v9 != 32 && *v9 != 9 )
{
EBPtr1 = --v9;
if ( (unsigned __int64)v9 < EndSAr )
goto LABEL_12;
}
EBPtr2 = v9;
while ( 1 )
{
v26 = EBPtr1;
if ( EBPtr1 <= EndSAr )
break;
--EBPtr1;
v27 = *(_BYTE *)(v26 - 1);
if ( v27 != 32 && v27 != 9 )
{
EBPtr1 = v26;
return 0LL;
}
}
return 0LL;
case 'V':
v8 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( (*((_BYTE *)&ChrMsk + *v8) & 0x40) != 0 )
break;
EBPtr1 = --v8;
}
while ( (unsigned __int64)v8 >= EndSAr );
}
goto LABEL_12;
case 'W':
v7 = (unsigned __int8 *)EBPtr1;
if ( EBPtr1 >= EndSAr )
{
do
{
if ( *((char *)&ChrMsk + *v7) < 0 )
break;
EBPtr1 = --v7;
}
while ( (unsigned __int64)v7 >= EndSAr );
}
goto LABEL_12;
case 'X':
goto LABEL_12;
case '[':
v30 = v0 + 2;
SStPtr = v0 + 2;
if ( SBfPtr == v0 + 2 )
goto LABEL_95;
if ( EBPtr1 < EndSAr )
goto LABEL_12;
break;
default:
goto LABEL_95;
}
while ( 1 )
{
v31 = SStPtr;
v32 = *SStPtr;
if ( *SStPtr != 93 )
break;
LABEL_107:
SStPtr = v30;
if ( --EBPtr1 < EndSAr )
goto LABEL_12;
}
while ( v32 == 44 )
{
SStPtr = v31 + 1;
if ( v31 + 1 == SBfPtr )
{
LABEL_116:
ErrMsg(4LL);
return 0xFFFFFFFFLL;
}
LABEL_113:
v31 = SStPtr;
v32 = *SStPtr;
if ( *SStPtr == 93 )
goto LABEL_107;
}
EBPtr2 = EBPtr1;
result = CMatch(v36);
if ( (_DWORD)result == -1 )
return result;
if ( !v36[0] )
{
if ( ++SStPtr == SBfPtr )
goto LABEL_116;
goto LABEL_113;
}
while ( *SStPtr != 93 )
{
if ( ++SStPtr == SBfPtr )
goto LABEL_116;
}
EBPtr2 = EBPtr1;
return 0LL;
}

original_code:
DEFAULT BakSrc()
{
    unsigned char Charac;
    charptr LstBeg;
    char OtCase;
    charptr QRPtr;
    BOOLEAN SamChr;
    charptr SavEP2;
    charptr SavSSP;
    DEFAULT Status;
    charptr TCBfPt;
    charptr TCStEn;
    LONG TmpLng;
    switch (*SStPtr) {
 case '\030':
         break;
 case '\023':
     for (; EBPtr1 >= EndSAr; --EBPtr1) {
         if (!(ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20'))) {
      break;
  }
     }
     break;
 case '\016':
     if (++SStPtr == SBfPtr) {
         ErrMsg(15);
  ;
  return (-1);
     }
     SavSSP = SStPtr;
     for (;EBPtr1>=EndSAr;--EBPtr1) {
         EBPtr2 = EBPtr1;
  SStPtr = SavSSP;
  if (CMatch(&SamChr) == (-1)) {
      ;
      return (-1);
  }
  if (!SamChr) {
      break;
  }
     }
     break;
 case '\005':
     if (++SStPtr == SBfPtr) {
         ErrMsg(4);
  ;
  return (-1);
     }
     switch (((ChrMsk[(*SStPtr)] & '\100') ? (*SStPtr)-' ' : (*SStPtr) )) {
         case 'A':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & ('\200' | '\100'))) {
       break;
   }
      }
      break;
  case 'B':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if (!(ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20'))) {
       break;
   }
      }
      break;
  case 'C':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if (((ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20')) || *EBPtr1 == '.' || *EBPtr1 == '_' || *EBPtr1 == '$')) {
       break;
   }
      }
      break;
  case 'D':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\20')) {
       break;
   }
      }
      break;
  case 'G':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      TCBfPt = CBfPtr;
      TCStEn = CStEnd;
      CBfPtr = SStPtr;
      CStEnd = SBfPtr;
      Status = FindQR();
      SStPtr = CBfPtr;
      SBfPtr = CStEnd;
      CBfPtr = TCBfPt;
      CStEnd = TCStEn;
      if (Status == (-1)) {
          ;
       return (-1);
      }
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          QRPtr = QR->Start;
   while (QRPtr < QR->End_P1) {
       if (*QRPtr++ == *EBPtr1) {
           goto kludge;
       }
   }
      }
kludge: break;
  case 'L':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\40')) {
       break;
   }
      }
      break;
  case 'M':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      SavSSP = SStPtr;
      if (BakSrc() == (-1)) {
          ;
   return (-1);
      }
      if (EBPtr1 < EndSAr) {
          break;
      }
      SavEP2 = EBPtr2;
      while (EBPtr1 > EndSAr) {
          EBPtr1--;
   EBPtr2 = EBPtr1;
   SStPtr = SavSSP;
   if (CMatch(&SamChr) == (-1)) {
       ;
       return (-1);
   }
   if (!SamChr) {
       EBPtr1++;
       EBPtr2 = SavEP2;
       break;
   }
      }
      ;
      return 0;
  case 'R':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20'))) {
       break;
   }
      }
      break;
  case 'S':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((*EBPtr1 == '\040') || (*EBPtr1 == '\011')) {
       EBPtr2 = EBPtr1;
       while (EBPtr1 > EndSAr) {
           EBPtr1--;
    if ((*EBPtr1 != '\040') &&
        (*EBPtr1 != '\011')) {
        EBPtr1++;
        break;
    }
       }
       ;
       return 0;
   }
      }
      break;
  case 'V':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\100')) {
       break;
   }
      }
      break;
  case 'W':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\200')) {
              break;
   }
      }
      break;
  case 'X':
      break;
  case '<':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      TmpLng = 0;
      while ((ChrMsk[(*SStPtr)] & '\20')) {
          TmpLng = (TmpLng * 8) + (*SStPtr - '0');
   if (TmpLng > 127) {
       ErrMsg(4);
       ;
       return (-1);
   }
   if (++SStPtr == SBfPtr) {
       ErrMsg(4);
       ;
       return (-1);
   }
      }
      if (*SStPtr != '>') {
          ErrMsg(4);
   ;
   return (-1);
      }
      Charac = (unsigned char)TmpLng;
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if (*EBPtr1 == Charac) {
       break;
   }
      }
      break;
  case '[':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      LstBeg = SStPtr;
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
   while (*SStPtr != ']') {
              if (*SStPtr == ',') {
           if (++SStPtr == SBfPtr) {
               ErrMsg(4);
        ;
        return (-1);
    }
       } else {
           EBPtr2 = EBPtr1;
    if (CMatch(&SamChr) == (-1)) {
               ;
        return (-1);
    }
    if (SamChr) {
               while (*SStPtr != ']') {
            if (++SStPtr == SBfPtr) {
                ErrMsg(4);
         ;
         return (-1);
     }
        }
        EBPtr2 = EBPtr1;
        ;
        return 0;
    }
    if (++SStPtr == SBfPtr) {
               ErrMsg(4);
        ;
        return (-1);
    }
       }
   }
   SStPtr = LstBeg;
      }
      break;
  default:
      ErrMsg(4);
      ;
      return (-1);
     }
     break;
 default:
     if (SMFlag) {
         for (; EBPtr1 >= EndSAr; --EBPtr1) {
      if (*EBPtr1 == *SStPtr) {
          break;
      }
  }
     } else {
         OtCase = (ChrMsk[(*SStPtr)] & '\200')
               ? ((ChrMsk[(*SStPtr)] & '\200') ? (*SStPtr)+' ' : (*SStPtr) )
        : ((ChrMsk[(*SStPtr)] & '\100') ? (*SStPtr)-' ' : (*SStPtr) );
  for (; EBPtr1 >= EndSAr; --EBPtr1) {
      if ((*EBPtr1 == *SStPtr) || (*EBPtr1 == OtCase)) {
          break;
      }
  }
     }
    }
    EBPtr2 = EBPtr1;
    ;
    return 0;
}

canonical_original_code:
int BakSrc()
{
    unsigned char Charac;
    unsigned char *LstBeg;
    char OtCase;
    unsigned char *QRPtr;
    int SamChr;
    unsigned char *SavEP2;
    unsigned char *SavSSP;
    int Status;
    unsigned char *TCBfPt;
    unsigned char *TCStEn;
    long TmpLng;
    switch (*SStPtr) {
 case '\030':
         break;
 case '\023':
     for (; EBPtr1 >= EndSAr; --EBPtr1) {
         if (!(ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20'))) {
      break;
  }
     }
     break;
 case '\016':
     if (++SStPtr == SBfPtr) {
         ErrMsg(15);
  ;
  return (-1);
     }
     SavSSP = SStPtr;
     for (;EBPtr1>=EndSAr;--EBPtr1) {
         EBPtr2 = EBPtr1;
  SStPtr = SavSSP;
  if (CMatch(&SamChr) == (-1)) {
      ;
      return (-1);
  }
  if (!SamChr) {
      break;
  }
     }
     break;
 case '\005':
     if (++SStPtr == SBfPtr) {
         ErrMsg(4);
  ;
  return (-1);
     }
     switch (((ChrMsk[(*SStPtr)] & '\100') ? (*SStPtr)-' ' : (*SStPtr) )) {
         case 'A':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & ('\200' | '\100'))) {
       break;
   }
      }
      break;
  case 'B':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if (!(ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20'))) {
       break;
   }
      }
      break;
  case 'C':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if (((ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20')) || *EBPtr1 == '.' || *EBPtr1 == '_' || *EBPtr1 == '$')) {
       break;
   }
      }
      break;
  case 'D':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\20')) {
       break;
   }
      }
      break;
  case 'G':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      TCBfPt = CBfPtr;
      TCStEn = CStEnd;
      CBfPtr = SStPtr;
      CStEnd = SBfPtr;
      Status = FindQR();
      SStPtr = CBfPtr;
      SBfPtr = CStEnd;
      CBfPtr = TCBfPt;
      CStEnd = TCStEn;
      if (Status == (-1)) {
          ;
       return (-1);
      }
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          QRPtr = QR->Start;
   while (QRPtr < QR->End_P1) {
       if (*QRPtr++ == *EBPtr1) {
           goto kludge;
       }
   }
      }
kludge: break;
  case 'L':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\40')) {
       break;
   }
      }
      break;
  case 'M':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      SavSSP = SStPtr;
      if (BakSrc() == (-1)) {
          ;
   return (-1);
      }
      if (EBPtr1 < EndSAr) {
          break;
      }
      SavEP2 = EBPtr2;
      while (EBPtr1 > EndSAr) {
          EBPtr1--;
   EBPtr2 = EBPtr1;
   SStPtr = SavSSP;
   if (CMatch(&SamChr) == (-1)) {
       ;
       return (-1);
   }
   if (!SamChr) {
       EBPtr1++;
       EBPtr2 = SavEP2;
       break;
   }
      }
      ;
      return 0;
  case 'R':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & ('\200' | '\100' | '\20'))) {
       break;
   }
      }
      break;
  case 'S':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((*EBPtr1 == '\040') || (*EBPtr1 == '\011')) {
       EBPtr2 = EBPtr1;
       while (EBPtr1 > EndSAr) {
           EBPtr1--;
    if ((*EBPtr1 != '\040') &&
        (*EBPtr1 != '\011')) {
        EBPtr1++;
        break;
    }
       }
       ;
       return 0;
   }
      }
      break;
  case 'V':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\100')) {
       break;
   }
      }
      break;
  case 'W':
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if ((ChrMsk[(*EBPtr1)] & '\200')) {
              break;
   }
      }
      break;
  case 'X':
      break;
  case '<':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      TmpLng = 0;
      while ((ChrMsk[(*SStPtr)] & '\20')) {
          TmpLng = (TmpLng * 8) + (*SStPtr - '0');
   if (TmpLng > 127) {
       ErrMsg(4);
       ;
       return (-1);
   }
   if (++SStPtr == SBfPtr) {
       ErrMsg(4);
       ;
       return (-1);
   }
      }
      if (*SStPtr != '>') {
          ErrMsg(4);
   ;
   return (-1);
      }
      Charac = (unsigned char)TmpLng;
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
          if (*EBPtr1 == Charac) {
       break;
   }
      }
      break;
  case '[':
      if (++SStPtr == SBfPtr) {
          ErrMsg(4);
   ;
   return (-1);
      }
      LstBeg = SStPtr;
      for (; EBPtr1 >= EndSAr; --EBPtr1) {
   while (*SStPtr != ']') {
              if (*SStPtr == ',') {
           if (++SStPtr == SBfPtr) {
               ErrMsg(4);
        ;
        return (-1);
    }
       } else {
           EBPtr2 = EBPtr1;
    if (CMatch(&SamChr) == (-1)) {
               ;
        return (-1);
    }
    if (SamChr) {
               while (*SStPtr != ']') {
            if (++SStPtr == SBfPtr) {
                ErrMsg(4);
         ;
         return (-1);
     }
        }
        EBPtr2 = EBPtr1;
        ;
        return 0;
    }
    if (++SStPtr == SBfPtr) {
               ErrMsg(4);
        ;
        return (-1);
    }
       }
   }
   SStPtr = LstBeg;
      }
      break;
  default:
      ErrMsg(4);
      ;
      return (-1);
     }
     break;
 default:
     if (SMFlag) {
         for (; EBPtr1 >= EndSAr; --EBPtr1) {
      if (*EBPtr1 == *SStPtr) {
          break;
      }
  }
     } else {
         OtCase = (ChrMsk[(*SStPtr)] & '\200')
               ? ((ChrMsk[(*SStPtr)] & '\200') ? (*SStPtr)+' ' : (*SStPtr) )
        : ((ChrMsk[(*SStPtr)] & '\100') ? (*SStPtr)-' ' : (*SStPtr) );
  for (; EBPtr1 >= EndSAr; --EBPtr1) {
      if ((*EBPtr1 == *SStPtr) || (*EBPtr1 == OtCase)) {
          break;
      }
  }
     }
    }
    EBPtr2 = EBPtr1;
    ;
    return 0;
}

variable_types:
Charac
unsigned char

variable_types:
LstBeg
unsigned char *

variable_types: OtCase char

variable_types:
QRPtr
unsigned char *

variable_types: SamChr int

variable_types:
SavSSP
unsigned char *

variable_types: Status int

variable_types:
TCBfPt
unsigned char *

variable_types:
TCStEn
unsigned char *

variable_types: TmpLng long


ExeBar

decompiled_code:
__int64 ExeBar()
{
__int64 result; // rax

result = FlowEC();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax

result = FlowEC();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

original_code:
DEFAULT ExeBar()
{
 ;
 if (FlowEC() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}

canonical_original_code:
int ExeBar()
{
 ;
 if (FlowEC() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}