// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/test.cpp
// Function: if_test::if_test()
PML_CUSTOM_TEST(if_test, lang_feature_test) {
    using namespace ast;
    parse_test("if true then 42 else 1", "If(true, 42, 1)");
    eval_test(
            make<if_expr_t>(
                make<bool_expr_t>(true),
                make<int_expr_t>(42),
                make<int_expr_t>(1)),
            make<int_expr_t>(42));

    parse_test("let x = false in if x then 31 else 21", "Let(x, false, If(x, 31, 21))");
    eval_test(
            make<let_expr_t>("x",
                make<bool_expr_t>(false),
                make<if_expr_t>(
                    make<var_expr_t>("x"),
                    make<int_expr_t>(31),
                    make<int_expr_t>(21))),
            make<int_expr_t>(21));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
leaq 0x31522(%rip), %rax     # 0x61708
movq %rax, (%rdi)
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1aad7(%rip), %rsi     # 0x4acd0
leaq 0x1aae6(%rip), %rdx     # 0x4ace6
movq %rsp, %rdi
callq 0x116f8
leaq 0x30(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1aacf(%rip), %rsi     # 0x4ace7
leaq 0x1aad7(%rip), %rdx     # 0x4acf6
leaq 0x20(%rsp), %rdi
callq 0x116f8
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x3543e
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30250
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x92e0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x30266
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
movl $0x20, %edi
callq 0x92d0
movabsq $0x100000001, %r15      # imm = 0x100000001
movq %r15, 0x8(%rax)
leaq 0x2f783(%rip), %rcx     # 0x5fa08
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2f7ea(%rip), %rdx     # 0x5fa80
movq %rdx, 0x10(%rax)
movb $0x1, 0x18(%rax)
movq %rax, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
leaq 0x2f82b(%rip), %r12     # 0x5fae8
movq %r12, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2f86a(%rip), %r13     # 0x5fb38
movq %r13, 0x10(%rax)
movl $0x2a, 0x18(%rax)
movq %rax, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r12, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, 0x10(%rax)
movl $0x1, 0x18(%rax)
leaq 0x60(%rsp), %r9
movq %rax, 0x8(%r9)
movq %rcx, (%r9)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x50(%rsp), %r8
callq 0x37436
movaps (%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r12, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, 0x10(%rax)
movl $0x2a, 0x18(%rax)
leaq 0x40(%rsp), %rdx
movq %rcx, (%rdx)
movq %rax, 0x8(%rdx)
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x354b8
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x30397
callq 0xa946
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x303a9
callq 0xa946
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x303b8
callq 0xa946
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x303c7
callq 0xa946
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x303d6
callq 0xa946
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x303e5
callq 0xa946
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x1a905(%rip), %rsi     # 0x4acf7
leaq 0x1a923(%rip), %rdx     # 0x4ad1c
callq 0x116f8
leaq 0x20(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x1a910(%rip), %rsi     # 0x4ad1d
leaq 0x1a925(%rip), %rdx     # 0x4ad39
callq 0x116f8
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x3543e
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30440
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x92e0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x30456
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
leaq 0x2f59d(%rip), %rcx     # 0x5fa08
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x2f604(%rip), %rdx     # 0x5fa80
movq %rdx, 0x10(%rax)
movb $0x0, 0x18(%rax)
movq %rax, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
leaq 0x68(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x1a898(%rip), %rcx     # 0x4ad3a
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x36c9a
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r12, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, 0x10(%rax)
movl $0x1f, 0x18(%rax)
movq %rax, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r12, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, 0x10(%rax)
movl $0x15, 0x18(%rax)
leaq 0xa8(%rsp), %r9
movq %rax, 0x8(%r9)
movq %rcx, (%r9)
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0x40(%rsp), %r8
callq 0x376c2
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x1a7f0(%rip), %rcx     # 0x4ad3a
movq %rsp, %rsi
leaq 0x70(%rsp), %rdx
leaq 0x20(%rsp), %r8
leaq 0x50(%rsp), %r9
callq 0x37544
movaps (%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movl $0x20, %edi
callq 0x92d0
movq %r15, 0x8(%rax)
movq %r12, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r13, 0x10(%rax)
movl $0x15, 0x18(%rax)
leaq 0x70(%rsp), %rdx
movq %rcx, (%rdx)
movq %rax, 0x8(%rdx)
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x354b8
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x305c2
callq 0xa946
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x305d4
callq 0xa946
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x305e3
callq 0xa946
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x305f2
callq 0xa946
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x30604
callq 0xa946
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x30613
callq 0xa946
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x30622
callq 0xa946
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x30631
callq 0xa946
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x3065a
callq 0xa946
jmp 0x3065a
movq %rax, %rbx
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x3066c
callq 0xa946
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x30680
callq 0xa946
jmp 0x30680
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x30694
callq 0xa946
jmp 0x30694
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x306ab
callq 0xa946
jmp 0x306ab
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x306bf
callq 0xa946
jmp 0x306bf
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0x30732
jmp 0x3073e
jmp 0x3078b
jmp 0x30754
jmp 0x30770
jmp 0x3078b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x306f3
callq 0xa946
jmp 0x306f3
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x30705
callq 0xa946
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x30719
callq 0xa946
jmp 0x30719
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x3072d
callq 0xa946
jmp 0x3072d
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x30741
callq 0xa946
jmp 0x30741
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3078e
callq 0xa946
jmp 0x3078e
jmp 0x3078b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30773
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x30773
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3078e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x3078e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x94e0