// File: /workspace/github_c_makefile_star2_O1/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 0x15f91e
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x15fa54
movq 0x28(%r15), %rdx
movq 0x28(%r14), %rcx
cmpq %rcx, %rdx
jne 0x15f945
movq (%r15), %rax
movq (%rax,%rdx,8), %rdx
movq (%r14), %rax
movq (%rax,%rcx,8), %rcx
cmpq %rcx, %rdx
jne 0x15f94e
xorl %eax, %eax
movb $0x1, %bpl
jmp 0x15f966
leaq 0x22eeaf(%rip), %rsi    # 0x38e7fb
jmp 0x15f955
leaq 0x22eee6(%rip), %rsi    # 0x38e83b
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %bpl, %bpl
je 0x15f9b3
xorl %r13d, %r13d
movq (%r15), %rax
movq (%rax,%r13,8), %rbp
movq (%r14), %rax
movq (%rax,%r13,8), %r12
movl $0x0, %eax
cmpq %r12, %rbp
je 0x15f9a5
movq %rbx, %rdi
leaq 0x22eeef(%rip), %rsi    # 0x38e87f
movq %r13, %rdx
movq %rbp, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %r12, %rbp
jne 0x15f9b3
incq %r13
cmpq 0x28(%r15), %r13
jbe 0x15f96e
testl %eax, %eax
je 0x15f9c6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rcx
movq 0x28(%r15), %rdx
cmpq $0x0, (%rcx,%rdx,8)
je 0x15f9b7
xorl %r12d, %r12d
leaq 0x22eede(%rip), %rbp    # 0x38e8bc
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rcx
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %r8
cmpq %r8, %rcx
jne 0x15fa0f
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rcx
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %r8
cmpq %r8, %rcx
jne 0x15fa1a
xorl %eax, %eax
movb $0x1, %r13b
jmp 0x15fa36
xorl %r13d, %r13d
movq %rbx, %rdi
movq %rbp, %rsi
jmp 0x15fa27
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x22eed5(%rip), %rsi    # 0x38e8fc
movq %r12, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %r13b, %r13b
je 0x15f9b7
incq %r12
movq (%r15), %rcx
movq 0x28(%r15), %rdx
cmpq (%rcx,%rdx,8), %r12
jb 0x15f9de
jmp 0x15f9b7
callq 0x4b3f2