// File: pfnet-research[P]pml/src/test.cpp
// Function: formula_test::formula_test()
PML_CUSTOM_TEST(formula_test, lang_feature_test) {
    using namespace ast;
    parse_test("1+2 == 4", "Eq(Add(1, 2), 4)");
    parse_test("1+2 != 4", "Neq(Add(1, 2), 4)");
    parse_test("1+2 <= 4", "Leq(Add(1, 2), 4)");
    parse_test("1+2 >= 4", "Geq(Add(1, 2), 4)");
    eval_test(
            make<eq_expr_t>(
                make<add_expr_t>(
                    make<int_expr_t>(1),
                    make<int_expr_t>(2)),
                make<int_expr_t>(4)),
            make<bool_expr_t>(false));
    eval_test(
            make<neq_expr_t>(
                make<add_expr_t>(
                    make<int_expr_t>(1),
                    make<int_expr_t>(2)),
                make<int_expr_t>(4)),
            make<bool_expr_t>(true));
    eval_test(
            make<leq_expr_t>(
                make<add_expr_t>(
                    make<int_expr_t>(1),
                    make<int_expr_t>(2)),
                make<int_expr_t>(4)),
            make<bool_expr_t>(true));
    eval_test(
            make<geq_expr_t>(
                make<add_expr_t>(
                    make<int_expr_t>(1),
                    make<int_expr_t>(2)),
                make<int_expr_t>(4)),
            make<bool_expr_t>(false));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x71b80
movq -0x3e8(%rbp), %rax
leaq 0x7ccbb(%rip), %rcx     # 0xe65f8
movq %rcx, (%rax)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0xa660
movq -0x3e0(%rbp), %rdx
leaq 0x36064(%rip), %rsi     # 0x9f9c2
leaq -0x28(%rbp), %rdi
callq 0x1dd10
jmp 0x69969
leaq -0x61(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0xa660
movq -0x3f0(%rbp), %rdx
leaq 0x36044(%rip), %rsi     # 0x9f9cb
leaq -0x60(%rbp), %rdi
callq 0x1dd10
jmp 0x69992
movq -0x3e8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x71bc0
jmp 0x699a8
leaq -0x60(%rbp), %rdi
callq 0xa240
leaq -0x61(%rbp), %rdi
callq 0xa420
leaq -0x28(%rbp), %rdi
callq 0xa240
leaq -0x29(%rbp), %rdi
callq 0xa420
leaq -0x89(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0xa660
movq -0x3f8(%rbp), %rdx
leaq 0x35fef(%rip), %rsi     # 0x9f9dc
leaq -0x88(%rbp), %rdi
callq 0x1dd10
jmp 0x699fb
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0xa660
movq -0x400(%rbp), %rdx
leaq 0x35fc9(%rip), %rsi     # 0x9f9e5
leaq -0xb0(%rbp), %rdi
callq 0x1dd10
jmp 0x69a2a
movq -0x3e8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x71bc0
jmp 0x69a46
leaq -0xb0(%rbp), %rdi
callq 0xa240
leaq -0xb1(%rbp), %rdi
callq 0xa420
leaq -0x88(%rbp), %rdi
callq 0xa240
leaq -0x89(%rbp), %rdi
callq 0xa420
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0xa660
movq -0x408(%rbp), %rdx
leaq 0x35f60(%rip), %rsi     # 0x9f9f7
leaq -0xd8(%rbp), %rdi
callq 0x1dd10
jmp 0x69aa5
leaq -0x101(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0xa660
movq -0x410(%rbp), %rdx
leaq 0x35f3a(%rip), %rsi     # 0x9fa00
leaq -0x100(%rbp), %rdi
callq 0x1dd10
jmp 0x69ad4
movq -0x3e8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x71bc0
jmp 0x69af0
leaq -0x100(%rbp), %rdi
callq 0xa240
leaq -0x101(%rbp), %rdi
callq 0xa420
leaq -0xd8(%rbp), %rdi
callq 0xa240
leaq -0xd9(%rbp), %rdi
callq 0xa420
leaq -0x129(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0xa660
movq -0x418(%rbp), %rdx
leaq 0x35ed1(%rip), %rsi     # 0x9fa12
leaq -0x128(%rbp), %rdi
callq 0x1dd10
jmp 0x69b4f
leaq -0x151(%rbp), %rdi
movq %rdi, -0x420(%rbp)
callq 0xa660
movq -0x420(%rbp), %rdx
leaq 0x35eab(%rip), %rsi     # 0x9fa1b
leaq -0x150(%rbp), %rdi
callq 0x1dd10
jmp 0x69b7e
movq -0x3e8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x71bc0
jmp 0x69b9a
leaq -0x150(%rbp), %rdi
callq 0xa240
leaq -0x151(%rbp), %rdi
callq 0xa420
leaq -0x128(%rbp), %rdi
callq 0xa240
leaq -0x129(%rbp), %rdi
callq 0xa420
movl $0x1, -0x19c(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x19c(%rbp), %rsi
callq 0x67db0
jmp 0x69be9
movl $0x2, -0x1b4(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x1b4(%rbp), %rsi
callq 0x67db0
jmp 0x69c08
leaq -0x188(%rbp), %rdi
leaq -0x198(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
callq 0x67f90
jmp 0x69c24
movl $0x4, -0x1cc(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x1cc(%rbp), %rsi
callq 0x67db0
jmp 0x69c43
leaq -0x178(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
callq 0x67f50
jmp 0x69c5f
leaq -0x168(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x74090
movb $0x0, -0x1f1(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x1f1(%rbp), %rsi
callq 0x67fd0
jmp 0x69c8e
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x428(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0x12f10
movq -0x3e8(%rbp), %rdi
movq -0x428(%rbp), %rdx
leaq -0x168(%rbp), %rsi
callq 0x71cb0
jmp 0x69cc4
leaq -0x1e0(%rbp), %rdi
callq 0x13080
leaq -0x1f0(%rbp), %rdi
callq 0x12f40
leaq -0x168(%rbp), %rdi
callq 0x13080
leaq -0x178(%rbp), %rdi
callq 0x421e0
leaq -0x1c8(%rbp), %rdi
callq 0x12f90
leaq -0x188(%rbp), %rdi
callq 0x42140
leaq -0x1b0(%rbp), %rdi
callq 0x12f90
leaq -0x198(%rbp), %rdi
callq 0x12f90
movl $0x1, -0x23c(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x23c(%rbp), %rsi
callq 0x67db0
jmp 0x69d43
movl $0x2, -0x254(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x254(%rbp), %rsi
callq 0x67db0
jmp 0x69d62
leaq -0x228(%rbp), %rdi
leaq -0x238(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0x67f90
jmp 0x69d7e
movl $0x4, -0x26c(%rbp)
leaq -0x268(%rbp), %rdi
leaq -0x26c(%rbp), %rsi
callq 0x67db0
jmp 0x69d9d
leaq -0x218(%rbp), %rdi
leaq -0x228(%rbp), %rsi
leaq -0x268(%rbp), %rdx
callq 0x68000
jmp 0x69db9
leaq -0x208(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x740c0
movb $0x1, -0x291(%rbp)
leaq -0x290(%rbp), %rdi
leaq -0x291(%rbp), %rsi
callq 0x67fd0
jmp 0x69de8
leaq -0x280(%rbp), %rdi
movq %rdi, -0x430(%rbp)
leaq -0x290(%rbp), %rsi
callq 0x12f10
movq -0x3e8(%rbp), %rdi
movq -0x430(%rbp), %rdx
leaq -0x208(%rbp), %rsi
callq 0x71cb0
jmp 0x69e1e
leaq -0x280(%rbp), %rdi
callq 0x13080
leaq -0x290(%rbp), %rdi
callq 0x12f40
leaq -0x208(%rbp), %rdi
callq 0x13080
leaq -0x218(%rbp), %rdi
callq 0x42230
leaq -0x268(%rbp), %rdi
callq 0x12f90
leaq -0x228(%rbp), %rdi
callq 0x42140
leaq -0x250(%rbp), %rdi
callq 0x12f90
leaq -0x238(%rbp), %rdi
callq 0x12f90
movl $0x1, -0x2dc(%rbp)
leaq -0x2d8(%rbp), %rdi
leaq -0x2dc(%rbp), %rsi
callq 0x67db0
jmp 0x69e9d
movl $0x2, -0x2f4(%rbp)
leaq -0x2f0(%rbp), %rdi
leaq -0x2f4(%rbp), %rsi
callq 0x67db0
jmp 0x69ebc
leaq -0x2c8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
leaq -0x2f0(%rbp), %rdx
callq 0x67f90
jmp 0x69ed8
movl $0x4, -0x30c(%rbp)
leaq -0x308(%rbp), %rdi
leaq -0x30c(%rbp), %rsi
callq 0x67db0
jmp 0x69ef7
leaq -0x2b8(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
leaq -0x308(%rbp), %rdx
callq 0x68040
jmp 0x69f13
leaq -0x2a8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x740f0
movb $0x1, -0x331(%rbp)
leaq -0x330(%rbp), %rdi
leaq -0x331(%rbp), %rsi
callq 0x67fd0
jmp 0x69f42
leaq -0x320(%rbp), %rdi
movq %rdi, -0x438(%rbp)
leaq -0x330(%rbp), %rsi
callq 0x12f10
movq -0x3e8(%rbp), %rdi
movq -0x438(%rbp), %rdx
leaq -0x2a8(%rbp), %rsi
callq 0x71cb0
jmp 0x69f78
leaq -0x320(%rbp), %rdi
callq 0x13080
leaq -0x330(%rbp), %rdi
callq 0x12f40
leaq -0x2a8(%rbp), %rdi
callq 0x13080
leaq -0x2b8(%rbp), %rdi
callq 0x42280
leaq -0x308(%rbp), %rdi
callq 0x12f90
leaq -0x2c8(%rbp), %rdi
callq 0x42140
leaq -0x2f0(%rbp), %rdi
callq 0x12f90
leaq -0x2d8(%rbp), %rdi
callq 0x12f90
movl $0x1, -0x37c(%rbp)
leaq -0x378(%rbp), %rdi
leaq -0x37c(%rbp), %rsi
callq 0x67db0
jmp 0x69ff7
movl $0x2, -0x394(%rbp)
leaq -0x390(%rbp), %rdi
leaq -0x394(%rbp), %rsi
callq 0x67db0
jmp 0x6a016
leaq -0x368(%rbp), %rdi
leaq -0x378(%rbp), %rsi
leaq -0x390(%rbp), %rdx
callq 0x67f90
jmp 0x6a032
movl $0x4, -0x3ac(%rbp)
leaq -0x3a8(%rbp), %rdi
leaq -0x3ac(%rbp), %rsi
callq 0x67db0
jmp 0x6a051
leaq -0x358(%rbp), %rdi
leaq -0x368(%rbp), %rsi
leaq -0x3a8(%rbp), %rdx
callq 0x68080
jmp 0x6a06d
leaq -0x348(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x74120
movb $0x0, -0x3d1(%rbp)
leaq -0x3d0(%rbp), %rdi
leaq -0x3d1(%rbp), %rsi
callq 0x67fd0
jmp 0x6a09c
leaq -0x3c0(%rbp), %rdi
movq %rdi, -0x440(%rbp)
leaq -0x3d0(%rbp), %rsi
callq 0x12f10
movq -0x3e8(%rbp), %rdi
movq -0x440(%rbp), %rdx
leaq -0x348(%rbp), %rsi
callq 0x71cb0
jmp 0x6a0d2
leaq -0x3c0(%rbp), %rdi
callq 0x13080
leaq -0x3d0(%rbp), %rdi
callq 0x12f40
leaq -0x348(%rbp), %rdi
callq 0x13080
leaq -0x358(%rbp), %rdi
callq 0x422d0
leaq -0x3a8(%rbp), %rdi
callq 0x12f90
leaq -0x368(%rbp), %rdi
callq 0x42140
leaq -0x390(%rbp), %rdi
callq 0x12f90
leaq -0x378(%rbp), %rdi
callq 0x12f90
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a17e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a16c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xa240
leaq -0x61(%rbp), %rdi
callq 0xa420
leaq -0x28(%rbp), %rdi
callq 0xa240
leaq -0x29(%rbp), %rdi
callq 0xa420
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a1d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a1c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xa240
leaq -0xb1(%rbp), %rdi
callq 0xa420
leaq -0x88(%rbp), %rdi
callq 0xa240
leaq -0x89(%rbp), %rdi
callq 0xa420
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a235
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a21d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xa240
leaq -0x101(%rbp), %rdi
callq 0xa420
leaq -0xd8(%rbp), %rdi
callq 0xa240
leaq -0xd9(%rbp), %rdi
callq 0xa420
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a292
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a27a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0xa240
leaq -0x151(%rbp), %rdi
callq 0xa420
leaq -0x128(%rbp), %rdi
callq 0xa240
leaq -0x129(%rbp), %rdi
callq 0xa420
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a35d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a351
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a345
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a321
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x13080
leaq -0x1f0(%rbp), %rdi
callq 0x12f40
leaq -0x168(%rbp), %rdi
callq 0x13080
leaq -0x178(%rbp), %rdi
callq 0x421e0
leaq -0x1c8(%rbp), %rdi
callq 0x12f90
leaq -0x188(%rbp), %rdi
callq 0x42140
leaq -0x1b0(%rbp), %rdi
callq 0x12f90
leaq -0x198(%rbp), %rdi
callq 0x12f90
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a417
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a40b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a3ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a3f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a3db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x13080
leaq -0x290(%rbp), %rdi
callq 0x12f40
leaq -0x208(%rbp), %rdi
callq 0x13080
leaq -0x218(%rbp), %rdi
callq 0x42230
leaq -0x268(%rbp), %rdi
callq 0x12f90
leaq -0x228(%rbp), %rdi
callq 0x42140
leaq -0x250(%rbp), %rdi
callq 0x12f90
leaq -0x238(%rbp), %rdi
callq 0x12f90
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a4d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a4c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a4b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a4ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a495
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x13080
leaq -0x330(%rbp), %rdi
callq 0x12f40
leaq -0x2a8(%rbp), %rdi
callq 0x13080
leaq -0x2b8(%rbp), %rdi
callq 0x42280
leaq -0x308(%rbp), %rdi
callq 0x12f90
leaq -0x2c8(%rbp), %rdi
callq 0x42140
leaq -0x2f0(%rbp), %rdi
callq 0x12f90
leaq -0x2d8(%rbp), %rdi
callq 0x12f90
jmp 0x6a597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a58b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a57f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a573
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a567
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a54f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x13080
leaq -0x3d0(%rbp), %rdi
callq 0x12f40
leaq -0x348(%rbp), %rdi
callq 0x13080
leaq -0x358(%rbp), %rdi
callq 0x422d0
leaq -0x3a8(%rbp), %rdi
callq 0x12f90
leaq -0x368(%rbp), %rdi
callq 0x42140
leaq -0x390(%rbp), %rdi
callq 0x12f90
leaq -0x378(%rbp), %rdi
callq 0x12f90
movq -0x3e8(%rbp), %rdi
callq 0x71f50
movq -0x38(%rbp), %rdi
callq 0xa650
nopl (%rax)