// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/pascompl.cc
// Function: simpleExpression()
void simpleExpression()
{
    ExprPtr l4var1z, l4var2z;
    Operator l4var3z;
    Kind argKind;
    bool l4bool5z;

    l4bool5z = false;
    if (charClass == PLUSOP || charClass == MINUSOP) {
        if (charClass == MINUSOP)
            l4bool5z = true;
        inSymbol();
    }
    term();
/* minus */
    if (l4bool5z) {
        arg1Type = curExpr->typ;
        l4var2z = new Expr;
        l4var2z->typ = arg1Type;
        l4var2z->expr1 = curExpr;
        if (arg1Type == RealType) {
            l4var2z->op = RNEGOP;
        } else if (typeCheck(arg1Type, IntegerType)) {
            l4var2z->op = INEGOP;
            l4var2z->typ = IntegerType;
        } else {
            error(69); /* errUnaryMinusNeedRealOrInteger */
            goto exit_minus;
        }
        curExpr = l4var2z;
    } exit_minus:; /* 15010 */
    while (SY == ADDOP) {
        l4var3z = charClass;
        inSymbol();
        l4var2z = curExpr;
        term();
        arg1Type = curExpr->typ;
        arg2Type = l4var2z->typ;
        l4bool5z = typeCheck(arg1Type, arg2Type);
        argKind = arg2Type->k;
        if (kindSet < argKind) {
L15031:     error(errNeedOtherTypesOfOperands);
        } else {
            l4var1z = new Expr;
            if (l4var3z == OROP) {
                if (not l4bool5z or
                   arg1Type != BooleanType)
                    goto L15031;
                l4var1z->typ = BooleanType;
                l4var1z->op = l4var3z;
            } else /* 15046 */ {
                if (l4bool5z) {
                    if (arg1Type == RealType) {
                        l4var1z->op = l4var3z;
                        l4var1z->typ = RealType;
                    } else if (typ120z == IntegerType) {
                        l4var1z->op = iAddOpMap[l4var3z];
                        l4var1z->typ = IntegerType;
                    } else if (argKind == kindSet) {
                        l4var1z->op = setOpMap[l4var3z];
                        l4var1z->typ = arg1Type;
                    } else {
                        goto L15031;
                    }
                } else if (areTypesCompatible(l4var2z)) {
                    l4var1z->typ = RealType;
                    l4var1z->op = l4var3z;
                } else
                    goto L15031;
            } /* 15077 */
            l4var1z->expr1 = l4var2z;
            l4var1z->expr2 = curExpr;
            curExpr = l4var1z;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movl 0x560f5(%rip), %ebx     # 0x63818
leal -0x5(%rbx), %eax
cmpl $0x1, %eax
ja 0xd7ba
leaq 0x1c8(%rsp), %rdi
callq 0x6316
callq 0xd520
cmpl $0x6, %ebx
jne 0xd7d9
movq 0x5634f(%rip), %rax     # 0x63aa0
movq (%rax), %rax
movq %rax, 0x562ad(%rip)     # 0x63a08
pushq $0x20
popq %rdi
callq 0x390b
movq %rax, %rbx
movq 0x5629b(%rip), %rsi     # 0x63a08
movq %rsi, (%rax)
movq 0x56329(%rip), %rax     # 0x63aa0
movq %rax, 0x10(%rbx)
cmpq 0x5626e(%rip), %rsi     # 0x639f0
je 0xd7c1
movq 0x5625d(%rip), %rdx     # 0x639e8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x74d4
movb (%r14), %al
addq $-0x8, 0xaec05(%rip)    # 0xbc3a8
cmpb $0x1, %al
jne 0xd7d1
movl $0x2b, 0x8(%rbx)
movq 0x56233(%rip), %rax     # 0x639e8
movq %rax, (%rbx)
jmp 0xd7c8
callq 0xd520
jmp 0xd7d9
movl $0x2c, 0x8(%rbx)
movq %rbx, 0x562d1(%rip)     # 0x63aa0
jmp 0xd7d9
pushq $0x45
popq %rdi
callq 0x4f2c
leaq 0x10(%rsp), %r14
cmpl $0xa, 0x56037(%rip)     # 0x6381c
jne 0xd929
movl 0x56026(%rip), %r12d    # 0x63818
leaq 0x58(%rsp), %rdi
callq 0x6316
movq 0x5629d(%rip), %r13     # 0x63aa0
movq %r13, 0x8(%rsp)
callq 0xd520
movq 0x5628c(%rip), %rax     # 0x63aa0
movq (%rax), %rsi
movq %rsi, 0x561ea(%rip)     # 0x63a08
movq (%r13), %rdx
movq %rdx, 0x561e7(%rip)     # 0x63a10
movq %r14, %rdi
callq 0x74d4
addq $-0x8, 0xaeb6f(%rip)    # 0xbc3a8
movb 0x10(%rsp), %bl
movq 0x561cc(%rip), %rax     # 0x63a10
movl 0x10(%rax), %r15d
cmpl $0x5, %r15d
jl 0xd858
pushq $0x15
popq %rdi
callq 0x4f2c
jmp 0xd7de
pushq $0x20
popq %rdi
callq 0x390b
movq %rax, %rbp
cmpl $0x7, %r12d
jne 0xd88d
testb %bl, %bl
je 0xd84e
movq 0x56164(%rip), %rax     # 0x639d8
cmpq %rax, 0x5618d(%rip)     # 0x63a08
jne 0xd84e
movq %rax, (%rbp)
movl $0x7, 0x8(%rbp)
jmp 0xd90e
testb %bl, %bl
je 0xd8ce
movq 0x56170(%rip), %rax     # 0x63a08
movq 0x56151(%rip), %rcx     # 0x639f0
cmpq %rcx, %rax
je 0xd8f6
movq 0x5613d(%rip), %rcx     # 0x639e8
cmpq %rcx, 0x56106(%rip)     # 0x639b8
je 0xd8fc
cmpl $0x4, %r15d
jne 0xd84e
leaq 0x5a1af(%rip), %rcx     # 0x67a70
movl (%rcx,%r12,4), %ecx
movl %ecx, 0x8(%rbp)
movq %rax, (%rbp)
jmp 0xd90e
leaq 0x8(%rsp), %rdi
callq 0xd209
testb %al, %al
je 0xd84e
movq 0x56109(%rip), %rax     # 0x639f0
movq %rax, (%rbp)
movl %r12d, 0x8(%rbp)
movq 0x8(%rsp), %r13
jmp 0xd90e
movl %r12d, 0x8(%rbp)
jmp 0xd90a
leaq 0x5a22d(%rip), %rax     # 0x67b30
movl (%rax,%r12,4), %eax
movl %eax, 0x8(%rbp)
movq %rcx, (%rbp)
movq %r13, 0x10(%rbp)
movq 0x56187(%rip), %rax     # 0x63aa0
movq %rax, 0x18(%rbp)
movq %rbp, 0x5617c(%rip)     # 0x63aa0
jmp 0xd7de
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq