// File: 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
movq %rsp, %rbp
subq $0x3c0, %rsp            # imm = 0x3C0
movb $0x0, -0x19(%rbp)
cmpl $0x5, 0x6a522(%rip)     # 0x7fed8
je 0x159c1
cmpl $0x6, 0x6a519(%rip)     # 0x7fed8
jne 0x159da
cmpl $0x6, 0x6a510(%rip)     # 0x7fed8
jne 0x159ce
movb $0x1, -0x19(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x9790
callq 0x156d0
testb $0x1, -0x19(%rbp)
je 0x15ae9
movq 0x6a770(%rip), %rax     # 0x80160
movq (%rax), %rax
movq %rax, 0x6a6ce(%rip)     # 0x800c8
movl $0x20, %edi
callq 0x1e2e0
movq %rax, -0x10(%rbp)
movq 0x6a6b9(%rip), %rcx     # 0x800c8
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x6a743(%rip), %rcx     # 0x80160
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x6a69c(%rip), %rax     # 0x800c8
cmpq 0x6a67d(%rip), %rax     # 0x800b0
jne 0x15a45
movq -0x10(%rbp), %rax
movl $0x2c, 0x8(%rax)
jmp 0x15ade
movq 0x6a67c(%rip), %rsi     # 0x800c8
movq 0x6a655(%rip), %rdx     # 0x800a8
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0xb280
movq -0x3b0(%rbp), %rdi
callq 0x1e950
movb %al, -0x3a1(%rbp)
jmp 0x15a7a
leaq -0x1d8(%rbp), %rdi
callq 0x1e9c0
movb -0x3a1(%rbp), %al
testb $0x1, %al
jne 0x15a92
jmp 0x15ad0
movq -0x10(%rbp), %rax
movl $0x2b, 0x8(%rax)
movq 0x6a604(%rip), %rcx     # 0x800a8
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x15adc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x1e9c0
jmp 0x15d25
movl $0x45, %edi
callq 0x7b40
jmp 0x15aeb
jmp 0x15ade
movq -0x10(%rbp), %rax
movq %rax, 0x6a677(%rip)     # 0x80160
jmp 0x15aeb
jmp 0x15aed
cmpl $0xa, 0x6a3e8(%rip)     # 0x7fedc
jne 0x15d1c
movl 0x6a3d8(%rip), %eax     # 0x7fed8
movl %eax, -0x14(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x9790
movq 0x6a64a(%rip), %rax     # 0x80160
movq %rax, -0x10(%rbp)
callq 0x156d0
movq 0x6a63a(%rip), %rax     # 0x80160
movq (%rax), %rax
movq %rax, 0x6a598(%rip)     # 0x800c8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x6a592(%rip)     # 0x800d0
movq 0x6a583(%rip), %rsi     # 0x800c8
movq 0x6a584(%rip), %rdx     # 0x800d0
leaq -0x3a0(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0xb280
movq -0x3c0(%rbp), %rdi
callq 0x1e950
movb %al, -0x3b1(%rbp)
jmp 0x15b73
movb -0x3b1(%rbp), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x1e9c0
movq 0x6a53f(%rip), %rax     # 0x800d0
movl 0x10(%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x4, %eax
cmpl -0x18(%rbp), %eax
jge 0x15bd5
jmp 0x15ba3
movl $0x15, %edi
callq 0x7b40
jmp 0x15d17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x1e9c0
jmp 0x15d25
movl $0x20, %edi
callq 0x1e2e0
movq %rax, -0x8(%rbp)
cmpl $0x7, -0x14(%rbp)
jne 0x15c1e
testb $0x1, -0x19(%rbp)
je 0x15bff
movq 0x6a4d2(%rip), %rax     # 0x800c8
cmpq 0x6a49b(%rip), %rax     # 0x80098
je 0x15c01
jmp 0x15ba3
movq 0x6a490(%rip), %rcx     # 0x80098
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x15cf1
testb $0x1, -0x19(%rbp)
je 0x15cbf
movq 0x6a499(%rip), %rax     # 0x800c8
cmpq 0x6a47a(%rip), %rax     # 0x800b0
jne 0x15c52
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x6a467(%rip), %rcx     # 0x800b0
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x15cbd
movq 0x6a41f(%rip), %rax     # 0x80078
cmpq 0x6a448(%rip), %rax     # 0x800a8
jne 0x15c88
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x6e582(%rip), %rax     # 0x841f0
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x6a429(%rip), %rcx     # 0x800a8
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x15cbb
cmpl $0x4, -0x18(%rbp)
jne 0x15cb4
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x6e496(%rip), %rax     # 0x84130
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x6a41d(%rip), %rcx     # 0x800c8
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x15cb9
jmp 0x15ba3
jmp 0x15cbb
jmp 0x15cbd
jmp 0x15cef
leaq -0x10(%rbp), %rdi
callq 0x15140
testb $0x1, %al
jne 0x15cce
jmp 0x15ce8
movq 0x6a3db(%rip), %rcx     # 0x800b0
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x15ced
jmp 0x15ba3
jmp 0x15cef
jmp 0x15cf1
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x6a45c(%rip), %rcx     # 0x80160
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq %rax, 0x6a449(%rip)     # 0x80160
jmp 0x15aed
addq $0x3c0, %rsp            # imm = 0x3C0
popq %rbp
retq
movq -0x1e0(%rbp), %rdi
callq 0x44c0
nopw %cs:(%rax,%rax)