// File: 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
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0xc8(%rbp)
subq $0x4, %rax
ja 0x75f68
movq -0xc8(%rbp), %rax
leaq 0x1ba11(%rip), %rcx     # 0x91698
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rdi
callq 0x69310
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x75d7d
movq -0xd0(%rbp), %rdi
callq 0x63810
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x15db0
movq -0xd8(%rbp), %rdx
leaq 0x1bad7(%rip), %rsi     # 0x917ac
leaq -0x48(%rbp), %rdi
callq 0x15d60
jmp 0x75ce0
leaq -0x68(%rbp), %rdi
callq 0x4688
movl $0x28, %edi
callq 0x41c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
movl $0xe, %esi
leaq -0x48(%rbp), %rdx
callq 0x73a90
jmp 0x75d10
movq -0xe0(%rbp), %rdi
leaq 0x50032(%rip), %rsi     # 0xc5d50
leaq -0x5fe95(%rip), %rdx    # 0x15e90
callq 0x45b0
jmp 0x75f8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4688
jmp 0x75f82
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x4280
jmp 0x75d6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4688
jmp 0x75f82
movl $0x10, %edi
callq 0x4310
movq %rax, -0xf0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x69310
movq %rax, -0xe8(%rbp)
jmp 0x75da0
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rax
movq -0x28(%rbp), %rcx
cqto
idivq %rcx
movq %rdx, %rsi
callq 0x69180
jmp 0x75dc1
movq -0xd0(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x75f79
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x42d0
jmp 0x75f82
movq -0x20(%rbp), %rdi
callq 0x693d0
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x75ef4
movq -0xd0(%rbp), %rdi
callq 0x63810
movq %rax, %rsi
leaq -0xc0(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x15db0
movq -0xf8(%rbp), %rdx
leaq 0x1b96f(%rip), %rsi     # 0x917ac
leaq -0xa0(%rbp), %rdi
callq 0x15d60
jmp 0x75e4b
leaq -0xc0(%rbp), %rdi
callq 0x4688
movl $0x28, %edi
callq 0x41c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x100(%rbp)
movl $0xe, %esi
leaq -0xa0(%rbp), %rdx
callq 0x73a90
jmp 0x75e81
movq -0x100(%rbp), %rdi
leaq 0x4fec1(%rip), %rsi     # 0xc5d50
leaq -0x60006(%rip), %rdx    # 0x15e90
callq 0x45b0
jmp 0x75f8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x4688
jmp 0x75f82
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x4280
jmp 0x75ee3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4688
jmp 0x75f82
movl $0x10, %edi
callq 0x4310
movq %rax, -0x110(%rbp)
movq -0x18(%rbp), %rdi
callq 0x693d0
movq %rax, -0x108(%rbp)
jmp 0x75f17
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rax
movq -0x80(%rbp), %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x691c0
jmp 0x75f38
movq -0xd0(%rbp), %rax
movq -0x110(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x75f79
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x42d0
jmp 0x75f82
jmp 0x75f68
jmp 0x75f6a
movq -0xd0(%rbp), %rax
movq $-0x1, 0x18(%rax)
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x45e0
nopl (%rax,%rax)