extrema

decompiled_code:
__int64 __fastcall extrema(int a1, _QWORD *a2)
{
_QWORD *v2; // r15
int *v3; // rbp
__int64 v4; // rbx
unsigned __int64 v5; // r12
unsigned __int64 v6; // r13
unsigned __int64 v7; // rbx
int v8; // eax
float v10; // [rsp+0h] [rbp-58h]
float v11; // [rsp+4h] [rbp-54h]
float v12; // [rsp+10h] [rbp-48h] BYREF
float v13; // [rsp+14h] [rbp-44h]
float v14; // [rsp+18h] [rbp-40h]
float v15; // [rsp+1Ch] [rbp-3Ch]

if ( a1 > 0 )
{
v2 = a2;
v3 = 0LL;
while ( 1 )
{
v4 = *v2;
if ( (unsigned int)extcmp(*v2, ".jpg") )
{
if ( (unsigned int)extcmp(v4, ".png") )
{
if ( (unsigned int)extcmp(v4, ".tif") )
{
if ( !(unsigned int)extcmp(v4, ".img") || !(unsigned int)extcmp(v4, ".lbl") )
v3 = (int *)pds_load(v4);
}
else
{
v3 = (int *)tif_load(v4);
}
}
else
{
v3 = (int *)png_load(v4);
}
}
else
{
v3 = (int *)jpg_load(v4);
}
if ( v3 )
break;
LABEL_6:
if ( ++v2 == &a2[(unsigned int)(a1 - 1) + 1] )
return 0LL;
}
v5 = v3[4];
v6 = v5 * v3[5];
if ( !v6 )
{
v11 = *(float *)&LC0;
v10 = *(float *)&LC1;
LABEL_30:
printf("%f\t%f\n", v10, v11);
img_close(v3);
goto LABEL_6;
}
v7 = 0LL;
v11 = *(float *)&LC0;
v10 = *(float *)&LC1;
while ( 1 )
{
if ( !(unsigned int)img_pixel(v3, (unsigned int)(v7 / v5), v7 % v5, &v12) )
goto LABEL_20;
v8 = v3[6];
if ( v8 == 3 )
goto LABEL_28;
if ( v8 > 3 )
break;
if ( v8 == 1 )
goto LABEL_19;
if ( v8 == 2 )
goto LABEL_18;
LABEL_20:
v7 += v6 >> 20;
if ( v7 >= v6 )
goto LABEL_30;
}
if ( v8 != 4 )
goto LABEL_20;
v10 = fminf(v10, v15);
v11 = fmaxf(v11, v15);
LABEL_28:
v10 = fminf(v10, v14);
v11 = fmaxf(v11, v14);
LABEL_18:
v10 = fminf(v10, v13);
v11 = fmaxf(v11, v13);
LABEL_19:
v10 = fminf(v10, v12);
v11 = fmaxf(v11, v12);
goto LABEL_20;
}
return 0LL;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, _QWORD *a2)
{
_QWORD *v2; // r15
int *v3; // rbp
__int64 v4; // rbx
unsigned __int64 v5; // r12
unsigned __int64 v6; // r13
unsigned __int64 v7; // rbx
int v8; // eax
float v10; // [rsp+0h] [rbp-58h]
float v11; // [rsp+4h] [rbp-54h]
float v12; // [rsp+10h] [rbp-48h] BYREF
float v13; // [rsp+14h] [rbp-44h]
float v14; // [rsp+18h] [rbp-40h]
float v15; // [rsp+1Ch] [rbp-3Ch]

if ( a1 > 0 )
{
v2 = a2;
v3 = 0LL;
while ( 1 )
{
v4 = *v2;
if ( (unsigned int)extcmp(*v2, ".jpg") )
{
if ( (unsigned int)extcmp(v4, ".png") )
{
if ( (unsigned int)extcmp(v4, ".tif") )
{
if ( !(unsigned int)extcmp(v4, ".img") || !(unsigned int)extcmp(v4, ".lbl") )
v3 = (int *)pds_load(v4);
}
else
{
v3 = (int *)tif_load(v4);
}
}
else
{
v3 = (int *)png_load(v4);
}
}
else
{
v3 = (int *)jpg_load(v4);
}
if ( v3 )
break;
LABEL_6:
if ( ++v2 == &a2[(unsigned int)(a1 - 1) + 1] )
return 0LL;
}
v5 = v3[4];
v6 = v5 * v3[5];
if ( !v6 )
{
v11 = *(float *)&LC0;
v10 = *(float *)&LC1;
LABEL_30:
printf("%f\t%f\n", v10, v11);
img_close(v3);
goto LABEL_6;
}
v7 = 0LL;
v11 = *(float *)&LC0;
v10 = *(float *)&LC1;
while ( 1 )
{
if ( !(unsigned int)img_pixel(v3, (unsigned int)(v7 / v5), v7 % v5, &v12) )
goto LABEL_20;
v8 = v3[6];
if ( v8 == 3 )
goto LABEL_28;
if ( v8 > 3 )
break;
if ( v8 == 1 )
goto LABEL_19;
if ( v8 == 2 )
goto LABEL_18;
LABEL_20:
v7 += v6 >> 20;
if ( v7 >= v6 )
goto LABEL_30;
}
if ( v8 != 4 )
goto LABEL_20;
v10 = fminf(v10, v15);
v11 = fmaxf(v11, v15);
LABEL_28:
v10 = fminf(v10, v14);
v11 = fmaxf(v11, v14);
LABEL_18:
v10 = fminf(v10, v13);
v11 = fmaxf(v11, v13);
LABEL_19:
v10 = fminf(v10, v12);
v11 = fmaxf(v11, v12);
goto LABEL_20;
}
return 0LL;
}

variable_types: argc int

variable_types:
argv
char **

variable_types:
w
unsigned long

variable_types:
h
unsigned long

variable_types:
n
unsigned long

variable_types: a float

variable_types: z float

variable_types:
c
float [4]

variable_types:
s
unsigned long


repo: rlk/scmtiff

original_code:
static inline long long log2i(long long n)
{
    unsigned long long v = (unsigned long long) n;
    unsigned long long r;
    unsigned long long s;
    r = (v > 0xFFFFFFFFULL) << 5; v >>= r;
    s = (v > 0xFFFFULL ) << 4; v >>= s; r |= s;
    s = (v > 0xFFULL ) << 3; v >>= s; r |= s;
    s = (v > 0xFULL ) << 2; v >>= s; r |= s;
    s = (v > 0x3ULL ) << 1; v >>= s; r |= s;
    return (long long) (r | (v >> 1));
}

variable_types:
n
long long

variable_types:
v
unsigned long long

variable_types:
r
unsigned long long

variable_types:
s
unsigned long long

return_type: long long


decompiled_code:
__int64 __fastcall scm_page_count(char a1)
{
return (1LL << (2 * a1 + 3)) - 2;
}

canonical_decompiled_code:
__int64 __fastcall func1(char a1)
{
return (1LL << (2 * a1 + 3)) - 2;
}

original_code:
static inline long long scm_page_count(long long d)
{
    return (1LL << (2 * d + 3)) - 2;
}

variable_types:
d
long long


decompiled_code:
__int64 __fastcall scm_page_level(__int64 a1)
{
return (log2i(a1 + 2) - 1) / 2;
}

canonical_decompiled_code:
__int64 __fastcall func2(__int64 a1)
{
return (func0(a1 + 2) - 1) / 2;
}

original_code:
static inline long long scm_page_level(long long i)
{
    return (log2i(i + 2) - 1) / 2;
}

variable_types:
i
long long


original_code:
static inline long long scm_page_root(long long i)
{
    long long n = 1LL << (2 * scm_page_level(i));
    return (i - 2 * (n - 1)) / n;
}


original_code:
static inline long long scm_page_rank(long long i)
{
    long long n = 1LL << (2 * scm_page_level(i));
    return (i - 2 * (n - 1)) % n;
}


decompiled_code:
__int64 __fastcall scm_page_row(__int64 a1)
{
__int64 v1; // rbx

v1 = scm_page_rank(a1);
return v1 / (1LL << scm_page_level(a1));
}

canonical_decompiled_code:
__int64 __fastcall func5(__int64 a1)
{
__int64 v1; // rbx

v1 = func4(a1);
return v1 / (1LL << func2(a1));
}

original_code:
static inline long long scm_page_row(long long i)
{
    return scm_page_rank(i) / (1LL << scm_page_level(i));
}


decompiled_code:
__int64 __fastcall scm_page_col(__int64 a1)
{
__int64 v1; // rbx

v1 = scm_page_rank(a1);
return v1 % (1LL << scm_page_level(a1));
}

canonical_decompiled_code:
__int64 __fastcall func6(__int64 a1)
{
__int64 v1; // rbx

v1 = func4(a1);
return v1 % (1LL << func2(a1));
}

original_code:
static inline long long scm_page_col(long long i)
{
    return scm_page_rank(i) % (1LL << scm_page_level(i));
}


decompiled_code:
__int64 __fastcall scm_page_index(__int64 a1, char a2, __int64 a3, __int64 a4)
{
return (a3 << a2) + scm_page_count(a2 - 1) + (a1 << (2 * a2)) + a4;
}

original_code:
static inline long long scm_page_index(long long a, long long l,
                                       long long r, long long c)
{
    return scm_page_count(l - 1) + (a << (2 * l)) + (r << l) + c;
}

variable_types:
a
long long

variable_types:
l
long long

variable_types:
r
long long

variable_types:
c
long long


decompiled_code:
__int64 __fastcall scm_page_child(__int64 a1, __int64 a2)
{
__int64 v2; // r12
__int64 v3; // r13
char v4; // bp
__int64 v5; // rax

v2 = a2 % 2 + 2 * scm_page_col(a1);
v3 = a2 / 2 + 2 * scm_page_row(a1);
v4 = scm_page_level(a1);
v5 = scm_page_root(a1);
return scm_page_index(v5, v4 + 1, v3, v2);
}

original_code:
static inline long long scm_page_child(long long i, long long k)
{
    return scm_page_index(scm_page_root(i), scm_page_level(i) + 1,
                                            scm_page_row (i) * 2 + k / 2,
                                            scm_page_col (i) * 2 + k % 2);
}

variable_types:
k
long long


isleaf

decompiled_code:
__int64 __fastcall isleaf(__int64 a1, __int64 a2)
{
__int64 v2; // rdx
__int64 result; // rax
__int64 v4; // r12
__int64 i; // rbp
__int64 v6; // rax
__int64 v7; // rax

v2 = ((__int64 (*)(void))scm_get_offset)();
result = 0LL;
if ( v2 )
{
v4 = scm_get_index(a1, a2);
for ( i = 0LL; i != 4; ++i )
{
v6 = scm_page_child(v4, i);
v7 = scm_search(a1, v6);
if ( v7 != -1 && scm_get_offset(a1, v7) > 0 )
return 0LL;
}
result = 1LL;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func9(__int64 a1, __int64 a2)
{
__int64 v2; // rdx
__int64 result; // rax
__int64 v4; // r12
__int64 i; // rbp
__int64 v6; // rax
__int64 v7; // rax

v2 = ((__int64 (*)(void))scm_get_offset)();
result = 0LL;
if ( v2 )
{
v4 = scm_get_index(a1, a2);
for ( i = 0LL; i != 4; ++i )
{
v6 = func8(v4, i);
v7 = scm_search(a1, v6);
if ( v7 != -1 && scm_get_offset(a1, v7) > 0 )
return 0LL;
}
result = 1LL;
}
return result;
}

original_code:
static _Bool isleaf(long long x, long long c, const long long *v)
{
    if (llsearch(scm_page_child(x, 0), c, v) >= 0) return 0;
    else if (llsearch(scm_page_child(x, 1), c, v) >= 0) return 0;
    else if (llsearch(scm_page_child(x, 2), c, v) >= 0) return 0;
    else if (llsearch(scm_page_child(x, 3), c, v) >= 0) return 0;
    else return 1;
}

canonical_original_code:
static _Bool isleaf(long long x, long long c, long long *v)
{
    if (llsearch(scm_page_child(x, 0), c, v) >= 0) return 0;
    else if (llsearch(scm_page_child(x, 1), c, v) >= 0) return 0;
    else if (llsearch(scm_page_child(x, 2), c, v) >= 0) return 0;
    else if (llsearch(scm_page_child(x, 3), c, v) >= 0) return 0;
    else return 1;
}

variable_types:
x
long long

variable_types:
v
long long *


canonical_original_code:
static inline long long log2i(long long n)
{
    unsigned long long v = (unsigned long long) n;
    unsigned long long r;
    unsigned long long s;
    r = (v > 0xFFFFFFFFULL) << 5; v >>= r;
    s = (v > 0xFFFFULL ) << 4; v >>= s; r |= s;
    s = (v > 0xFFULL ) << 3; v >>= s; r |= s;
    s = (v > 0xFULL ) << 2; v >>= s; r |= s;
    s = (v > 0x3ULL ) << 1; v >>= s; r |= s;
    return (long long) (r | (v >> 1));
}


canonical_original_code:
static inline long long scm_page_count(long long d)
{
    return (1LL << (2 * d + 3)) - 2;
}


canonical_original_code:
static inline long long scm_page_level(long long i)
{
    return (log2i(i + 2) - 1) / 2;
}


canonical_original_code:
static inline long long scm_page_root(long long i)
{
    long long n = 1LL << (2 * scm_page_level(i));
    return (i - 2 * (n - 1)) / n;
}


canonical_original_code:
static inline long long scm_page_rank(long long i)
{
    long long n = 1LL << (2 * scm_page_level(i));
    return (i - 2 * (n - 1)) % n;
}


canonical_original_code:
static inline long long scm_page_row(long long i)
{
    return scm_page_rank(i) / (1LL << scm_page_level(i));
}


canonical_original_code:
static inline long long scm_page_col(long long i)
{
    return scm_page_rank(i) % (1LL << scm_page_level(i));
}


canonical_original_code:
static inline long long scm_page_index(long long a, long long l, long long r, long long c)
{
    return scm_page_count(l - 1) + (a << (2 * l)) + (r << l) + c;
}


canonical_original_code:
static inline long long scm_page_child(long long i, long long k)
{
    return scm_page_index(scm_page_root(i), scm_page_level(i) + 1,
                                            scm_page_row (i) * 2 + k / 2,
                                            scm_page_col (i) * 2 + k % 2);
}


facenorm

variable_types:
a
double *

variable_types:
b
double *

variable_types:
c
double *

variable_types:
n
double *

variable_types:
u
double [3]

variable_types:
v
double [3]

return_type: void


sampnorm

original_code:
static void sampnorm(int f, int i, int j, int n, int c,
                     long u, long v, long w, const float *r, const float *p, float *q)
{
    const float dr = r[1] - r[0];
    double vn[3];
    double vs[3];
    double ve[3];
    double vw[3];
    double vc[3];
    scm_get_sample_center(f, n * u + i, n * v + j, n * w, vc);
    scm_get_sample_center(f, n * u + i - 1, n * v + j, n * w, vn);
    scm_get_sample_center(f, n * u + i + 1, n * v + j, n * w, vs);
    scm_get_sample_center(f, n * u + i, n * v + j - 1, n * w, ve);
    scm_get_sample_center(f, n * u + i, n * v + j + 1, n * w, vw);
    double rc = p[((n + 2) * (i + 1) + (j + 1)) * c] * dr + r[0];
    double rn = p[((n + 2) * (i + 0) + (j + 1)) * c] * dr + r[0];
    double rs = p[((n + 2) * (i + 2) + (j + 1)) * c] * dr + r[0];
    double re = p[((n + 2) * (i + 1) + (j + 0)) * c] * dr + r[0];
    double rw = p[((n + 2) * (i + 1) + (j + 2)) * c] * dr + r[0];
    vn[0] *= rn; vn[1] *= rn; vn[2] *= rn;
    vs[0] *= rs; vs[1] *= rs; vs[2] *= rs;
    ve[0] *= re; ve[1] *= re; ve[2] *= re;
    vw[0] *= rw; vw[1] *= rw; vw[2] *= rw;
    vc[0] *= rc; vc[1] *= rc; vc[2] *= rc;
    double na[3];
    double nb[3];
    double nc[3];
    double nd[3];
    double nn[3];
    facenorm(vc, vn, ve, na);
    facenorm(vc, ve, vs, nb);
    facenorm(vc, vs, vw, nc);
    facenorm(vc, vw, vn, nd);
    nn[0] = na[0] + nb[0] + nc[0] + nd[0];
    nn[1] = na[1] + nb[1] + nc[1] + nd[1];
    nn[2] = na[2] + nb[2] + nc[2] + nd[2];
    normalize(nn);
    float *o = q + 3 * ((n + 2) * (i + 1) + (j + 1));
    o[0] = ((float) nn[0] + 1.f) / 2.f;
    o[1] = ((float) nn[1] + 1.f) / 2.f;
    o[2] = ((float) nn[2] + 1.f) / 2.f;
}

canonical_original_code:
static void sampnorm(int f, int i, int j, int n, int c, long u, long v, long w, float *r, float *p, float *q)
{
    float dr = r[1] - r[0];
    double vn[3];
    double vs[3];
    double ve[3];
    double vw[3];
    double vc[3];
    scm_get_sample_center(f, n * u + i, n * v + j, n * w, vc);
    scm_get_sample_center(f, n * u + i - 1, n * v + j, n * w, vn);
    scm_get_sample_center(f, n * u + i + 1, n * v + j, n * w, vs);
    scm_get_sample_center(f, n * u + i, n * v + j - 1, n * w, ve);
    scm_get_sample_center(f, n * u + i, n * v + j + 1, n * w, vw);
    double rc = p[((n + 2) * (i + 1) + (j + 1)) * c] * dr + r[0];
    double rn = p[((n + 2) * (i + 0) + (j + 1)) * c] * dr + r[0];
    double rs = p[((n + 2) * (i + 2) + (j + 1)) * c] * dr + r[0];
    double re = p[((n + 2) * (i + 1) + (j + 0)) * c] * dr + r[0];
    double rw = p[((n + 2) * (i + 1) + (j + 2)) * c] * dr + r[0];
    vn[0] *= rn; vn[1] *= rn; vn[2] *= rn;
    vs[0] *= rs; vs[1] *= rs; vs[2] *= rs;
    ve[0] *= re; ve[1] *= re; ve[2] *= re;
    vw[0] *= rw; vw[1] *= rw; vw[2] *= rw;
    vc[0] *= rc; vc[1] *= rc; vc[2] *= rc;
    double na[3];
    double nb[3];
    double nc[3];
    double nd[3];
    double nn[3];
    facenorm(vc, vn, ve, na);
    facenorm(vc, ve, vs, nb);
    facenorm(vc, vs, vw, nc);
    facenorm(vc, vw, vn, nd);
    nn[0] = na[0] + nb[0] + nc[0] + nd[0];
    nn[1] = na[1] + nb[1] + nc[1] + nd[1];
    nn[2] = na[2] + nb[2] + nc[2] + nd[2];
    normalize(nn);
    float *o = q + 3 * ((n + 2) * (i + 1) + (j + 1));
    o[0] = ((float) nn[0] + 1.f) / 2.f;
    o[1] = ((float) nn[1] + 1.f) / 2.f;
    o[2] = ((float) nn[2] + 1.f) / 2.f;
}

variable_types: f int

variable_types: i int

variable_types: j int

variable_types: n int

variable_types: c int

variable_types: u long

variable_types: v long

variable_types: w long

variable_types:
r
float *

variable_types:
p
float *

variable_types:
q
float *

variable_types: dr float

variable_types:
vn
double [3]

variable_types:
vs
double [3]

variable_types:
ve
double [3]

variable_types:
vw
double [3]

variable_types:
vc
double [3]

variable_types: rc double

variable_types: rn double

variable_types: rs double

variable_types: re double

variable_types: rw double

variable_types:
nb
double [3]

variable_types:
nc
double [3]

variable_types:
nd
double [3]

variable_types:
nn
double [3]

variable_types:
o
float *


divide

original_code:
static void divide(float *p, float d, int c)
{
    switch (c)
    {
        case 4: p[3] /= d;
        case 3: p[2] /= d;
        case 2: p[1] /= d;
        case 1: p[0] /= d;
    }
}

variable_types:
p
float *

variable_types: d float

variable_types: c int


ExeV

repo: rmblair/tecoc

decompiled_code:
__int64 ExeV()
{
__int64 v0; // rdi
__int64 v1; // rbx
__int64 v2; // rax
__int64 v3; // rbx
__int64 v4; // rax
__int64 result; // rax
__int64 v6; // rbx
__int64 v7; // rax
__int64 v8; // rbx
__int64 v9; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
}
else
{
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
}
if ( (CmdMod & 8) != 0 )
v0 = 1LL - MArgmt;
else
v0 = 1LL - NArgmt;
if ( v0 <= 0 )
{
v6 = GapBeg;
v7 = Ln2Chr();
TypBuf(v6 + v7, v6);
}
else
{
v1 = GapEnd;
v2 = Ln2Chr();
TypBuf(GapEnd + 1LL, v1 + v2 + 1);
}
if ( NArgmt <= 0 )
{
v8 = GapBeg;
v9 = Ln2Chr();
TypBuf(v8 + v9, v8);
}
else
{
v3 = GapEnd;
v4 = Ln2Chr();
TypBuf(GapEnd + 1LL, v3 + v4 + 1);
}
CmdMod = 0;
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 v0; // rdi
__int64 v1; // rbx
__int64 v2; // rax
__int64 v3; // rbx
__int64 v4; // rax
__int64 result; // rax
__int64 v6; // rbx
__int64 v7; // rax
__int64 v8; // rbx
__int64 v9; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
}
else
{
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
}
if ( (CmdMod & 8) != 0 )
v0 = 1LL - MArgmt;
else
v0 = 1LL - NArgmt;
if ( v0 <= 0 )
{
v6 = GapBeg;
v7 = Ln2Chr();
TypBuf(v6 + v7, v6);
}
else
{
v1 = GapEnd;
v2 = Ln2Chr();
TypBuf(GapEnd + 1LL, v1 + v2 + 1);
}
if ( NArgmt <= 0 )
{
v8 = GapBeg;
v9 = Ln2Chr();
TypBuf(v8 + v9, v8);
}
else
{
v3 = GapEnd;
v4 = Ln2Chr();
TypBuf(GapEnd + 1LL, v3 + v4 + 1);
}
CmdMod = 0;
return 0LL;
}

original_code:
DEFAULT ExeV()
{
 LONG firstarg;
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 firstarg = 1 - ((CmdMod & '\10') ? MArgmt : NArgmt);
 if (firstarg <= 0) {
  TypBuf(GapBeg+Ln2Chr(firstarg), GapBeg);
 } else {
  TypBuf(GapEnd+1, GapEnd+Ln2Chr(firstarg)+1);
 }
 if (NArgmt <= 0) {
  TypBuf(GapBeg+Ln2Chr(NArgmt), GapBeg);
 } else {
  TypBuf(GapEnd+1, GapEnd+Ln2Chr(NArgmt)+1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeV()
{
 long firstarg;
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 firstarg = 1 - ((CmdMod & '\10') ? MArgmt : NArgmt);
 if (firstarg <= 0) {
  TypBuf(GapBeg+Ln2Chr(firstarg), GapBeg);
 } else {
  TypBuf(GapEnd+1, GapEnd+Ln2Chr(firstarg)+1);
 }
 if (NArgmt <= 0) {
  TypBuf(GapBeg+Ln2Chr(NArgmt), GapBeg);
 } else {
  TypBuf(GapEnd+1, GapEnd+Ln2Chr(NArgmt)+1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

variable_types: firstarg long

return_type: int


SkpSkp

decompiled_code:
__int64 SkpSkp()
{
CmdMod = 0;
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
CmdMod = 0;
return 0LL;
}

original_code:
static DEFAULT SkpSkp()
{
 CmdMod = '\0';
 return 0;
}

canonical_original_code:
static int SkpSkp()
{
 CmdMod = '\0';
 return 0;
}


SkpOne

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

if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
result = 0LL;
}
return result;
}

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

if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
result = 0LL;
}
return result;
}

original_code:
static DEFAULT SkpOne()
{
 if (CBfPtr == CStEnd) {
  if (MStTop < 0) {
   ErrUTC();
   ;
   return (-1);
  } else {
   ;
   return 0;
  }
 }
 ++CBfPtr;
 return 0;
}

canonical_original_code:
static int SkpOne()
{
 if (CBfPtr == CStEnd) {
  if (MStTop < 0) {
   ErrUTC();
   ;
   return (-1);
  } else {
   ;
   return 0;
  }
 }
 ++CBfPtr;
 return 0;
}


SkpCrt

decompiled_code:
__int64 SkpCrt()
{
__int64 v0; // rax
unsigned __int8 v1; // al
__int16 v2; // ax
__int64 result; // rax

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v1 = *(_BYTE *)(v0 + 1);
if ( (unsigned __int8)(v1 - 65) <= 0x1Eu )
{
v2 = v1 - 65;
return FCAray_1[v2]();
}
if ( (*((_BYTE *)&ChrMsk + v1) & 0x40) != 0 )
{
v2 = v1 - 97;
return FCAray_1[v2]();
}
ErrMsg(16LL);
result = 0xFFFFFFFFLL;
}
return result;
}

canonical_decompiled_code:
__int64 func2()
{
__int64 v0; // rax
unsigned __int8 v1; // al
__int16 v2; // ax
__int64 result; // rax

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v1 = *(_BYTE *)(v0 + 1);
if ( (unsigned __int8)(v1 - 65) <= 0x1Eu )
{
v2 = v1 - 65;
return FCAray_1[v2]();
}
if ( (*((_BYTE *)&ChrMsk + v1) & 0x40) != 0 )
{
v2 = v1 - 97;
return FCAray_1[v2]();
}
ErrMsg(16LL);
result = 0xFFFFFFFFLL;
}
return result;
}

