// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/apps/parasail_aligner.cpp
// Function: output_tables(bool, long, unsigned char*, std::vector<long, std::allocator<long>> const&, std::vector<long, std::allocator<long>> const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&, std::vector<parasail_result*, std::allocator<parasail_result*>> const&, long long, long long)
inline static void output_tables(
        bool has_query,
        long sid_crossover,
        unsigned char *T,
        const vector<long> &BEG,
        const vector<long> &END,
        const PairVec &vpairs,
        const vector<parasail_result_t*> &results,
        long long start,
        long long stop)
{
    for (long long index=start; index<stop; ++index) {
        parasail_result_t *result = results[index];
        int i = vpairs[index].first;
        int j = vpairs[index].second;
        long i_beg = BEG[i];
        long i_end = END[i];
        long i_len = i_end-i_beg;
        long j_beg = BEG[j];
        long j_end = END[j];
        long j_len = j_end-j_beg;
        int *table = parasail_result_get_score_table(result);

        if (has_query) {
            i = i - sid_crossover;
        }

        char filename[256] = {'\0'};
        sprintf(filename, "parasail_%d_%d.txt", i, j);
        print_array(filename, table,
                (const char*)&T[i_beg], i_len,
                (const char*)&T[j_beg], j_len);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movb %dil, %al
movq 0x20(%rbp), %rdi
movq 0x18(%rbp), %rdi
movq 0x10(%rbp), %rdi
andb $0x1, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq 0x20(%rbp), %rax
jge 0x2b8084
movq 0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2bdca0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2bdcc0
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2bdcc0
movl 0x4(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x44(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x44(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x48(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x48(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
subq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rdi
callq 0x2db260
movq %rax, -0x80(%rbp)
testb $0x1, -0x1(%rbp)
je 0x2b8018
movslq -0x44(%rbp), %rax
subq -0x10(%rbp), %rax
movl %eax, -0x44(%rbp)
leaq -0x180(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2af140
leaq -0x180(%rbp), %rdi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
leaq 0xaf798e(%rip), %rsi    # 0xdaf9cd
movb $0x0, %al
callq 0x2af060
leaq -0x180(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq -0x50(%rbp), %rdx
movq -0x60(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %r8
addq -0x68(%rbp), %r8
movq -0x78(%rbp), %rax
movl %eax, %r9d
callq 0x2b8090
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2b7f4b
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopl (%rax)