// File: c2-d2[P]disty/src/main.cpp
// Function: void compute_pair_matrix<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>>(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>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&)
void compute_pair_matrix(const string &seq1, const string &seq2, const string &mask, T &pair_matrix){
    assert(seq1.size()==seq2.size());
    assert(seq1.size()==mask.size());
    assert(pair_matrix.size()==128);
    assert(pair_matrix[0].size()==128);

    for(int i=0; i<128; i++){
        for(int j=0; j<128; j++){
            pair_matrix[i][j]=0;
        }
    }
    int len=(int)seq1.size();
    for (int i=0;i<len;i++){
        if(mask[i]!='0'){
            ++pair_matrix[seq1[i]][seq2[i]];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2140
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2140
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jne 0x4eec
jmp 0x4f0b
leaq 0x3b47(%rip), %rdi      # 0x8a3a
leaq 0x36d4(%rip), %rsi      # 0x85ce
movl $0x188, %edx            # imm = 0x188
leaq 0x3b4d(%rip), %rcx      # 0x8a53
callq 0x2110
movq -0x8(%rbp), %rdi
callq 0x2140
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2140
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jne 0x4f2f
jmp 0x4f4e
leaq 0x3b8f(%rip), %rdi      # 0x8ac5
leaq 0x3691(%rip), %rsi      # 0x85ce
movl $0x189, %edx            # imm = 0x189
leaq 0x3b0a(%rip), %rcx      # 0x8a53
callq 0x2110
movq -0x20(%rbp), %rdi
callq 0x7b40
cmpq $0x80, %rax
jne 0x4f61
jmp 0x4f80
leaq 0x3b76(%rip), %rdi      # 0x8ade
leaq 0x365f(%rip), %rsi      # 0x85ce
movl $0x18a, %edx            # imm = 0x18A
leaq 0x3ad8(%rip), %rcx      # 0x8a53
callq 0x2110
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x53b0
movq %rax, %rdi
callq 0x7610
cmpq $0x80, %rax
jne 0x4f9f
jmp 0x4fbe
leaq 0x3b50(%rip), %rdi      # 0x8af6
leaq 0x3621(%rip), %rsi      # 0x85ce
movl $0x18b, %edx            # imm = 0x18B
leaq 0x3a9a(%rip), %rcx      # 0x8a53
callq 0x2110
movl $0x0, -0x24(%rbp)
cmpl $0x80, -0x24(%rbp)
jge 0x5015
movl $0x0, -0x28(%rbp)
cmpl $0x80, -0x28(%rbp)
jge 0x5008
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x53b0
movq %rax, %rdi
movslq -0x28(%rbp), %rsi
callq 0x53d0
movl $0x0, (%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4fd5
jmp 0x500a
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4fc5
movq -0x8(%rbp), %rdi
callq 0x2140
movl %eax, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x5099
movq -0x18(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x2250
movsbl (%rax), %eax
cmpl $0x30, %eax
je 0x508c
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x2250
movq -0x50(%rbp), %rdi
movsbq (%rax), %rsi
callq 0x53b0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x2250
movq -0x48(%rbp), %rdi
movsbq (%rax), %rsi
callq 0x53d0
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x508e
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x5028
addq $0x50, %rsp
popq %rbp
retq
nop