// File: pfnet-research[P]pml/src/test.cpp
// Function: translation_test::translation_test()
PML_TEST(translation_test) {
    using namespace ast;
    using namespace mdp;
    assert_eq(
            translate_to_mdp(ast::int_expr_t{42}).mdp,
            mdp_t {
                "default",
                {},
                {
                    mdp::constant_t{"c42", 42}
                },
                {}
            });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x71f20
movq -0x1a8(%rbp), %rax
leaq 0x79f7b(%rip), %rcx     # 0xe6778
movq %rcx, (%rax)
leaq -0xb8(%rbp), %rdi
movl $0x2a, %esi
callq 0x148e0
jmp 0x6c813
leaq -0xa8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x8afa0
jmp 0x6c828
leaq -0xa8(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x130(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0xa660
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rdx
leaq 0x333ce(%rip), %rsi     # 0x9fc3a
callq 0x1dd10
jmp 0x6c873
movb $0x1, -0x19d(%rbp)
leaq -0x110(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x110(%rbp)
movq $0x0, -0x100(%rbp)
callq 0x79550
movb $0x1, -0x19c(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movb $0x1, -0x19a(%rbp)
leaq -0x170(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0x199(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0xa660
movq -0x1c8(%rbp), %rdx
leaq 0x33355(%rip), %rsi     # 0x9fc42
leaq -0x198(%rbp), %rdi
callq 0x1dd10
jmp 0x6c8fb
leaq -0x170(%rbp), %rdi
leaq -0x198(%rbp), %rsi
movl $0x2a, %edx
callq 0x79570
jmp 0x6c915
movb $0x0, -0x19a(%rbp)
leaq -0x170(%rbp), %rax
movq %rax, -0x148(%rbp)
movq $0x1, -0x140(%rbp)
leaq -0x19b(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x795d0
movq -0x1d0(%rbp), %rdi
movq -0x1e0(%rbp), %rcx
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
callq 0x795f0
jmp 0x6c96b
leaq -0xe0(%rbp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, -0xe0(%rbp)
movq $0x0, -0xd0(%rbp)
callq 0x79670
movq -0x1a8(%rbp), %rdi
movq -0x1c0(%rbp), %rsi
movb $0x0, -0x19c(%rbp)
movb $0x0, -0x19d(%rbp)
leaq -0x130(%rbp), %rdx
callq 0x79300
jmp 0x6c9b6
leaq -0x130(%rbp), %rdi
callq 0xc340
leaq -0x19b(%rbp), %rdi
callq 0xdc50
leaq -0x170(%rbp), %rax
movq %rax, -0x1f0(%rbp)
addq $0x28, %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x1f8(%rbp)
callq 0xd4b0
movq -0x1f0(%rbp), %rcx
movq -0x1f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1e8(%rbp)
jne 0x6c9e7
leaq -0x198(%rbp), %rdi
callq 0xa240
leaq -0x199(%rbp), %rdi
callq 0xa420
leaq -0x131(%rbp), %rdi
callq 0xa420
leaq -0xa8(%rbp), %rdi
callq 0x79690
leaq -0xb8(%rbp), %rdi
callq 0x14930
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x6cc1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x6cc12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x6cbfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x6cb66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x6cb5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0x6cb02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xc340
leaq -0x19b(%rbp), %rdi
callq 0xdc50
leaq -0x170(%rbp), %rax
movq %rax, -0x208(%rbp)
addq $0x28, %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x210(%rbp)
callq 0xd4b0
movq -0x208(%rbp), %rcx
movq -0x210(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x200(%rbp)
jne 0x6cb27
jmp 0x6cb5a
leaq -0x198(%rbp), %rdi
callq 0xa240
leaq -0x199(%rbp), %rdi
callq 0xa420
testb $0x1, -0x19a(%rbp)
jne 0x6cb7d
jmp 0x6cbca
movq -0x178(%rbp), %rax
leaq -0x170(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x218(%rbp)
je 0x6cbc8
movq -0x218(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x220(%rbp)
callq 0xd4b0
movq -0x220(%rbp), %rax
leaq -0x170(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x218(%rbp)
jne 0x6cb97
jmp 0x6cbca
testb $0x1, -0x19c(%rbp)
jne 0x6cbd5
jmp 0x6cbe1
movq -0x1d8(%rbp), %rdi
callq 0xcc90
testb $0x1, -0x19d(%rbp)
jne 0x6cbec
jmp 0x6cbf8
movq -0x1b8(%rbp), %rdi
callq 0xa240
jmp 0x6cbfa
leaq -0x131(%rbp), %rdi
callq 0xa420
leaq -0xa8(%rbp), %rdi
callq 0x79690
leaq -0xb8(%rbp), %rdi
callq 0x14930
movq -0x1a8(%rbp), %rdi
callq 0x71f80
movq -0xc0(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)