// File: /workspace/github_cpp_makefile_star2_O3/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 0x124fc
leaq 0x173a8(%rip), %r12     # 0x29630
movl (%r12), %eax
leal -0x15(%rax), %ecx
cmpl $0x1, %ecx
ja 0x1247a
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 0x19d18
leaq -0xa8(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x124fc
movq %r13, %rdi
leaq -0x38(%rbp), %rsi
callq 0x163ae
testb %al, %al
je 0x12308
leaq -0xa8(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x163ae
testb %al, %al
je 0x12308
cmpl $0x3, -0x2c(%rbp)
movl -0x38(%rbp), %eax
movl -0x34(%rbp), %r13d
jne 0x123a7
imull %eax, %r13d
jmp 0x123ae
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x15bcf
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 0x12c32(%rip), %rcx     # 0x24f80
callq 0x150ec
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x12364
callq 0x32a0
leaq -0x2c(%rbp), %rdi
movq %r13, %rsi
leaq -0xa8(%rbp), %rdx
movq %rbx, %rcx
callq 0x150ec
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3160
movl $0x1, (%r15)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1246a
callq 0x32a0
jmp 0x1246a
cltd
idivl %r13d
movl %eax, %r13d
movl %r13d, %ebx
negl %ebx
cmovsl %r13d, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x12408
movl $0x4, %r15d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x123ff
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x12405
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x12408
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 0x123ca
addl $-0x3, %r15d
jmp 0x12408
addl $-0x2, %r15d
jmp 0x12408
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 0x13e46
movq -0x60(%rbp), %r13
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
callq 0x3370
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x12458
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 0x122a4
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x12492
callq 0x32a0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x124d9
jmp 0x124d9
jmp 0x124d9
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x124c5
callq 0x32a0
jmp 0x124c5
jmp 0x124d9
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x124dc
callq 0x32a0
jmp 0x124dc
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x124f4
callq 0x32a0
movq %rbx, %rdi
callq 0x3480