// File: /workspace/github_cpp_makefile_star2_O1/fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pTerm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, DataType&)
static void pTerm(std::string &res, DataType &res_dtype)
{
    std::string temp_var;
    DataType temp_dtype;
    pFactor(res, res_dtype);
    while (g_sym == STAR || g_sym == SLASH) {
        OpCode op = (g_sym == STAR ? MUL : DIV);
        readSymbol();
        pFactor(temp_var, temp_dtype);
        int t1, t2;
        if (isConstValue(res, t1) && isConstValue(temp_var, t2)) {
            res = std::to_string( op == MUL ? t1 * t2 : t1 / t2 );
            res_dtype = DT_INT;
        }
        else {
            std::string new_res = genTempVar();
            genMidCode(TEMP, "int", new_res, NONE);
            genMidCode(op, res, temp_var, new_res);
            res = new_res;
            res_dtype = DT_INT;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r15
movq %rdi, %r13
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
callq 0x125c1
leaq 0x172e3(%rip), %r12     # 0x29630
movl (%r12), %eax
leal -0x15(%rax), %ecx
cmpl $0x1, %ecx
ja 0x1253f
leaq -0x78(%rbp), %r14
movq %r15, -0x68(%rbp)
movq %r13, -0x60(%rbp)
xorl %ecx, %ecx
cmpl $0x15, %eax
setne %cl
addl $0x3, %ecx
movl %ecx, -0x2c(%rbp)
callq 0x19e44
leaq -0xa8(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x125c1
movq %r13, %rdi
leaq -0x38(%rbp), %rsi
callq 0x16448
testb %al, %al
je 0x123cd
leaq -0xa8(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x16448
testb %al, %al
je 0x123cd
cmpl $0x3, -0x2c(%rbp)
movl -0x38(%rbp), %eax
movl -0x34(%rbp), %r13d
jne 0x1246c
imull %eax, %r13d
jmp 0x12473
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x15c69
movl $0x17, -0x30(%rbp)
movq %r14, -0x88(%rbp)
movb $0x74, 0x2(%r14)
movw $0x6e69, (%r14)         # imm = 0x6E69
movq $0x3, -0x80(%rbp)
movb $0x0, -0x75(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %rbx, %rdx
leaq 0x12b6d(%rip), %rcx     # 0x24f80
callq 0x151b0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x12429
callq 0x32a0
leaq -0x2c(%rbp), %rdi
movq %r13, %rsi
leaq -0xa8(%rbp), %rdx
movq %rbx, %rcx
callq 0x151b0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3160
movl $0x1, (%r15)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1252f
callq 0x32a0
jmp 0x1252f
cltd
idivl %r13d
movl %eax, %r13d
movl %r13d, %ebx
negl %ebx
cmovsl %r13d, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x124cd
movl $0x4, %r15d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x124c4
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x124ca
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x124cd
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x1248f
addl $-0x3, %r15d
jmp 0x124cd
addl $-0x2, %r15d
jmp 0x124cd
decl %r15d
movq %r12, %r14
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq -0x48(%rbp), %r12
movq %r12, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
movl $0x2d, %edx
callq 0x3350
movl %r13d, %edi
addq -0x58(%rbp), %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x13f04
movq -0x60(%rbp), %r13
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
callq 0x3370
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1251d
callq 0x32a0
movq -0x68(%rbp), %r15
movl $0x1, (%r15)
movq %r14, %r12
leaq -0x78(%rbp), %r14
movl (%r12), %eax
leal -0x15(%rax), %ecx
cmpl $0x2, %ecx
jb 0x12369
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x12557
callq 0x32a0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1259e
jmp 0x1259e
jmp 0x1259e
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x1258a
callq 0x32a0
jmp 0x1258a
jmp 0x1259e
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x125a1
callq 0x32a0
jmp 0x125a1
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x125b9
callq 0x32a0
movq %rbx, %rdi
callq 0x3480