original_code:
static DEFAULT SkpCrt()
{
 static DEFAULT (*FCAray[])(void) = {
        SkpCtA, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpArg, ExeNul, SkpSkp, SkpSkp,
        ExeNul, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpCtU, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpOne, SkpSkp
 };
 WORD CDummy;
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 if ((*CBfPtr >= 'A') && (*CBfPtr <= '_'))
  CDummy = *CBfPtr - 'A';
 else if ((ChrMsk[(*CBfPtr)] & '\100'))
  CDummy = *CBfPtr - 'a';
 else {
  ErrMsg(16);
  return (-1);
 }
 return (*FCAray[CDummy])();
}

canonical_original_code:
static int SkpCrt()
{
 static int (*FCAray[])() = {
        SkpCtA, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpArg, ExeNul, SkpSkp, SkpSkp,
        ExeNul, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpCtU, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpOne, SkpSkp
 };
 short CDummy;
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 if ((*CBfPtr >= 'A') && (*CBfPtr <= '_'))
  CDummy = *CBfPtr - 'A';
 else if ((ChrMsk[(*CBfPtr)] & '\100'))
  CDummy = *CBfPtr - 'a';
 else {
  ErrMsg(16);
  return (-1);
 }
 return (*FCAray[CDummy])();
}

variable_types:
FCAray
int (*[])()

variable_types: CDummy short


SkpDqu

decompiled_code:
__int64 SkpDqu()
{
__int64 v0; // rax
int v1; // eax
__int64 result; // rax

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v1 = *(unsigned __int8 *)(v0 + 1);
if ( (*((_BYTE *)&ChrMsk + v1) & 0x40) != 0 )
v1 -= 32;
switch ( v1 )
{
case '<':
case '=':
case '>':
case 'A':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'L':
case 'N':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
CmdMod = 0;
result = 0LL;
break;
default:
ErrMsg(11LL);
result = 0xFFFFFFFFLL;
break;
}
}
return result;
}

canonical_decompiled_code:
__int64 func3()
{
__int64 v0; // rax
int v1; // eax
__int64 result; // rax

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v1 = *(unsigned __int8 *)(v0 + 1);
if ( (*((_BYTE *)&ChrMsk + v1) & 0x40) != 0 )
v1 -= 32;
switch ( v1 )
{
case '<':
case '=':
case '>':
case 'A':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'L':
case 'N':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
CmdMod = 0;
result = 0LL;
break;
default:
ErrMsg(11LL);
result = 0xFFFFFFFFLL;
break;
}
}
return result;
}

original_code:
static DEFAULT SkpDqu()
{
 ;
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 switch (((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) )) {
  case 'A':
  case 'C':
  case 'D':
  case 'E':
  case 'F':
  case 'U':
  case '=':
  case 'G':
  case '>':
  case 'L':
  case 'S':
  case 'T':
  case '<':
  case 'N':
  case 'R':
  case 'V':
  case 'W':
   break;
  default:
   ErrMsg(11);
   ;
   return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int SkpDqu()
{
 ;
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 switch (((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) )) {
  case 'A':
  case 'C':
  case 'D':
  case 'E':
  case 'F':
  case 'U':
  case '=':
  case 'G':
  case '>':
  case 'L':
  case 'S':
  case 'T':
  case '<':
  case 'N':
  case 'R':
  case 'V':
  case 'W':
   break;
  default:
   ErrMsg(11);
   ;
   return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


SkpDAr

decompiled_code:
__int64 SkpDAr()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(27LL);
if ( (_DWORD)result == -1 )
{
TraceM = v0;
}
else
{
if ( (CmdMod & 1) != 0 )
--CBfPtr;
result = FindES(27LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func4()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(27LL);
if ( (_DWORD)result == -1 )
{
TraceM = v0;
}
else
{
if ( (CmdMod & 1) != 0 )
--CBfPtr;
result = FindES(27LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
result = 0LL;
}
return result;
}

original_code:
static DEFAULT SkpDAr()
{
 BOOLEAN TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 if (CmdMod & '\1')
  --CBfPtr;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 return 0;
}

canonical_original_code:
static int SkpDAr()
{
 int TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 if (CmdMod & '\1')
  --CBfPtr;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 return 0;
}

variable_types: TTrace int


SkpExc

decompiled_code:
__int64 SkpExc()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(33LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func5()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(33LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
return result;
}

original_code:
static DEFAULT SkpExc()
{
 BOOLEAN TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('!') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}

canonical_original_code:
static int SkpExc()
{
 int TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('!') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}


SkpCtU

decompiled_code:
__int64 SkpCtU()
{
int v0; // ebx
__int64 result; // rax

if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v0 = TraceM;
TraceM = 0;
result = FindES(27LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

canonical_decompiled_code:
__int64 func6()
{
int v0; // ebx
__int64 result; // rax

if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v0 = TraceM;
TraceM = 0;
result = FindES(27LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
static DEFAULT SkpCtU()
{
 BOOLEAN TTrace;
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}

canonical_original_code:
static int SkpCtU()
{
 int TTrace;
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}


SkpArg

decompiled_code:
__int64 SkpArg()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(27LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func7()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(27LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
return result;
}

original_code:
static DEFAULT SkpArg()
{
 BOOLEAN TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}

canonical_original_code:
static int SkpArg()
{
 int TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\033') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}


SkpF

decompiled_code:
__int64 SkpF()
{
__int64 v0; // rax
int v1; // esi
__int64 v2; // rdx
int v3; // eax
__int64 result; // rax

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v1 = *(unsigned __int8 *)(v0 + 1);
v2 = *(unsigned __int8 *)(v0 + 1);
v3 = v1 - 32;
if ( (*((_BYTE *)&ChrMsk + v2) & 0x40) == 0 )
v3 = v1;
switch ( v3 )
{
case '\'':
case '<':
case '>':
case '|':
result = SkpSkp();
break;
case 'B':
case 'D':
case 'K':
case 'R':
result = SkpArg();
break;
case 'C':
case 'N':
case 'S':
case '_':
result = SkpDAr();
break;
default:
ErrChr(6LL);
result = 0xFFFFFFFFLL;
break;
}
}
return result;
}

canonical_decompiled_code:
__int64 func8()
{
__int64 v0; // rax
int v1; // esi
__int64 v2; // rdx
int v3; // eax
__int64 result; // rax

v0 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v1 = *(unsigned __int8 *)(v0 + 1);
v2 = *(unsigned __int8 *)(v0 + 1);
v3 = v1 - 32;
if ( (*((_BYTE *)&ChrMsk + v2) & 0x40) == 0 )
v3 = v1;
switch ( v3 )
{
case '\'':
case '<':
case '>':
case '|':
result = func0();
break;
case 'B':
case 'D':
case 'K':
case 'R':
result = func7();
break;
case 'C':
case 'N':
case 'S':
case '_':
result = func4();
break;
default:
ErrChr(6LL);
result = 0xFFFFFFFFLL;
break;
}
}
return result;
}

original_code:
static DEFAULT SkpF()
{
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 switch (((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) )) {
  case 'S':
  case 'N':
  case 'C':
  case '_': return SkpDAr();
  case 'D':
  case 'R':
  case 'B':
  case 'K': return SkpArg();
  case '>':
  case '<':
  case '\'':
  case '|': return SkpSkp();
  default:
      ErrChr(6, *CBfPtr);
    return (-1);
 }
}

canonical_original_code:
static int SkpF()
{
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 switch (((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) )) {
  case 'S':
  case 'N':
  case 'C':
  case '_': return SkpDAr();
  case 'D':
  case 'R':
  case 'B':
  case 'K': return SkpArg();
  case '>':
  case '<':
  case '\'':
  case '|': return SkpSkp();
  default:
      ErrChr(6, *CBfPtr);
    return (-1);
 }
}


SkpE

decompiled_code:
__int64 __fastcall SkpE(__int64 a1)
{
__int64 v1; // rax
unsigned __int8 v2; // al
__int64 v3; // rsi
__int64 result; // rax

v1 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v2 = *(_BYTE *)(v1 + 1);
v3 = v2;
if ( (*((_BYTE *)&ChrMsk + v2) & 0x40) != 0 )
v2 -= 32;
if ( v2 == 37 )
{
result = SkpOne(a1, v3);
}
else if ( v2 == 95 )
{
result = SkpArg(a1, v3);
}
else if ( *((char *)&ChrMsk + v2) >= 0 || v2 == 69 )
{
ErrChr(5LL);
result = 0xFFFFFFFFLL;
}
else
{
result = ((__int64 (__fastcall *)(__int64, __int64))FEAray_0[v2 - 65])(a1, v3);
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func9(__int64 a1)
{
__int64 v1; // rax
unsigned __int8 v2; // al
__int64 v3; // rsi
__int64 result; // rax

v1 = CBfPtr;
if ( CBfPtr == CStEnd )
{
if ( MStTop < 0 )
{
ErrUTC();
result = 0xFFFFFFFFLL;
}
else
{
result = 0LL;
}
}
else
{
++CBfPtr;
v2 = *(_BYTE *)(v1 + 1);
v3 = v2;
if ( (*((_BYTE *)&ChrMsk + v2) & 0x40) != 0 )
v2 -= 32;
if ( v2 == 37 )
{
result = func1(a1, v3);
}
else if ( v2 == 95 )
{
result = func7(a1, v3);
}
else if ( *((char *)&ChrMsk + v2) >= 0 || v2 == 69 )
{
ErrChr(5LL);
result = 0xFFFFFFFFLL;
}
else
{
result = ((__int64 (__fastcall *)(__int64, __int64))FEAray_0[v2 - 65])(a1, v3);
}
}
return result;
}

original_code:
static DEFAULT SkpE()
{
 unsigned char TmpChr;
 static DEFAULT (*FEAray[])(void) = {
        SkpSkp, SkpArg, SkpSkp, SkpSkp,
        0, SkpSkp, SkpArg, SkpSkp,
        SkpArg, SkpSkp, SkpSkp, SkpArg,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpOne, SkpArg, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpArg, SkpSkp,
        SkpSkp, SkpSkp
 };
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 TmpChr = ((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) );
 if (TmpChr == '%')
  return SkpOne();
 else if (TmpChr == '_')
  return SkpArg();
 else if (!(ChrMsk[(TmpChr)] & '\200') || (TmpChr=='E'))
  {
  ErrChr(5, *CBfPtr);
  return (-1);
  }
 return (*FEAray[TmpChr-'A'])();
}

canonical_original_code:
static int SkpE()
{
 unsigned char TmpChr;
 static int (*FEAray[])() = {
        SkpSkp, SkpArg, SkpSkp, SkpSkp,
        0, SkpSkp, SkpArg, SkpSkp,
        SkpArg, SkpSkp, SkpSkp, SkpArg,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpOne, SkpArg, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpArg, SkpSkp,
        SkpSkp, SkpSkp
 };
 if (CBfPtr == CStEnd)
  if (MStTop < 0)
   {
   ErrUTC();
   return (-1);
   }
  else
   return 0;
 ++CBfPtr;
 TmpChr = ((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) );
 if (TmpChr == '%')
  return SkpOne();
 else if (TmpChr == '_')
  return SkpArg();
 else if (!(ChrMsk[(TmpChr)] & '\200') || (TmpChr=='E'))
  {
  ErrChr(5, *CBfPtr);
  return (-1);
  }
 return (*FEAray[TmpChr-'A'])();
}

variable_types:
TmpChr
unsigned char

variable_types:
FEAray
int (*[])()


SkpCtA

decompiled_code:
__int64 SkpCtA()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(1LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func10()
{
int v0; // ebx
__int64 result; // rax

v0 = TraceM;
TraceM = 0;
result = FindES(1LL);
TraceM = v0;
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
return result;
}

original_code:
static DEFAULT SkpCtA()
{
 BOOLEAN TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\001') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}

canonical_original_code:
static int SkpCtA()
{
 int TTrace;
 TTrace = TraceM;
 TraceM = 0;
 if (FindES('\001') == (-1))
  {
  TraceM = TTrace;
  return (-1);
  }
 TraceM = TTrace;
 CmdMod = '\0';
 return 0;
}


SkpCmd

decompiled_code:
__int64 SkpCmd()
{
return ((__int64 (__fastcall *)())FSAray_2[(unsigned __int8)*CBfPtr])();
}

canonical_decompiled_code:
__int64 func11()
{
return ((__int64 (__fastcall *)())FSAray_2[(unsigned __int8)*CBfPtr])();
}

original_code:
DEFAULT SkpCmd()
{
 static DEFAULT (*FSAray[])(void) = {
        ExeNul, SkpCtA, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpArg, ExeNul, SkpSkp,
        SkpSkp, ExeNul, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpCtU, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpOne, SkpSkp,
        ExeNul, SkpExc, SkpDqu, SkpSkp,
        SkpSkp, SkpOne, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        ExeAtS, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpE, SkpF, SkpOne,
        SkpSkp, SkpArg, SkpSkp, SkpSkp,
        SkpSkp, SkpOne, SkpArg, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpSkp,
        SkpOne, SkpSkp, SkpSkp, SkpOne,
        SkpSkp, SkpOne, SkpCrt, SkpArg,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpE, SkpF, SkpOne,
        SkpSkp, SkpArg, SkpSkp, SkpSkp,
        SkpSkp, SkpOne, SkpArg, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpSkp,
        SkpOne, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp
 };
 DEFAULT Status;
 Status = (*FSAray[*CBfPtr])();
 return Status;
}

canonical_original_code:
int SkpCmd()
{
 static int (*FSAray[])() = {
        ExeNul, SkpCtA, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpArg, ExeNul, SkpSkp,
        SkpSkp, ExeNul, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpCtU, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpOne, SkpSkp,
        ExeNul, SkpExc, SkpDqu, SkpSkp,
        SkpSkp, SkpOne, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        ExeAtS, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpE, SkpF, SkpOne,
        SkpSkp, SkpArg, SkpSkp, SkpSkp,
        SkpSkp, SkpOne, SkpArg, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpSkp,
        SkpOne, SkpSkp, SkpSkp, SkpOne,
        SkpSkp, SkpOne, SkpCrt, SkpArg,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpE, SkpF, SkpOne,
        SkpSkp, SkpArg, SkpSkp, SkpSkp,
        SkpSkp, SkpOne, SkpArg, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpArg,
        SkpSkp, SkpOne, SkpSkp, SkpSkp,
        SkpOne, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp,
        SkpSkp, SkpSkp, SkpSkp, SkpSkp
 };
 int Status;
 Status = (*FSAray[*CBfPtr])();
 return Status;
}

variable_types:
FSAray
int (*[])()

variable_types: Status int


ExeCtR

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

if ( EStTop == EStBot || (v0 = EStack[4 * EStTop + 2]) != 0 )
return (unsigned int)PushEx(Radix, 0LL);
if ( (unsigned int)GetNmA() == -1 )
return (unsigned int)-1;
if ( (NArgmt & 0xFFFFFFFFFFFFFFFDLL) == 8 || NArgmt == 16LL )
{
Radix = NArgmt;
}
else
{
ErrMsg(13LL);
v0 = -1;
}
return v0;
}

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

if ( EStTop == EStBot || (v0 = EStack[4 * EStTop + 2]) != 0 )
return (unsigned int)PushEx(Radix, 0LL);
if ( (unsigned int)GetNmA() == -1 )
return (unsigned int)-1;
if ( (NArgmt & 0xFFFFFFFFFFFFFFFDLL) == 8 || NArgmt == 16LL )
{
Radix = NArgmt;
}
else
{
ErrMsg(13LL);
v0 = -1;
}
return v0;
}

original_code:
DEFAULT ExeCtR()
{
 ;
 if ((EStTop == EStBot) ||
     (EStack[EStTop].ElType != 0)) {
  ;
  return PushEx((LONG)Radix, 0);
 }
 if (GetNmA() == (-1)) {
  ;
  return (-1);
 }
 if ((NArgmt != 8) && (NArgmt != 10) && (NArgmt != 16)) {
  ErrMsg(13);
  ;
  return (-1);
 }
 Radix = (DEFAULT)NArgmt;
 ;
 return 0;
}

canonical_original_code:
int ExeCtR()
{
 ;
 if ((EStTop == EStBot) ||
     (EStack[EStTop].ElType != 0)) {
  ;
  return PushEx((long)Radix, 0);
 }
 if (GetNmA() == (-1)) {
  ;
  return (-1);
 }
 if ((NArgmt != 8) && (NArgmt != 10) && (NArgmt != 16)) {
  ErrMsg(13);
  ;
  return (-1);
 }
 Radix = (int)NArgmt;
 ;
 return 0;
}


ExeK

decompiled_code:
__int64 ExeK()
{
const char *v0; // rsi
__int64 result; // rax
__int64 v2; // rdx
int v3; // ebx
__int64 v4; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
}
else
{
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
}
if ( (CmdMod & 8) == 0 )
{
v4 = Ln2Chr(NArgmt);
NArgmt = v4;
if ( v4 <= 0 )
GapBeg += v4;
else
GapEnd += v4;
LABEL_16:
CmdMod = 0;
return 0LL;
}
if ( NArgmt == MArgmt )
{
CmdMod = 0;
return 0LL;
}
v0 = "m,nD";
if ( (*CBfPtr & 0xDF) != 68 )
v0 = "m,nK";
ZCpyBl(&ErrTxt, v0, 5LL);
result = GetAra();
if ( (_DWORD)result != -1 )
{
if ( AraBeg >= GapBeg || AraEnd <= GapEnd )
{
if ( AraEnd >= GapEnd )
{
v3 = AraBeg - (GapEnd + 1);
ZCpyBl(GapBeg, GapEnd + 1LL, (unsigned int)v3);
GapBeg += v3;
GapEnd = AraEnd;
}
else
{
v2 = GapBeg - 1LL - AraEnd;
GapBeg -= (int)v2;
GapEnd -= (int)v2;
ZCpyBl(GapEnd + 1LL, GapBeg, v2);
GapBeg = AraBeg;
}
}
else
{
GapBeg = AraBeg;
GapEnd = AraEnd;
}
goto LABEL_16;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
const char *v0; // rsi
__int64 result; // rax
__int64 v2; // rdx
int v3; // ebx
__int64 v4; // rax

if ( EStTop == EStBot )
{
NArgmt = 1LL;
}
else
{
UMinus();
result = GetNmA();
if ( (_DWORD)result == -1 )
return result;
}
if ( (CmdMod & 8) == 0 )
{
v4 = Ln2Chr(NArgmt);
NArgmt = v4;
if ( v4 <= 0 )
GapBeg += v4;
else
GapEnd += v4;
LABEL_16:
CmdMod = 0;
return 0LL;
}
if ( NArgmt == MArgmt )
{
CmdMod = 0;
return 0LL;
}
v0 = "m,nD";
if ( (*CBfPtr & 0xDF) != 68 )
v0 = "m,nK";
ZCpyBl(&ErrTxt, v0, 5LL);
result = GetAra();
if ( (_DWORD)result != -1 )
{
if ( AraBeg >= GapBeg || AraEnd <= GapEnd )
{
if ( AraEnd >= GapEnd )
{
v3 = AraBeg - (GapEnd + 1);
ZCpyBl(GapBeg, GapEnd + 1LL, (unsigned int)v3);
GapBeg += v3;
GapEnd = AraEnd;
}
else
{
v2 = GapBeg - 1LL - AraEnd;
GapBeg -= (int)v2;
GapEnd -= (int)v2;
ZCpyBl(GapEnd + 1LL, GapBeg, v2);
GapBeg = AraBeg;
}
}
else
{
GapBeg = AraBeg;
GapEnd = AraEnd;
}
goto LABEL_16;
}
return result;
}

original_code:
DEFAULT ExeK()
{
 int HowFar;
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 if (CmdMod & '\10') {
  if (NArgmt == MArgmt) {
   CmdMod = '\0';
   ;
   return 0;
  }
  ZCpyBl((ErrTxt),((*CBfPtr == 'D' || *CBfPtr=='d') ? "m,nD" : "m,nK"),(5));
  if (GetAra() == (-1)) {
   ;
   return (-1);
  }
  if ((AraBeg < GapBeg) && (AraEnd > GapEnd)) {
   GapBeg = AraBeg;
   GapEnd = AraEnd;
  } else {
   if (AraEnd < GapEnd) {
    HowFar = (GapBeg-1) - AraEnd;
    GapBeg -= HowFar;
    GapEnd -= HowFar;
    ZCpyBl((GapEnd+1),(GapBeg),((SIZE_T)HowFar));
    GapBeg = AraBeg;
   } else {
    HowFar = AraBeg - (GapEnd+1);
    ZCpyBl((GapBeg),(GapEnd+1),((SIZE_T)HowFar));
    GapBeg += HowFar;
    GapEnd = AraEnd;
   }
  }
 } else {
  NArgmt = Ln2Chr(NArgmt);
  if (NArgmt > 0) {
   GapEnd += NArgmt;
  } else {
   GapBeg += NArgmt;
  }
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeK()
{
 int HowFar;
 ;
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 if (CmdMod & '\10') {
  if (NArgmt == MArgmt) {
   CmdMod = '\0';
   ;
   return 0;
  }
  ZCpyBl((ErrTxt),((*CBfPtr == 'D' || *CBfPtr=='d') ? "m,nD" : "m,nK"),(5));
  if (GetAra() == (-1)) {
   ;
   return (-1);
  }
  if ((AraBeg < GapBeg) && (AraEnd > GapEnd)) {
   GapBeg = AraBeg;
   GapEnd = AraEnd;
  } else {
   if (AraEnd < GapEnd) {
    HowFar = (GapBeg-1) - AraEnd;
    GapBeg -= HowFar;
    GapEnd -= HowFar;
    ZCpyBl((GapEnd+1),(GapBeg),((unsigned int)HowFar));
    GapBeg = AraBeg;
   } else {
    HowFar = AraBeg - (GapEnd+1);
    ZCpyBl((GapBeg),(GapEnd+1),((unsigned int)HowFar));
    GapBeg += HowFar;
    GapEnd = AraEnd;
   }
  }
 } else {
  NArgmt = Ln2Chr(NArgmt);
  if (NArgmt > 0) {
   GapEnd += NArgmt;
  } else {
   GapBeg += NArgmt;
  }
 }
 CmdMod = '\0';
 ;
 return 0;
}

variable_types: HowFar int


ExeDgt

decompiled_code:
__int64 ExeDgt()
{
__int64 v0; // rbx
__int64 result; // rax
__int64 v2; // rdx
__int64 v3; // rbx
__int64 v4; // rcx
int v5; // eax
char v6; // dl

v0 = 0LL;
if ( Radix == 8 )
{
if ( *CBfPtr <= 0x37u )
{
v0 = 0LL;
goto LABEL_11;
}
ErrMsg(9LL);
result = 0xFFFFFFFFLL;
}
else
{
do
{
LABEL_11:
v3 = Radix * v0;
v4 = CBfPtr;
v5 = (unsigned __int8)*CBfPtr;
v6 = *((_BYTE *)&ChrMsk + (unsigned __int8)*CBfPtr);
if ( (v6 & 0x10) != 0 )
{
v0 = v5 - 48 + v3;
}
else
{
if ( v6 >= 0 )
v2 = v5 - 87;
else
v2 = v5 - 55;
v0 = v2 + v3;
}
if ( CBfPtr == CStEnd )
return PushEx(v0, 0LL);
++CBfPtr;
if ( (unsigned int)IsRadx(*(unsigned __int8 *)(v4 + 1)) )
{
if ( TraceM )
EchoIt((unsigned __int8)*CBfPtr);
}
}
while ( (unsigned int)IsRadx((unsigned __int8)*CBfPtr) );
--CBfPtr;
result = PushEx(v0, 0LL);
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 v0; // rbx
__int64 result; // rax
__int64 v2; // rdx
__int64 v3; // rbx
__int64 v4; // rcx
int v5; // eax
char v6; // dl

v0 = 0LL;
if ( Radix == 8 )
{
if ( *CBfPtr <= 0x37u )
{
v0 = 0LL;
goto LABEL_11;
}
ErrMsg(9LL);
result = 0xFFFFFFFFLL;
}
else
{
do
{
LABEL_11:
v3 = Radix * v0;
v4 = CBfPtr;
v5 = (unsigned __int8)*CBfPtr;
v6 = *((_BYTE *)&ChrMsk + (unsigned __int8)*CBfPtr);
if ( (v6 & 0x10) != 0 )
{
v0 = v5 - 48 + v3;
}
else
{
if ( v6 >= 0 )
v2 = v5 - 87;
else
v2 = v5 - 55;
v0 = v2 + v3;
}
if ( CBfPtr == CStEnd )
return PushEx(v0, 0LL);
++CBfPtr;
if ( (unsigned int)IsRadx(*(unsigned __int8 *)(v4 + 1)) )
{
if ( TraceM )
EchoIt((unsigned __int8)*CBfPtr);
}
}
while ( (unsigned int)IsRadx((unsigned __int8)*CBfPtr) );
--CBfPtr;
result = PushEx(v0, 0LL);
}
return result;
}

original_code:
DEFAULT ExeDgt()
{
 LONG TmpLng;
 ;
 if ((Radix == 8) && (*CBfPtr > '7')) {
  ErrMsg(9);
  ;
  return (-1);
 }
 TmpLng = 0;
 do {
  TmpLng *= Radix;
  if ((ChrMsk[(*CBfPtr)] & '\20')) {
   TmpLng += *CBfPtr - '0';
  } else if ((ChrMsk[(*CBfPtr)] & '\200')) {
   TmpLng += *CBfPtr - '\67';
  } else {
   TmpLng += *CBfPtr - '\127';
  }
  if (CBfPtr == CStEnd) {
   return PushEx(TmpLng, 0);
  }
  ++CBfPtr;
  if (IsRadx(*CBfPtr) && TraceM) {
   EchoIt(*CBfPtr);
  }
 } while (IsRadx(*CBfPtr));
 --CBfPtr;
 return PushEx(TmpLng, 0);
}

canonical_original_code:
int ExeDgt()
{
 long TmpLng;
 ;
 if ((Radix == 8) && (*CBfPtr > '7')) {
  ErrMsg(9);
  ;
  return (-1);
 }
 TmpLng = 0;
 do {
  TmpLng *= Radix;
  if ((ChrMsk[(*CBfPtr)] & '\20')) {
   TmpLng += *CBfPtr - '0';
  } else if ((ChrMsk[(*CBfPtr)] & '\200')) {
   TmpLng += *CBfPtr - '\67';
  } else {
   TmpLng += *CBfPtr - '\127';
  }
  if (CBfPtr == CStEnd) {
   return PushEx(TmpLng, 0);
  }
  ++CBfPtr;
  if (IsRadx(*CBfPtr) && TraceM) {
   EchoIt(*CBfPtr);
  }
 } while (IsRadx(*CBfPtr));
 --CBfPtr;
 return PushEx(TmpLng, 0);
}

variable_types: TmpLng long


ExeFLs

decompiled_code:
__int64 ExeFLs()
{
__int64 v0; // rax

CmdMod = 0;
EStTop = EStBot;
if ( LStTop == LStBot )
v0 = CStBeg - 1LL;
else
v0 = LStack[2 * LStTop + 1];
CBfPtr = v0;
return 0LL;
}

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

CmdMod = 0;
EStTop = EStBot;
if ( LStTop == LStBot )
v0 = CStBeg - 1LL;
else
v0 = LStack[2 * LStTop + 1];
CBfPtr = v0;
return 0LL;
}

original_code:
static DEFAULT ExeFLs()
{
 ;
 CmdMod = '\0';
 EStTop = EStBot;
 CBfPtr = (LStTop == LStBot) ? CStBeg-1 : LStack[LStTop].LAddr;
 ;
 return 0;
}

canonical_original_code:
static int ExeFLs()
{
 ;
 CmdMod = '\0';
 EStTop = EStBot;
 CBfPtr = (LStTop == LStBot) ? CStBeg-1 : LStack[LStTop].LAddr;
 ;
 return 0;
}


ExeFN

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

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

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

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

original_code:
static DEFAULT ExeFN()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFN");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::FN");
  ;
  return (-1);
 }
 SrcTyp = 4;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int ExeFN()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFN");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::FN");
  ;
  return (-1);
 }
 SrcTyp = 4;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeFC

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

if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::FC");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 2;
result = Replac();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

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

if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::FC");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 2;
result = Replac();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
static DEFAULT ExeFC()
{
 ;
 if (CmdMod & '\4') {
  ErrStr(8, "::FC");
  ;
  return (-1);
 }
 SrcTyp = 2;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int ExeFC()
{
 ;
 if (CmdMod & '\4') {
  ErrStr(8, "::FC");
  ;
  return (-1);
 }
 SrcTyp = 2;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeFS

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nFS");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
if ( EStTop > EStBot )
{
ErrStr(8LL, "n::FS");
result = 0xFFFFFFFFLL;
}
else if ( GapEnd == EBfEnd )
{
CmdMod = 0;
result = PushEx(0LL, 0LL);
}
else
{
CmdMod = CmdMod & 0xFB | 0xA;
MArgmt = GapBeg - EBfBeg;
result = PushEx(GapBeg - EBfBeg + 1LL, 0LL);
if ( (_DWORD)result != -1 )
result = ExeFC();
}
}
else
{
SrcTyp = 5;
result = Replac();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nFS");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
if ( EStTop > EStBot )
{
ErrStr(8LL, "n::FS");
result = 0xFFFFFFFFLL;
}
else if ( GapEnd == EBfEnd )
{
CmdMod = 0;
result = PushEx(0LL, 0LL);
}
else
{
CmdMod = CmdMod & 0xFB | 0xA;
MArgmt = GapBeg - EBfBeg;
result = PushEx(GapBeg - EBfBeg + 1LL, 0LL);
if ( (_DWORD)result != -1 )
result = func2();
}
}
else
{
SrcTyp = 5;
result = Replac();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
static DEFAULT ExeFS()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFS");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  if (CmdMod & '\10') {
   ErrStr(8, "m,n::FS");
   ;
   return (-1);
  }
  if (EStTop > EStBot) {
   ErrStr(8, "n::FS");
   ;
   return (-1);
  }
  if (GapEnd == EBfEnd) {
   CmdMod = '\0';
   ;
   return PushEx(0L,0);
  }
  CmdMod &= ~'\4';
  CmdMod |= '\2';
  CmdMod |= '\10';
  MArgmt = GapBeg - EBfBeg;
  if (PushEx((LONG)((GapBeg-EBfBeg)+1),0) == (-1)) {
   ;
   return (-1);
  }
  ;
  return ExeFC();
 }
 SrcTyp = 5;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int ExeFS()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFS");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  if (CmdMod & '\10') {
   ErrStr(8, "m,n::FS");
   ;
   return (-1);
  }
  if (EStTop > EStBot) {
   ErrStr(8, "n::FS");
   ;
   return (-1);
  }
  if (GapEnd == EBfEnd) {
   CmdMod = '\0';
   ;
   return PushEx(0L,0);
  }
  CmdMod &= ~'\4';
  CmdMod |= '\2';
  CmdMod |= '\10';
  MArgmt = GapBeg - EBfBeg;
  if (PushEx((LONG)((GapBeg-EBfBeg)+1),0) == (-1)) {
   ;
   return (-1);
  }
  ;
  return ExeFC();
 }
 SrcTyp = 5;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeFUn

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nF_");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::F_");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 6;
result = Replac();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nF_");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::F_");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 6;
result = Replac();
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
static DEFAULT ExeFUn()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nF_");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::F_");
  ;
  return (-1);
 }
 SrcTyp = 6;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int ExeFUn()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nF_");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::F_");
  ;
  return (-1);
 }
 SrcTyp = 6;
 if (Replac() == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeFD

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nFD");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::FD");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 5;
result = Search(0LL);
if ( (_DWORD)result != -1 )
{
if ( Matchd )
GapBeg += RefLen;
CmdMod = 0;
result = 0LL;
}
}
return result;
}

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nFD");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
ErrStr(8LL, "::FD");
result = 0xFFFFFFFFLL;
}
else
{
SrcTyp = 5;
result = Search(0LL);
if ( (_DWORD)result != -1 )
{
if ( Matchd )
GapBeg += RefLen;
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
static DEFAULT ExeFD()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFD");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::FD");
  ;
  return (-1);
 }
 SrcTyp = 5;
 if (Search(0) == (-1)) {
  ;
  return (-1);
 }
 if (Matchd) {
  GapBeg += RefLen;
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int ExeFD()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFD");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::FD");
  ;
  return (-1);
 }
 SrcTyp = 5;
 if (Search(0) == (-1)) {
  ;
  return (-1);
 }
 if (Matchd) {
  GapBeg += RefLen;
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeFK

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

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

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

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

original_code:
static DEFAULT ExeFK()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFK");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::FK");
  ;
  return (-1);
 }
 SrcTyp = 3;
 if (Search(0) == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
static int ExeFK()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nFK");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  ErrStr(8, "::FK");
  ;
  return (-1);
 }
 SrcTyp = 3;
 if (Search(0) == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeFR

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

if ( EBfBeg > GapBeg - RefLen )
{
ErrMsg(2LL);
result = 0xFFFFFFFFLL;
}
else
{
GapBeg += RefLen;
CmdMod &= 2u;
EStTop = EStBot;
result = ExeI();
}
return result;
}

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

if ( EBfBeg > GapBeg - RefLen )
{
ErrMsg(2LL);
result = 0xFFFFFFFFLL;
}
else
{
GapBeg += RefLen;
CmdMod &= 2u;
EStTop = EStBot;
result = ExeI();
}
return result;
}

original_code:
static DEFAULT ExeFR()
{
 ;
 if ((GapBeg-RefLen) < EBfBeg) {
  ErrMsg(2);
  ;
  return (-1);
 }
 GapBeg += RefLen;
 CmdMod = (CmdMod & '\2');
 EStTop = EStBot;
 ;
 return ExeI();
}

canonical_original_code:
static int ExeFR()
{
 ;
 if ((GapBeg-RefLen) < EBfBeg) {
  ErrMsg(2);
  ;
  return (-1);
 }
 GapBeg += RefLen;
 CmdMod = (CmdMod & '\2');
 EStTop = EStBot;
 ;
 return ExeI();
}


ExeFGt

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

if ( LStTop == LStBot )
return 0xFFFFFFFFLL;
result = FlowEL();
if ( (_DWORD)result != -1 )
{
--CBfPtr;
++LStTop;
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

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

if ( LStTop == LStBot )
return 0xFFFFFFFFLL;
result = FlowEL();
if ( (_DWORD)result != -1 )
{
--CBfPtr;
++LStTop;
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

original_code:
static DEFAULT ExeFGt()
{
 ;
 if (LStTop == LStBot) {
  ;
  return (-1);
 }
 if (FlowEL() == (-1)) {
  ;
  return (-1);
 }
 CBfPtr--;
 LStTop++;
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}

canonical_original_code:
static int ExeFGt()
{
 ;
 if (LStTop == LStBot) {
  ;
  return (-1);
 }
 if (FlowEL() == (-1)) {
  ;
  return (-1);
 }
 CBfPtr--;
 LStTop++;
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}


ExeFSQ

decompiled_code:
__int64 ExeFSQ()
{
CmdMod = 0;
EStTop = EStBot;
return FlowEC();
}

canonical_decompiled_code:
__int64 func9()
{
CmdMod = 0;
EStTop = EStBot;
return FlowEC();
}

original_code:
static DEFAULT ExeFSQ()
{
 ;
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return FlowEC();
}

canonical_original_code:
static int ExeFSQ()
{
 ;
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return FlowEC();
}


ExeFBr

decompiled_code:
__int64 ExeFBr()
{
CmdMod = 0;
EStTop = EStBot;
return FlowEE();
}

canonical_decompiled_code:
__int64 func10()
{
CmdMod = 0;
EStTop = EStBot;
return FlowEE();
}

original_code:
static DEFAULT ExeFBr()
{
 ;
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return FlowEE();
}

canonical_original_code:
static int ExeFBr()
{
 ;
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return FlowEE();
}


ExeF

decompiled_code:
__int64 ExeF()
{
__int64 result; // rax
int v1; // eax

result = IncCBP();
if ( (_DWORD)result != -1 )
{
v1 = (unsigned __int8)*CBfPtr - 32;
if ( (*((_BYTE *)&ChrMsk + (unsigned __int8)*CBfPtr) & 0x40) == 0 )
v1 = (unsigned __int8)*CBfPtr;
switch ( v1 )
{
case '\'':
result = ExeFSQ();
break;
case '<':
result = ExeFLs();
break;
case '>':
result = ExeFGt();
break;
case 'B':
result = ExeFB();
break;
case 'C':
result = ExeFC();
break;
case 'D':
result = ExeFD();
break;
case 'K':
result = ExeFK();
break;
case 'N':
result = ExeFN();
break;
case 'R':
result = ExeFR();
break;
case 'S':
result = ExeFS();
break;
case '_':
result = ExeFUn();
break;
case '|':
result = ExeFBr();
break;
default:
ErrChr(6LL);
result = 0xFFFFFFFFLL;
break;
}
}
return result;
}

canonical_decompiled_code:
__int64 func11()
{
__int64 result; // rax
int v1; // eax

result = IncCBP();
if ( (_DWORD)result != -1 )
{
v1 = (unsigned __int8)*CBfPtr - 32;
if ( (*((_BYTE *)&ChrMsk + (unsigned __int8)*CBfPtr) & 0x40) == 0 )
v1 = (unsigned __int8)*CBfPtr;
switch ( v1 )
{
case '\'':
result = func9();
break;
case '<':
result = func0();
break;
case '>':
result = func8();
break;
case 'B':
result = ExeFB();
break;
case 'C':
result = func2();
break;
case 'D':
result = func5();
break;
case 'K':
result = func6();
break;
case 'N':
result = func1();
break;
case 'R':
result = func7();
break;
case 'S':
result = func3();
break;
case '_':
result = func4();
break;
case '|':
result = func10();
break;
default:
ErrChr(6LL);
result = 0xFFFFFFFFLL;
break;
}
}
return result;
}

original_code:
DEFAULT ExeF()
{
 if (IncCBP() == (-1)) {
  return (-1);
 }
 switch (((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) )) {
          case 'S': return ExeFS();
   case 'N': return ExeFN();
   case 'D': return ExeFD();
   case 'R': return ExeFR();
   case 'B': return ExeFB();
   case 'C': return ExeFC();
   case 'K': return ExeFK();
   case '_': return ExeFUn();
   case '>': return ExeFGt();
   case '<': return ExeFLs();
   case '\'': return ExeFSQ();
   case '|': return ExeFBr();
   default: ErrChr(6, *CBfPtr);
       return (-1);
 }
}

canonical_original_code:
int ExeF()
{
 if (IncCBP() == (-1)) {
  return (-1);
 }
 switch (((ChrMsk[(*CBfPtr)] & '\100') ? (*CBfPtr)-' ' : (*CBfPtr) )) {
          case 'S': return ExeFS();
   case 'N': return ExeFN();
   case 'D': return ExeFD();
   case 'R': return ExeFR();
   case 'B': return ExeFB();
   case 'C': return ExeFC();
   case 'K': return ExeFK();
   case '_': return ExeFUn();
   case '>': return ExeFGt();
   case '<': return ExeFLs();
   case '\'': return ExeFSQ();
   case '|': return ExeFBr();
   default: ErrChr(6, *CBfPtr);
       return (-1);
 }
}


ExePW

decompiled_code:
__int64 ExePW()
{
__int64 result; // rax
__int64 v1; // rax

if ( (CmdMod & 8) == 0 )
{
while ( 1 )
{
v1 = NArgmt--;
if ( v1 <= 0 )
break;
result = WrPage(CurOut, EBfBeg, EBfEnd, -1LL);
if ( (_DWORD)result == -1 )
return result;
}
goto LABEL_7;
}
if ( MArgmt == NArgmt
|| ((*CBfPtr & 0xDF) != 87 ? ZCpyBl(&ErrTxt, "m,nP", 5LL) : ZCpyBl(&ErrTxt, "m,nPW", 6LL),
(result = GetAra(), (_DWORD)result != -1)
&& (result = WrPage(CurOut, AraBeg, AraEnd, 0LL), (_DWORD)result != -1)) )
{
LABEL_7:
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

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

if ( (CmdMod & 8) == 0 )
{
while ( 1 )
{
v1 = NArgmt--;
if ( v1 <= 0 )
break;
result = WrPage(CurOut, EBfBeg, EBfEnd, -1LL);
if ( (_DWORD)result == -1 )
return result;
}
goto LABEL_7;
}
if ( MArgmt == NArgmt
|| ((*CBfPtr & 0xDF) != 87 ? ZCpyBl(&ErrTxt, "m,nP", 5LL) : ZCpyBl(&ErrTxt, "m,nPW", 6LL),
(result = GetAra(), (_DWORD)result != -1)
&& (result = WrPage(CurOut, AraBeg, AraEnd, 0LL), (_DWORD)result != -1)) )
{
LABEL_7:
CmdMod = 0;
EStTop = EStBot;
result = 0LL;
}
return result;
}

original_code:
DEFAULT ExePW()
{
 ;
 if (CmdMod & '\10') {
  if (MArgmt != NArgmt) {
      if ((*CBfPtr == 'W') || (*CBfPtr == 'w')) {
   ZCpyBl((ErrTxt),("m,nPW"),(6));
      } else {
   ZCpyBl((ErrTxt),("m,nP"),(5));
      }
      if (GetAra() == (-1)) {
   ;
   return (-1);
      }
      if (WrPage(CurOut,AraBeg,AraEnd,0L) == (-1)) {
   ;
   return (-1);
      }
  }
 } else {
  while (NArgmt-- > 0)
   if (WrPage(CurOut,EBfBeg,EBfEnd,-1L) == (-1)) {
    ;
    return (-1);
   }
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}

canonical_original_code:
int ExePW()
{
 ;
 if (CmdMod & '\10') {
  if (MArgmt != NArgmt) {
      if ((*CBfPtr == 'W') || (*CBfPtr == 'w')) {
   ZCpyBl((ErrTxt),("m,nPW"),(6));
      } else {
   ZCpyBl((ErrTxt),("m,nP"),(5));
      }
      if (GetAra() == (-1)) {
   ;
   return (-1);
      }
      if (WrPage(CurOut,AraBeg,AraEnd,0L) == (-1)) {
   ;
   return (-1);
      }
  }
 } else {
  while (NArgmt-- > 0)
   if (WrPage(CurOut,EBfBeg,EBfEnd,-1L) == (-1)) {
    ;
    return (-1);
   }
 }
 CmdMod = '\0';
 EStTop = EStBot;
 ;
 return 0;
}


RdPage

decompiled_code:
__int64 RdPage()
{
__int64 result; // rax
int v1[3]; // [rsp+Ch] [rbp-Ch] BYREF

v1[0] = 0;
while ( 1 )
{
result = RdLine(v1);
if ( (_DWORD)result == -1 )
break;
if ( FFPage )
return 0LL;
if ( v1[0] | *((_DWORD *)&IsEofI + CurInp) )
return 0LL;
}
return result;
}

canonical_decompiled_code:
__int64 func0()
{
__int64 result; // rax
int v1[3]; // [rsp+Ch] [rbp-Ch] BYREF

v1[0] = 0;
while ( 1 )
{
result = RdLine(v1);
if ( (_DWORD)result == -1 )
break;
if ( FFPage )
return 0LL;
if ( v1[0] | *((_DWORD *)&IsEofI + CurInp) )
return 0LL;
}
return result;
}

original_code:
DEFAULT RdPage()
{
 BOOLEAN EBfFul;
 ;
 EBfFul = 0;
 do {
  if (RdLine(&EBfFul) == (-1)) {
   ;
   return (-1);
  }
 } while (!IsEofI[CurInp] && !FFPage && !EBfFul);
 ;
 return 0;
}

canonical_original_code:
int RdPage()
{
 int EBfFul;
 ;
 EBfFul = 0;
 do {
  if (RdLine(&EBfFul) == (-1)) {
   ;
   return (-1);
  }
 } while (!IsEofI[CurInp] && !FFPage && !EBfFul);
 ;
 return 0;
}

variable_types: EBfFul int


ExeS

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

if ( (CmdMod & 8) != 0 )
{
ErrStr(8LL, "m,nS");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
if ( EStTop > EStBot )
{
ErrStr(8LL, "n::S");
result = 0xFFFFFFFFLL;
}
else if ( GapEnd == EBfEnd )
{
result = FindES(27LL);
if ( (_DWORD)result != -1 )
result = PushEx(0LL, 0LL);
}
else
{
CmdMod = CmdMod & 0xFB | 0xA;
MArgmt = GapBeg - EBfBeg;
result = PushEx(GapBeg - EBfBeg + 1LL, 0LL);
if ( (_DWORD)result != -1 )
result = ExeFB();
}
}
else
{
SrcTyp = 5;
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,nS");
result = 0xFFFFFFFFLL;
}
else if ( (CmdMod & 4) != 0 )
{
if ( EStTop > EStBot )
{
ErrStr(8LL, "n::S");
result = 0xFFFFFFFFLL;
}
else if ( GapEnd == EBfEnd )
{
result = FindES(27LL);
if ( (_DWORD)result != -1 )
result = PushEx(0LL, 0LL);
}
else
{
CmdMod = CmdMod & 0xFB | 0xA;
MArgmt = GapBeg - EBfBeg;
result = PushEx(GapBeg - EBfBeg + 1LL, 0LL);
if ( (_DWORD)result != -1 )
result = ExeFB();
}
}
else
{
SrcTyp = 5;
result = Search(0LL);
if ( (_DWORD)result != -1 )
{
CmdMod = 0;
result = 0LL;
}
}
return result;
}

original_code:
DEFAULT ExeS()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nS");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  if (CmdMod & '\10') {
   ErrStr(8, "m,n::S");
   ;
   return (-1);
  }
  if (EStTop > EStBot) {
   ErrStr(8, "n::S");
   ;
   return (-1);
  }
  if (GapEnd == EBfEnd) {
   if (FindES('\033') == (-1)) {
    ;
    return (-1);
   }
   ;
   return PushEx(0L,0);
  }
  CmdMod &= ~'\4';
  CmdMod |= '\2';
  CmdMod |= '\10';
  MArgmt = GapBeg - EBfBeg;
  if (PushEx((LONG)((GapBeg-EBfBeg)+1),0) == (-1)) {
   ;
   return (-1);
  }
  ;
  return ExeFB();
 }
 SrcTyp = 5;
 if (Search(0) == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeS()
{
 ;
 if (CmdMod & '\10') {
  ErrStr(8, "m,nS");
  ;
  return (-1);
 }
 if (CmdMod & '\4') {
  if (CmdMod & '\10') {
   ErrStr(8, "m,n::S");
   ;
   return (-1);
  }
  if (EStTop > EStBot) {
   ErrStr(8, "n::S");
   ;
   return (-1);
  }
  if (GapEnd == EBfEnd) {
   if (FindES('\033') == (-1)) {
    ;
    return (-1);
   }
   ;
   return PushEx(0L,0);
  }
  CmdMod &= ~'\4';
  CmdMod |= '\2';
  CmdMod |= '\10';
  MArgmt = GapBeg - EBfBeg;
  if (PushEx((LONG)((GapBeg-EBfBeg)+1),0) == (-1)) {
   ;
   return (-1);
  }
  ;
  return ExeFB();
 }
 SrcTyp = 5;
 if (Search(0) == (-1)) {
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}


ExeCtY

decompiled_code:
__int64 ExeCtY()
{
MArgmt = RefLen + GapBeg - EBfBeg;
CmdMod |= 8u;
return PushEx(GapBeg - EBfBeg, 0LL);
}

canonical_decompiled_code:
__int64 func0()
{
MArgmt = RefLen + GapBeg - EBfBeg;
CmdMod |= 8u;
return PushEx(GapBeg - EBfBeg, 0LL);
}

original_code:
DEFAULT ExeCtY()
{
 ;
 MArgmt = (GapBeg-EBfBeg) + RefLen;
 CmdMod |= '\10';
 ;
 return PushEx((LONG)(GapBeg-EBfBeg), 0);
}

canonical_original_code:
int ExeCtY()
{
 ;
 MArgmt = (GapBeg-EBfBeg) + RefLen;
 CmdMod |= '\10';
 ;
 return PushEx((LONG)(GapBeg-EBfBeg), 0);
}


GetNmA

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

if ( *((_DWORD *)&EStack + 4 * EStTop + 2) )
{
ErrMsg(43LL);
result = 0xFFFFFFFFLL;
}
else
{
NArgmt = *((_QWORD *)&EStack + 2 * EStTop);
--EStTop;
result = 0LL;
}
return result;
}

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

if ( *((_DWORD *)&EStack + 4 * EStTop + 2) )
{
ErrMsg(43LL);
result = 0xFFFFFFFFLL;
}
else
{
NArgmt = *((_QWORD *)&EStack + 2 * EStTop);
--EStTop;
result = 0LL;
}
return result;
}

original_code:
DEFAULT GetNmA()
{
    ;
    if (EStack[EStTop].ElType == 0) {
 NArgmt = EStack[EStTop].Elemnt;
 --EStTop;
 return 0;
    }
    ErrMsg(43);
    ;
    return (-1);
}

canonical_original_code:
int GetNmA()
{
    ;
    if (EStack[EStTop].ElType == 0) {
 NArgmt = EStack[EStTop].Elemnt;
 --EStTop;
 return 0;
    }
    ErrMsg(43);
    ;
    return (-1);
}


ExeCtO

decompiled_code:
__int64 ExeCtO()
{
Radix = 8;
CmdMod = 0;
return 0LL;
}

canonical_decompiled_code:
__int64 func0()
{
Radix = 8;
CmdMod = 0;
return 0LL;
}

original_code:
DEFAULT ExeCtO()
{
 ;
 Radix = 8;
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeCtO()
{
 ;
 Radix = 8;
 CmdMod = '\0';
 ;
 return 0;
}


ExeD

decompiled_code:
__int64 ExeD()
{
__int64 v0; // rax
unsigned __int64 v1; // rax
__int64 result; // rax
__int64 v3; // rdi

if ( (CmdMod & 8) != 0 )
return ExeK();
if ( EStTop == EStBot )
{
NArgmt = 1LL;
v0 = 1LL;
goto LABEL_4;
}
UMinus();
result = GetNmA();
if ( (_DWORD)result != -1 )
{
v0 = NArgmt;
if ( NArgmt <= 0 )
{
if ( GapBeg + NArgmt >= EBfBeg )
{
GapBeg += NArgmt;
goto LABEL_6;
}
LABEL_16:
if ( (CmdMod & 2) == 0 )
{
ErrMsg(2LL);
return 0xFFFFFFFFLL;
}
v3 = 0LL;
goto LABEL_18;
}
LABEL_4:
v1 = GapEnd + v0;
if ( v1 <= EBfEnd )
{
GapEnd = v1;
LABEL_6:
if ( (CmdMod & 2) == 0 )
{
CmdMod = 0;
return 0LL;
}
v3 = -1LL;
LABEL_18:
CmdMod = 0;
return PushEx(v3, 0LL);
}
goto LABEL_16;
}
return result;
}

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

if ( (CmdMod & 8) != 0 )
return ExeK();
if ( EStTop == EStBot )
{
NArgmt = 1LL;
v0 = 1LL;
goto LABEL_4;
}
UMinus();
result = GetNmA();
if ( (_DWORD)result != -1 )
{
v0 = NArgmt;
if ( NArgmt <= 0 )
{
if ( GapBeg + NArgmt >= EBfBeg )
{
GapBeg += NArgmt;
goto LABEL_6;
}
LABEL_16:
if ( (CmdMod & 2) == 0 )
{
ErrMsg(2LL);
return 0xFFFFFFFFLL;
}
v3 = 0LL;
goto LABEL_18;
}
LABEL_4:
v1 = GapEnd + v0;
if ( v1 <= EBfEnd )
{
GapEnd = v1;
LABEL_6:
if ( (CmdMod & 2) == 0 )
{
CmdMod = 0;
return 0LL;
}
v3 = -1LL;
LABEL_18:
CmdMod = 0;
return PushEx(v3, 0LL);
}
goto LABEL_16;
}
return result;
}

original_code:
DEFAULT ExeD()
{
 LONG Status;
 ;
 if (CmdMod & '\10') {
  ;
  return ExeK();
 }
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 Status = -1;
 if (NArgmt > 0) {
  if ((GapEnd+NArgmt) > EBfEnd) {
   Status = 0;
  } else {
   GapEnd += NArgmt;
  }
 } else {
  if ((GapBeg+NArgmt) < EBfBeg) {
   Status = 0;
  } else {
   GapBeg += NArgmt;
  }
 }
 if (CmdMod & '\2') {
  CmdMod = '\0';
  ;
  return PushEx(Status, 0);
 }
 if (Status == 0) {
  ErrMsg(2);
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

canonical_original_code:
int ExeD()
{
 long Status;
 ;
 if (CmdMod & '\10') {
  ;
  return ExeK();
 }
 if (EStTop == EStBot) {
  NArgmt = 1;
 } else {
  UMinus();
  if (GetNmA() == (-1)) {
   ;
   return (-1);
  }
 }
 Status = -1;
 if (NArgmt > 0) {
  if ((GapEnd+NArgmt) > EBfEnd) {
   Status = 0;
  } else {
   GapEnd += NArgmt;
  }
 } else {
  if ((GapBeg+NArgmt) < EBfBeg) {
   Status = 0;
  } else {
   GapBeg += NArgmt;
  }
 }
 if (CmdMod & '\2') {
  CmdMod = '\0';
  ;
  return PushEx(Status, 0);
 }
 if (Status == 0) {
  ErrMsg(2);
  ;
  return (-1);
 }
 CmdMod = '\0';
 ;
 return 0;
}

variable_types: Status long


InpDel

decompiled_code:
__int64 InpDel()
{
__int64 v0; // rdx
__int64 result; // rax
unsigned __int64 v2; // rdx
unsigned __int64 v3; // rbx
__int64 v4; // rcx

v0 = CBfPtr--;
if ( CBfPtr >= CBfBeg )
{
if ( (EtFlag & 2) == 0 )
{
result = EchoIt(*(unsigned __int8 *)(v0 - 1));
goto LABEL_7;
}
result = *(unsigned __int8 *)(v0 - 1);
if ( (unsigned __int8)(result - 32) <= 0x5Eu || (_BYTE)result == 27 || (result & 0x80u) != 0LL )
{
result = ZDspBf(&unk_E7C, 3LL);
LABEL_7:
--CBfPtr;
return result;
}
if ( (unsigned __int8)result > 0xCu )
{
if ( (_BYTE)result != 13 )
{
if ( (_BYTE)result == 127 )
goto LABEL_7;
goto LABEL_14;
}
}
else if ( (unsigned __int8)result > 0xAu )
{
ZScrOp(1LL);
ZScrOp(1LL);
ZScrOp(1LL);
ZScrOp(1LL);
ZScrOp(1LL);
}
else
{
if ( (unsigned __int8)result > 9u )
{
result = ZScrOp(1LL);
goto LABEL_7;
}
if ( (unsigned __int8)result <= 7u )
{
LABEL_14:
result = ZDspBf("\b \b\b \b", 6LL);
goto LABEL_7;
}
}
ZDspCh(13LL);
ZScrOp(2LL);
v3 = CBfPtr;
if ( *CBfPtr == 13 )
--CRCnt;
v4 = CBfBeg;
while ( CBfBeg < v3 )
{
v2 = v3 - 1;
if ( (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(v3 - 1)) & 0x20) != 0 )
goto LABEL_27;
--v3;
}
if ( CBfBeg == v3 )
ZDspCh(42LL);
LABEL_27:
result = TypBuf(v3, CBfPtr, v2, v4);
goto LABEL_7;
}
return ZDspBf(&unk_E78, 3LL);
}

canonical_decompiled_code:
__int64 func0()
{
__int64 v0; // rdx
__int64 result; // rax
unsigned __int64 v2; // rdx
unsigned __int64 v3; // rbx
__int64 v4; // rcx

v0 = CBfPtr--;
if ( CBfPtr >= CBfBeg )
{
if ( (EtFlag & 2) == 0 )
{
result = EchoIt(*(unsigned __int8 *)(v0 - 1));
goto LABEL_7;
}
result = *(unsigned __int8 *)(v0 - 1);
if ( (unsigned __int8)(result - 32) <= 0x5Eu || (_BYTE)result == 27 || (result & 0x80u) != 0LL )
{
result = ZDspBf(&unk_E7C, 3LL);
LABEL_7:
--CBfPtr;
return result;
}
if ( (unsigned __int8)result > 0xCu )
{
if ( (_BYTE)result != 13 )
{
if ( (_BYTE)result == 127 )
goto LABEL_7;
goto LABEL_14;
}
}
else if ( (unsigned __int8)result > 0xAu )
{
ZScrOp(1LL);
ZScrOp(1LL);
ZScrOp(1LL);
ZScrOp(1LL);
ZScrOp(1LL);
}
else
{
if ( (unsigned __int8)result > 9u )
{
result = ZScrOp(1LL);
goto LABEL_7;
}
if ( (unsigned __int8)result <= 7u )
{
LABEL_14:
result = ZDspBf("\b \b\b \b", 6LL);
goto LABEL_7;
}
}
ZDspCh(13LL);
ZScrOp(2LL);
v3 = CBfPtr;
if ( *CBfPtr == 13 )
--CRCnt;
v4 = CBfBeg;
while ( CBfBeg < v3 )
{
v2 = v3 - 1;
if ( (*((_BYTE *)&ChrMsk + *(unsigned __int8 *)(v3 - 1)) & 0x20) != 0 )
goto LABEL_27;
--v3;
}
if ( CBfBeg == v3 )
ZDspCh(42LL);
LABEL_27:
result = TypBuf(v3, CBfPtr, v2, v4);
goto LABEL_7;
}
return ZDspBf(&unk_E78, 3LL);
}

original_code:
static void InpDel()
{
    int i;
    charptr TmpPtr;
    ;
    --CBfPtr;
    if (CBfPtr < CBfBeg) {
 ZDspBf(Prompt, 3);
 ;
 return;
    }
    if (EtFlag & 2) {
 if (((*CBfPtr > '\037') &&
      (*CBfPtr < '\177')) ||
      (*CBfPtr == '\033') ||
      (*CBfPtr & '\200')) {
     ZDspBf("\b \b", 3);
 } else {
     switch (*CBfPtr) {
  case '\012':
      ZScrOp(1);
  case '\177':
      break;
  case '\013':
  case '\014':
      for (i = 1; i <= 5; i++)
   ZScrOp(1);
  case '\011':
  case '\010':
  case '\015':
      ZDspCh('\015');
      ZScrOp(2);
      if (*CBfPtr == '\015') {
   --CRCnt;
      }
      TmpPtr = CBfPtr;
      while (TmpPtr > CBfBeg) {
   TmpPtr--;
   if ((ChrMsk[(*TmpPtr)] & '\40')) {
       ++TmpPtr;
       break;
   }
      }
      if (TmpPtr == CBfBeg) {
   ZDspCh('*');
      }
      TypBuf(TmpPtr, CBfPtr);
      break;
  default:
      ZDspBf("\b \b\b \b", 6);
      break;
     }
 }
    } else {
 EchoIt(*CBfPtr);
    }
    --CBfPtr;
    ;
}

canonical_original_code:
static void InpDel()
{
    int i;
    unsigned char *TmpPtr;
    ;
    --CBfPtr;
    if (CBfPtr < CBfBeg) {
 ZDspBf(Prompt, 3);
 ;
 return;
    }
    if (EtFlag & 2) {
 if (((*CBfPtr > '\037') &&
      (*CBfPtr < '\177')) ||
      (*CBfPtr == '\033') ||
      (*CBfPtr & '\200')) {
     ZDspBf("\b \b", 3);
 } else {
     switch (*CBfPtr) {
  case '\012':
      ZScrOp(1);
  case '\177':
      break;
  case '\013':
  case '\014':
      for (i = 1; i <= 5; i++)
   ZScrOp(1);
  case '\011':
  case '\010':
  case '\015':
      ZDspCh('\015');
      ZScrOp(2);
      if (*CBfPtr == '\015') {
   --CRCnt;
      }
      TmpPtr = CBfPtr;
      while (TmpPtr > CBfBeg) {
   TmpPtr--;
   if ((ChrMsk[(*TmpPtr)] & '\40')) {
       ++TmpPtr;
       break;
   }
      }
      if (TmpPtr == CBfBeg) {
   ZDspCh('*');
      }
      TypBuf(TmpPtr, CBfPtr);
      break;
  default:
      ZDspBf("\b \b\b \b", 6);
      break;
     }
 }
    } else {
 EchoIt(*CBfPtr);
    }
    --CBfPtr;
    ;
}

variable_types: i int

variable_types:
TmpPtr
unsigned char *


FirstChar

decompiled_code:
__int64 FirstChar()
{
__int64 result; // rax
int v1; // ebx
__int64 v2; // r12
__int64 v3; // rbp
int v4; // eax
_QWORD *v5; // rax
int v6; // ebx
char v7; // [rsp+Eh] [rbp-1Ah] BYREF
char v8; // [rsp+Fh] [rbp-19h] BYREF

while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
if ( EvFlag )
DoEvEs((unsigned int)EvFlag);
ZDspCh(42LL);
result = ZChIn(0LL);
if ( (_DWORD)result != 47 )
break;
if ( LstErr == 0xFFFF )
return result;
ZDspCh(47LL);
ErrVrb((unsigned int)LstErr);
}
if ( (int)result <= 47 )
break;
if ( (_DWORD)result == 63 )
{
if ( LstErr == 0xFFFF )
return result;
ZDspCh(63LL);
TypESt();
}
else
{
if ( (_DWORD)result != 127 )
return result;
LABEL_15:
ZDspCh(13LL);
}
}
if ( (_DWORD)result == 21 )
goto LABEL_15;
if ( (_DWORD)result != 42 )
return result;
ZDspCh(42LL);
v1 = ZChIn(0LL);
if ( GotCtC )
break;
if ( v1 != 13 )
{
if ( v1 <= 13 )
{
if ( v1 == 8 )
goto LABEL_15;
EchoIt((unsigned __int8)v1);
v2 = CBfPtr;
v3 = CStEnd;
v7 = v1;
CBfPtr = &v7;
}
else
{
if ( v1 == 21 || v1 == 127 )
goto LABEL_15;
EchoIt((unsigned __int8)v1);
v2 = CBfPtr;
v3 = CStEnd;
v7 = v1;
CBfPtr = &v7;
if ( v1 == 46 )
{
v8 = ZChIn(0LL);
EchoIt(46LL);
CStEnd = &v8;
goto LABEL_25;
}
}
CStEnd = &v7;
LABEL_25:
v4 = FindQR();
CBfPtr = v2;
CStEnd = v3;
if ( !v4 )
{
if ( *QR )
{
ZFree();
v5 = (_QWORD *)QR;
*(_QWORD *)(QR + 8LL) = 0LL;
*v5 = 0LL;
}
v6 = CStEnd - CStBeg + 1;
if ( v6 > 0 && (unsigned int)MakRom((unsigned int)v6) != -1 )
{
ZCpyBl(*QR, CStBeg, (unsigned int)v6);
*(_QWORD *)(QR + 8LL) = *QR + v6;
}
ZDspBf("\r\n", 2LL);
}
}
}
GotCtC = 0;
return 3LL;
}

canonical_decompiled_code:
__int64 func1()
{
__int64 result; // rax
int v1; // ebx
__int64 v2; // r12
__int64 v3; // rbp
int v4; // eax
_QWORD *v5; // rax
int v6; // ebx
char v7; // [rsp+Eh] [rbp-1Ah] BYREF
char v8; // [rsp+Fh] [rbp-19h] BYREF

while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
if ( EvFlag )
DoEvEs((unsigned int)EvFlag);
ZDspCh(42LL);
result = ZChIn(0LL);
if ( (_DWORD)result != 47 )
break;
if ( LstErr == 0xFFFF )
return result;
ZDspCh(47LL);
ErrVrb((unsigned int)LstErr);
}
if ( (int)result <= 47 )
break;
if ( (_DWORD)result == 63 )
{
if ( LstErr == 0xFFFF )
return result;
ZDspCh(63LL);
TypESt();
}
else
{
if ( (_DWORD)result != 127 )
return result;
LABEL_15:
ZDspCh(13LL);
}
}
if ( (_DWORD)result == 21 )
goto LABEL_15;
if ( (_DWORD)result != 42 )
return result;
ZDspCh(42LL);
v1 = ZChIn(0LL);
if ( GotCtC )
break;
if ( v1 != 13 )
{
if ( v1 <= 13 )
{
if ( v1 == 8 )
goto LABEL_15;
EchoIt((unsigned __int8)v1);
v2 = CBfPtr;
v3 = CStEnd;
v7 = v1;
CBfPtr = &v7;
}
else
{
if ( v1 == 21 || v1 == 127 )
goto LABEL_15;
EchoIt((unsigned __int8)v1);
v2 = CBfPtr;
v3 = CStEnd;
v7 = v1;
CBfPtr = &v7;
if ( v1 == 46 )
{
v8 = ZChIn(0LL);
EchoIt(46LL);
CStEnd = &v8;
goto LABEL_25;
}
}
CStEnd = &v7;
LABEL_25:
v4 = FindQR();
CBfPtr = v2;
CStEnd = v3;
if ( !v4 )
{
if ( *QR )
{
ZFree();
v5 = (_QWORD *)QR;
*(_QWORD *)(QR + 8LL) = 0LL;
*v5 = 0LL;
}
v6 = CStEnd - CStBeg + 1;
if ( v6 > 0 && (unsigned int)MakRom((unsigned int)v6) != -1 )
{
ZCpyBl(*QR, CStBeg, (unsigned int)v6);
*(_QWORD *)(QR + 8LL) = *QR + v6;
}
ZDspBf("\r\n", 2LL);
}
}
}
GotCtC = 0;
return 3LL;
}

