// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/hcr.c
// Function: hcr_base_qual_distr_new_from_file
static GtBaseQualDistr* hcr_base_qual_distr_new_from_file(FILE *fp,
                                                          GtAlphabet *alpha)
{
  GtBaseQualDistr *bqd;
  char read_char_code;
  GtUchar cur_char_code;
  unsigned char cur_qual;
  unsigned alpha_size,
           min_qual = HCR_HIGHESTQUALVALUE,
           max_qual = HCR_LOWESTQUALVALUE;
  GtUword numofleaves,
                i;
  GtUint64 cur_freq;
  GT_UNUSED size_t read,
            one = (size_t) 1;

  alpha_size = gt_alphabet_size(alpha);
  bqd = gt_malloc(sizeof (GtBaseQualDistr));
  gt_array2dim_calloc(bqd->distr, HCR_HIGHESTQUALVALUE + 1UL, alpha_size)
  bqd->ncols = alpha_size;
  bqd->nrows = HCR_HIGHESTQUALVALUE + 1U;
  bqd->qual_offset = HCR_LOWESTQUALVALUE;
  bqd->wildcard_indx = alpha_size - 1;

  read = gt_xfread_one(&numofleaves, fp);
  gt_assert(read == one);
  for (i = 0; i < numofleaves; i++) {
    read = gt_xfread_one(&read_char_code, fp);
    gt_assert(read == one);
    read = gt_xfread_one(&cur_qual, fp);
    gt_assert(read == one);
    read = gt_xfread_one(&cur_freq, fp);
    gt_assert(read == one);
    cur_char_code = gt_alphabet_encode(alpha, read_char_code);
    if (cur_char_code == (GtUchar) GT_WILDCARD)
      gt_safe_assign(cur_char_code, bqd->wildcard_indx);
    bqd->distr[cur_qual][cur_char_code] = cur_freq;
    if ((unsigned) cur_qual > max_qual)
      max_qual = cur_qual;
    if ((unsigned) cur_qual < min_qual)
      min_qual = cur_qual;
  }

  bqd->min_qual = min_qual;
  bqd->max_qual = max_qual;
  hcr_base_qual_distr_trim(bqd);
  return bqd;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl $0x7f, 0x44(%rsp)
movl $0x0, 0x40(%rsp)
movq $0x1, 0x18(%rsp)
movq 0x58(%rsp), %rdi
callq 0x7e920
movl %eax, 0x48(%rsp)
movl $0x30, %edi
leaq 0x3cc24a(%rip), %rsi    # 0x554ceb
movl $0xc1, %edx
callq 0xe80f0
movq %rax, 0x50(%rsp)
movl $0x400, %edi            # imm = 0x400
leaq 0x3cc22f(%rip), %rsi    # 0x554ceb
movl $0xc2, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
movl 0x48(%rsp), %eax
movl %eax, %edi
shlq $0x7, %rdi
movl $0x8, %esi
leaq 0x3cc204(%rip), %rdx    # 0x554ceb
movl $0xc2, %ecx
callq 0xe83c0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq $0x1, 0x10(%rsp)
cmpq $0x80, 0x10(%rsp)
jae 0x188b54
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movl 0x48(%rsp), %eax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x188b08
movl 0x48(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x50(%rsp), %rax
movl $0x80, 0x14(%rax)
movq 0x50(%rsp), %rax
movl $0x0, 0x28(%rax)
movl 0x48(%rsp), %ecx
subl $0x1, %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x60(%rsp), %rcx
leaq 0x38(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x126c30
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x188be9
movq 0x4b33e8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38d451(%rip), %rsi    # 0x516013
leaq 0x3cc5a3(%rip), %rdx    # 0x55516c
leaq 0x3cc5cf(%rip), %rcx    # 0x55519f
leaq 0x3cc114(%rip), %r8     # 0x554ceb
movl $0xc9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x188beb
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x188e49
movq 0x60(%rsp), %rcx
leaq 0x4f(%rsp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x126c30
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x188c64
movq 0x4b336d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38d3d6(%rip), %rsi    # 0x516013
leaq 0x3cc528(%rip), %rdx    # 0x55516c
leaq 0x3cc554(%rip), %rcx    # 0x55519f
leaq 0x3cc099(%rip), %r8     # 0x554ceb
movl $0xcc, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x188c66
movq 0x60(%rsp), %rcx
leaq 0x4d(%rsp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x126c30
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x188cc6
movq 0x4b330b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38d374(%rip), %rsi    # 0x516013
leaq 0x3cc4c6(%rip), %rdx    # 0x55516c
leaq 0x3cc4f2(%rip), %rcx    # 0x55519f
leaq 0x3cc037(%rip), %r8     # 0x554ceb
movl $0xce, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x188cc8
movq 0x60(%rsp), %rcx
leaq 0x28(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x126c30
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x188d2a
movq 0x4b32a7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38d310(%rip), %rsi    # 0x516013
leaq 0x3cc462(%rip), %rdx    # 0x55516c
leaq 0x3cc48e(%rip), %rcx    # 0x55519f
leaq 0x3cbfd3(%rip), %r8     # 0x554ceb
movl $0xd0, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x188d2c
movq 0x58(%rsp), %rdi
movsbl 0x4f(%rsp), %esi
callq 0x7f6f0
movb %al, 0x4e(%rsp)
movzbl 0x4e(%rsp), %eax
cmpl $0xfe, %eax
jne 0x188ded
jmp 0x188d51
movq 0x50(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movb %al, 0xb(%rsp)
movl 0xc(%rsp), %eax
movzbl 0xb(%rsp), %ecx
cmpl %ecx, %eax
jne 0x188da3
cmpl $0x1, 0xc(%rsp)
setb %al
andb $0x1, %al
movzbl %al, %eax
movzbl 0xb(%rsp), %ecx
cmpl $0x1, %ecx
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x188da3
movb 0xb(%rsp), %al
movb %al, 0x4e(%rsp)
xorl %eax, %eax
movl %eax, (%rsp)
jmp 0x188dad
movl $0x1, %eax
movl %eax, (%rsp)
jmp 0x188dad
movl (%rsp), %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x188de9
movq 0x4b31de(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38f259(%rip), %rsi    # 0x518025
leaq 0x3cbf18(%rip), %rdx    # 0x554ceb
movl $0xd3, %ecx
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x188deb
jmp 0x188ded
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movq (%rax), %rax
movzbl 0x4d(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movzbl 0x4e(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movzbl 0x4d(%rsp), %eax
cmpl 0x40(%rsp), %eax
jbe 0x188e20
movzbl 0x4d(%rsp), %eax
movl %eax, 0x40(%rsp)
movzbl 0x4d(%rsp), %eax
cmpl 0x44(%rsp), %eax
jae 0x188e34
movzbl 0x4d(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x188e36
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x188bf4
movl 0x44(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl 0x40(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x50(%rsp), %rdi
callq 0x187ce0
movq 0x50(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)