// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movq %rdx, 0x38(%rsp)
movq %rsi, 0x50(%rsp)
movq (%rdi), %rdi
leaq 0x1f94(%rip), %rsi      # 0x5379
callq 0x2240
testq %rax, %rax
je 0x3969
movq %rax, %r14
movl $0x1, %edi
movl $0x70, %esi
callq 0x20f0
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x20f0
movq %rax, %rbx
movq %r14, 0x40(%rsp)
movq %r14, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x2220
movq %rax, (%rbx)
movq %rbx, 0x68(%r15)
leaq 0x48(%r15), %rbp
leaq 0x30(%r15), %rax
movq %rax, 0x30(%rsp)
leaq 0x18(%r15), %rax
movq %rax, 0x48(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rbx
movl $0x0, 0x2c(%rsp)
movq 0x68(%r15), %r12
cmpl $0x0, 0x60(%r15)
jne 0x351d
jmp 0x347d
movl $0x1, 0x10(%r12)
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
jmp 0x34f6
movl 0xc(%r12), %eax
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
cmpl $-0x1, %eax
je 0x34f6
cmpl $0x0, 0x10(%r12)
je 0x34a0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl %eax, 0x8(%r12)
jge 0x34f6
cmpl %eax, 0x8(%r12)
jl 0x34e1
movl $0x0, 0x8(%r12)
movq (%r12), %rsi
movq 0x18(%r12), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x22f0
movl %eax, 0xc(%r12)
cmpl $-0x1, %eax
je 0x346d
testl %eax, %eax
jne 0x34e1
movl $0x1, 0x10(%r12)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x34f6
movq (%r12), %rax
movslq 0x8(%r12), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r12)
movzbl (%rax,%rcx), %ebx
movl %ebx, 0x8(%rsp)
testl %ebx, %ebx
js 0x350c
cmpl $0x40, %ebx
je 0x350c
cmpl $0x3e, %ebx
jne 0x347d
testl %ebx, %ebx
js 0x37ff
movl %ebx, 0x60(%r15)
leaq 0x8(%rsp), %rbx
xorl %eax, %eax
movq %rax, 0x48(%r15)
movq %rax, 0x30(%r15)
movq %rax, 0x18(%r15)
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x30ed
testl %eax, %eax
js 0x366a
cmpl $0xa, 0x8(%rsp)
je 0x3564
movq %r12, %rdi
movl $0x2, %esi
movq 0x48(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x30ed
cmpq $0x0, 0x40(%r15)
movq 0x30(%rsp), %rbx
jne 0x3586
movq $0x100, 0x38(%r15)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x2220
movq %rax, 0x40(%r15)
movl 0xc(%r12), %ecx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $-0x1, %ecx
je 0x3603
cmpl $0x0, 0x10(%r12)
je 0x35a9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, 0x8(%r12)
jge 0x3603
cmpl %ecx, 0x8(%r12)
jl 0x35ee
movl $0x0, 0x8(%r12)
movq (%r12), %rsi
movq 0x18(%r12), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x22f0
movl %eax, 0xc(%r12)
cmpl $-0x1, %eax
je 0x365a
testl %eax, %eax
jne 0x35ee
movl $0x1, 0x10(%r12)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3603
movq (%r12), %rax
movslq 0x8(%r12), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r12)
movzbl (%rax,%rcx), %eax
movl %eax, 0x8(%rsp)
testl %eax, %eax
js 0x3675
cmpl $0x2a, %eax
jg 0x361b
cmpl $0xa, %eax
je 0x3586
jmp 0x362a
cmpl $0x2b, %eax
je 0x3675
cmpl $0x3e, %eax
je 0x3671
cmpl $0x40, %eax
je 0x3671
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x30(%r15)
movb %al, (%rdx,%rcx)
movq %r12, %rdi
movl $0x2, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x30ed
jmp 0x3586
movl $0x1, 0x10(%r12)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x3603
movl %eax, %ebx
jmp 0x37ff
movl %eax, 0x60(%r15)
movq 0x30(%r15), %rbx
leaq 0x1(%rbx), %rax
cmpq 0x38(%r15), %rax
jb 0x36c8
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x38(%r15)
movq 0x40(%r15), %rdi
callq 0x2290
movq %rax, 0x40(%r15)
movq 0x40(%r15), %rax
movb $0x0, (%rax,%rbx)
cmpl $0x2b, 0x8(%rsp)
jne 0x37ff
movq 0x38(%r15), %rsi
cmpq %rsi, 0x50(%r15)
jae 0x36f6
movq %rsi, 0x50(%r15)
movq 0x58(%r15), %rdi
callq 0x2290
movq %rax, 0x58(%r15)
movq 0x30(%rsp), %rbx
movl 0xc(%r12), %ecx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $-0x1, %ecx
je 0x3774
cmpl $0x0, 0x10(%r12)
je 0x371e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, 0x8(%r12)
jge 0x3774
cmpl %ecx, 0x8(%r12)
jl 0x375f
movl $0x0, 0x8(%r12)
movq (%r12), %rsi
movq 0x18(%r12), %rdi
movl $0x4000, %edx           # imm = 0x4000
callq 0x22f0
movl %eax, 0xc(%r12)
cmpl $-0x1, %eax
je 0x3787
testl %eax, %eax
jne 0x375f
movl $0x1, 0x10(%r12)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3774
movq (%r12), %rax
movslq 0x8(%r12), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r12)
movzbl (%rax,%rcx), %eax
movl %eax, 0x8(%rsp)
testl %eax, %eax
js 0x3797
cmpl $0xa, %eax
jne 0x36fb
jmp 0x3797
movl $0x1, 0x10(%r12)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x3774
cmpl $-0x1, %eax
je 0x37cc
movq %r12, %rdi
movl $0x2, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x30ed
testl %eax, %eax
js 0x37d3
movq (%rbp), %rax
xorl %ecx, %ecx
cmpq (%rbx), %rax
setb %cl
movl %ecx, 0x8(%rsp)
jb 0x379c
jmp 0x37db
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
jmp 0x37ff
movl $0x0, 0x8(%rsp)
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
cmpl $-0x3, 0x8(%rsp)
je 0x37ff
movl $0x0, 0x60(%r15)
movq 0x30(%r15), %rbx
cmpq 0x48(%r15), %rbx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovnel %eax, %ebx
testl %ebx, %ebx
js 0x38d6
movq 0x10(%r15), %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x7(%rsp), %rdx
callq 0x3386
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x454e
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3841
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %r14, %r13
movq 0x40(%r15), %rsi
movq %rbx, %rdi
leaq 0x7(%rsp), %rdx
callq 0x3386
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x387d
movq 0x8(%rsp), %r12
xorl %r14d, %r14d
movsbl (%r12,%r14), %edi
callq 0x22e0
movb %al, (%r12,%r14)
incq %r14
cmpq %r14, %rbx
jne 0x3867
movl 0x10(%rsp), %eax
movl 0x2c(%rsp), %r12d
testl %r12d, %r12d
je 0x389d
cmpl %eax, %r12d
movq %r13, %r14
leaq 0x8(%rsp), %rbx
je 0x38a8
jmp 0x394a
movl %eax, %r12d
movq %r13, %r14
leaq 0x8(%rsp), %rbx
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x4510
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x38cc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %r12d, 0x2c(%rsp)
jmp 0x345c
testq %r15, %r15
movq 0x40(%rsp), %r14
je 0x3925
movq 0x10(%r15), %rdi
callq 0x21e0
movq 0x28(%r15), %rdi
callq 0x21e0
movq 0x40(%r15), %rdi
callq 0x21e0
movq 0x58(%r15), %rdi
callq 0x21e0
movq 0x68(%r15), %rbx
testq %rbx, %rbx
je 0x391d
movq (%rbx), %rdi
callq 0x21e0
movq %rbx, %rdi
callq 0x21e0
movq %r15, %rdi
callq 0x21e0
movq %r14, %rdi
callq 0x22a0
movq 0x38(%rsp), %rcx
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
je 0x3988
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ba6(%rip), %rdi      # 0x54f7
leaq 0x198e(%rip), %rsi      # 0x52e6
leaq 0x1b3f(%rip), %rcx      # 0x549e
movl $0xfb, %edx
callq 0x20e0
leaq 0x1b20(%rip), %rdi      # 0x5490
leaq 0x196f(%rip), %rsi      # 0x52e6
leaq 0x1b20(%rip), %rcx      # 0x549e
movl $0xef, %edx
callq 0x20e0
leaq 0x1b88(%rip), %rdi      # 0x5517
leaq 0x1950(%rip), %rsi      # 0x52e6
leaq 0x1b01(%rip), %rcx      # 0x549e
movl $0x10a, %edx            # imm = 0x10A
callq 0x20e0
jmp 0x39a9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x39ca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x39ca
jmp 0x39c7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22c0