// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/apps/parasail_aligner.cpp
// Function: pair_check(unsigned long&, std::set<std::pair<int, int>, std::less<std::pair<int, int>>, std::allocator<std::pair<int, int>>>&, int const&, int const&, int const*, unsigned char const*, int const*, std::vector<int, std::allocator<int>> const&, char const&)
inline static void pair_check(
        unsigned long &count_generated,
        PairSet &pairs,
        const int &i,
        const int &j,
        const int * const restrict SA,
        const unsigned char * const restrict BWT,
        const int * const restrict SID,
        const vector<int> &DB,
        const char &sentinal)
{
    const int &sidi = SID[SA[i]];
    const int &sidj = SID[SA[j]];
    if (BWT[i] != BWT[j] || BWT[i] == sentinal) {
        if (DB.empty()) {
            if (sidi != sidj) {
                ++count_generated;
                if (sidi < sidj) {
                    pairs.insert(make_pair(sidi,sidj));
                }
                else {
                    pairs.insert(make_pair(sidj,sidi));
                }
            }
        }
        else {
            if (sidi != sidj && DB[sidi] != DB[sidj]) {
                ++count_generated;
                if (sidi > sidj) {
                    pairs.insert(make_pair(sidi,sidj));
                }
                else {
                    pairs.insert(make_pair(sidj,sidi));
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rdx
movslq (%rdx), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq (%rdx), %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movzbl (%rax,%rcx), %eax
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq (%rdx), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x2b632b
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movzbl (%rax,%rcx), %eax
movq 0x20(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x2b64be
movq 0x18(%rbp), %rdi
callq 0x2bd2c0
testb $0x1, %al
jne 0x2b633d
jmp 0x2b63da
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2b63d5
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2b63a0
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x2bd350
movq -0xa8(%rbp), %rdi
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x2bd300
movq %rax, -0x58(%rbp)
movb %dl, -0x50(%rbp)
jmp 0x2b63d3
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2bd350
movq -0xb0(%rbp), %rdi
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x2bd300
movq %rax, -0x70(%rbp)
movb %dl, -0x68(%rbp)
jmp 0x2b63d5
jmp 0x2b64bc
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2b64ba
movq 0x18(%rbp), %rdi
movq -0x38(%rbp), %rax
movslq (%rax), %rsi
callq 0x2bd380
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movslq (%rax), %rsi
callq 0x2bd380
movq %rax, %rcx
movl -0xb4(%rbp), %eax
cmpl (%rcx), %eax
je 0x2b64ba
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x2b6479
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x2bd350
movq -0xc0(%rbp), %rdi
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x2bd300
movq %rax, -0x88(%rbp)
movb %dl, -0x80(%rbp)
jmp 0x2b64b8
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2bd350
movq -0xc8(%rbp), %rdi
movq %rax, -0x90(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x2bd300
movq %rax, -0xa0(%rbp)
movb %dl, -0x98(%rbp)
jmp 0x2b64ba
jmp 0x2b64bc
jmp 0x2b64be
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)