// File: /workspace/github_cpp_makefile_star2_O1/besm6[P]pascal-re/pascompl.cc
// Function: formOperator::formOperator(OpGen)
formOperator::formOperator(OpGen op)
{ /* formOperator */
    super.push_back(this);
    l3bool13z = true;
    if ((errors and (op != SETREG)) or curExpr == NULL)
        return;
    if (op != LOOPCOND &&
        op != STRUCTASSN &&
        op != MKINT &&
        op != FILEINIT &&
        op!=PCKUNPCK)
        (void) genFullExpr(curExpr);
    switch (op) {
    case APPLYEXPR:
        genOneOp();
        break;
    case SETREG: {
        l3int3z = insnCount();
        l3var5z = new Expr;
        l3var5z->expr1 = expr63z;
        expr63z = l3var5z;
        l3var5z->op = NOOP;
        switch (insnList->st) {
        case st0: {
            if (l3int3z == 0)  {
                l3int2z = 14;
            } else {
                l3var10z.m = set148z * set147z;
                if (l3var10z.m != Bits()) {
                    l3int2z = minel(l3var10z.m);
                } else {
                    l3int2z = 14;
                }
                if (l3int3z != 1) {
                    (void) setAddrTo(l3int2z);
                    addToInsnList(KITA + l3int2z);
                    P5117(op37);
                } else if (l3int2z != 14) {
                    (void) setAddrTo(l3int2z);
                    genOneOp();
                }
                l3var11z.m = Bits(l3int2z) - Bits(14);
                regsUsed = regsUsed - l3var11z.m;
                set147z = set147z - l3var11z.m;
                set146z = set146z + l3var11z.m;
            }
            curVal.i = l3int2z;
            l3var5z->val = curVal;
        } break;
        case st1: {
            curVal.i = 14;
            l3var5z->val = curVal;
        } break;
        case st2:
            error(errVarTooComplex);
            break;
        } /* case */
        l3var5z->expr2 = curExpr;
    } break; /* SETREG */
    case gen0: {
        prepLoad();
        if (insnCount() > 1)
            P5117(op36);
    } break;
    case STORE: {
        prepStore();
        genOneOp();
    } break;
    case LOOPCOND: {
        curInsnTemplate = curVal.i;
        (void) formOperator(LOAD);
        curInsnTemplate = InsnTemp[XTA];
    } break;
    case ADDRTOR9: {
        if (insnList->st != st0)
            error(errVarTooComplex);
        setAddrTo(9);
        genOneOp();
    } break;
    case STRUCTASSN: {
        l3int1z = curVal.i;
        (void) genFullExpr(curExpr);
        prepLoad();
        if (insnList->regsused.has(9))
            error(errVarTooComplex);
        genOneOp();
        form1Insn(KATX+I9 + l3int1z);
    } break;
    case ADDRTOR12: {
        (void) setAddrTo(12);
        genOneOp();
    } break;
    case MKINT: {
        curVal.i = curVal.ii;
        form1Insn(KXTA+I8 + getFCSToffset());
    } break;
    case MKPUSH: {
        prepLoad();
        addxToInsnList(macro + mcPUSH);
        genOneOp();
    } break;
    case gen11: case gen12: {
        setAddrTo(11);
        if (op == gen12)
            addxToInsnList(macro + mcPUSH);
        genOneOp();
        regsUsed = regsUsed + Bits(12);
    } break;
    case FILEACCESS: {
        setAddrTo(12);
        genOneOp();
        formAndAlign(jumpTarget);
    } break;
    case FILEINIT:
        formFileInit();
        break;
    case LOAD: {
        prepLoad();
        genOneOp();
    } break;
    case CONDJUMP:
        l3bool9z = jumpTarget == 0;
        l3int3z = jumpTarget;
        if (insnList->ilm == ilCONST) {
            if (insnList->ilf5.ii) {
                jumpTarget = 0;
            } else {
                if (l3bool9z) {
                    formJump(jumpTarget);
                } else {
                    form1Insn(InsnTemp[UJ] + jumpTarget);
                }
            }
        } else {
            l3var8z.ii = (insnList->regsused.has(16));
            if ((insnList->ilm == il3) and
                (insnList->ilf5.i != 0)) {
                genOneOp();
                if (l3var8z.ii) {
                    if (l3bool9z)
                        formJump(l3int3z);
                    else
                        form1Insn(InsnTemp[UJ] + l3int3z);
                    P0715(0, jumpTarget);
                    jumpTarget = l3int3z;
                } else {
                    if (not l3bool9z) {
                        if (not putLeft)
                            padToLeft();
                        P0715(l3int3z, jumpTarget);
                    }
                }
            } else {
                if (insnList->ilm == il1) {
                    bool49z = false;
                    prepLoad();
                    bool49z = true;
                }
                genOneOp();
                if (l3var8z.ii)
                    nextInsn = InsnTemp[U1A];
                else
                    nextInsn = InsnTemp[UZA];
                if (l3bool9z) {
                    jumpType = nextInsn;
                    formJump(l3int3z);
                    jumpType = InsnTemp[UJ];
                    jumpTarget = l3int3z;
                } else {
                    form1Insn(nextInsn + l3int3z);
                }
            }
        }
        break; /* CONDJUMP */
    case PCKUNPCK: {
        l3var5z = curExpr;
        curExpr = curExpr->expr1;
        (void) formOperator(gen11);
        genFullExpr(l3var5z->expr2);
        if (insnList->regsused.has(11))
            error(44); /* errIncorrectUsageOfStandProcOrFunc */
        setAddrTo(12);
        genOneOp();
        arg1Type = l3var5z->expr2->typ;
        ArrayT & array = arg1Type->cast<ArrayT>();
        l3int3z = array.range->right - array.range->left + 1;
        form2Insn((KVTM+I14) + l3int3z,
                  (KVTM+I10+64) - array.pcksize);
        l3int3z = ord(l3var5z->typ);
        l3int1z = array.perWord;
        if (l3int3z == 72)          /* P/KC */
            l3int1z = 1 - l3int1z;
        form1Insn(getValueOrAllocSymtab(l3int1z) + (KVTM+I9));
        if (typeCheck(curExpr->typ, IntegerType)) {
            l3int1z = KXTA+ZERO;
        } else {
            l3int1z = InsnTemp[XTA];
        };
        form1Insn(l3int1z);
        formAndAlign(getHelperProc(l3int3z));
   } break;
   case LITINSN:
        if (insnList->ilm != ilCONST)
            error(errNoConstant);
        if (insnList->typ->size != 1)
            error(errConstOfOtherTypeNeeded);
        curVal = insnList->ilf5;
        break;
    } /* case */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x5a38, %rsp           # imm = 0x5A38
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %rsi
movq %rdi, (%rsi)
leaq 0xb1365(%rip), %rdi     # 0xbd3c8
callq 0x1b1b4
movb $0x1, 0x60(%rbx)
cmpl $0x4, %ebp
setne %al
andb 0x5890e(%rip), %al      # 0x64986
movq 0x58a31(%rip), %rsi     # 0x64ab0
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xc5f4
cmpl $0x10, %ebp
ja 0xc107
movl $0x14248, %eax          # imm = 0x14248
btl %ebp, %eax
jae 0xc107
cmpl $0x11, %ebp
ja 0xc5f4
movl %ebp, %eax
leaq 0x10532(%rip), %rcx     # 0x1c5e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf0(%rsp), %rdi
movl $0xb, %esi
callq 0x16a94
cmpl $0xc, %ebp
jne 0xc0d8
movl $0x1000005, %edi        # imm = 0x1000005
callq 0x8942
leaq 0x24b8(%rsp), %rdi
callq 0x15a10
movabsq $0xfff7ffffffff, %rax   # imm = 0xFFF7FFFFFFFF
andq 0x5896a(%rip), %rax     # 0x64a60
btsq $0x23, %rax
movq %rax, 0x5895e(%rip)     # 0x64a60
jmp 0xc5f4
leaq 0x240(%rsp), %rdi
callq 0xaa18
addq $-0x8, 0xb12cc(%rip)    # 0xbd3e8
jmp 0xc09c
movq 0x58988(%rip), %rax     # 0x64ab0
movq %rax, 0x20(%rbx)
movq 0x10(%rax), %rax
movq %rax, 0x58979(%rip)     # 0x64ab0
leaq 0x278(%rsp), %rdi
movl $0xb, %esi
callq 0xc044
addq $-0x8, 0xb127f(%rip)    # 0xbd3d0
movq 0x20(%rbx), %rax
movq 0x18(%rax), %rsi
leaq 0x80(%rsp), %rdi
callq 0xaa18
addq $-0x8, 0xb127a(%rip)    # 0xbd3e8
movq 0x58943(%rip), %rax     # 0x64ab8
testb $0x10, 0x1c(%rax)
je 0xc185
movl $0x2c, %edi
callq 0x589e
leaq 0x48(%rsp), %rdi
movl $0xc, %esi
callq 0x16a94
leaq 0x348(%rsp), %rdi
callq 0x15a10
movq 0x20(%rbx), %rax
movq 0x18(%rax), %rax
movq (%rax), %r15
movq %r15, 0x58865(%rip)     # 0x64a18
cmpl $0x5, 0x10(%r15)
jne 0xc82e
movq 0x20(%r15), %rax
movq 0x30(%rax), %rdi
subq 0x28(%rax), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x10(%rbx)
addq $0xea0001, %rdi         # imm = 0xEA0001
movl $0xaa0040, %r14d        # imm = 0xAA0040
subq 0x38(%r15), %r14
callq 0x5941
movq %r14, %rdi
callq 0x5941
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x3d9a
movq %rax, 0x10(%rbx)
movq 0x30(%r15), %rcx
movl $0x1, %edi
subq %rcx, %rdi
cmpq $0x48, %rax
cmovneq %rcx, %rdi
movq %rdi, (%rbx)
callq 0x6128
leaq 0x9a0000(%rax), %rdi
callq 0x5941
movq 0x58881(%rip), %rax     # 0x64ab0
movq (%rax), %rsi
movq 0x587bf(%rip), %rdx     # 0x649f8
movq %rsp, %r14
movq %r14, %rdi
callq 0x83b2
addq $-0x8, 0xb116c(%rip)    # 0xbd3b8
cmpb $0x0, (%r14)
movl $0x108009, %edi         # imm = 0x108009
jne 0xc25e
movq 0x5d162(%rip), %rdi     # 0x693c0
movq %rdi, (%rbx)
callq 0x5941
movq 0x10(%rbx), %rdi
callq 0x5cbc
movq %rax, %rdi
jmp 0xc5b5
callq 0xbd82
jmp 0xc5f4
movq 0x58830(%rip), %rax     # 0x64ab8
addq $0x8, %rax
movq $-0x1, %rcx
movq (%rax), %rax
incq %rcx
testq %rax, %rax
jne 0xc293
movq %rcx, 0x10(%rbx)
movl $0x20, %edi
callq 0x3d03
movq %rax, 0x20(%rbx)
movq 0x585b1(%rip), %rcx     # 0x64868
movq %rcx, 0x10(%rax)
movq 0x20(%rbx), %rax
movq %rax, 0x585a2(%rip)     # 0x64868
movl $0x2e, 0x8(%rax)
movq 0x587e4(%rip), %rcx     # 0x64ab8
movl 0x40(%rcx), %ecx
cmpl $0x2, %ecx
je 0xc63d
cmpl $0x1, %ecx
je 0xc616
testl %ecx, %ecx
jne 0xc7a1
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xc661
movabsq $-0x1000000000000, %rcx # imm = 0xFFFF000000000000
orq 0x58769(%rip), %rcx     # 0x64a78
andq 0x5875a(%rip), %rcx     # 0x64a70
movq %rcx, 0x48(%rbx)
movq %rcx, %rdx
shlq $0x10, %rdx
je 0xc6e0
movabsq $0x7fffffffffff, %rdx   # imm = 0x7FFFFFFFFFFF
movq %rcx, %rsi
andq %rdx, %rsi
incq %rdx
bsrq %rsi, %rdi
notq %rdi
addq $0x30, %rdi
xorl %esi, %esi
testq %rdx, %rcx
cmoveq %rdi, %rsi
jmp 0xc6e5
movq 0x586e6(%rip), %rsi     # 0x64a40
leaq 0x586df(%rip), %rdi     # 0x64a40
callq 0x3bf2
callq 0x5f9d
leaq 0x808000(%rax), %rdi
jmp 0xc588
callq 0x8989
leaq 0x1758(%rsp), %rdi
jmp 0xc5ef
movq 0x58488(%rip), %rdi     # 0x64818
testq %rdi, %rdi
sete 0x40(%rbx)
movq %rdi, 0x10(%rbx)
movq 0x58716(%rip), %rax     # 0x64ab8
cmpl $0x0, 0x20(%rax)
je 0xc602
leaq 0x10(%rbx), %r14
movl 0x18(%rax), %ecx
shrl $0x1f, %ecx
movq %rcx, 0x38(%rbx)
movl 0x20(%rax), %ecx
cmpl $0x1, %ecx
je 0xc673
cmpl $0x3, %ecx
jne 0xc686
movq 0x28(%rax), %rax
shlq $0x17, %rax
je 0xc66e
leaq 0x10a8(%rsp), %rdi
callq 0x15a10
cmpq $0x0, 0x38(%rbx)
movb 0x40(%rbx), %al
je 0xc7c6
testb %al, %al
je 0xc802
movq %r14, %rdi
callq 0x5ac6
jmp 0xc811
movq 0x5862c(%rip), %rax     # 0x64a40
shlq $0x17, %rax
sarq $0x17, %rax
movq %rax, 0x5844d(%rip)     # 0x64870
leaq 0x2e0(%rsp), %rdi
movl $0x2, %esi
callq 0xc044
addq $-0x8, 0xb0f93(%rip)    # 0xbd3d0
movq 0x5cf7c(%rip), %rax     # 0x693c0
movq %rax, 0x58425(%rip)     # 0x64870
jmp 0xc5f4
leaq 0x5388(%rsp), %rdi
jmp 0xc5ef
callq 0x8989
movq 0x5864f(%rip), %rax     # 0x64ab8
addq $0x8, %rax
movq $-0x1, %rcx
movq (%rax), %rax
incq %rcx
testq %rax, %rax
jne 0xc474
cmpq $0x2, %rcx
jb 0xc5f4
movl $0x1e, %edi
callq 0x8f4b
jmp 0xc5f4
callq 0x8d07
leaq 0x4628(%rsp), %rdi
jmp 0xc5ef
movq 0x58607(%rip), %rax     # 0x64ab8
cmpl $0x0, 0x20(%rax)
je 0xc4c1
movl $0x6, %edi
callq 0x589e
movq 0x585f0(%rip), %rax     # 0x64ab8
movq 0x10(%rax), %rax
cmpq $0x1, (%rax)
je 0xc4dc
movl $0x7, %edi
callq 0x589e
movq 0x585d5(%rip), %rax     # 0x64ab8
movq 0x28(%rax), %rax
movq %rax, 0x58552(%rip)     # 0x64a40
jmp 0xc5f4
movq 0x585be(%rip), %rax     # 0x64ab8
cmpl $0x0, 0x40(%rax)
je 0xc50a
movl $0x30, %edi
callq 0x589e
leaq 0x198(%rsp), %rdi
movl $0x9, %esi
callq 0x16a94
leaq 0x3f78(%rsp), %rdi
jmp 0xc5ef
movq 0x58510(%rip), %rax     # 0x64a40
shlq $0x17, %rax
sarq $0x17, %rax
movq %rax, (%rbx)
movq 0x5856e(%rip), %rsi     # 0x64ab0
leaq 0x160(%rsp), %rdi
callq 0xaa18
addq $-0x8, 0xb0e91(%rip)    # 0xbd3e8
callq 0x8989
movq 0x58555(%rip), %rax     # 0x64ab8
testb $0x40, 0x1c(%rax)
je 0xc573
movl $0x30, %edi
callq 0x589e
leaq 0x38c8(%rsp), %rdi
callq 0x15a10
movl $0x900000, %edi         # imm = 0x900000
addq (%rbx), %rdi
callq 0x5941
jmp 0xc5f4
leaq 0xb8(%rsp), %rdi
movl $0xc, %esi
callq 0x16a94
leaq 0x1e08(%rsp), %rdi
callq 0x15a10
movq 0x58263(%rip), %rdi     # 0x64818
callq 0x5b45
jmp 0xc5f4
callq 0x8989
movl $0x1000005, %edi        # imm = 0x1000005
callq 0x8942
leaq 0x2b68(%rsp), %rdi
jmp 0xc5ef
leaq 0x128(%rsp), %rdi
movl $0xc, %esi
callq 0x16a94
leaq 0x3218(%rsp), %rdi
callq 0x15a10
addq $0x5a38, %rsp           # imm = 0x5A38
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x28(%rax)
je 0xc64c
movq $0x0, 0x58204(%rip) # 0x64818
jmp 0xc5f4
movzwl 0x58429(%rip), %ecx     # 0x64a46
shlq $0x30, %rcx
movabsq $0xd0000000000e, %rdx   # imm = 0xD0000000000E
orq %rcx, %rdx
movq %rdx, 0x5840b(%rip)     # 0x64a40
movq %rdx, (%rax)
jmp 0xc7a1
movl $0x30, %edi
callq 0x589e
jmp 0xc7a1
testq %rdi, %rdi
je 0xc7b5
addq 0x5ce8c(%rip), %rdi     # 0x694e8
jmp 0xc588
movq $0xe, 0x8(%rbx)
jmp 0xc783
cmpl $0x1, %ecx
jne 0xc686
movb $0x0, 0x58190(%rip)     # 0x6480a
callq 0x8989
movb $0x1, 0x58184(%rip)     # 0x6480a
leaq 0x9f8(%rsp), %rdi
callq 0x15a10
xorl %eax, %eax
cmpq $0x0, 0x38(%rbx)
setne %al
leaq 0x5ccdc(%rip), %rcx     # 0x69380
movq 0x158(%rcx,%rax,8), %rdi
movq %rdi, 0x18(%rbx)
cmpb $0x1, 0x40(%rbx)
jne 0xc6d8
movq %rdi, 0x58153(%rip)     # 0x64810
movq %r14, %rdi
callq 0x5ac6
movq 0x5ce1c(%rip), %rax     # 0x694e8
movq %rax, 0x5813d(%rip)     # 0x64810
jmp 0xc81f
addq (%r14), %rdi
jmp 0xc588
movl $0xe, %esi
movabsq $0xffffffffffff, %r14   # imm = 0xFFFFFFFFFFFF
movq %rsi, 0x8(%rbx)
cmpq $0x1, %rax
jne 0xc71b
cmpq $0xe, %rsi
je 0xc740
leaq 0x1d0(%rsp), %rdi
callq 0x16a94
leaq 0x4cd8(%rsp), %rdi
callq 0x15a10
jmp 0xc740
leaq 0x208(%rsp), %rdi
callq 0x16a94
movl $0x22000, %edi          # imm = 0x22000
addq 0x8(%rbx), %rdi
callq 0x88e5
movl $0x1f, %edi
callq 0x8f4b
movb $0x2f, %cl
subb 0x8(%rbx), %cl
movl $0x1, %eax
shlq %cl, %rax
movabsq $0xfffdffffffff, %rcx   # imm = 0xFFFDFFFFFFFF
andq %rax, %rcx
movq %rcx, 0x50(%rbx)
movq %rcx, %rax
xorq %r14, %rax
andq %rax, 0x582f5(%rip)     # 0x64a60
andq %rax, 0x582fe(%rip)     # 0x64a70
andq 0x582ef(%rip), %r14     # 0x64a68
orq %rcx, %r14
movq %r14, 0x582e5(%rip)     # 0x64a68
movq 0x8(%rbx), %rsi
leaq 0x582b2(%rip), %rdi     # 0x64a40
callq 0x3bf2
movq 0x20(%rbx), %rax
movq 0x582a2(%rip), %rcx     # 0x64a40
movq %rcx, (%rax)
movq 0x58308(%rip), %rax     # 0x64ab0
movq 0x20(%rbx), %rcx
movq %rax, 0x18(%rcx)
jmp 0xc5f4
leaq 0x5805c(%rip), %rdi     # 0x64818
callq 0x5ac6
jmp 0xc5f4
testb %al, %al
jne 0xc5f4
cmpb $0x0, 0x581af(%rip)     # 0x64984
jne 0xc7ee
movq 0x5ccda(%rip), %rdi     # 0x694b8
callq 0x5941
movq $0x0, 0x5817a(%rip) # 0x64968
movq (%r14), %rdi
movq 0x58020(%rip), %rsi     # 0x64818
callq 0x617f
jmp 0xc5f4
movq (%r14), %rdi
addq 0x5ccdc(%rip), %rdi     # 0x694e8
callq 0x5941
movq 0x58000(%rip), %rsi     # 0x64818
xorl %edi, %edi
callq 0x617f
movq (%r14), %rax
movq %rax, 0x57fef(%rip)     # 0x64818
jmp 0xc5f4
leaq 0x11013(%rip), %rdi     # 0x1d848
leaq 0x10d78(%rip), %rsi     # 0x1d5b4
leaq 0x110df(%rip), %rcx     # 0x1d922
movl $0x1f7, %edx            # imm = 0x1F7
callq 0x3170