// File: /workspace/github_cpp_makefile_star2_O1/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 0x5548f(%rip), %ebx     # 0x64828
leal -0x5(%rbx), %eax
cmpl $0x1, %eax
ja 0xf43e
leaq 0x1c8(%rsp), %rdi
callq 0x6e26
callq 0xf183
cmpl $0x6, %ebx
jne 0xf45f
movq 0x556e9(%rip), %rax     # 0x64ab0
movq (%rax), %rax
movq %rax, 0x55647(%rip)     # 0x64a18
movl $0x20, %edi
callq 0x3d03
movq %rax, %rbx
movq %rax, 0x8(%rsp)
movq 0x5562e(%rip), %rax     # 0x64a18
movq %rax, (%rbx)
movq 0x556bc(%rip), %rax     # 0x64ab0
movq %rax, 0x10(%rbx)
movq 0x55619(%rip), %rsi     # 0x64a18
cmpq 0x555fa(%rip), %rsi     # 0x64a00
je 0xf445
movq 0x555e9(%rip), %rdx     # 0x649f8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x83b2
movb (%r14), %al
addq $-0x8, 0xadf91(%rip)    # 0xbd3b8
cmpb $0x1, %al
jne 0xf455
movl $0x2b, 0x8(%rbx)
movq 0x555bf(%rip), %rax     # 0x649f8
movq %rax, (%rbx)
jmp 0xf44c
callq 0xf183
jmp 0xf45f
movl $0x2c, 0x8(%rbx)
movq %rbx, 0x5565d(%rip)     # 0x64ab0
jmp 0xf45f
movl $0x45, %edi
callq 0x589e
cmpl $0xa, 0x553c6(%rip)     # 0x6482c
jne 0xf5c9
leaq 0x58(%rsp), %rbx
leaq 0x10(%rsp), %r14
movl 0x553ac(%rip), %ebp     # 0x64828
movq %rbx, %rdi
callq 0x6e26
movq 0x55625(%rip), %r15     # 0x64ab0
movq %r15, 0x8(%rsp)
callq 0xf183
movq 0x55614(%rip), %rax     # 0x64ab0
movq (%rax), %rsi
movq %rsi, 0x55572(%rip)     # 0x64a18
movq (%r15), %rdx
movq %rdx, 0x55570(%rip)     # 0x64a20
movq %r14, %rdi
callq 0x83b2
addq $-0x8, 0xadef8(%rip)    # 0xbd3b8
movb 0x10(%rsp), %r15b
movq 0x55554(%rip), %rax     # 0x64a20
movl 0x10(%rax), %r13d
cmpl $0x5, %r13d
jl 0xf4e5
movl $0x15, %edi
callq 0x589e
jmp 0xf5bc
movl $0x20, %edi
callq 0x3d03
movq %rax, %r12
cmpl $0x7, %ebp
jne 0xf51e
testb %r15b, %r15b
je 0xf4d6
movq 0x554e5(%rip), %rax     # 0x649e8
cmpq %rax, 0x5550e(%rip)     # 0x64a18
jne 0xf4d6
movq %rax, (%r12)
movl $0x7, 0x8(%r12)
jmp 0xf59f
testb %r15b, %r15b
je 0xf561
movq 0x554ee(%rip), %rax     # 0x64a18
movq 0x554cf(%rip), %rcx     # 0x64a00
cmpq %rcx, %rax
je 0xf585
movq 0x554bb(%rip), %rcx     # 0x649f8
cmpq %rcx, 0x55484(%rip)     # 0x649c8
je 0xf58c
cmpl $0x4, %r13d
jne 0xf4d6
leaq 0x5952d(%rip), %rcx     # 0x68a80
movl (%rcx,%rbp,4), %ecx
movl %ecx, 0x8(%r12)
movq %rax, (%r12)
jmp 0xf59f
leaq 0x8(%rsp), %rdi
callq 0xeda3
testb %al, %al
je 0xf4d6
movq 0x55486(%rip), %rax     # 0x64a00
movq %rax, (%r12)
movl %ebp, 0x8(%r12)
jmp 0xf59f
movl %ebp, 0x8(%r12)
jmp 0xf59b
leaq 0x595ad(%rip), %rax     # 0x68b40
movl (%rax,%rbp,4), %eax
movl %eax, 0x8(%r12)
movq %rcx, (%r12)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r12)
movq 0x55500(%rip), %rax     # 0x64ab0
movq %rax, 0x18(%r12)
movq %r12, 0x554f4(%rip)     # 0x64ab0
cmpl $0xa, 0x55269(%rip)     # 0x6482c
je 0xf476
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq