// File: /workspace/github_cpp_makefile_star2_O3/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 0x551f0(%rip), %ebx     # 0x64818
leal -0x5(%rbx), %eax
cmpl $0x1, %eax
ja 0xf6c1
leaq 0x1c8(%rsp), %rdi
callq 0x6f40
callq 0xf407
cmpl $0x6, %ebx
jne 0xf6e2
movq 0x5544a(%rip), %rax     # 0x64aa0
movq (%rax), %rax
movq %rax, 0x553a8(%rip)     # 0x64a08
movl $0x20, %edi
callq 0x3d77
movq %rax, %rbx
movq 0x55394(%rip), %rsi     # 0x64a08
movq %rsi, (%rax)
movq 0x55422(%rip), %rax     # 0x64aa0
movq %rax, 0x10(%rbx)
cmpq 0x55367(%rip), %rsi     # 0x649f0
je 0xf6c8
movq 0x55356(%rip), %rdx     # 0x649e8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x84c6
movb (%r14), %al
addq $-0x8, 0xadcfe(%rip)    # 0xbd3a8
cmpb $0x1, %al
jne 0xf6d8
movl $0x2b, 0x8(%rbx)
movq 0x5532c(%rip), %rax     # 0x649e8
movq %rax, (%rbx)
jmp 0xf6cf
callq 0xf407
jmp 0xf6e2
movl $0x2c, 0x8(%rbx)
movq %rbx, 0x553ca(%rip)     # 0x64aa0
jmp 0xf6e2
movl $0x45, %edi
callq 0x58ff
cmpl $0xa, 0x55133(%rip)     # 0x6481c
jne 0xf84b
leaq 0x10(%rsp), %r14
movl 0x5511d(%rip), %r13d    # 0x64818
leaq 0x58(%rsp), %rdi
callq 0x6f40
movq 0x55394(%rip), %rbp     # 0x64aa0
movq %rbp, 0x8(%rsp)
callq 0xf407
movq 0x55383(%rip), %rax     # 0x64aa0
movq (%rax), %rsi
movq %rsi, 0x552e1(%rip)     # 0x64a08
movq (%rbp), %rdx
movq %rdx, 0x552de(%rip)     # 0x64a10
movq %r14, %rdi
callq 0x84c6
addq $-0x8, 0xadc66(%rip)    # 0xbd3a8
movb 0x10(%rsp), %bl
movq 0x552c3(%rip), %rax     # 0x64a10
movl 0x10(%rax), %r15d
cmpl $0x5, %r15d
jl 0xf766
movl $0x15, %edi
callq 0x58ff
jmp 0xf83e
movl $0x20, %edi
callq 0x3d77
movq %rax, %r12
cmpl $0x7, %r13d
jne 0xf79f
testb %bl, %bl
je 0xf757
movq 0x55254(%rip), %rax     # 0x649d8
cmpq %rax, 0x5527d(%rip)     # 0x64a08
jne 0xf757
movq %rax, (%r12)
movl $0x7, 0x8(%r12)
jmp 0xf826
testb %bl, %bl
je 0xf7e2
movq 0x5525e(%rip), %rax     # 0x64a08
movq 0x5523f(%rip), %rcx     # 0x649f0
cmpq %rcx, %rax
je 0xf80b
movq 0x5522b(%rip), %rcx     # 0x649e8
cmpq %rcx, 0x551f4(%rip)     # 0x649b8
je 0xf812
cmpl $0x4, %r15d
jne 0xf757
leaq 0x5929d(%rip), %rcx     # 0x68a70
movl (%rcx,%r13,4), %ecx
movl %ecx, 0x8(%r12)
movq %rax, (%r12)
jmp 0xf826
leaq 0x8(%rsp), %rdi
callq 0xf035
testb %al, %al
je 0xf757
movq 0x551f5(%rip), %rax     # 0x649f0
movq %rax, (%r12)
movl %r13d, 0x8(%r12)
movq 0x8(%rsp), %rbp
jmp 0xf826
movl %r13d, 0x8(%r12)
jmp 0xf822
leaq 0x59317(%rip), %rax     # 0x68b30
movl (%rax,%r13,4), %eax
movl %eax, 0x8(%r12)
movq %rcx, (%r12)
movq %rbp, 0x10(%r12)
movq 0x5526e(%rip), %rax     # 0x64aa0
movq %rax, 0x18(%r12)
movq %r12, 0x55262(%rip)     # 0x64aa0
cmpl $0xa, 0x54fd7(%rip)     # 0x6481c
je 0xf6f4
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq