// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/test.cpp
// Function: typecheck_test::typecheck_test()
PML_TEST(typecheck_test) {
    using namespace typechecker;
    assert_(
        typecheck(ast::let_expr_t{ "a",
            make<ast::rand_expr_t>(0, 1),
            make<ast::typed_expr_t>(
                    make<ast::var_expr_t>("a"),
                    ast::refinement_type_t{
                            "x", logic::domain_kind_t::Int,
                            make<logic::eq_formula_t>(
                                    make<logic::prob_term_t>(
                                        make<logic::eq_formula_t>(
                                            make<logic::var_term_t>("x"),
                                            make<logic::int_term_t>(0))),
                                    make<logic::div_term_t>(
                                        make<logic::int_term_t>(1),
                                        make<logic::int_term_t>(2)))})
        }),
        "can not type `let a = rand(0, 1) in a : {x:int | Prob(x=0) = 1/2}`");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %r15
andl $0x0, 0x8(%rdi)
leaq 0x328c5(%rip), %rax     # 0x5bc60
movq %rax, (%rdi)
leaq 0x12ed2(%rip), %rsi     # 0x3c277
leaq 0x128(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xeb2e
leaq 0xbc(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0xb8(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x10(%rsp), %rdi
callq 0x2bd76
leaq 0xf8(%rsp), %rbx
leaq 0x18(%rsp), %rax
movaps -0x8(%rax), %xmm0
movaps %xmm0, -0x8(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
leaq 0x12e7a(%rip), %rsi     # 0x3c277
leaq 0x98(%rsp), %rdi
callq 0x2b094
leaq 0x12f95(%rip), %rsi     # 0x3c3a6
leaq 0x148(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xeb2e
andl $0x0, 0x168(%rsp)
leaq 0x12f74(%rip), %rsi     # 0x3c3a6
leaq 0x68(%rsp), %rdi
callq 0x2faaa
leaq 0xb4(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x58(%rsp), %rdi
callq 0x1b78c
leaq 0x78(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x2f963
leaq 0x88(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2f854
leaq 0xb0(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x38(%rsp), %rdi
callq 0x1b78c
leaq 0xac(%rsp), %rsi
movl $0x2, (%rsi)
leaq 0x28(%rsp), %rdi
callq 0x1b78c
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x2ee27
leaq 0xc0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x2f70d
leaq 0xc8(%rsp), %r12
movaps -0x8(%r12), %xmm0
leaq 0x148(%rsp), %rdx
movups %xmm0, 0x28(%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r12)
leaq 0xd0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x2f5d2
leaq 0xe8(%rsp), %rbp
leaq 0xd8(%rsp), %r13
movaps -0x8(%r13), %xmm0
movaps %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r13)
leaq 0x180(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
callq 0x1cc6e
leaq 0x180(%rsp), %rdi
callq 0x35cde
movl %eax, %r14d
leaq 0x1318c(%rip), %rsi     # 0x3c6f6
leaq 0x108(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0xeb2e
movzbl %r14b, %esi
leaq 0x108(%rsp), %rdx
movq %r15, %rdi
callq 0x29bd8
leaq 0x108(%rsp), %rdi
callq 0x9130
leaq 0x180(%rsp), %rdi
callq 0x1ccb4
movq %rbp, %rdi
callq 0xa248
movq %r13, %rdi
callq 0xa248
leaq 0x148(%rsp), %rdi
callq 0xc28a
movq %r12, %rdi
callq 0xa248
leaq 0x50(%rsp), %rdi
callq 0xa248
leaq 0x30(%rsp), %rdi
callq 0xa248
leaq 0x40(%rsp), %rdi
callq 0xa248
leaq 0x90(%rsp), %rdi
callq 0xa248
leaq 0x80(%rsp), %rdi
callq 0xa248
leaq 0x60(%rsp), %rdi
callq 0xa248
leaq 0x70(%rsp), %rdi
callq 0xa248
leaq 0xa0(%rsp), %rdi
callq 0xa248
movq %rbx, %rdi
callq 0xa248
leaq 0x18(%rsp), %rdi
callq 0xa248
leaq 0x128(%rsp), %rdi
callq 0x9130
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x108(%rsp), %rdi
callq 0x9130
jmp 0x29670
jmp 0x2966d
movq %rax, %r15
leaq 0x180(%rsp), %rdi
callq 0x1ccb4
jmp 0x29682
movq %rax, %r15
movq %rbp, %rdi
callq 0xa248
movq %r13, %rdi
callq 0xa248
jmp 0x29697
movq %rax, %r15
leaq 0x148(%rsp), %rdi
callq 0xc28a
movq %r12, %rdi
callq 0xa248
xorl %ebp, %ebp
leaq 0x50(%rsp), %rdi
callq 0xa248
leaq 0x30(%rsp), %rdi
callq 0xa248
leaq 0x40(%rsp), %rdi
callq 0xa248
leaq 0x90(%rsp), %rdi
callq 0xa248
leaq 0x80(%rsp), %rdi
callq 0xa248
leaq 0x60(%rsp), %rdi
callq 0xa248
leaq 0x70(%rsp), %rdi
callq 0xa248
testb %bpl, %bpl
je 0x2970c
leaq 0x148(%rsp), %rdi
callq 0x9130
leaq 0xa0(%rsp), %rdi
callq 0xa248
movq %rbx, %rdi
callq 0xa248
leaq 0x18(%rsp), %rdi
callq 0xa248
leaq 0x128(%rsp), %rdi
callq 0x9130
movq %r15, %rdi
callq 0x94d0
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296ae
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296b8
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296c2
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296cc
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296d9
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296e6
movq %rax, %r15
movb $0x1, %bpl
jmp 0x296f0
movq %rax, %r15
jmp 0x296ff
movq %rax, %r15
jmp 0x2970c
movq %rax, %r15
jmp 0x29719
movq %rax, %r15
jmp 0x2972b