// File: /workspace/github_cpp_makefile_star2_O3/acliusBackHome[P]kamaya/dist/ParseExpressionConstCalculate.cpp
// Function: ParseExpression::calculate_const_mod(ConstValueType, ParseConstant const&, ParseConstant const&)
void ParseExpression::
calculate_const_mod(ConstValueType cal_type,
                    const ParseConstant &const1, const ParseConstant &const2) {
    switch (cal_type) {
        case C_BOOL:
        case C_SIGNED: {
            auto divisor = const2.get_signed();
            if (divisor == 0) {
                string info = "ParseExpression::calculate_const() expr_id=" + to_string(get_id());
                throw ParseException(EX_EXPRESSION_DIVIDE_ZERO, info);
            }
            const_value = (size_t)
                    new ParseConstant(ParseConstant(const1.get_signed() % divisor));
            return;
        }
        case C_UNSIGNED: {
            auto divisor = const2.get_unsigned();
            if (divisor == 0) {
                string info = "ParseExpression::calculate_const() expr_id=" + to_string(get_id());
                throw ParseException(EX_EXPRESSION_DIVIDE_ZERO, info);
            }
            const_value = (size_t)
                    new ParseConstant(ParseConstant(const1.get_unsigned() % divisor));
            return;
        }
        case C_FLOAT:
        case C_STRING:
        default:
            break;
    }
    const_value = (size_t) -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rdi, %rbx
cmpl $0x4, %esi
je 0x34501
cmpl $0x2, %esi
je 0x34538
movq $-0x1, %r14
cmpl $0x1, %esi
jne 0x34571
movq %rcx, %rdi
callq 0x2efe0
testq %rax, %rax
je 0x34582
movq %rax, %r12
movl $0x10, %edi
callq 0x42e0
movq %rax, %r14
movq %r15, %rdi
callq 0x2efe0
cqto
idivq %r12
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2eed4
jmp 0x34571
movq %rcx, %rdi
callq 0x2f04c
testq %rax, %rax
je 0x345f4
movq %rax, %r12
movl $0x10, %edi
callq 0x42e0
movq %rax, %r14
movq %r15, %rdi
callq 0x2f04c
xorl %edx, %edx
divq %r12
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2eefe
movq %r14, 0x18(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2c6c6
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe50f
leaq 0x13170(%rip), %rsi     # 0x47710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe495
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x345be
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x333ee
leaq 0x2678d(%rip), %rsi     # 0x5ad70
leaq -0x2604a(%rip), %rdx    # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x34664
movq %rbx, %rdi
callq 0x2c6c6
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe50f
leaq 0x130fe(%rip), %rsi     # 0x47710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe495
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34630
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x333ee
leaq 0x2671b(%rip), %rsi     # 0x5ad70
leaq -0x260bc(%rip), %rdx    # 0xe5a0
movq %r14, %rdi
callq 0x4540
jmp 0x34668
jmp 0x3466d
movq %rax, %rbx
jmp 0x34678
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
jmp 0x34687
jmp 0x34680
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3469a
jmp 0x3469f
jmp 0x34694
movq %rax, %rbx
movq %r14, %rdi
callq 0x42b0
movq %rbx, %rdi
callq 0x4560
nop