// File: /workspace/github_cpp_makefile_star2_O2/canzarlab[P]Trajan/src/EditDist.cpp
// Function: PrintMatching(std::vector<std::vector<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>, std::allocator<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>>>, std::allocator<std::vector<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>, std::allocator<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::tuple<int, int, int, int>, bool, std::basic_ofstream<char, std::char_traits<char>>&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void PrintMatching(vvvvi& BP, vvi& L1, vvi& L2, vvi& T1, vvi& T2, vvi& D1, vvi& D2, i4 r, bool swp, 
                   ofstream& myfile, std::map<string, string> & t1Label2Node, std::map<string, string> & t2Label2Node)
{
    int i, j, k, l;
    tie(i, j, k, l) = r;
    int n = L1.size() - 1, m = L2.size() - 1;
    switch (BP[i][j][k][l])
    {
        case INS_TREE:
            for (int nl = l + 1; nl <= m - k; ++nl)
                cout << (!swp ? "INS " : "DEL ") << L2[k][nl] << '\n';
            break;
        case DEL_TREE:
            for (int nj = j + 1; nj <= n - i; ++nj)
                cout << (!swp ? "DEL " : "INS ") << L1[i][nj] << '\n';
            break;
        case MATCH:
        {
            int xs = L1[i][j + 1], ys = L2[k][l + 1];
            int p = D1[i][j + 1], q = D2[k][l + 1];
            int x = n - p - T1[i][j + 1], y = m - q - T2[k][l + 1];
            cout << "MATCH " << (swp ? ys : xs) << ' ' << (swp ? xs : ys) << '\n';
            myfile << (swp ? t2Label2Node[std::to_string(ys)] : t1Label2Node[std::to_string(xs)]) << ' ' << (swp ? t1Label2Node[std::to_string(xs)] : t2Label2Node[std::to_string(ys)]) << '\n';
            PrintMatching(BP, L1, L2, T1, T2, D1, D2, {i, j + T1[i][j + 1], k, l + T2[k][l + 1]}, swp, myfile, t1Label2Node, t2Label2Node);
            PrintMatching(BP, L1, L2, T1, T2, D1, D2, {p + 1, x, q + 1, y}, swp, myfile, t1Label2Node, t2Label2Node);
            break;
        }
        case DEL_NODE:
            cout << (!swp ? "DEL " : "INS ") << L1[i][j + 1] << '\n';
            PrintMatching(BP, L1, L2, T1, T2, D1, D2, {i, j + 1, k, l}, swp, myfile, t1Label2Node, t2Label2Node);
            break;
        case INS_NODE:
            cout << (!swp ? "INS " : "DEL ") << L2[k][l + 1] << '\n';
            PrintMatching(BP, L1, L2, T1, T2, D1, D2, {i, j, k, l + 1}, swp, myfile, t1Label2Node, t2Label2Node);
            break;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, 0x50(%rsp)
movq %r8, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x128(%rsp), %rsi
leaq 0x10(%rsp), %rax
leaq 0x88(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %rbp
movq %rbp, 0x8(%rdi)
leaq 0x14(%rsp), %r13
movq %r13, 0x10(%rdi)
leaq 0xc(%rsp), %r14
movq %r14, 0x18(%rdi)
callq 0x4d7a2
movq (%r15), %rcx
movq %r15, 0x18(%rsp)
movq 0x8(%r15), %rax
subq %rcx, %rax
pushq $0x18
popq %rdi
cqto
idivq %rdi
movq %rax, %r15
movq (%r12), %rsi
movq %r12, 0x20(%rsp)
movq 0x8(%r12), %rax
subq %rsi, %rax
cqto
idivq %rdi
movq %rax, %r12
movl (%r14), %eax
movslq %eax, %rdx
movq %rbx, 0x38(%rsp)
movq (%rbx), %r8
imulq $0x18, %rdx, %rdi
movslq (%r13), %r13
movq (%r8,%rdi), %r8
imulq $0x18, %r13, %r9
movl (%rbp), %edx
movslq %edx, %r10
movq (%r8,%r9), %r9
imulq $0x18, %r10, %r8
leaq 0x10(%rsp), %r10
movslq (%r10), %rbx
movq (%r9,%r8), %r9
movl (%r9,%rbx,4), %r9d
addl $0x2, %r9d
cmpl $0x4, %r9d
ja 0x4c868
movb 0x130(%rsp), %bpl
movq 0x120(%rsp), %r11
decl %r15d
decl %r12d
leaq 0x2541b(%rip), %r10     # 0x717b8
movslq (%r10,%r9,4), %r9
addq %r10, %r9
movzbl %bpl, %r10d
jmpq *%r9
leaq 0x2542b(%rip), %rax     # 0x717dd
leaq 0x2541f(%rip), %r14     # 0x717d8
testb %bpl, %bpl
cmovneq %rax, %r14
movq 0x4abe9(%rip), %r15     # 0x96fb0
pushq $0xa
popq %rbp
movl %r12d, %eax
subl %edx, %eax
cltq
cmpq %rax, %rbx
jge 0x4c868
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x9330
movslq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq (%rdx), %rdx
imulq $0x18, %rcx, %rcx
movq (%rdx,%rcx), %rcx
movl 0x4(%rcx,%rbx,4), %esi
movq %rax, %rdi
callq 0x9610
movq %rax, %rdi
movl %ebp, %esi
callq 0x93b0
movl 0x8(%rsp), %edx
movq %r13, %rbx
jmp 0x4c3ca
movq %r10, 0x30(%rsp)
leaq 0x253b4(%rip), %rax     # 0x717dd
leaq 0x253a8(%rip), %rsi     # 0x717d8
testb %bpl, %bpl
cmovneq %rax, %rsi
movq 0x4ab72(%rip), %rdi     # 0x96fb0
callq 0x9330
movslq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rbx
movq (%rbx), %rdx
imulq $0x18, %rcx, %rcx
movslq 0x10(%rsp), %rsi
movq (%rdx,%rcx), %rcx
movl 0x4(%rcx,%rsi,4), %esi
movq %rax, %rdi
callq 0x9610
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x93b0
movl 0x10(%rsp), %ecx
incl %ecx
leaq 0xa8(%rsp), %rax
movl %ecx, (%rax)
movl 0x8(%rsp), %ecx
movl %ecx, 0x4(%rax)
movl 0x14(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0xc(%rax)
movq 0x18(%rsp), %r14
jmp 0x4c61b
movq %r10, 0x30(%rsp)
movq (%rcx,%rdi), %rax
movl 0x4(%rax,%r13,4), %eax
movl %eax, 0x64(%rsp)
movq (%rsi,%r8), %rax
movl 0x4(%rax,%rbx,4), %r14d
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rdi), %rax
movl 0x4(%rax,%r13,4), %ecx
movq (%r11), %rax
movq (%rax,%r8), %rax
movl 0x4(%rax,%rbx,4), %edx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rdi), %rax
movl 0x4(%rax,%r13,4), %eax
movl %ecx, 0x28(%rsp)
addl %ecx, %eax
movl %eax, 0x5c(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r8), %rax
movl 0x4(%rax,%rbx,4), %eax
movl %edx, 0x60(%rsp)
addl %edx, %eax
movl %eax, 0x58(%rsp)
movq 0x4aa9a(%rip), %rdi     # 0x96fb0
leaq 0x252c5(%rip), %rsi     # 0x717e2
callq 0x9330
testb %bpl, %bpl
movl 0x64(%rsp), %ecx
movl %ecx, %esi
cmovnel %r14d, %esi
movl %r14d, 0x2c(%rsp)
movl %ecx, %ebx
cmovnel %ecx, %r14d
movq %rax, %rdi
callq 0x9610
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x93b0
movq %rax, %rdi
movl %r14d, %esi
callq 0x9610
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x93b0
testb %bpl, %bpl
je 0x4c699
movl %ebx, %r14d
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
movl 0x2c(%rsp), %esi
movl %esi, %ebp
callq 0xb96c
movq 0x148(%rsp), %rdi
movq %rbx, %rsi
callq 0x4d7b8
jmp 0x4c6c2
movq %r10, 0x30(%rsp)
leaq 0x25232(%rip), %rax     # 0x717d8
leaq 0x25230(%rip), %rsi     # 0x717dd
testb %bpl, %bpl
cmovneq %rax, %rsi
movq 0x4a9f5(%rip), %rdi     # 0x96fb0
callq 0x9330
movslq 0xc(%rsp), %rcx
movq 0x18(%rsp), %r14
movq (%r14), %rdx
imulq $0x18, %rcx, %rcx
movslq 0x14(%rsp), %rsi
movq (%rdx,%rcx), %rcx
movl 0x4(%rcx,%rsi,4), %esi
movq %rax, %rdi
callq 0x9610
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x93b0
movl 0x14(%rsp), %ecx
incl %ecx
movl 0x10(%rsp), %edx
leaq 0xb8(%rsp), %rax
movl %edx, (%rax)
movl 0x8(%rsp), %edx
movl %edx, 0x4(%rax)
movl %ecx, 0x8(%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0xc(%rax)
movq 0x20(%rsp), %rbx
movq 0x38(%rsp), %r13
jmp 0x4c826
leaq 0x251ac(%rip), %rcx     # 0x717d8
leaq 0x251aa(%rip), %rbx     # 0x717dd
testb %bpl, %bpl
cmovneq %rcx, %rbx
movq 0x4a96f(%rip), %r12     # 0x96fb0
pushq $0xa
popq %rbp
movl %r15d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
cmpq %rax, %r13
jge 0x4c868
leaq 0x1(%r13), %r14
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9330
movslq 0xc(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq (%rdx), %rdx
imulq $0x18, %rcx, %rcx
movq (%rdx,%rcx), %rcx
movl 0x4(%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x9610
movq %rax, %rdi
movl %ebp, %esi
callq 0x93b0
movl 0xc(%rsp), %eax
movq %r14, %r13
jmp 0x4c644
movl 0x2c(%rsp), %ebp
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
callq 0xb96c
movq 0x140(%rsp), %rdi
movq %r14, %rsi
callq 0x4d7b8
movl %ebx, %r14d
movq 0x138(%rsp), %rdi
movq %rax, %rsi
movb 0x130(%rsp), %r13b
callq 0x92d0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x93b0
movq %rax, %rbx
testb %r13b, %r13b
je 0x4c70e
leaq 0x68(%rsp), %rdi
movl %r14d, %esi
callq 0xb96c
leaq 0x68(%rsp), %rsi
movq 0x140(%rsp), %rdi
callq 0x4d7b8
jmp 0x4c72c
leaq 0x68(%rsp), %rdi
movl %ebp, %esi
callq 0xb96c
leaq 0x68(%rsp), %rsi
movq 0x148(%rsp), %rdi
callq 0x4d7b8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x92d0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x93b0
subl 0x5c(%rsp), %r15d
subl 0x58(%rsp), %r12d
testb %r13b, %r13b
je 0x4c753
jmp 0x4c753
leaq 0x68(%rsp), %rdi
callq 0x9708
leaq 0x88(%rsp), %rdi
callq 0x9708
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r14
movq 0x38(%rsp), %r13
movl 0x28(%rsp), %ebp
movslq 0x14(%rsp), %rax
movslq 0xc(%rsp), %r10
movq 0x40(%rsp), %rcx
movq (%rcx), %rdx
imulq $0x18, %r10, %rsi
movq (%rdx,%rsi), %rdx
movl 0x4(%rdx,%rax,4), %edx
addl %eax, %edx
movslq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rsi
movq 0x48(%rsp), %r8
movq (%r8), %rdi
imulq $0x18, %rsi, %r9
movq (%rdi,%r9), %rdi
movl 0x4(%rdi,%rax,4), %edi
addl %eax, %edi
leaq 0xd8(%rsp), %rax
movl %edi, (%rax)
movl %esi, 0x4(%rax)
movl %edx, 0x8(%rax)
movl %r10d, 0xc(%rax)
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq 0x50(%rsp), %r9
pushq 0x148(%rsp)
pushq 0x148(%rsp)
pushq 0x148(%rsp)
pushq 0x48(%rsp)
pushq %rax
pushq 0x148(%rsp)
callq 0x4c2a2
addq $0x30, %rsp
incl %ebp
movl 0x60(%rsp), %ecx
incl %ecx
leaq 0xc8(%rsp), %rax
movl %r12d, (%rax)
movl %ecx, 0x4(%rax)
movl %r15d, 0x8(%rax)
movl %ebp, 0xc(%rax)
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %r9
pushq 0x148(%rsp)
pushq 0x148(%rsp)
pushq 0x148(%rsp)
pushq 0x48(%rsp)
pushq %rax
pushq 0x148(%rsp)
callq 0x4c2a2
addq $0x30, %rsp
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4c8a6
movq %rax, %rbx
jmp 0x4c89a
jmp 0x4c888
jmp 0x4c88d
movq %rax, %rbx
jmp 0x4c8bc
movq %rax, %rbx
jmp 0x4c8ba
movq %rax, %rbx
testb %r13b, %r13b
je 0x4c8a6
leaq 0x68(%rsp), %rdi
callq 0x9708
jmp 0x4c8ba
leaq 0x68(%rsp), %rdi
callq 0x9708
jmp 0x4c8bc
movq %rax, %rbx
testb %r13b, %r13b
je 0x4c8bc
jmp 0x4c8bc
leaq 0x88(%rsp), %rdi
callq 0x9708
movq %rbx, %rdi
callq 0x9640