// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/md5set.c
// Function: gt_md5set_add_sequence
GtMD5SetStatus gt_md5set_add_sequence(GtMD5Set *set, const char* seq,
                                      GtUword seqlen, bool both_strands,
                                      GtError *err)
{
  md5_t md5sum, md5sum_rc;
  GtUword i;
  int retval = 0;
  bool found;

  gt_assert(set != NULL);
  gt_assert(set->table != NULL);

  md5set_prepare_buffer(set, seqlen);
  for (i = 0; i < seqlen; i++)
    set->buffer[i] = toupper(seq[i]);

  MD5SET_HASH_STRING(set->buffer, seqlen, md5sum);
  found = md5set_search(set, md5sum, true);
  if (found)
    return GT_MD5SET_FOUND;

  if (both_strands) {
    retval = gt_reverse_complement(set->buffer, seqlen, err);
    if (retval != 0) {
      gt_assert(retval < 0);
      return GT_MD5SET_ERROR;
    }

    MD5SET_HASH_STRING(set->buffer, seqlen, md5sum_rc);
    /* if the MD5 sum of the reverse complement equals the MD5 sum of the
       sequence itself we don't check if the reverse complement is in the set.
       Otherwise such sequences would never be added to the set at all. */
    if (md5sum_rc.l == md5sum.l && md5sum_rc.h == md5sum.h) {
      return GT_MD5SET_NOT_FOUND;
    }
    found = md5set_search(set, md5sum_rc, false);
    if (found)
      return GT_MD5SET_RC_FOUND;
  }

  return GT_MD5SET_NOT_FOUND;
}

// Assembly:
subq $0x78, %rsp
movb %cl, %al
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
andb $0x1, %al
movb %al, 0x57(%rsp)
movq %r8, 0x48(%rsp)
movl $0x0, 0x1c(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x1ada28
movq 0x48e5a9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x368612(%rip), %rsi    # 0x516013
leaq 0x3ac969(%rip), %rdx    # 0x55a371
leaq 0x3ac85d(%rip), %rcx    # 0x55a26c
leaq 0x3ac813(%rip), %r8     # 0x55a229
movl $0xf6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ada2a
jmp 0x1ada2c
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1ada6f
movq 0x48e562(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3685cb(%rip), %rsi    # 0x516013
leaq 0x3ac834(%rip), %rdx    # 0x55a283
leaq 0x3ac816(%rip), %rcx    # 0x55a26c
leaq 0x3ac7cc(%rip), %r8     # 0x55a229
movl $0xf7, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ada71
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x1adc70
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x1adacb
movq 0x60(%rsp), %rax
movq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x19dd0
movb %al, %dl
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x1ada89
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x3ac744(%rip), %rsi    # 0x55a229
movl $0xfd, %edx
leaq -0xa4021(%rip), %rcx    # 0x109ad0
xorl %eax, %eax
movl %eax, %r8d
callq 0x109e00
movq 0x10(%rsp), %rdi
movq %rax, %rsi
leaq 0x38(%rsp), %rdx
callq 0x35a880
movq 0x68(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x1, %ecx
callq 0x1add60
andb $0x1, %al
movb %al, 0x1b(%rsp)
testb $0x1, 0x1b(%rsp)
je 0x1adb40
movl $0x1, 0x74(%rsp)
jmp 0x1adc59
testb $0x1, 0x57(%rsp)
je 0x1adc51
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x1cb4f0
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
je 0x1adbbe
jmp 0x1adb70
cmpl $0x0, 0x1c(%rsp)
jl 0x1adbaf
movq 0x48e422(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36848b(%rip), %rsi    # 0x516013
leaq 0x3ac707(%rip), %rdx    # 0x55a296
leaq 0x3ac6d6(%rip), %rcx    # 0x55a26c
leaq 0x3ac68c(%rip), %r8     # 0x55a229
movl $0x105, %r9d            # imm = 0x105
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1adbb1
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x1adc59
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x3ac651(%rip), %rsi    # 0x55a229
movl $0x109, %edx            # imm = 0x109
leaq -0xa4114(%rip), %rcx    # 0x109ad0
xorl %eax, %eax
movl %eax, %r8d
callq 0x109e00
movq 0x8(%rsp), %rdi
movq %rax, %rsi
leaq 0x28(%rsp), %rdx
callq 0x35a880
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x1adc22
movq 0x30(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x1adc22
movl $0x0, 0x74(%rsp)
jmp 0x1adc59
movq 0x68(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
xorl %ecx, %ecx
callq 0x1add60
andb $0x1, %al
movb %al, 0x1b(%rsp)
testb $0x1, 0x1b(%rsp)
je 0x1adc4f
movl $0x2, 0x74(%rsp)
jmp 0x1adc59
jmp 0x1adc51
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)