// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/translate_to_mdp.cpp
// Function: create_binop_case(ast::expr_t const&, ast::expr_t const&, ast::expr_kind_t, environment_t<value_info_t> const&)
mdp_with_info_t create_binop_case(
        ast::expr_t const& lhs_expr,
        ast::expr_t const& rhs_expr,
        ast::expr_kind_t op,
        var_env_t const& var_env) {
    auto lhs_ = trans_impl(lhs_expr, var_env);
    auto const& lhs = lhs_.value;
    auto rhs_ = trans_impl(rhs_expr, var_env);
    auto const& rhs = rhs_.value;

    auto result_mdp = mdp::mdp_t::merge(
            std::move(lhs_.mdp),
            std::move(rhs_.mdp));

    auto result_bound = calc_binop_bound(lhs, rhs, op);

    return mdp_with_info_t {
        result_mdp, lhs_.init, rhs_.accept,
        result_bound
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x138(%rsp), %rdi
movq %r8, %rdx
callq 0x3d82e
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3d82e
leaq 0x30(%rsp), %rdi
leaq 0x138(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x9b6c
leaq 0x1a8(%rsp), %rsi
leaq 0x108(%rsp), %rdx
movq %rsp, %rdi
movl %ebp, %ecx
callq 0x3e6a6
leaq 0x10(%rbx), %r14
movq %r14, (%rbx)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xac68
leaq 0x20(%rbx), %r13
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x405f6
leaq 0x38(%rbx), %rbp
leaq 0x68(%rsp), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x40692
leaq 0x50(%rbx), %rdi
leaq 0x80(%rsp), %r12
movq %r12, %rsi
callq 0x4072c
movl 0x1a0(%rsp), %eax
movl %eax, 0x68(%rbx)
movl 0x104(%rsp), %eax
movl %eax, 0x6c(%rbx)
leaq 0x70(%rbx), %rdi
leaq 0x80(%rbx), %rax
movq %rax, 0x70(%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xac68
movb $0x0, 0x98(%rbx)
cmpb $0x1, 0x28(%rsp)
jne 0x3f314
movq 0x20(%rsp), %rax
movq %rax, 0x90(%rbx)
movb $0x1, 0x98(%rbx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f32f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %r12, %rdi
callq 0xa808
movq %r15, %rdi
callq 0xa838
leaq 0x50(%rsp), %rdi
callq 0xa868
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f364
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f385
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0xe8(%rsp), %rdi
callq 0xa808
leaq 0xd0(%rsp), %rdi
callq 0xa838
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
callq 0xa868
movq -0x20(%r14), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x3f3d0
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1b8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f3f1
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x188(%rsp), %rdi
callq 0xa808
leaq 0x170(%rsp), %rdi
callq 0xa838
leaq 0x158(%rsp), %r14
movq %r14, %rdi
callq 0xa868
movq -0x20(%r14), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x3f43c
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %rbx, %rdi
callq 0xa7c4
jmp 0x3f493
movq %rax, %r15
movq %rbp, %rdi
callq 0xa838
jmp 0x3f46e
movq %rax, %r15
movq %r13, %rdi
callq 0xa868
jmp 0x3f47b
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x3f493
movq (%r14), %rsi
incq %rsi
callq 0x92e0
jmp 0x3f493
movq %rax, %r15
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f4b3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x3f4b3
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0xa7c4
leaq 0x98(%rsp), %rdi
callq 0x37b5c
leaq 0x138(%rsp), %rdi
callq 0x37b5c
movq %r15, %rdi
callq 0x94e0
movq %rax, %r15
jmp 0x3f4bd
movq %rax, %r15
jmp 0x3f4ca