// File: /workspace/github_cpp_makefile_star2_O1/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 0x34c3d
movq %rdx, %r15
leaq 0x13ab9(%rip), %rax     # 0x4862c
movslq (%rax,%rsi,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movq %rcx, %rdi
callq 0x2f8a4
testq %rax, %rax
je 0x34c55
movq %rax, %r12
movl $0x10, %edi
callq 0x42e0
movq %rax, %r14
movq %r15, %rdi
callq 0x2f8a4
cqto
idivq %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x2f798
jmp 0x34c44
movq %rcx, %rdi
callq 0x2f910
testq %rax, %rax
je 0x34cca
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 %rax, %rsi
callq 0x2f7c2
jmp 0x34c44
movq %rcx, %rdi
callq 0x2f996
fldz
fld %st(1)
fstpt -0x6c(%rbp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x34c12
jnp 0x34d3c
movl $0x10, %edi
callq 0x42e0
movq %rax, %r14
movq %r15, %rdi
callq 0x2f996
fldt -0x6c(%rbp)
fdivrp %st, %st(1)
fstpt (%rsp)
movq %r14, %rdi
callq 0x2f814
fldz
fstp %st(0)
jmp 0x34c44
movq $-0x1, %r14
movq %r14, 0x18(%rbx)
addq $0x60, %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 0x13a9d(%rip), %rsi     # 0x48710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe2af
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34c91
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x33d12
leaq 0x270ba(%rip), %rsi     # 0x5bd70
leaq -0x26903(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x34dac
movq %rbx, %rdi
callq 0x2cfa2
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe329
leaq 0x13a28(%rip), %rsi     # 0x48710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe2af
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34d06
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x33d12
leaq 0x27045(%rip), %rsi     # 0x5bd70
leaq -0x26978(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x34dac
movq %rbx, %rdi
callq 0x2cfa2
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe329
leaq 0x139b6(%rip), %rsi     # 0x48710
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0xe2af
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34d78
callq 0x42b0
movl $0x28, %edi
callq 0x4190
movq %rax, %r14
leaq -0x60(%rbp), %rdx
movq %rax, %rdi
movl $0xe, %esi
callq 0x33d12
leaq 0x26fd3(%rip), %rsi     # 0x5bd70
leaq -0x269ea(%rip), %rdx    # 0xe3ba
movq %r14, %rdi
callq 0x4540
jmp 0x34db4
jmp 0x34db9
jmp 0x34db4
jmp 0x34db9
movq %rax, %rbx
jmp 0x34dc4
movq %rax, %rbx
movq %r14, %rdi
callq 0x4250
leaq -0x50(%rbp), %rax
jmp 0x34dd5
jmp 0x34dce
jmp 0x34dce
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x34dec
jmp 0x34df1
fstp %st(0)
jmp 0x34de6
jmp 0x34de6
movq %rax, %rbx
movq %r14, %rdi
callq 0x42b0
movq %rbx, %rdi
callq 0x4560
nop