// File: /workspace/github_cpp_makefile_star2_O1/besm6[P]pascal-re/pascompl.cc
// Function: term()
void term()
{
    Operator l4var1z;
    ExprPtr l4var2z, l4var3z;
    bool l4var4z;

    Factor();
    while (SY == MULOP) {
        l4var1z = charClass;
        inSymbol();
        l4var2z = curExpr;
        Factor();
        arg1Type = curExpr->typ;
        arg2Type = l4var2z->typ;
        l4var4z = typeCheck(arg1Type, arg2Type);
        if (not l4var4z and
            RDIVOP < l4var1z) {
L14650:
            error(errNeedOtherTypesOfOperands);
        } else {
            switch (l4var1z) {
            case MUL:
            case RDIVOP: {
                if (l4var4z) {
                    if (arg1Type == RealType) {
                        /* empty */
                    } else {
                        if (typ120z == IntegerType) {
                            if (l4var1z == MUL) {
                                arg1Type = IntegerType;
                            } else {
                                arg1Type = RealType;
                            }
                            l4var1z = iMulOpMap[l4var1z];
                        } else {
                            if (arg1Type->k == kindSet) {
                                l4var1z = setOpMap[l4var1z];
                            } else
                                goto L14650;
                        }
                    }
                } else {
                    if (areTypesCompatible(l4var2z)) {
                        arg1Type = RealType;
                    } else
                        goto L14650;
                }
            } break;
            case AMPERS: {
                if (arg1Type != BooleanType)
                    goto L14650;
            } break;
            case IDIVOP: {
                if (typ120z != IntegerType)
                    goto L14650;
                arg1Type = IntegerType;
            } break;
            case IMODOP: {
                if (typ120z == IntegerType) {
                    arg1Type = IntegerType;
                } else {
                    if (arg1Type->k == kindSet)
                        l4var1z = SETXOR;
                    else
                        goto L14650;
                }
            } break;
            default: break;
            }
            l4var3z = new Expr;
            l4var3z->op = l4var1z;
            l4var3z->expr1 = l4var2z;
            l4var3z->expr2 = curExpr;
            curExpr = l4var3z;
            l4var3z->typ = arg1Type;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
leaq 0xb8(%rsp), %rdi
callq 0x17694
cmpl $0x9, 0x55684(%rip)     # 0x6482c
jne 0xf370
leaq 0x118(%rsp), %rbx
leaq 0x58(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xd475(%rip), %r13      # 0x1c63c
movl 0x5565b(%rip), %ebp     # 0x64828
movq %rbx, %rdi
callq 0x6e26
movq 0x558d4(%rip), %r12     # 0x64ab0
movq %r12, 0x8(%rsp)
movq %r14, %rdi
callq 0x17694
movq 0x558c0(%rip), %rax     # 0x64ab0
movq (%rax), %rsi
movq %rsi, 0x5581e(%rip)     # 0x64a18
movq (%r12), %rdx
movq %rdx, 0x5581b(%rip)     # 0x64a20
movq %r15, %rdi
callq 0x83b2
addq $-0x8, 0xae1a3(%rip)    # 0xbd3b8
movb 0x10(%rsp), %cl
cmpl $0x2, %ebp
setl %al
orb %cl, %al
je 0xf300
cmpl $0x4, %ebp
ja 0xf331
movl %ebp, %eax
movslq (%r13,%rax,4), %rdx
addq %r13, %rdx
jmpq *%rdx
testb %cl, %cl
je 0xf2e2
movq 0x557cd(%rip), %rdx     # 0x64a18
movq 0x557ae(%rip), %rcx     # 0x64a00
cmpq %rcx, %rdx
je 0xf331
movq 0x55796(%rip), %rsi     # 0x649f8
cmpq %rsi, 0x5575f(%rip)     # 0x649c8
je 0xf31a
cmpl $0x4, 0x10(%rdx)
jne 0xf300
leaq 0x59800(%rip), %rcx     # 0x68a80
jmp 0xf32e
movq 0x5576c(%rip), %rax     # 0x649f8
cmpq %rax, 0x55735(%rip)     # 0x649c8
je 0xf30c
movq 0x5577c(%rip), %rax     # 0x64a18
movl $0x12, %ebp
cmpl $0x4, 0x10(%rax)
je 0xf331
jmp 0xf300
movq 0x55764(%rip), %rax     # 0x64a18
cmpq 0x5572d(%rip), %rax     # 0x649e8
jne 0xf300
movl $0x2, %ebp
jmp 0xf331
movq 0x5572d(%rip), %rax     # 0x649f8
cmpq %rax, 0x556f6(%rip)     # 0x649c8
jne 0xf300
movq %rax, 0x5573d(%rip)     # 0x64a18
movl $0x3, %ebp
jmp 0xf331
leaq 0x8(%rsp), %rdi
callq 0xeda3
testb %al, %al
je 0xf300
movq 0x55709(%rip), %rax     # 0x64a00
movq %rax, 0x5571a(%rip)     # 0x64a18
jmp 0xf331
movl $0x15, %edi
callq 0x589e
jmp 0xf363
movq %rax, 0x55705(%rip)     # 0x64a18
movl $0x4, %ebp
jmp 0xf331
testl %ebp, %ebp
cmoveq %rsi, %rcx
movq %rcx, 0x556f1(%rip)     # 0x64a18
leaq 0x59692(%rip), %rcx     # 0x689c0
movl (%rcx,%rax,4), %ebp
movl $0x20, %edi
callq 0x3d03
movl %ebp, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x55762(%rip), %rcx     # 0x64ab0
movq %rcx, 0x18(%rax)
movq %rax, 0x55757(%rip)     # 0x64ab0
movq 0x556b8(%rip), %rcx     # 0x64a18
movq %rcx, (%rax)
cmpl $0x9, 0x554c2(%rip)     # 0x6482c
je 0xf1c7
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq