// File: /workspace/github_cpp_makefile_star2_O2/acliusBackHome[P]kamaya/dist/ParseExpressionConstCalculate.cpp
// Function: ParseExpression::calculate_const_div(ConstValueType, ParseConstant const&, ParseConstant const&)
void ParseExpression::
calculate_const_div(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: {
            auto divisor = const2.get_float();
            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_float() / divisor));
            return;
        }
        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 $0x60, %rsp
movq %rdi, %rbx
decl %esi
cmpl $0x3, %esi
ja 0x2c20d
movq %rdx, %r15
leaq 0x1047b(%rip), %rax     # 0x3c5c4
movslq (%rax,%rsi,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movq %rcx, %rdi
callq 0x27b16
testq %rax, %rax
je 0x2c222
movq %rax, %r12
pushq $0x10
popq %rdi
callq 0x42a0
movq %rax, %r14
movq %r15, %rdi
callq 0x27b16
cqto
idivq %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x27a24
jmp 0x2c211
movq %rcx, %rdi
callq 0x27b82
testq %rax, %rax
je 0x2c28a
movq %rax, %r12
pushq $0x10
popq %rdi
callq 0x42a0
movq %rax, %r14
movq %r15, %rdi
callq 0x27b82
xorl %edx, %edx
divq %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x27a4c
jmp 0x2c211
movq %rcx, %rdi
callq 0x27c08
fldz
fld %st(1)
fstpt -0x6c(%rbp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x2c1e4
jnp 0x2c2ef
pushq $0x10
popq %rdi
callq 0x42a0
movq %rax, %r14
movq %r15, %rdi
callq 0x27c08
fldt -0x6c(%rbp)
fdivrp %st, %st(1)
fstpt (%rsp)
movq %r14, %rdi
callq 0x27a9a
fldz
fstp %st(0)
jmp 0x2c211
pushq $-0x1
popq %r14
movq %r14, 0x18(%rbx)
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x25a2e
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc865
leaq 0x10468(%rip), %rsi     # 0x3c6a8
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xc837
leaq -0x40(%rbp), %rdi
callq 0x4598
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0xe
popq %rsi
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x26afa(%rip), %rsi     # 0x52d70
leaq -0x1f9d5(%rip), %rdx    # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x2c352
movq %rbx, %rdi
callq 0x25a2e
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc865
leaq 0x10400(%rip), %rsi     # 0x3c6a8
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xc837
leaq -0x40(%rbp), %rdi
callq 0x4598
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0xe
popq %rsi
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x26a92(%rip), %rsi     # 0x52d70
leaq -0x1fa3d(%rip), %rdx    # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x2c352
movq %rbx, %rdi
callq 0x25a2e
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc865
leaq 0x1039b(%rip), %rsi     # 0x3c6a8
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xc837
leaq -0x40(%rbp), %rdi
callq 0x4598
pushq $0x28
popq %rdi
callq 0x4180
movq %rax, %r14
pushq $0xe
popq %rsi
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
callq 0x2b53c
leaq 0x26a2d(%rip), %rsi     # 0x52d70
leaq -0x1faa2(%rip), %rdx    # 0xc8a8
movq %r14, %rdi
callq 0x44e0
jmp 0x2c35a
jmp 0x2c35f
jmp 0x2c35a
jmp 0x2c35f
movq %rax, %rbx
jmp 0x2c36a
movq %rax, %rbx
movq %r14, %rdi
callq 0x4220
leaq -0x60(%rbp), %rdi
jmp 0x2c37b
jmp 0x2c374
jmp 0x2c374
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x4598
jmp 0x2c393
fstp %st(0)
jmp 0x2c388
jmp 0x2c388
movq %rax, %rbx
movq %r14, %rdi
callq 0x4270
movq %rbx, %rdi
callq 0x4500
nop