// File: pfnet-research[P]pml/src/translate_to_mdp.cpp
// Function: make_concat(int, int)
mdp::command_t make_concat(int from, int to) {
    return mdp::command_t {
        make<mdp::binop_expr_t>(
                make<mdp::var_expr_t>("location"),
                make<mdp::int_expr_t>(from),
                mdp::binop_kind_t::Eq),
        {
            mdp::branch_t{
                make<mdp::int_expr_t>(1),
                make<mdp::binop_expr_t>(
                        make<mdp::var_expr_t>("location'"),
                        make<mdp::int_expr_t>(to),
                        mdp::binop_kind_t::Eq)
            }
        }
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0xf0(%rbp)
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rdi, -0xe0(%rbp)
leaq 0x12150(%rip), %rsi     # 0x99164
leaq -0x30(%rbp), %rdi
callq 0x86e70
leaq -0x40(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x86ea0
jmp 0x8702c
movl $0x8, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x86e30
jmp 0x8704a
movq -0xe0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x7a500
movq -0xf0(%rbp), %rax
movb $0x1, -0xd8(%rbp)
addq $0x10, %rax
movq %rax, -0x100(%rbp)
movb $0x1, -0xd6(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %rax, -0x88(%rbp)
movl $0x1, -0x9c(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
callq 0x86f10
jmp 0x870ab
movq -0xf8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x7b4b0
movb $0x1, -0xd5(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq 0x18b9c(%rip), %rsi     # 0x9fc73
leaq -0xc0(%rbp), %rdi
callq 0x86f40
jmp 0x870e5
leaq -0xd0(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x86ea0
jmp 0x870f7
movl $0x8, -0xd4(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
leaq -0xd4(%rbp), %rcx
callq 0x86e30
jmp 0x87124
movq -0x108(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7a500
movb $0x0, -0xd5(%rbp)
movb $0x0, -0xd6(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x1, -0x58(%rbp)
leaq -0xd7(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x7a530
movq -0x100(%rbp), %rdi
movq -0x110(%rbp), %rcx
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x7a550
jmp 0x87185
movb $0x0, -0xd8(%rbp)
leaq -0xd7(%rbp), %rdi
callq 0xd0d0
leaq -0x80(%rbp), %rax
movq %rax, -0x120(%rbp)
addq $0x20, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x128(%rbp)
callq 0xcfe0
movq -0x120(%rbp), %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x118(%rbp)
jne 0x871ae
leaq -0xb0(%rbp), %rdi
callq 0x7a670
leaq -0xd0(%rbp), %rdi
callq 0x7a690
leaq -0xc0(%rbp), %rdi
callq 0x7a6b0
leaq -0x98(%rbp), %rdi
callq 0x7a690
leaq -0x20(%rbp), %rdi
callq 0x7a670
leaq -0x40(%rbp), %rdi
callq 0x7a690
leaq -0x30(%rbp), %rdi
callq 0x7a6b0
movq -0xe8(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x873be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x873b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x87343
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x87320
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x87314
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x87308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd7(%rbp), %rdi
callq 0xd0d0
leaq -0x80(%rbp), %rax
movq %rax, -0x138(%rbp)
addq $0x20, %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x140(%rbp)
callq 0xcfe0
movq -0x138(%rbp), %rcx
movq -0x140(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x130(%rbp)
jne 0x872cb
leaq -0xb0(%rbp), %rdi
callq 0x7a670
leaq -0xd0(%rbp), %rdi
callq 0x7a690
leaq -0xc0(%rbp), %rdi
callq 0x7a6b0
testb $0x1, -0xd5(%rbp)
jne 0x8732b
jmp 0x87337
movq -0xf8(%rbp), %rdi
callq 0xceb0
leaq -0x98(%rbp), %rdi
callq 0x7a690
testb $0x1, -0xd6(%rbp)
jne 0x8734e
jmp 0x87395
movq -0x88(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x148(%rbp)
je 0x87393
movq -0x148(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x150(%rbp)
callq 0xcfe0
movq -0x150(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x148(%rbp)
jne 0x87365
jmp 0x87395
testb $0x1, -0xd8(%rbp)
jne 0x873a0
jmp 0x873ac
movq -0xe0(%rbp), %rdi
callq 0xceb0
leaq -0x20(%rbp), %rdi
callq 0x7a670
leaq -0x40(%rbp), %rdi
callq 0x7a690
leaq -0x30(%rbp), %rdi
callq 0x7a6b0
movq -0x48(%rbp), %rdi
callq 0xa650