// File: /workspace/github_cpp_makefile_star2_O2/c2-d2[P]disty/src/main.cpp
// Function: void load_sequences<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void load_sequences(const string &fasta_fn, T &names, T &seqs) {
    gzFile fp;
    kseq_t *seq;
    int l;
    fp = gzopen(fasta_fn.c_str(), "r");
    assert (fp != nullptr);
    seq = kseq_init(fp);

    int len=0; // length of sequences (for checking)

    while ((l = kseq_read(seq)) >= 0) {
        names.push_back(seq->name.s);
        string s(seq->seq.s);
        for (auto & c: s) {
            c = toupper(c);
        }
        if(len!=0){
            assert(len==static_cast<int>(s.size()));
        }
        else{
            len=(int)s.size();
        }

        for(char &a: s){
            assert ((int)a<128);
        }

        seqs.push_back(s);
    }
    kseq_destroy(seq);
    gzclose(fp);

    assert(seqs.size()>0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x28(%rsp)
movq %rsi, 0x40(%rsp)
movq (%rdi), %rdi
leaq 0x231c(%rip), %rsi      # 0x5379
callq 0x2210
testq %rax, %rax
je 0x33ca
movq %rax, %r12
pushq $0x1
popq %rbx
pushq $0x70
popq %rsi
movq %rbx, %rdi
callq 0x20d0
movq %rax, %r15
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x20d0
movq %rax, %r14
movq %r12, 0x30(%rsp)
movq %r12, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x21e0
movq %rax, (%r14)
movq %r14, 0x68(%r15)
leaq 0x48(%r15), %r13
leaq 0x30(%r15), %rbp
leaq 0x18(%r15), %rax
movq %rax, 0x38(%rsp)
xorl %eax, %eax
leaq 0x8(%rsp), %rbx
movl $0x0, 0x4(%rsp)
testl %eax, %eax
jne 0x30ed
movq %r14, %rdi
callq 0x2ce7
testl %eax, %eax
js 0x333a
cmpl $0x40, %eax
je 0x30e5
cmpl $0x3e, %eax
jne 0x30cb
movl %eax, 0x8(%rsp)
movl %eax, 0x60(%r15)
andq $0x0, 0x48(%r15)
andq $0x0, 0x30(%r15)
andq $0x0, 0x18(%r15)
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2d69
testl %eax, %eax
js 0x333f
cmpl $0xa, 0x8(%rsp)
pushq $0x2
popq %rbx
je 0x312f
movq %r14, %rdi
movl %ebx, %esi
movq 0x38(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2d69
cmpq $0x0, 0x40(%r15)
jne 0x314c
movq $0x100, 0x38(%r15)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x21e0
movq %rax, 0x40(%r15)
movq %r14, %rdi
callq 0x2ce7
movl %eax, 0x8(%rsp)
testl %eax, %eax
js 0x319c
cmpl $0xa, %eax
je 0x314c
cmpl $0x2b, %eax
je 0x319c
cmpl $0x3e, %eax
je 0x3198
cmpl $0x40, %eax
je 0x3198
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x30(%r15)
movb %al, (%rdx,%rcx)
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r8
callq 0x2d6e
jmp 0x314c
movl %eax, 0x60(%r15)
movq 0x30(%r15), %r12
movq 0x38(%r15), %rbx
leaq 0x1(%r12), %rcx
movq 0x40(%r15), %rax
cmpq %rbx, %rcx
jb 0x31f9
movq %rcx, %rdx
shrq %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %rbx
shrq $0x10, %rbx
orq %rcx, %rbx
incq %rbx
movq %rbx, 0x38(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2260
movq %rax, 0x40(%r15)
movb $0x0, (%rax,%r12)
cmpl $0x2b, 0x8(%rsp)
jne 0x3289
cmpq %rbx, 0x50(%r15)
jae 0x3223
movq %rbx, 0x50(%r15)
movq 0x58(%r15), %rdi
movq %rbx, %rsi
callq 0x2260
movq %rax, 0x58(%r15)
movq %r14, %rdi
callq 0x2ce7
movl %eax, 0x8(%rsp)
testl %eax, %eax
js 0x3238
cmpl $0xa, %eax
jne 0x3223
cmpl $-0x1, %eax
je 0x333a
pushq $0x2
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r8
callq 0x2d6e
testl %eax, %eax
js 0x3273
movq (%r13), %r12
movq (%rbp), %rax
xorl %ecx, %ecx
cmpq %rax, %r12
setb %cl
movl %ecx, 0x8(%rsp)
jb 0x3244
jmp 0x327b
movq (%rbp), %rax
movq (%r13), %r12
andl $0x0, 0x60(%r15)
cmpq %r12, %rax
jne 0x333f
testl %r12d, %r12d
js 0x333f
movq 0x10(%r15), %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x3(%rsp), %rdx
callq 0x2fd4
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x3e2e
movq %rbx, %rdi
callq 0x22d8
movq 0x40(%r15), %rsi
movq %rbx, %rdi
leaq 0x3(%rsp), %rdx
callq 0x2fd4
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x32f3
movsbl (%rbx,%r12), %edi
callq 0x22b0
movb %al, (%rbx,%r12)
incq %r12
jmp 0x32db
movl 0x10(%rsp), %eax
movl 0x4(%rsp), %ecx
testl %ecx, %ecx
je 0x330d
cmpl %eax, %ecx
leaq 0x8(%rsp), %rbx
je 0x3314
jmp 0x33ab
movl %eax, %ecx
leaq 0x8(%rsp), %rbx
movl %ecx, 0x4(%rsp)
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x3e02
movq %rbx, %rdi
callq 0x22d8
movq 0x68(%r15), %r14
movl 0x60(%r15), %eax
jmp 0x30c7
testq %r15, %r15
je 0x3384
movq 0x10(%r15), %rdi
callq 0x2190
movq 0x28(%r15), %rdi
callq 0x2190
movq 0x40(%r15), %rdi
callq 0x2190
movq 0x58(%r15), %rdi
callq 0x2190
movq 0x68(%r15), %rbx
testq %rbx, %rbx
je 0x337c
movq (%rbx), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x2190
movq %r15, %rdi
callq 0x2190
movq 0x30(%rsp), %rdi
callq 0x2270
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
je 0x33e9
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2145(%rip), %rdi      # 0x54f7
leaq 0x1f2d(%rip), %rsi      # 0x52e6
leaq 0x20de(%rip), %rcx      # 0x549e
movl $0xfb, %edx
callq 0x20c0
leaq 0x20bf(%rip), %rdi      # 0x5490
leaq 0x1f0e(%rip), %rsi      # 0x52e6
leaq 0x20bf(%rip), %rcx      # 0x549e
movl $0xef, %edx
callq 0x20c0
leaq 0x2127(%rip), %rdi      # 0x5517
leaq 0x1eef(%rip), %rsi      # 0x52e6
leaq 0x20a0(%rip), %rcx      # 0x549e
movl $0x10a, %edx            # imm = 0x10A
callq 0x20c0
jmp 0x340c
jmp 0x341b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22d8
jmp 0x341e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2290