// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/kmer_database.c
// Function: gt_kmer_database_compare
int gt_kmer_database_compare(GtKmerDatabase *a, GtKmerDatabase *b, GtError *err)
{
  int had_err = 0;
  GtUword i;

  gt_error_check(err);

  if (a->nu_kmer_codes != b->nu_kmer_codes) {
    gt_error_set(err, "Kmer Dtaatabases not identical. Alphabet sizes are"
                 ": " GT_WU " and " GT_WU, a->nu_kmer_codes, b->nu_kmer_codes);
    had_err = -1;
  }

  if (!had_err && a->offset[a->nu_kmer_codes] !=
      b->offset[b->nu_kmer_codes]) {
    gt_error_set(err, "Kmer Databases not identical. Number of inserted kmers: "
                 GT_WU " and " GT_WU,
                 a->offset[a->nu_kmer_codes], b->offset[b->nu_kmer_codes]);
    had_err = -1;
  }

  for (i = 0; !had_err && i <= a->nu_kmer_codes; i++) {
    if (!had_err && a->offset[i] != b->offset[i]) {
      gt_error_set(err, "Kmer Databases not identical. Offset at " GT_WU
                   " are: " GT_WU " and " GT_WU, i, a->offset[i], b->offset[i]);
      had_err = -1;
    }
  }
  for (i = 0; !had_err && i < a->offset[a->nu_kmer_codes]; i++) {
    if (!had_err && a->positions[i] != b->positions[i]) {
      gt_error_set(err, "Kmer Databases not identical. Positions at " GT_WU
                   " are: "GT_WU " and " GT_WU, i, a->positions[i],
                   b->positions[i]);
      had_err = -1;
    }
    if (!had_err && a->unique_ids[i] != b->unique_ids[i]) {
      gt_error_set(err, "Kmer Databases not identical. Ids at " GT_WU
                   " are: "GT_WU " and " GT_WU,
                   i, a->unique_ids[i], b->unique_ids[i]);
      had_err = -1;
    }
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0xf55e5
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0xf56ef
movq 0x28(%r15), %rdx
movq 0x28(%r14), %rcx
pushq $-0x1
popq %rbp
cmpq %rcx, %rdx
jne 0xf5619
movq (%r15), %rax
movq (%rax,%rdx,8), %rax
movq (%r14), %rcx
movq (%rcx,%rdx,8), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
je 0xf562c
leaq 0x230265(%rip), %rsi    # 0x325876
movq %rbx, %rdi
movq %rax, %rdx
jmp 0xf5623
leaq 0x230216(%rip), %rsi    # 0x325836
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %edx
leaq 0x230287(%rip), %r12    # 0x3258ba
xorl %r13d, %r13d
testl %edx, %edx
jne 0xf566c
cmpq 0x28(%r15), %r13
ja 0xf5670
movq (%r15), %rax
movq (%rax,%r13,8), %rcx
movq (%r14), %rax
movq (%rax,%r13,8), %r8
xorl %edx, %edx
cmpq %r8, %rcx
je 0xf5667
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %edx
incq %r13
jmp 0xf5636
movl %ebp, %eax
jmp 0xf5672
xorl %eax, %eax
leaq 0x23027e(%rip), %r13    # 0x3258f7
xorl %r12d, %r12d
testl %eax, %eax
jne 0xf56de
movq (%r15), %rax
movq 0x28(%r15), %rcx
cmpq (%rax,%rcx,8), %r12
jae 0xf56dc
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rcx
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %r8
cmpq %r8, %rcx
jne 0xf56c5
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rcx
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %r8
xorl %eax, %eax
cmpq %r8, %rcx
je 0xf56d7
movq %rbx, %rdi
leaq 0x230274(%rip), %rsi    # 0x325937
jmp 0xf56cb
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %eax
incq %r12
jmp 0xf567c
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x342872(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1ef913(%rip), %rsi    # 0x2e5013
leaq 0x1efab8(%rip), %rdx    # 0x2e51bf
leaq 0x23010f(%rip), %rcx    # 0x32581d
leaq 0x22fcde(%rip), %r8     # 0x3253f3
movl $0x268, %r9d            # imm = 0x268
xorl %eax, %eax
callq 0x17a50
callq 0x17390