// File: /workspace/github_cpp_makefile_star2_O3/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 $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
leaq 0x2cf24(%rip), %rax     # 0x61c70
movq %rax, (%rdi)
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x15ea9(%rip), %rsi     # 0x4ac0b
leaq 0x15ea3(%rip), %rdx     # 0x4ac0c
leaq 0xb8(%rsp), %rdi
callq 0x116f8
movl $0x20, %edi
callq 0x92d0
movabsq $0x100000001, %r12      # imm = 0x100000001
movq %r12, 0x8(%rax)
leaq 0x2bebb(%rip), %rcx     # 0x60c50
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2befa(%rip), %rdx     # 0x60ca0
movq %rdx, 0x10(%rax)
movabsq $0x100000000, %rdx      # imm = 0x100000000
movq %rdx, 0x18(%rax)
movq %rcx, 0xa8(%rsp)
movq %rax, 0xb0(%rsp)
leaq 0xa0(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x15e2c(%rip), %rcx     # 0x4ac0b
leaq 0x98(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0x36c9a
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x15f33(%rip), %rsi     # 0x4ad3a
leaq 0x15f2d(%rip), %rdx     # 0x4ad3b
leaq 0xd8(%rsp), %rdi
callq 0x116f8
movl $0x0, 0xf8(%rsp)
leaq 0x50(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x15f00(%rip), %rcx     # 0x4ad3a
leaq 0x48(%rsp), %rsi
movq %rsp, %rdx
callq 0x3bc1a
movl $0x20, %edi
callq 0x92d0
movq %r12, 0x8(%rax)
leaq 0x2ba7c(%rip), %r13     # 0x608d8
movq %r13, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2babb(%rip), %rbp     # 0x60928
movq %rbp, 0x10(%rax)
movl $0x0, 0x18(%rax)
leaq 0x130(%rsp), %r8
movq %rax, 0x8(%r8)
movq %rcx, (%r8)
leaq 0x80(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x78(%rsp), %rsi
movq %rsp, %rdx
leaq 0x48(%rsp), %rcx
callq 0x3bb2c
leaq 0x90(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x88(%rsp), %rsi
movq %rsp, %rdx
leaq 0x78(%rsp), %rcx
callq 0x3ba6c
movl $0x20, %edi
callq 0x92d0
movq %r12, 0x8(%rax)
movq %r13, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, 0x10(%rax)
movl $0x1, 0x18(%rax)
movq %rax, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r12, 0x8(%rax)
movq %r13, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, 0x10(%rax)
movl $0x2, 0x18(%rax)
leaq 0x120(%rsp), %r8
movq %rax, 0x8(%r8)
movq %rcx, (%r8)
leaq 0x70(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x68(%rsp), %rsi
movq %rsp, %rdx
leaq 0x58(%rsp), %rcx
callq 0x3b13e
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x88(%rsp), %rcx
leaq 0x68(%rsp), %r8
callq 0x3b97e
movaps 0x20(%rsp), %xmm0
leaq 0xd8(%rsp), %r8
movups %xmm0, 0x28(%r8)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x30(%rsp), %rsi
movq %rsp, %rdx
leaq 0x98(%rsp), %rcx
callq 0x3b8a8
movaps 0x30(%rsp), %xmm0
leaq 0x110(%rsp), %rcx
movaps %xmm0, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
leaq 0x140(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x25714
leaq 0x140(%rsp), %rdi
callq 0x4434a
movl %eax, %ebp
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x16086(%rip), %rsi     # 0x4b08a
leaq 0x160c1(%rip), %rdx     # 0x4b0cc
movq %rsp, %rdi
callq 0x116f8
movzbl %bpl, %esi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x35ab6
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x35038
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x2baf9(%rip), %rax     # 0x60b38
movq %rax, 0x140(%rsp)
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x35059
callq 0xa946
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x3506b
callq 0xa946
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3508c
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x3509e
callq 0xa946
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x350ad
callq 0xa946
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x350bf
callq 0xa946
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x350dc
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x350eb
callq 0xa946
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x350fa
callq 0xa946
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x3510c
callq 0xa946
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3511b
callq 0xa946
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3512d
callq 0xa946
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x3513f
callq 0xa946
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x35151
callq 0xa946
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x35160
callq 0xa946
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x35172
callq 0xa946
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x35184
callq 0xa946
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x351a1
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x92e0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x351d3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x351d3
jmp 0x351d0
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x257a6
jmp 0x351e5
movq %rax, %rbx
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x351f7
callq 0xa946
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3520b
callq 0xa946
jmp 0x3520b
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x24b24
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x35227
callq 0xa946
xorl %ebp, %ebp
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x35248
callq 0xa946
jmp 0x35248
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x35229
movq %rax, %rbx
movb $0x1, %bpl
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x35262
callq 0xa946
jmp 0x35262
movq %rax, %rbx
movb $0x1, %bpl
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x35279
callq 0xa946
jmp 0x35279
movq %rax, %rbx
movb $0x1, %bpl
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x3528b
callq 0xa946
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x3529d
callq 0xa946
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x352af
callq 0xa946
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x352be
callq 0xa946
testb %bpl, %bpl
je 0x3530e
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3530e
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x3530e
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x3528b
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x3529d
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x352c3
callq 0xa946
jmp 0x352c3
movq %rax, %rbx
jmp 0x352c3
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x35320
callq 0xa946
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x35332
callq 0xa946
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3534f
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rdi
callq 0x94e0
movq %rax, %rbx
jmp 0x35320
movq %rax, %rbx
jmp 0x35332
nop