// File: /workspace/github_cpp_makefile_star2_O3/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 0x19ca2
movq %rdi, %rbx
movq 0x28(%rax), %rsi
leaq 0x4b0b0(%rip), %rdi     # 0x64a30
callq 0x3c48
cmpl $0x7, 0x4ae90(%rip)     # 0x6481c
jne 0x19cc1
movq 0x4b097(%rip), %r15     # 0x64a30
shlq $0x17, %r15
movq %r15, %r14
sarq $0x17, %r14
callq 0xee5e
leaq -0xe(%r14), %rcx
movq 0x4b0ec(%rip), %rax     # 0x64aa0
cmpq $0x2, %rcx
ja 0x199c9
movl 0x8(%rax), %ecx
addl $-0x1c, %ecx
cmpl $0x8, %ecx
jae 0x19a6f
movq (%rax), %r12
movq %r12, 0x4b035(%rip)     # 0x64a08
movl 0x10(%r12), %ecx
cmpl $0x2, %ecx
jne 0x199ee
movq 0x18(%r12), %r12
movq %r12, 0x4b01f(%rip)     # 0x64a08
movl 0x10(%r12), %ecx
movq 0x4affb(%rip), %rax     # 0x649f0
movq %rax, 0x8(%rsp)
cmpq %rax, %r12
je 0x19a3c
cmpq 0x4afe2(%rip), %r12     # 0x649e8
je 0x19a87
movb $0x1, %al
cmpq 0x4afe7(%rip), %r12     # 0x649f8
je 0x19abc
decl %ecx
cmpl $0x6, %ecx
ja 0x19c91
leaq 0x30d7(%rip), %rdx      # 0x1cb00
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x2c, %esi
jmp 0x19ad3
movb $0x2f, %cl
subb %r14b, %cl
movl $0x1, %ebp
shlq %cl, %rbp
movzbl %cl, %eax
xorl %r13d, %r13d
movabsq $0x7e9ffbffff, %rcx     # imm = 0x7E9FFBFFFF
btq %rax, %rcx
jae 0x19b4c
movl $0x2f, %esi
movb $0x1, %dil
xorl %edx, %edx
jmp 0x19ab8
movl $0x1b, %edi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x58ff
movb $0x2f, %cl
subb %r14b, %cl
movl $0x1, %ebp
shlq %cl, %rbp
movzbl %cl, %eax
movb $0x1, %r13b
movabsq $0xaebbffffff, %rcx     # imm = 0xAEBBFFFFFF
btq %rax, %rcx
jae 0x19b4c
movl $0x2e, %esi
xorl %edx, %edx
movb $0x1, %dil
movb $0x1, %al
jmp 0x19ae8
movl $0x2d, %esi
jmp 0x19ad3
movl $0x29, %esi
xorl %edx, %edx
xorl %edi, %edi
jmp 0x19ad8
movl $0x2b, %esi
xorl %edx, %edx
movb $0x1, %dil
movb $0x2f, %cl
subb %r14b, %cl
movl $0x1, %ebp
shlq %cl, %rbp
xorl %r13d, %r13d
movabsq $0x380000000000, %rcx   # imm = 0x380000000000
btq %rsi, %rcx
jae 0x19b07
movabsq $0xffd2ffffffff, %rcx   # imm = 0xFFD2FFFFFFFF
andq %rbp, %rcx
je 0x19b4c
movabsq $0xfffc7fffffff, %rcx   # imm = 0xFFFC7FFFFFFF
testq %rcx, %rbp
sete %cl
testb %cl, %dl
jne 0x19b4c
movabsq $0xfffee7ffffff, %rcx   # imm = 0xFFFEE7FFFFFF
testq %rcx, %rbp
setne %cl
orb %cl, %dil
cmpq $0x7800000, %r15        # imm = 0x7800000
setne %cl
orb %al, %cl
andb %dil, %cl
cmpb $0x1, %cl
jne 0x19b4c
movl $0x15, %edi
callq 0x58ff
movabsq $0xfef3bfffffff, %rax   # imm = 0xFEF3BFFFFFFF
testq %rax, %rbp
je 0x19b6c
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x4ae9e(%rip)     # 0x64a08
jmp 0x19b97
movabsq $0xc00000000, %rax      # imm = 0xC00000000
testq %rax, %rbp
setne %al
xorb $0x1, %r13b
orb %al, %r13b
jne 0x19b97
xorl %r14d, %r14d
cmpq $0x3800000, %r15        # imm = 0x3800000
sete %r14b
xorq $0x17, %r14
movl $0x20, %edi
callq 0x3d77
movq %rax, 0x28(%rbx)
movl $0x2d, 0x8(%rax)
movq 0x4aeed(%rip), %rcx     # 0x64aa0
movq %rcx, 0x10(%rax)
movq 0x28(%rbx), %rax
movq %r14, 0x18(%rax)
cmpq $0x18, %r14
jne 0x19c52
cmpl $0xe, 0x4ac4c(%rip)     # 0x6481c
jne 0x19cc8
callq 0xee5e
movq 0x4aebe(%rip), %rax     # 0x64aa0
movq (%rax), %r14
cmpq 0x4ae04(%rip), %r14     # 0x649f0
je 0x19c1d
movq 0x4adf3(%rip), %rdx     # 0x649e8
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x84c6
addq $-0x8, 0xa379b(%rip)    # 0xbd3a8
cmpb $0x0, (%r15)
jne 0x19c1d
movl $0x15, %edi
callq 0x58ff
xorl %eax, %eax
cmpq 0x8(%rsp), %r12
sete %al
cmpq 0x4adc2(%rip), %r14     # 0x649f0
leal 0x17(%rax,%rax), %eax
movl $0x18, %ecx
cmovnel %eax, %ecx
movq 0x4ae5f(%rip), %rax     # 0x64aa0
movq 0x28(%rbx), %rdx
movq %rax, 0x18(%rdx)
movq 0x28(%rbx), %rax
movl %ecx, 0x8(%rax)
jmp 0x19c56
movq 0x28(%rbx), %rax
movq %rax, 0x4ae43(%rip)     # 0x64aa0
movq 0x4ada4(%rip), %rcx     # 0x64a08
movq %rcx, (%rax)
movl $0xc, %edi
callq 0x83e7
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2a, %esi
movb $0x1, %dl
movb $0x1, %dil
movb $0x1, %al
jmp 0x19ad8
movl $0x28, %esi
xorl %edx, %edx
movb $0x1, %dil
xorl %eax, %eax
jmp 0x19ad8
leaq 0x3b22(%rip), %rdi      # 0x1d7cb
leaq 0x39c4(%rip), %rsi      # 0x1d674
leaq 0x3bc9(%rip), %rcx      # 0x1d880
movl $0x2dd, %edx            # imm = 0x2DD
callq 0x3170
movl $0x7, %edi
jmp 0x19ccd
movl $0xe, %edi
callq 0x68a8
movl $0x4, %edi
callq 0x3110
movl $0x22b8, (%rax)         # imm = 0x22B8
movq 0xa297(%rip), %rsi      # 0x23f80
movq %rax, %rdi
xorl %edx, %edx
callq 0x33f0
nop