original_code:
static unsigned char FirstChar()
{
    BOOLEAN ImdCmd;
    unsigned char LclStr[2];
    DEFAULT Status;
    charptr TCBfPt;
    charptr TCStEn;
    DEFAULT TmpChr;
    int TmpSiz;
    do {
 if (EvFlag) {
     DoEvEs(EvFlag);
 }
 ZDspCh('*');
 TmpChr = ZChIn(0);
 ImdCmd = 0;
 switch (TmpChr) {
     case '\177':
     case '\025':
  ZDspCh('\015');
  ImdCmd = 1;
  break;
     case '/':
  if (LstErr != -1) {
      ZDspCh('/');
      ErrVrb(LstErr);
      ImdCmd = 1;
  }
  break;
     case '?':
  if (LstErr != -1) {
      ZDspCh('?');
      TypESt();
      ImdCmd = 1;
  }
  break;
     case '*':
  ZDspCh('*');
  TmpChr = ZChIn(0);
  if (GotCtC) {
      GotCtC = 0;
      return '\003';
  }
  switch (TmpChr) {
      case '\015':
   TmpChr = 0;
   break;
      case '\177':
      case '\025':
      case '\010':
   ZDspCh('\015');
   break;
      default:
   EchoIt((unsigned char)TmpChr);
   TCBfPt = CBfPtr;
   TCStEn = CStEnd;
   LclStr[0] = (unsigned char)TmpChr;
   CBfPtr = &LclStr[0];
   if (TmpChr == (DEFAULT)'.') {
       LclStr[1] = (unsigned char)ZChIn(0);
       EchoIt((unsigned char)TmpChr);
       CStEnd = &LclStr[1];
   } else {
       CStEnd = &LclStr[0];
   }
   Status = FindQR();
   CBfPtr = TCBfPt;
   CStEnd = TCStEn;
   if (Status == 0) {
       if (QR->Start != (void *)0) {
    ZFree((charptr)QR->Start);
    QR->Start = QR->End_P1 = (void *)0;
       }
       TmpSiz = (CStEnd-CStBeg) + 1;
       if (TmpSiz > 0) {
    if (MakRom((SIZE_T)TmpSiz) != (-1)) {
        ZCpyBl((QR->Start),(CStBeg),((SIZE_T)TmpSiz));
        QR->End_P1 = QR->Start + TmpSiz;
    }
       }
       ZDspBf("\r\n", 2);
   }
  }
  ImdCmd = 1;
  break;
 }
    } while (ImdCmd);
    return (unsigned char)TmpChr;
}

