// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/score_matrix.c
// Function: parse_score_matrix
static int parse_score_matrix(GtScoreMatrix *sm, const char *path,
                              GtError *err)
{
  GtTokenizer *tz;
  GtArray *index_to_alpha_char_mapping;
  unsigned int parsed_score_lines = 0;
  char parsed_characters[UCHAR_MAX] = { 0 };
  int had_err = 0;
  gt_error_check(err);
  gt_assert(sm && path && sm->alphabet);
  tz = gt_tokenizer_new(gt_io_new(path, "r"));
  index_to_alpha_char_mapping = gt_array_new(sizeof (char));
  gt_tokenizer_skip_comment_lines(tz);
  had_err = parse_alphabet_line(index_to_alpha_char_mapping, tz, err);
  if (!had_err) {
    while (gt_tokenizer_has_token(tz)) {
      had_err = parse_score_line(sm, tz, index_to_alpha_char_mapping,
                                 parsed_characters, err);
      if (had_err)
        break;
      parsed_score_lines++;
    }
  }

  /* check the number of parsed score lines */
  if (!had_err &&
      parsed_score_lines != gt_array_size(index_to_alpha_char_mapping)) {
    gt_error_set(err, "the score matrix given in '%s' is not symmetric", path);
    had_err = -1;
  }

  gt_array_delete(index_to_alpha_char_mapping);
  gt_tokenizer_delete(tz);

  return had_err;
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movl $0x0, 0x11c(%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0xff, %edx
callq 0xb2d0
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x130(%rsp)
je 0xe21c9
movq 0x130(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0xe2191
jmp 0xe21c9
movq 0xd1e40(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x7bec4(%rip), %rsi     # 0x15e066
leaq 0x7c49f(%rip), %rdx     # 0x15e648
leaq 0x96963(%rip), %rcx     # 0x178b13
leaq 0x96837(%rip), %r8      # 0x1789ee
movl $0xc1, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe21cb
jmp 0xe21cd
cmpq $0x0, 0x140(%rsp)
je 0xe21f1
cmpq $0x0, 0x138(%rsp)
je 0xe21f1
movq 0x140(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xe2229
movq 0xd1de0(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x7be64(%rip), %rsi     # 0x15e066
leaq 0x9691d(%rip), %rdx     # 0x178b26
leaq 0x96903(%rip), %rcx     # 0x178b13
leaq 0x967d7(%rip), %r8      # 0x1789ee
movl $0xc2, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe222b
movq 0x138(%rsp), %rdi
leaq 0x89fd2(%rip), %rsi     # 0x16c20c
callq 0xe16f0
movq %rax, %rdi
callq 0xe4e10
movq %rax, 0x128(%rsp)
movl $0x1, %edi
callq 0x75ab0
movq %rax, 0x120(%rsp)
movq 0x128(%rsp), %rdi
callq 0xe4ea0
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
movq 0x130(%rsp), %rdx
callq 0xe2990
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0xe22f7
jmp 0xe2298
movq 0x128(%rsp), %rdi
callq 0xe5200
testb $0x1, %al
jne 0xe22ab
jmp 0xe22f5
movq 0x140(%rsp), %rdi
movq 0x128(%rsp), %rsi
movq 0x120(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq 0x130(%rsp), %r8
callq 0xe2e40
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xe22e2
jmp 0xe22f5
movl 0x11c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x11c(%rsp)
jmp 0xe2298
jmp 0xe22f7
cmpl $0x0, 0xc(%rsp)
jne 0xe2348
movl 0x11c(%rsp), %eax
movq %rax, (%rsp)
movq 0x120(%rsp), %rdi
callq 0x76490
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
je 0xe2348
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %rdx
leaq 0x96808(%rip), %rsi     # 0x178b41
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x120(%rsp), %rdi
callq 0x770a0
movq 0x128(%rsp), %rdi
callq 0xe58c0
movl 0xc(%rsp), %eax
addq $0x148, %rsp            # imm = 0x148
retq
nop