// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/apps/parasail_aligner.cpp
// Function: output_stats(_IO_FILE*, bool, long, 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_stats(
        FILE *fop,
        bool has_query,
        long sid_crossover,
        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;

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

        if (parasail_result_is_saturated(result)) {
            if (has_query) {
                fprintf(stderr, "query %d and ref %d saturated\n", i, j);
            } else {
                fprintf(stderr, "seq %d and seq %d saturated\n", i, j);
            }
            continue;
        }

        eprintf(fop, "%d,%d,%ld,%ld,%d,%d,%d,%d,%d,%d\n",
                i,
                j,
                i_len,
                j_len,
                parasail_result_get_score(result),
                parasail_result_get_end_query(result),
                parasail_result_get_end_ref(result),
                parasail_result_get_matches(result),
                parasail_result_get_similar(result),
                parasail_result_get_length(result));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movb %sil, %al
movq 0x20(%rbp), %rsi
movq 0x18(%rbp), %rsi
movq 0x10(%rbp), %rsi
movq %rdi, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq 0x20(%rbp), %rax
jge 0x2b6ab9
movq 0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2bdca0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2bdcc0
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2bdcc0
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x5c(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x5c(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
subq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x60(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x60(%rbp), %rsi
callq 0x2bdce0
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
subq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
testb $0x1, -0x21(%rbp)
je 0x2b6979
movslq -0x5c(%rbp), %rax
subq -0x30(%rbp), %rax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2daa80
cmpl $0x0, %eax
je 0x2b69d0
testb $0x1, -0x21(%rbp)
je 0x2b69ad
movq 0xcc463c(%rip), %rax    # 0xf7afd0
movq (%rax), %rdi
movl -0x5c(%rbp), %edx
movl -0x60(%rbp), %ecx
leaq 0xaf8e4a(%rip), %rsi    # 0xdaf7ee
movb $0x0, %al
callq 0x2af440
jmp 0x2b69cb
movq 0xcc461c(%rip), %rax    # 0xf7afd0
movq (%rax), %rdi
movl -0x5c(%rbp), %edx
movl -0x60(%rbp), %ecx
leaq 0xaf8dd4(%rip), %rsi    # 0xdaf798
movb $0x0, %al
callq 0x2af440
jmp 0x2b6aa8
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0xb0(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0xac(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2daf60
movl %eax, %r15d
movq -0x58(%rbp), %rdi
callq 0x2dafc0
movl %eax, %r14d
movq -0x58(%rbp), %rdi
callq 0x2db020
movl %eax, %ebx
movq -0x58(%rbp), %rdi
callq 0x2db080
movl %eax, -0x98(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2db120
movl %eax, -0x94(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2db1c0
movq -0xb8(%rbp), %rdi
movl -0xb0(%rbp), %edx
movl -0xac(%rbp), %ecx
movq -0xa8(%rbp), %r8
movq -0xa0(%rbp), %r9
movl -0x98(%rbp), %r11d
movl -0x94(%rbp), %r10d
leaq 0xaf8d97(%rip), %rsi    # 0xdaf81d
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq 0x2af440
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2b68b0
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)