canonical_original_code:
static unsigned char FirstChar()
{
    int ImdCmd;
    unsigned char LclStr[2];
    int Status;
    unsigned char *TCBfPt;
    unsigned char *TCStEn;
    int TmpChr;
    int TmpSiz;
    do {
 if (EvFlag) {
     DoEvEs(EvFlag);
 }
 ZDspCh('*');
 TmpChr = ZChIn(0);
 ImdCmd = 0;
 switch (TmpChr) {
     case '\177':
     case '\025':
  ZDspCh('\015');
  ImdCmd = 1;
  break;
     case '/':
  if (LstErr != -1) {
      ZDspCh('/');
      ErrVrb(LstErr);
      ImdCmd = 1;
  }
  break;
     case '?':
  if (LstErr != -1) {
      ZDspCh('?');
      TypESt();
      ImdCmd = 1;
  }
  break;
     case '*':
  ZDspCh('*');
  TmpChr = ZChIn(0);
  if (GotCtC) {
      GotCtC = 0;
      return '\003';
  }
  switch (TmpChr) {
      case '\015':
   TmpChr = 0;
   break;
      case '\177':
      case '\025':
      case '\010':
   ZDspCh('\015');
   break;
      default:
   EchoIt((unsigned char)TmpChr);
   TCBfPt = CBfPtr;
   TCStEn = CStEnd;
   LclStr[0] = (unsigned char)TmpChr;
   CBfPtr = &LclStr[0];
   if (TmpChr == (int)'.') {
       LclStr[1] = (unsigned char)ZChIn(0);
       EchoIt((unsigned char)TmpChr);
       CStEnd = &LclStr[1];
   } else {
       CStEnd = &LclStr[0];
   }
   Status = FindQR();
   CBfPtr = TCBfPt;
   CStEnd = TCStEn;
   if (Status == 0) {
       if (QR->Start != (void *)0) {
    ZFree((unsigned char *)QR->Start);
    QR->Start = QR->End_P1 = (void *)0;
       }
       TmpSiz = (CStEnd-CStBeg) + 1;
       if (TmpSiz > 0) {
    if (MakRom((unsigned int)TmpSiz) != (-1)) {
        ZCpyBl((QR->Start),(CStBeg),((unsigned int)TmpSiz));
        QR->End_P1 = QR->Start + TmpSiz;
    }
       }
       ZDspBf("\r\n", 2);
   }
  }
  ImdCmd = 1;
  break;
 }
    } while (ImdCmd);
    return (unsigned char)TmpChr;
}

variable_types: ImdCmd int

variable_types:
LclStr
unsigned char [2]

variable_types:
TCBfPt
unsigned char *

variable_types:
TCStEn
unsigned char *

variable_types: TmpChr int

variable_types: TmpSiz int

return_type: unsigned char