// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
cmpb $0x1, 0x5691d(%rip)     # 0x63975
jne 0xd069
leaq 0x1c8(%rsp), %rdi
callq 0x6316
jmp 0xd070
movb $0x1, 0x56905(%rip)     # 0x63975
callq 0xd70c
cmpl $0xb, 0x567a0(%rip)     # 0x6381c
jne 0xd1d6
movl 0x56790(%rip), %ebp     # 0x63818
leaq 0x58(%rsp), %rdi
callq 0x6316
movq 0x56a07(%rip), %rbx     # 0x63aa0
movq %rbx, 0x8(%rsp)
callq 0xd70c
movq 0x569f6(%rip), %rax     # 0x63aa0
movq (%rax), %rsi
movq %rsi, 0x56954(%rip)     # 0x63a08
movq (%rbx), %rdx
movq %rdx, 0x56952(%rip)     # 0x63a10
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x74d4
movb (%rbx), %al
addq $-0x8, 0xaf2d3(%rip)    # 0xbc3a8
cmpb $0x1, %al
jne 0xd10a
cmpl $0xe, %ebp
je 0xd147
movq 0x56923(%rip), %rdi     # 0x63a08
cmpl $0x7, 0x10(%rdi)
je 0xd147
cmpq $0x1, (%rdi)
setne %al
cmpl $0xa, %ebp
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xd14f
callq 0xcd87
testb %al, %al
je 0xd147
jmp 0xd14f
leaq 0x8(%rsp), %rdi
callq 0xd209
testb %al, %al
jne 0xd14f
movq 0x568e9(%rip), %rax     # 0x63a08
cmpl $0x4, 0x10(%rax)
jne 0xd147
movq 0x568e4(%rip), %rax     # 0x63a10
movl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0xd13b
cmpl $0xe, %ebp
jne 0xd147
jmp 0xd14f
xorl $0x2, %eax
movl %ebp, %ecx
xorl $0xe, %ecx
orl %eax, %ecx
je 0xd14f
pushq $0x15
popq %rdi
callq 0x4f2c
pushq $0x20
popq %rdi
callq 0x390b
movq %rax, %rbx
movq 0x568af(%rip), %rax     # 0x63a10
cmpl $0x4, 0x10(%rax)
jne 0xd179
cmpl $0xc, %ebp
je 0xd171
cmpl $0xa, %ebp
jne 0xd179
pushq $0x15
popq %rdi
callq 0x4f2c
movq 0x56858(%rip), %rax     # 0x639d8
movq %rax, (%rbx)
movl %ebp, %eax
andl $-0x2, %eax
cmpl $0xc, %eax
jne 0xd1af
movq 0x5690c(%rip), %rax     # 0x63aa0
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rbx)
cmpl $0xc, %ebp
jne 0xd1c8
movl $0xa, 0x8(%rbx)
jmp 0xd1cf
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x568e1(%rip), %rax     # 0x63aa0
movq %rax, 0x18(%rbx)
movl %ebp, 0x8(%rbx)
jmp 0xd1cf
movl $0xb, 0x8(%rbx)
movq %rbx, 0x568ca(%rip)     # 0x63aa0
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %rbp
retq