// File: /workspace/github_cpp_makefile_star2_O1/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 0x34e25
cmpl $0x2, %esi
je 0x34e5c
movq $-0x1, %r14
cmpl $0x1, %esi
jne 0x34e95
movq %rcx, %rdi
callq 0x2f8a4
testq %rax, %rax
je 0x34ea6
movq %rax, %r12
movl $0x10, %edi
callq 0x42e0
movq %rax, %r14
movq %r15, %rdi
callq 0x2f8a4
cqto
idivq %r12
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2f798
jmp 0x34e95
movq %rcx, %rdi
callq 0x2f910
testq %rax, %rax
je 0x34f18
movq %rax, %r12
movl $0x10, %edi
callq 0x42e0
movq %rax, %r14
movq %r15, %rdi
callq 0x2f910
xorl %edx, %edx
divq %r12
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2f7c2
movq %r14, 0x18(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2cfa2
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe329
leaq 0x1384c(%rip), %rsi     # 0x48710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe2af
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34ee2
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x33d12
leaq 0x26e69(%rip), %rsi     # 0x5bd70
leaq -0x26b54(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x34f88
movq %rbx, %rdi
callq 0x2cfa2
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe329
leaq 0x137da(%rip), %rsi     # 0x48710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe2af
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34f54
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x33d12
leaq 0x26df7(%rip), %rsi     # 0x5bd70
leaq -0x26bc6(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x34f8c
jmp 0x34f91
movq %rax, %rbx
jmp 0x34f9c
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
jmp 0x34fab
jmp 0x34fa4
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x34fbe
jmp 0x34fc3
jmp 0x34fb8
movq %rax, %rbx
movq %r14, %rdi
callq 0x42b0
movq %rbx, %rdi
callq 0x4560
nop