// File: /workspace/github_cpp_makefile_star2_O1/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 $0xe8, %rsp
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
leaq 0x2dea8(%rip), %rax     # 0x62bf0
movq %rax, (%rdi)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x15eb0(%rip), %rsi     # 0x4ac0b
leaq 0x15eaa(%rip), %rdx     # 0x4ac0c
movq %rsp, %rdi
callq 0x11866
movl $0x20, %edi
callq 0x92d0
movabsq $0x100000001, %r15      # imm = 0x100000001
movq %r15, 0x8(%rax)
leaq 0x2bd37(%rip), %r13     # 0x60ac0
movq %r13, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2bd76(%rip), %rbp     # 0x60b10
movq %rbp, 0x10(%rax)
movl $0xc, 0x18(%rax)
movq %rcx, 0x40(%rsp)
movq %rax, 0x48(%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 0xd8(%rsp), %rcx
movq %rdx, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0x58(%rsp), %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x25862
leaq 0xa0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x2bc40
leaq 0xa0(%rsp), %rdi
callq 0x2bd94
movq (%rax), %rsi
leaq 0x2d71c(%rip), %rax     # 0x62538
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0x3bb0a
leaq 0xa0(%rsp), %rdi
callq 0x19d96
leaq 0x2ccd0(%rip), %r14     # 0x61b10
movq %r14, 0x58(%rsp)
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x34e57
callq 0xaa12
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x34e69
callq 0xaa12
leaq 0x70(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x34e85
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x34e97
callq 0xaa12
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x34ea6
callq 0xaa12
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x34ec1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x15d38(%rip), %rsi     # 0x4ac0b
leaq 0x15d32(%rip), %rdx     # 0x4ac0c
callq 0x11866
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, 0x30(%rsp)
movq %rax, 0x38(%rsp)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x15ceb(%rip), %rcx     # 0x4ac0b
leaq 0x20(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x37386
movups 0x20(%rsp), %xmm0
leaq 0xc8(%rsp), %rcx
movups %xmm0, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
movq %rsp, %rsi
leaq 0x30(%rsp), %rdx
callq 0x25862
leaq 0xa0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x2bc40
leaq 0xa0(%rsp), %rdi
callq 0x2bd94
movq (%rax), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x2d5b1(%rip), %rax     # 0x62538
movq %rax, (%rdx)
movq %rbx, %rdi
callq 0x3bb0a
leaq 0xa0(%rsp), %rdi
callq 0x19d96
movq %r14, 0x58(%rsp)
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x34fb6
callq 0xaa12
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x34fc8
callq 0xaa12
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x34fdf
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x34ff1
callq 0xaa12
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x35000
callq 0xaa12
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3500f
callq 0xaa12
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3502a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3503e
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x19d96
jmp 0x35053
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x258f4
jmp 0x35062
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x35074
callq 0xaa12
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x35088
callq 0xaa12
jmp 0x35088
movq %rax, %rbx
movq 0x38(%rsp), %rdi
jmp 0x350d5
jmp 0x350e1
jmp 0x35101
jmp 0x35095
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x19d96
jmp 0x350aa
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x258f4
jmp 0x350b9
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x350d0
callq 0xaa12
jmp 0x350d0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x350e4
callq 0xaa12
jmp 0x350e4
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x35104
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x35104
movq %rax, %rbx
movq %rbx, %rdi
callq 0x94e0