// File: /workspace/github_cpp_makefile_star2_O1/besm6[P]pascal-re/pascompl.cc
// Function: Factor::stdCall()
void stdCall() {
        const int64_t chkREAL = 0,  chkINT    = 1,  chkCHAR = 2,    chkSCALAR = 3,
            chkPTR  = 4,  chkFILE   = 5,  chkSET  = 6,    chkOTHER  = 7;

        Operator l5op1z;
        TypesPtr l5var2z;
        Kind argKind;
        Bitset asBitset;
        int64_t stProcNo, checkMode;

        curVal.i = routine->procno();
        stProcNo = curVal.i;
        if (SY != LPAREN) {
            requiredSymErr(LPAREN);
            throw 8888;
        }
        expression();
        if (stProcNo >= fnEOF and
            fnEOLN >= stProcNo and
            not (GETELT<=curExpr->op && curExpr->op <=FILEPTR)) {
            error(27); /* errExpressionWhereVariableExpected */
            return;
        }
        arg1Type = curExpr->typ;
        if (arg1Type->k == kindRange)
            arg1Type = arg1Type->cast<RangeT>().base;
        argKind = arg1Type->k;
        if (arg1Type == RealType)
            checkMode = chkREAL;
        else if (arg1Type == IntegerType)
            checkMode = chkINT;
        else if (arg1Type == CharType)
            checkMode = chkCHAR;
        else if (argKind == kindScalar)
            checkMode = chkSCALAR;
        else if (argKind == kindPtr)
            checkMode = chkPTR;
        else if (argKind == kindFile)
            checkMode = chkFILE;
        else if (argKind == kindSet)
            checkMode = chkSET;
        else {
            checkMode = chkOTHER;
        }
        asBitset = Bits(stProcNo);

        if (not ((checkMode == chkREAL and
                 asBitset <= BitRange(fnSQRT,fnTRUNC) + Bits(fnREF, fnSQR, fnROUND, fn29))
                 or ((checkMode == chkINT and
                     asBitset <= BitRange(fnSQRT,fnABS) + Bits(fnODD, fnCHR, fnREF) + Bits(fnSQR, fnPTR)))
                 or (Bits(chkCHAR, chkSCALAR, chkPTR).has(checkMode) and
                     (asBitset <= Bits(fnORD, fnSUCC, fnPRED, fnREF)))
                 or ((checkMode == chkFILE) and
                     (asBitset <= Bits(fnEOF, fnREF, fnEOLN)))
                 or ((checkMode == chkSET) and
                     (asBitset <= Bits(fnREF, fnCARD, fnMINEL)))
                 or ((checkMode == chkOTHER) and
                     (stProcNo == fnREF))))
            error(errNeedOtherTypesOfOperands);

        if (not (asBitset <= Bits(fnABS, fnSUCC, fnPRED, fnSQR))) {
            arg1Type = routine->typ;
        } else if ((checkMode == chkINT) and (asBitset <= Bits(fnABS, fnSQR))) {
            if (stProcNo == fnABS)
                stProcNo = fnABSI;
            else
              stProcNo = fnSQRI;
        }
        l4exp6z = new Expr;
        l4exp6z->op = STANDPROC;
        l4exp6z->expr1 = curExpr;
        l4exp6z->num2 = stProcNo;
        if (stProcNo == fn24) {
            if (SY != COMMA) {
                requiredSymErr(COMMA);
                throw 8888;
            }
            expression();
            l5var2z = curExpr->typ;
            l5op1z = badop27;
            if ((l5var2z != RealType) and
                not typeCheck(l5var2z, IntegerType))
                error(errNeedOtherTypesOfOperands);
            if (l5var2z == RealType)
                l5op1z = badop30;
            else if (checkMode == chkREAL)
                l5op1z = badop31;
            l4exp6z->expr2 = curExpr;
            l4exp6z->op = l5op1z;
        }
        curExpr = l4exp6z;
        curExpr->typ = arg1Type;
        checkSymAndRead(RPAREN);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x40(%rdi), %rax
cmpl $0x2, 0x20(%rax)
jne 0x197fc
movq %rdi, %rbx
movq 0x28(%rax), %rsi
leaq 0x4b560(%rip), %rdi     # 0x64a40
callq 0x3bf2
cmpl $0x7, 0x4b340(%rip)     # 0x6482c
jne 0x1981b
movq 0x4b547(%rip), %r15     # 0x64a40
shlq $0x17, %r15
movq %r15, %r14
sarq $0x17, %r14
callq 0xebcc
leaq -0xe(%r14), %rax
cmpq $0x2, %rax
ja 0x19529
movq 0x4b596(%rip), %rax     # 0x64ab0
movl 0x8(%rax), %eax
addl $-0x1c, %eax
cmpl $0x8, %eax
jae 0x195a9
movq 0x4b580(%rip), %rax     # 0x64ab0
movq (%rax), %rax
movq %rax, 0x4b4de(%rip)     # 0x64a18
cmpl $0x2, 0x10(%rax)
jne 0x1954b
movq 0x18(%rax), %rax
movq %rax, 0x4b4cd(%rip)     # 0x64a18
movq 0x4b4c6(%rip), %r12     # 0x64a18
movq 0x4b4a7(%rip), %r8      # 0x64a00
cmpq %r8, %r12
je 0x19599
movb $0x1, %al
cmpq 0x4b491(%rip), %r12     # 0x649f8
je 0x195c1
cmpq 0x4b498(%rip), %r12     # 0x64a08
je 0x195cd
movl 0x10(%r12), %ecx
decl %ecx
cmpl $0x6, %ecx
ja 0x197e9
leaq 0x34b7(%rip), %rdx      # 0x1ca40
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x2c, %edx
jmp 0x195e6
movl $0x2f, %edx
movb $0x1, %sil
xorl %ebp, %ebp
xorl %edi, %edi
movb $0x1, %al
jmp 0x195ed
movl $0x1b, %edi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x589e
movl $0x2e, %edx
xorl %edi, %edi
movb $0x1, %bpl
jmp 0x195ea
movl $0x2d, %edx
jmp 0x195e6
movl $0x29, %edx
xorl %ebp, %ebp
xorl %edi, %edi
xorl %esi, %esi
jmp 0x195ed
movl $0x2b, %edx
xorl %ebp, %ebp
xorl %edi, %edi
movb $0x1, %sil
movb $0x2f, %cl
subb %r14b, %cl
movl $0x1, %r13d
shlq %cl, %r13
cmpq %r8, %r12
movq %r8, 0x8(%rsp)
jne 0x19614
movabsq $0x7e9ffbffff, %rcx     # imm = 0x7E9FFBFFFF
andq %r13, %rcx
je 0x1968e
movabsq $0xaebbffffff, %rcx     # imm = 0xAEBBFFFFFF
testq %rcx, %r13
sete %cl
testb %cl, %bpl
jne 0x1968e
movabsq $0x380000000000, %rcx   # imm = 0x380000000000
btq %rdx, %rcx
jae 0x19648
movabsq $0xffd2ffffffff, %rcx   # imm = 0xFFD2FFFFFFFF
andq %r13, %rcx
je 0x1968e
movabsq $0xfffc7fffffff, %rcx   # imm = 0xFFFC7FFFFFFF
testq %rcx, %r13
sete %cl
testb %cl, %dil
jne 0x1968e
movabsq $0xfffee7ffffff, %rcx   # imm = 0xFFFEE7FFFFFF
testq %rcx, %r13
setne %cl
orb %cl, %sil
cmpq $0x7800000, %r15        # imm = 0x7800000
setne %cl
orb %al, %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x1968e
movl $0x15, %edi
callq 0x589e
movabsq $0xfef3bfffffff, %rax   # imm = 0xFEF3BFFFFFFF
testq %rax, %r13
je 0x196ae
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x4b36c(%rip)     # 0x64a18
jmp 0x196d9
movabsq $0xc00000000, %rax      # imm = 0xC00000000
testq %rax, %r13
sete %al
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x196d9
xorl %r14d, %r14d
cmpq $0x3800000, %r15        # imm = 0x3800000
sete %r14b
xorq $0x17, %r14
movl $0x20, %edi
callq 0x3d03
movq %rax, 0x28(%rbx)
movl $0x2d, 0x8(%rax)
movq 0x4b3bb(%rip), %rcx     # 0x64ab0
movq %rcx, 0x10(%rax)
movq 0x28(%rbx), %rax
movq %r14, 0x18(%rax)
cmpq $0x18, %r14
jne 0x197a9
cmpl $0xe, 0x4b11a(%rip)     # 0x6482c
jne 0x19822
callq 0xebcc
movq 0x4b38c(%rip), %rax     # 0x64ab0
movq (%rax), %r14
movq 0x4b2d2(%rip), %r13     # 0x64a00
cmpq %r13, %r14
je 0x19751
movq 0x4b2be(%rip), %rdx     # 0x649f8
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x83b2
movb (%r15), %al
xorb $0x1, %al
jmp 0x19753
xorl %eax, %eax
movq 0x8(%rsp), %rcx
cmpq %r13, %r14
je 0x19765
addq $-0x8, 0xa3c53(%rip)    # 0xbd3b8
testb %al, %al
je 0x19778
movl $0x15, %edi
callq 0x589e
movq 0x8(%rsp), %rcx
xorl %eax, %eax
cmpq %rcx, %r12
sete %al
cmpq 0x4b279(%rip), %r14     # 0x64a00
leal 0x17(%rax,%rax), %eax
movl $0x18, %ecx
cmovnel %eax, %ecx
movq 0x4b316(%rip), %rax     # 0x64ab0
movq 0x28(%rbx), %rdx
movq %rax, 0x18(%rdx)
movq 0x28(%rbx), %rax
movl %ecx, 0x8(%rax)
movq 0x28(%rbx), %rax
movq %rax, 0x4b2fc(%rip)     # 0x64ab0
movq 0x4b25d(%rip), %rcx     # 0x64a18
movq %rcx, (%rax)
movl $0xc, %edi
callq 0x82d3
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2a, %edx
movb $0x1, %dil
xorl %ebp, %ebp
movb $0x1, %sil
jmp 0x195a5
movl $0x28, %edx
xorl %ebp, %ebp
xorl %edi, %edi
movb $0x1, %sil
xorl %eax, %eax
jmp 0x195ed
leaq 0x3f08(%rip), %rdi      # 0x1d70b
leaq 0x3daa(%rip), %rsi      # 0x1d5b4
leaq 0x3faf(%rip), %rcx      # 0x1d7c0
movl $0x2dd, %edx            # imm = 0x2DD
callq 0x3170
movl $0x7, %edi
jmp 0x19827
movl $0xe, %edi
callq 0x6782
movl $0x4, %edi
callq 0x3110
movl $0x22b8, (%rax)         # imm = 0x22B8
movq 0xa73d(%rip), %rsi      # 0x23f80
movq %rax, %rdi
xorl %edx, %edx
callq 0x3400
nop