// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/src/stats.h
// Function: ococo::stats_t<unsigned short, 3, 4>::stats_t(ococo::params_t*, bam_hdr_t&)
stats_t<T, counter_size, refbase_size>::stats_t(ococo::params_t *params,
                                                bam_hdr_t &h)
    : n_seqs(h.n_targets),
      seq_active(new (std::nothrow) bool[n_seqs]()),
      seq_len(new (std::nothrow) int64_t[n_seqs]()),
      seq_name(new (std::nothrow) std::string[n_seqs]()),
      seq_comment(new (std::nothrow) std::string[n_seqs]()),
      seq_stats(new (std::nothrow) T *[n_seqs]()),
      params(params) {
    for (int seqid = 0; seqid < n_seqs; seqid++) {
        seq_len[seqid]    = h.target_len[seqid];
        seq_active[seqid] = true;
        seq_name[seqid]   = std::string(h.target_name[seqid]);

        seq_stats[seqid] = new (std::nothrow) T[seq_len[seqid]]();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, %r14
movq %rdx, 0x20(%rsp)
movl (%rdx), %r12d
movl %r12d, (%rdi)
movslq %r12d, %r13
movq 0x50055(%rip), %rsi     # 0x56fa8
movq %r13, %rdi
callq 0x48d0
movq %rax, %r15
testq %rax, %rax
je 0x6f70
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x42e0
movq %r15, 0x8(%r14)
leaq (,%r13,8), %rbx
testl %r13d, %r13d
pushq $-0x1
popq %rax
cmovsq %rax, %rbx
movq 0x5001b(%rip), %rsi     # 0x56fa8
movq %rbx, %rdi
callq 0x48d0
movq %rax, %r15
testq %rax, %rax
je 0x6faa
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x42e0
movq %rbx, 0x10(%rsp)
movq %r13, %rbx
shlq $0x5, %rbx
leaq 0x8(%rbx), %rbp
testl %r13d, %r13d
movq %r15, 0x10(%r14)
pushq $-0x1
popq %rax
cmovsq %rax, %rbp
movq 0x4ffd9(%rip), %rsi     # 0x56fa8
movq %rbp, %rdi
callq 0x48d0
testq %rax, %rax
je 0x7004
movq %r13, (%rax)
leaq 0x8(%rax), %rcx
testl %r13d, %r13d
je 0x7006
addq $0x18, %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %rbx
jne 0x6fec
jmp 0x7006
xorl %ecx, %ecx
movq %rcx, 0x18(%r14)
movq 0x4ff97(%rip), %rsi     # 0x56fa8
movq %rbp, %rdi
callq 0x48d0
testq %rax, %rax
movq 0x10(%rsp), %rbx
je 0x704f
movq %r13, (%rax)
leaq 0x8(%rax), %rcx
testl %r13d, %r13d
je 0x7051
addq $0x18, %rax
shlq $0x5, %r13
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r13
jne 0x7037
jmp 0x7051
xorl %ecx, %ecx
movq %rcx, 0x20(%r14)
movq 0x4ff4c(%rip), %rsi     # 0x56fa8
movq %rbx, %rdi
callq 0x48d0
movq %rax, %r15
testq %rax, %rax
je 0x7079
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x42e0
movq %r15, 0x28(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x30(%r14)
xorl %r13d, %r13d
leaq 0x28(%rsp), %r15
xorl %ebx, %ebx
movslq %r12d, %rax
cmpq %rax, %rbx
jge 0x7135
movq 0x20(%rsp), %rdx
movq 0x10(%rdx), %rax
movl (%rax,%rbx,4), %eax
movq 0x10(%r14), %rcx
movq %rax, (%rcx,%rbx,8)
movq 0x8(%r14), %rax
movb $0x1, (%rax,%rbx)
movq 0x20(%rdx), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x7576
movq 0x18(%r14), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0x4650
movq %r15, %rdi
callq 0x4230
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rax
leaq (%rax,%rax), %rbp
testq %rax, %rax
pushq $-0x1
popq %rax
cmovsq %rax, %rbp
movq %rbp, %rdi
movq 0x4fea4(%rip), %rsi     # 0x56fa8
callq 0x48d0
movq %rax, %r12
testq %rax, %rax
je 0x711e
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x42e0
movq 0x28(%r14), %rax
movq %r12, (%rax,%rbx,8)
incq %rbx
movl (%r14), %r12d
addq $0x20, %r13
jmp 0x7090
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq