// File: besm6[P]pascal-re/pascompl.cc
// Function: expression()
void expression()
{
    Operator oper;
    ExprPtr l4var2z, l4var3z;

    if (bool102z)
        inSymbol();
    else
        bool102z = true;
    simpleExpression();
    if (SY == RELOP) {
        oper = charClass;
        inSymbol();
        l4var3z = curExpr;
        simpleExpression();
        arg1Type = curExpr->typ;
        arg2Type = l4var3z->typ;
        if (typeCheck(arg1Type, arg2Type)) {
            if ((oper == INOP) or
                (arg1Type->k == kindFile) or
                (arg1Type->size != 1 and
                 oper >= LTOP and
                 not isCharArray(arg1Type)))
                error(errNeedOtherTypesOfOperands);
        } else /* 15150 */ {
            if (not areTypesCompatible(l4var3z) and
                ((arg1Type->k != kindSet) or
                 not (arg2Type->k == kindScalar || arg2Type->k == kindRange) or
                 (oper != INOP))) {
                error(errNeedOtherTypesOfOperands);
            }
        } /* 15167 */
        l4var2z = new Expr;
        if ((arg2Type->k == kindSet) and
            (oper == LTOP || oper == GTOP))
            error(errNeedOtherTypesOfOperands);
        l4var2z->typ = BooleanType;
        if (oper == GTOP || oper == LEOP) {
            l4var2z->expr1 = curExpr;
            l4var2z->expr2 = l4var3z;
            if (oper == GTOP)
                l4var2z->op = LTOP;
            else
                l4var2z->op = GEOP;
        } else {
            l4var2z->expr1 = l4var3z;
            l4var2z->expr2 = curExpr;
            l4var2z->op = oper;
        }
        curExpr = l4var2z;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
testb $0x1, 0x6b193(%rip)     # 0x80035
je 0x14eb2
leaq -0x188(%rbp), %rdi
callq 0x9790
jmp 0x14eb9
movb $0x1, 0x6b17c(%rip)     # 0x80035
callq 0x159a0
cmpl $0xb, 0x6b017(%rip)     # 0x7fedc
jne 0x150bf
movl 0x6b007(%rip), %eax     # 0x7fed8
movl %eax, -0x4(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x9790
movq 0x6b279(%rip), %rax     # 0x80160
movq %rax, -0x18(%rbp)
callq 0x159a0
movq 0x6b269(%rip), %rax     # 0x80160
movq (%rax), %rax
movq %rax, 0x6b1c7(%rip)     # 0x800c8
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x6b1c1(%rip)     # 0x800d0
movq 0x6b1b2(%rip), %rsi     # 0x800c8
movq 0x6b1b3(%rip), %rdx     # 0x800d0
leaq -0x340(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0xb280
movq -0x358(%rbp), %rdi
callq 0x1e950
movb %al, -0x34d(%rbp)
jmp 0x14f44
leaq -0x340(%rbp), %rdi
callq 0x1e9c0
movb -0x34d(%rbp), %al
testb $0x1, %al
jne 0x14f5c
jmp 0x14fc3
cmpl $0xe, -0x4(%rbp)
je 0x14f92
movq 0x6b15f(%rip), %rax     # 0x800c8
cmpl $0x7, 0x10(%rax)
je 0x14f92
movq 0x6b152(%rip), %rax     # 0x800c8
cmpq $0x1, (%rax)
je 0x14fc1
cmpl $0xa, -0x4(%rbp)
jl 0x14fc1
movq 0x6b13f(%rip), %rdi     # 0x800c8
callq 0x14aa0
testb $0x1, %al
jne 0x14fc1
movl $0x15, %edi
callq 0x7b40
jmp 0x14fc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x1e9c0
jmp 0x150c8
jmp 0x15009
leaq -0x18(%rbp), %rdi
callq 0x15140
testb $0x1, %al
jne 0x15007
movq 0x6b0f1(%rip), %rax     # 0x800c8
cmpl $0x4, 0x10(%rax)
jne 0x14ffd
movq 0x6b0ec(%rip), %rax     # 0x800d0
cmpl $0x1, 0x10(%rax)
je 0x14ff7
movq 0x6b0df(%rip), %rax     # 0x800d0
cmpl $0x2, 0x10(%rax)
jne 0x14ffd
cmpl $0xe, -0x4(%rbp)
je 0x15007
movl $0x15, %edi
callq 0x7b40
jmp 0x15009
movl $0x20, %edi
callq 0x1e2e0
movq %rax, -0x10(%rbp)
movq 0x6b0b2(%rip), %rax     # 0x800d0
cmpl $0x4, 0x10(%rax)
jne 0x1503a
cmpl $0xa, -0x4(%rbp)
je 0x15030
cmpl $0xc, -0x4(%rbp)
jne 0x1503a
movl $0x15, %edi
callq 0x7b40
movq 0x6b057(%rip), %rcx     # 0x80098
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpl $0xc, -0x4(%rbp)
je 0x15054
cmpl $0xd, -0x4(%rbp)
jne 0x1508f
movq 0x6b105(%rip), %rcx     # 0x80160
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpl $0xc, -0x4(%rbp)
jne 0x15082
movq -0x10(%rbp), %rax
movl $0xa, 0x8(%rax)
jmp 0x1508d
movq -0x10(%rbp), %rax
movl $0xb, 0x8(%rax)
jmp 0x150b4
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x6b0be(%rip), %rcx     # 0x80160
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rax, 0x6b0a1(%rip)     # 0x80160
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
movq -0x348(%rbp), %rdi
callq 0x44c0
nopw %cs:(%rax,%rax)