// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/test.cpp
// Function: simple_type_let::simple_type_let()
PML_TEST(simple_type_let) {
    // let a = 12 in 42
    assert_eq(
        *simty::simple_typing(ast::let_expr_t {
            "a",
            make<ast::int_expr_t>(12),
            make<ast::int_expr_t>(42)
        }).ok(),
        simty::int_type_t{});

    // let a = 12 in a
    assert_eq(
        *simty::simple_typing(ast::let_expr_t {
            "a",
            make<ast::int_expr_t>(12),
            make<ast::var_expr_t>("a")
        }).ok(),
        simty::int_type_t{});
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
leaq 0x2d442(%rip), %rax     # 0x61bf0
movq %rax, (%rdi)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1644a(%rip), %rsi     # 0x4ac0b
leaq 0x16444(%rip), %rdx     # 0x4ac0c
movq %rsp, %rdi
callq 0x116f8
movl $0x20, %edi
callq 0x92d0
movabsq $0x100000001, %r15      # imm = 0x100000001
movq %r15, 0x8(%rax)
leaq 0x2b2f9(%rip), %r13     # 0x5fae8
movq %r13, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2b338(%rip), %rbp     # 0x5fb38
movq %rbp, 0x10(%rax)
movl $0xc, 0x18(%rax)
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r13, (%rax)
movq %rax, %rdx
addq $0x10, %rdx
movq %rbp, 0x10(%rax)
movl $0x2a, 0x18(%rax)
leaq 0xe8(%rsp), %rcx
movq %rdx, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
leaq 0x48(%rsp), %rdx
callq 0x25714
leaq 0xa8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2ba98
leaq 0xa8(%rsp), %rdi
callq 0x2bbf2
movq (%rax), %rsi
leaq 0x2ccde(%rip), %rax     # 0x61560
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0x3b2ec
leaq 0xa8(%rsp), %rdi
callq 0x19b66
leaq 0x2c292(%rip), %r14     # 0x60b38
movq %r14, 0x60(%rsp)
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x348bd
callq 0xa946
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x348cf
callq 0xa946
leaq 0x78(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x348eb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x348fd
callq 0xa946
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3490c
callq 0xa946
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x34927
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x162d2(%rip), %rsi     # 0x4ac0b
leaq 0x162cc(%rip), %rdx     # 0x4ac0c
callq 0x116f8
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r13, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %rbp, 0x10(%rax)
movl $0xc, 0x18(%rax)
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x16285(%rip), %rcx     # 0x4ac0b
leaq 0x20(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x36c9a
movaps 0x20(%rsp), %xmm0
leaq 0xd0(%rsp), %rcx
movaps %xmm0, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
leaq 0x38(%rsp), %rdx
callq 0x25714
leaq 0xa8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2ba98
leaq 0xa8(%rsp), %rdi
callq 0x2bbf2
movq (%rax), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x2cb73(%rip), %rax     # 0x61560
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0x3b2ec
leaq 0xa8(%rsp), %rdi
callq 0x19b66
movq %r14, 0x60(%rsp)
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x34a1c
callq 0xa946
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x34a2e
callq 0xa946
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x34a45
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x34a57
callq 0xa946
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x34a66
callq 0xa946
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x34a75
callq 0xa946
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x34a90
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34aa4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x19b66
jmp 0x34ab9
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x257a6
jmp 0x34ac8
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x34ada
callq 0xa946
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x34aee
callq 0xa946
jmp 0x34aee
movq %rax, %rbx
movq 0x40(%rsp), %rdi
jmp 0x34b3b
jmp 0x34b47
jmp 0x34b67
jmp 0x34afb
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x19b66
jmp 0x34b10
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x257a6
jmp 0x34b1f
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x34b36
callq 0xa946
jmp 0x34b36
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x34b4a
callq 0xa946
jmp 0x34b4a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x34b6a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x34b6a
movq %rax, %rbx
movq %rbx, %rdi
callq 0x94e0