// File: besm6[P]pascal-re/pascompl.cc
// Function: Factor::Factor()
Factor() {
        inParam = parsingParam;
        parsingParam = false;
        if (SY < MULOP) {
            switch (SY) {
            case IDENT: {
                if (hashTravPtr == NULL) {
                    error(errNotDefined);
                    curExpr = uVarPtr;
                } else switch (hashTravPtr->cl) {
                    case TYPEID: {
                        error(23); /* errTypeIdInsteadOfVar */
                          curExpr = uVarPtr;
                    } break;
                    case ENUMID: {
                        curExpr = new Expr;
                        curExpr->typ = hashTravPtr->typ;
                        curExpr->op = GETENUM;
                        curExpr->num1 = hashTravPtr->value();
                        curExpr->num2 = 0;
                        inSymbol();
                    } break;
                    case ROUTINEID: {
                        routine = hashTravPtr;
                        inSymbol();
                        if (routine->offset == 0) {
                            if (routine->typ != NULL and
                                SY == LPAREN) {
                                stdCall();
                                return;
                            }
                            error(44); /* errIncorrectUsageOfStandProcOrFunc */
                        } else if (routine->typ == NULL) {
                            if (inParam) {
                                curOp = PCALL;
                            } else {
                                error(68); /* errUsingProcedureInExpression */
                            }
                        } else /* 14330 */ {
                            if (SY == LPAREN) {
                                parseCallArgs(routine);
                                return;
                            }
                            if (inParam && (SY == COMMA || (SY == RPAREN))) {
                                curOp = FCALL;
                            } else {
                                parseCallArgs(routine);
                                return;
                            }
                        } /* 14342 */
                        curExpr = new Expr;
                        if (SY != RPAREN && SY != COMMA) {
                            error(errNoCommaOrParenOrTooFewArgs);
                            throw 8888;
                        }
                        curExpr->typ = routine->typ;
                        curExpr->op = curOp;
                        curExpr->expr1 = NULL;
                        curExpr->id2 = routine;
                    } break;
                    case VARID: case FORMALID: case FIELDID:
                        parseLval();
                        break;
                    } /* case */
            } break;
            case LPAREN: {
                expression();
                checkSymAndRead(RPAREN);
            } break;
            case INTCONST: case REALCONST: case CHARCONST: case LTSY: case GTSY: {
                curExpr = new Expr;
                parseLiteral(curExpr->typ, curExpr->d1, false);
                curExpr->num2 = suffix;
                curExpr->op = GETENUM;
                inSymbol();
            } break;
            case NOTSY: {
                inSymbol();
                Factor();
                if (curExpr->typ != BooleanType)
                    error(1); /* errNoCommaNorSemicolon */
                l4exp6z = curExpr;
                curExpr = new Expr;
                curExpr->typ = BooleanType;
                curExpr->op = NOTOP;
                curExpr->expr1 = l4exp6z;
            } break;
            case LBRACK: {
                curExpr = new Expr;
                inSymbol();
                l4var8z = curExpr;
                l4var1z.m = Bits();
                if (SY != RBRACK) {
                    l4var12z = true;
                    bool102z = false;
                    do {
                        l4exp6z = curExpr;
                        expression();
                        if (l4var12z) {
                            curType = curExpr->typ;
                            if (not (Bits(curType->k) <= Bits(kindScalar, kindRange)))
                                error(23); /* errTypeIdInsteadOfVar */
                        } else {
                            if (not typeCheck(curType, curExpr->typ))
                                error(24); /*errIncompatibleExprsInSetCtor*/
                        }
                        l4var12z = false;
                        l4exp5z = curExpr;
                        if (SY == COLON) {
                            expression();
                            if (not typeCheck(curType, curExpr->typ))
                                error(24); /*errIncompatibleExprsInSetCtor*/
                            if (l4exp5z->op == GETENUM and
                                curExpr->op == GETENUM) {
                                l4var4z.i = l4exp5z->num1;
                                l4var3z.i = curExpr->num1;
                                l4var4z.i.exp = 0;
                                l4var3z.i.exp = 0;
                                l4var1z.m = l4var1z.m + BitRange(l4var4z.i, l4var3z.i);
                                curExpr = l4exp6z;
                                goto L14567;
                            }
                            l4var7z = new Expr;
                            l4var7z->typ = setType;
                            l4var7z->op = MKRANGE;
                            l4var7z->expr1 = l4exp5z;
                            l4var7z->expr2 = curExpr;
                            l4exp5z = l4var7z;
                        } else {/* 14535 */
                            if (l4exp5z->op == GETENUM) {
                                l4var4z.i = l4exp5z->num1;
                                l4var4z.i.exp = 0;
                                l4var1z.m = l4var1z.m + Bits(l4var4z.i);
                                curExpr = l4exp6z;
                                goto L14567;
                            }
                            l4var7z = new Expr;
                            l4var7z->typ = setType;
                            l4var7z->op = STANDPROC;
                            l4var7z->expr1 = l4exp5z;
                            l4var7z->num2 = 109;
                            l4exp5z = l4var7z;
                        } /* 14560 */
                        curExpr = new Expr;
                        curExpr->typ = setType;
                        curExpr->op = SETOR;
                        curExpr->expr1 = l4exp6z;
                        curExpr->expr2 = l4exp5z;
L14567:;
                    } while (SY == COMMA);
                } /* 14571 */
                checkSymAndRead(RBRACK);
                l4var8z->op = GETENUM;
                l4var8z->typ = setType;
                l4var8z->d1 = l4var1z;
            } break;
            default:;
            } /* case */
        } else {
            error(errBadSymbol);
            throw 8888;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x890, %rsp            # imm = 0x890
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x868(%rbp)
movb 0x5dda8(%rip), %cl      # 0x7feb8
andb $0x1, %cl
movb %cl, 0x8(%rax)
movb $0x0, 0x5dd9b(%rip)     # 0x7feb8
cmpl $0x9, 0x5ddb8(%rip)     # 0x7fedc
jge 0x229ae
movl 0x5ddac(%rip), %eax     # 0x7fedc
movq %rax, -0x870(%rbp)
subq $0x8, %rax
ja 0x229aa
movq -0x870(%rbp), %rax
leaq 0xf891(%rip), %rcx      # 0x319e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, 0x5df00(%rip)     # 0x80060
jne 0x2217f
movl $0xb, %edi
callq 0x7b40
movq 0x5dfe5(%rip), %rax     # 0x80158
movq %rax, 0x5dfe6(%rip)     # 0x80160
jmp 0x223e5
movq 0x5deda(%rip), %rax     # 0x80060
movl 0x20(%rax), %eax
movq %rax, -0x878(%rbp)
subq $0x5, %rax
ja 0x223e3
movq -0x878(%rbp), %rax
leaq 0xf85c(%rip), %rcx      # 0x31a04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x17, %edi
callq 0x7b40
movq 0x5df96(%rip), %rax     # 0x80158
movq %rax, 0x5df97(%rip)     # 0x80160
jmp 0x223e3
movl $0x20, %edi
callq 0x1e2e0
movq %rax, 0x5df81(%rip)     # 0x80160
movq 0x5de7a(%rip), %rax     # 0x80060
movq 0x18(%rax), %rcx
movq 0x5df6f(%rip), %rax     # 0x80160
movq %rcx, (%rax)
movq 0x5df65(%rip), %rax     # 0x80160
movl $0x20, 0x8(%rax)
movq 0x5de57(%rip), %rdi     # 0x80060
callq 0x1e6b0
movq (%rax), %rcx
movq 0x5df48(%rip), %rax     # 0x80160
movq %rcx, 0x10(%rax)
movq 0x5df3d(%rip), %rax     # 0x80160
movq $0x0, 0x18(%rax)
leaq -0x178(%rbp), %rdi
callq 0x9790
jmp 0x223e3
movq -0x868(%rbp), %rax
movq 0x5de16(%rip), %rcx     # 0x80060
movq %rcx, 0x40(%rax)
leaq -0x2e8(%rbp), %rdi
callq 0x9790
movq -0x868(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x8(%rax)
jne 0x222a7
movq -0x868(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x22298
cmpl $0x7, 0x5dc57(%rip)     # 0x7fedc
jne 0x22298
movq -0x868(%rbp), %rdi
callq 0x26eb0
jmp 0x229db
movl $0x2c, %edi
callq 0x7b40
jmp 0x22348
movq -0x868(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x18(%rax)
jne 0x222e2
movq -0x868(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x222d6
movq -0x868(%rbp), %rax
movl $0x26, 0x48(%rax)
jmp 0x222e0
movl $0x44, %edi
callq 0x7b40
jmp 0x22346
cmpl $0x7, 0x5dbf3(%rip)     # 0x7fedc
jne 0x22300
movq -0x868(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x152d0
jmp 0x229db
movq -0x868(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x2232f
cmpl $0xe, 0x5dbc8(%rip)     # 0x7fedc
je 0x2231f
cmpl $0xc, 0x5dbbf(%rip)     # 0x7fedc
jne 0x2232f
movq -0x868(%rbp), %rax
movl $0x27, 0x48(%rax)
jmp 0x22344
movq -0x868(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x152d0
jmp 0x229db
jmp 0x22346
jmp 0x22348
movl $0x20, %edi
callq 0x1e2e0
movq %rax, 0x5de07(%rip)     # 0x80160
cmpl $0xc, 0x5db7c(%rip)     # 0x7fedc
je 0x22398
cmpl $0xe, 0x5db73(%rip)     # 0x7fedc
je 0x22398
movl $0x29, %edi
callq 0x7b40
movl $0x4, %edi
callq 0x4130
movq %rax, %rdi
movl $0x22b8, (%rdi)         # imm = 0x22B8
movq 0x1cbf1(%rip), %rsi     # 0x3ef80
xorl %eax, %eax
movl %eax, %edx
callq 0x44b0
movq -0x868(%rbp), %rax
movq 0x40(%rax), %rcx
movq 0x18(%rcx), %rdx
movq 0x5ddb2(%rip), %rcx     # 0x80160
movq %rdx, (%rcx)
movl 0x48(%rax), %edx
movq 0x5dda5(%rip), %rcx     # 0x80160
movl %edx, 0x8(%rcx)
movq 0x5dd9b(%rip), %rcx     # 0x80160
movq $0x0, 0x10(%rcx)
movq 0x40(%rax), %rcx
movq 0x5dd88(%rip), %rax     # 0x80160
movq %rcx, 0x18(%rax)
jmp 0x223e3
callq 0x14ae0
jmp 0x223e5
jmp 0x229ac
callq 0x14e90
movl $0xc, %edi
callq 0xb110
jmp 0x229ac
movl $0x20, %edi
callq 0x1e2e0
movq %rax, 0x5dd51(%rip)     # 0x80160
movq 0x5dd4a(%rip), %rdi     # 0x80160
movq 0x5dd43(%rip), %rsi     # 0x80160
addq $0x10, %rsi
xorl %edx, %edx
callq 0xad20
movl 0x5da52(%rip), %eax     # 0x7fe80
movl %eax, %ecx
movq 0x5dd29(%rip), %rax     # 0x80160
movq %rcx, 0x18(%rax)
movq 0x5dd1e(%rip), %rax     # 0x80160
movl $0x20, 0x8(%rax)
leaq -0x458(%rbp), %rdi
callq 0x9790
jmp 0x229ac
leaq -0x5c8(%rbp), %rdi
callq 0x9790
leaq -0x628(%rbp), %rdi
callq 0x220f0
movq 0x5dce7(%rip), %rax     # 0x80160
movq (%rax), %rax
cmpq 0x5dc15(%rip), %rax     # 0x80098
je 0x2248f
movl $0x1, %edi
callq 0x7b40
movq -0x868(%rbp), %rax
movq 0x5dcc3(%rip), %rcx     # 0x80160
movq %rcx, 0x28(%rax)
movl $0x20, %edi
callq 0x1e2e0
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, 0x5dca4(%rip)     # 0x80160
movq 0x5dbd5(%rip), %rdx     # 0x80098
movq 0x5dc96(%rip), %rcx     # 0x80160
movq %rdx, (%rcx)
movq 0x5dc8c(%rip), %rcx     # 0x80160
movl $0x2a, 0x8(%rcx)
movq 0x28(%rax), %rcx
movq 0x5dc7a(%rip), %rax     # 0x80160
movq %rcx, 0x10(%rax)
jmp 0x229ac
movl $0x20, %edi
callq 0x1e2e0
movq %rax, 0x5dc60(%rip)     # 0x80160
leaq -0x798(%rbp), %rdi
callq 0x9790
movq -0x868(%rbp), %rax
movq 0x5dc46(%rip), %rcx     # 0x80160
movq %rcx, 0x38(%rax)
callq 0x48c0
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, -0x7a0(%rbp)
movq -0x7a0(%rbp), %rcx
movq %rcx, (%rax)
cmpl $0xd, 0x5d997(%rip)     # 0x7fedc
je 0x22973
movq -0x868(%rbp), %rax
movb $0x1, 0x58(%rax)
movb $0x0, 0x5dad8(%rip)     # 0x80035
movq -0x868(%rbp), %rax
movq 0x5dbf5(%rip), %rcx     # 0x80160
movq %rcx, 0x28(%rax)
callq 0x14e90
movq -0x868(%rbp), %rax
testb $0x1, 0x58(%rax)
je 0x225e8
movq -0x868(%rbp), %rax
movq 0x5dbd1(%rip), %rcx     # 0x80160
movq (%rcx), %rcx
movq %rcx, 0x50(%rax)
movq 0x50(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, %edi
callq 0x48e0
movq %rax, -0x7a8(%rbp)
movl $0x1, %edi
movl $0x2, %esi
callq 0x4940
movq %rax, -0x7b0(%rbp)
movq -0x7b0(%rbp), %rsi
leaq -0x7a8(%rbp), %rdi
callq 0x27540
xorb $-0x1, %al
testb $0x1, %al
jne 0x225dc
jmp 0x225e6
movl $0x17, %edi
callq 0x7b40
jmp 0x22641
movq -0x868(%rbp), %rax
movq 0x50(%rax), %rsi
movq 0x5db66(%rip), %rax     # 0x80160
movq (%rax), %rdx
leaq -0x7f8(%rbp), %rdi
callq 0xb280
leaq -0x7f8(%rbp), %rdi
callq 0x1e950
xorb $-0x1, %al
movb %al, -0x879(%rbp)
leaq -0x7f8(%rbp), %rdi
callq 0x1e9c0
movb -0x879(%rbp), %al
testb $0x1, %al
jne 0x22635
jmp 0x2263f
movl $0x18, %edi
callq 0x7b40
jmp 0x22641
movq -0x868(%rbp), %rax
movb $0x0, 0x58(%rax)
movq 0x5db0d(%rip), %rcx     # 0x80160
movq %rcx, 0x20(%rax)
cmpl $0x12, 0x5d87e(%rip)    # 0x7fedc
jne 0x22819
callq 0x14e90
movq -0x868(%rbp), %rax
movq 0x50(%rax), %rsi
movq 0x5dae5(%rip), %rax     # 0x80160
movq (%rax), %rdx
leaq -0x840(%rbp), %rdi
callq 0xb280
leaq -0x840(%rbp), %rdi
callq 0x1e950
xorb $-0x1, %al
movb %al, -0x87a(%rbp)
leaq -0x840(%rbp), %rdi
callq 0x1e9c0
movb -0x87a(%rbp), %al
testb $0x1, %al
jne 0x226b6
jmp 0x226c0
movl $0x18, %edi
callq 0x7b40
movq -0x868(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x20, 0x8(%rax)
jne 0x227c0
movq 0x5da84(%rip), %rax     # 0x80160
cmpl $0x20, 0x8(%rax)
jne 0x227c0
movq -0x868(%rbp), %rdi
movq 0x20(%rdi), %rax
movq 0x10(%rax), %rsi
addq $0x18, %rdi
callq 0x4ad0
movq -0x868(%rbp), %rdi
movq 0x5da54(%rip), %rax     # 0x80160
movq 0x10(%rax), %rsi
addq $0x10, %rdi
callq 0x4ad0
movq -0x868(%rbp), %rdi
movabsq $-0xfe0000000001, %rax  # imm = 0xFFFF01FFFFFFFFFF
andq 0x18(%rdi), %rax
orq $0x0, %rax
movq %rax, 0x18(%rdi)
movabsq $-0xfe0000000001, %rax  # imm = 0xFFFF01FFFFFFFFFF
andq 0x10(%rdi), %rax
orq $0x0, %rax
movq %rax, 0x10(%rdi)
addq $0x18, %rdi
callq 0x1dfb0
movq -0x868(%rbp), %rdi
movq %rax, -0x888(%rbp)
addq $0x10, %rdi
callq 0x1dfb0
movq -0x888(%rbp), %rdi
movq %rax, %rsi
callq 0x4a60
movq -0x868(%rbp), %rdi
movq %rax, -0x850(%rbp)
movq -0x850(%rbp), %rsi
callq 0x1db20
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, -0x848(%rbp)
movq -0x848(%rbp), %rcx
movq %rcx, (%rax)
movq 0x28(%rax), %rax
movq %rax, 0x5d9a5(%rip)     # 0x80160
jmp 0x22962
movl $0x20, %edi
callq 0x1e2e0
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, 0x30(%rax)
movq 0x5d8b1(%rip), %rdx     # 0x80090
movq 0x30(%rax), %rcx
movq %rdx, (%rcx)
movq 0x30(%rax), %rcx
movl $0x1a, 0x8(%rcx)
movq 0x20(%rax), %rdx
movq 0x30(%rax), %rcx
movq %rdx, 0x10(%rcx)
movq 0x5d95c(%rip), %rdx     # 0x80160
movq 0x30(%rax), %rcx
movq %rdx, 0x18(%rcx)
movq 0x30(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0x2290a
movq -0x868(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x20, 0x8(%rax)
jne 0x228b9
movq -0x868(%rbp), %rdi
movq 0x20(%rdi), %rax
movq 0x10(%rax), %rsi
addq $0x18, %rdi
callq 0x4ad0
movq -0x868(%rbp), %rdi
movabsq $-0xfe0000000001, %rax  # imm = 0xFFFF01FFFFFFFFFF
andq 0x18(%rdi), %rax
orq $0x0, %rax
movq %rax, 0x18(%rdi)
addq $0x18, %rdi
callq 0x1dfb0
movq %rax, %rdi
callq 0x48e0
movq -0x868(%rbp), %rdi
movq %rax, -0x860(%rbp)
movq -0x860(%rbp), %rsi
callq 0x1db20
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, -0x858(%rbp)
movq -0x858(%rbp), %rcx
movq %rcx, (%rax)
movq 0x28(%rax), %rax
movq %rax, 0x5d8ac(%rip)     # 0x80160
jmp 0x22962
movl $0x20, %edi
callq 0x1e2e0
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, 0x30(%rax)
movq 0x5d7b8(%rip), %rdx     # 0x80090
movq 0x30(%rax), %rcx
movq %rdx, (%rcx)
movq 0x30(%rax), %rcx
movl $0x2d, 0x8(%rcx)
movq 0x20(%rax), %rdx
movq 0x30(%rax), %rcx
movq %rdx, 0x10(%rcx)
movq 0x30(%rax), %rcx
movq $0x6d, 0x18(%rcx)
movq 0x30(%rax), %rcx
movq %rcx, 0x20(%rax)
movl $0x20, %edi
callq 0x1e2e0
movq %rax, %rcx
movq -0x868(%rbp), %rax
movq %rcx, 0x5d83b(%rip)     # 0x80160
movq 0x5d764(%rip), %rdx     # 0x80090
movq 0x5d82d(%rip), %rcx     # 0x80160
movq %rdx, (%rcx)
movq 0x5d823(%rip), %rcx     # 0x80160
movl $0x13, 0x8(%rcx)
movq 0x28(%rax), %rdx
movq 0x5d811(%rip), %rcx     # 0x80160
movq %rdx, 0x10(%rcx)
movq 0x20(%rax), %rcx
movq 0x5d802(%rip), %rax     # 0x80160
movq %rcx, 0x18(%rax)
jmp 0x22964
cmpl $0xe, 0x5d571(%rip)     # 0x7fedc
je 0x2255d
jmp 0x22973
movl $0xd, %edi
callq 0xb110
movq -0x868(%rbp), %rcx
movq 0x38(%rcx), %rax
movl $0x20, 0x8(%rax)
movq 0x5d6fa(%rip), %rdx     # 0x80090
movq 0x38(%rcx), %rax
movq %rdx, (%rax)
movq 0x38(%rcx), %rax
movq (%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x229ac
jmp 0x229ac
jmp 0x229db
movl $0xc, %edi
callq 0x7b40
movl $0x4, %edi
callq 0x4130
movq %rax, %rdi
movl $0x22b8, (%rdi)         # imm = 0x22B8
movq 0x1c5ae(%rip), %rsi     # 0x3ef80
xorl %eax, %eax
movl %eax, %edx
callq 0x44b0
addq $0x890, %rsp            # imm = 0x890
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop