// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/encdesc.c
// Function: prepare_write_data_and_count_bits
static void prepare_write_data_and_count_bits(GtEncdesc *encdesc,
                                              EncdescWriteInfo *info)
{
  size_t desc_char_idx,
         field_char_idx,
         len;
  DescField *cur_field;

  len = strlen(info->descbuffer);
  info->cur_field_num = 0;
  info->cur_field_start_pos = 0;
  info->total_bits_prepared = 0;
  gt_assert(info->codes->nextfreeEncdescCode == 0);

  if (!encdesc->num_of_fields_is_const) {
    encdesc_prepare_num_of_fields(encdesc, info);
  }

  cur_field = &encdesc->fields[info->cur_field_num];
  for (desc_char_idx = 0; desc_char_idx <= len; desc_char_idx++) {
    if (info->descbuffer[desc_char_idx] == cur_field->sep ||
        desc_char_idx == len) {

      info->descbuffer[desc_char_idx] = '\0';
      if (!cur_field->is_const) {
        if (cur_field->is_numeric) {
          prepare_numeric_field(encdesc, info);
        }
        else {
          if (!cur_field->fieldlen_is_const) {
            regular_field_prepare_length(encdesc, info,
                                         (GtUword) desc_char_idx);
          }
          for (field_char_idx = 0;
               field_char_idx < desc_char_idx - info->cur_field_start_pos;
               field_char_idx++) {
            if (field_char_idx >= (size_t) cur_field->len ||
                !gt_bittab_bit_is_set(cur_field->bittab,
                                     (GtUword) field_char_idx)) {
              regular_field_prepare_char(encdesc, info,
                                         (GtUword) field_char_idx);
            }
          }

        }
      }
      info->cur_field_start_pos = (GtUword) desc_char_idx + 1;
      info->cur_field_num++;
      cur_field = &encdesc->fields[info->cur_field_num];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r12
movq 0x8(%rsi), %rdi
callq 0x172f0
movq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq (%rbx), %rcx
cmpq $0x0, 0x10(%rcx)
jne 0x13d97a
movq %rax, %r13
cmpb $0x0, 0x6c(%r12)
je 0x13d2f4
xorl %eax, %eax
jmp 0x13d394
movq 0x30(%rbx), %rsi
movq (%r12), %rax
movq %r12, %r15
movq 0x40(%r12), %rdx
movq (%rax,%rsi,8), %r12
cmpq %rdx, %r12
ja 0x13d989
jae 0x13d32d
leaq 0x23f1ec(%rip), %rdi    # 0x37c506
movq %r12, %rdx
xorl %eax, %eax
callq 0x103d72
movq (%rbx), %rcx
movq 0x10(%rcx), %rax
jmp 0x13d32f
xorl %eax, %eax
movl 0x68(%r15), %r14d
movq 0x8(%rcx), %rsi
cmpq %rsi, %rax
jae 0x13d341
movq (%rcx), %rax
jmp 0x13d367
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e9d1(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
callq 0x104461
movq (%rbx), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x13d98e
movq 0x10(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx)
shlq $0x4, %rdx
movl %r14d, 0x8(%rax,%rdx)
movq %r12, (%rax,%rdx)
addq %r14, 0x10(%rbx)
movq 0x28(%rbx), %rax
movq %r15, %r12
leaq 0x20(%rbx), %rcx
movq %rcx, 0x28(%rsp)
imulq $0xc8, %rax, %r15
addq 0x18(%r12), %r15
xorl %r14d, %r14d
movq %rbx, 0x20(%rsp)
movq %r13, 0x30(%rsp)
movq 0x8(%rbx), %rax
movb (%rax,%r14), %cl
cmpb 0xb8(%r15), %cl
sete %cl
cmpq %r13, %r14
sete %dl
orb %cl, %dl
je 0x13d46a
movb $0x0, (%rax,%r14)
cmpb $0x0, 0xbb(%r15)
jne 0x13d75f
cmpb $0x1, 0xbf(%r15)
jne 0x13d472
movq %r14, %r13
movq $0x0, 0x8(%rsp)
imulq $0xc8, 0x28(%rbx), %r14
movq 0x18(%r12), %r15
leaq (%r15,%r14), %rbp
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x8(%rsp), %rdx
callq 0x13d15c
cmpb $0x1, 0xba(%r15,%r14)
jne 0x13d6c0
cmpb $0x0, 0xb9(%rbp)
jne 0x13d6c0
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rdx
movb (%rax,%rdx), %cl
cmpb $0x30, %cl
jne 0x13d61b
addq %rax, %rdx
incq %rdx
xorl %eax, %eax
movb (%rdx,%rax), %cl
incq %rax
cmpb $0x30, %cl
je 0x13d45a
jmp 0x13d61d
incq %r14
jmp 0x13d782
movq 0x28(%rsp), %rax
movq (%rax), %rbp
cmpb $0x0, 0xb9(%r15)
jne 0x13d524
movq %r14, (%rsp)
movq 0x18(%r12), %rax
imulq $0xc8, 0x28(%rbx), %rcx
movq 0x58(%rax,%rcx), %r14
movl 0xa8(%rax,%rcx), %r8d
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, 0x10(%rcx)
jae 0x13d4b8
movq (%rcx), %rax
jmp 0x13d4e8
movq %rbx, %r13
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e857(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
movq %r8, %rbx
callq 0x104461
movq %rbx, %r8
movq (%r13), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x13d975
addq %r14, %rbp
movq (%rsp), %r14
movq %r14, %rdx
subq %rbp, %rdx
movq 0x10(%rcx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x10(%rcx)
shlq $0x4, %rsi
movl %r8d, 0x8(%rax,%rsi)
movq %rdx, (%rax,%rsi)
movq 0x20(%rsp), %rbx
addq %r8, 0x10(%rbx)
movq 0x20(%rbx), %rbp
cmpq %rbp, %r14
je 0x13d75f
xorl %ebp, %ebp
cmpq 0x50(%r15), %rbp
jae 0x13d549
movq 0x18(%r15), %rdi
movq %rbp, %rsi
callq 0xd6e4a
testb %al, %al
jne 0x13d5ff
imulq $0xc8, 0x28(%rbx), %rax
movq 0x18(%r12), %rcx
movq (%rcx,%rax), %rax
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0x13d966
movq %r12, %r13
movq 0x8(%rbx), %rax
addq 0x20(%rbx), %rax
movsbq (%rbp,%rax), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x1544f4
movl 0x8(%rsp), %r12d
movq 0x18(%rsp), %rdi
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, 0x10(%rcx)
jae 0x13d5a3
movq (%rcx), %rax
jmp 0x13d5d1
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq %rdi, (%rsp)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e76b(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
callq 0x104461
movq (%rsp), %rdi
movq (%rbx), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x13d96b
movq 0x10(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx)
shlq $0x4, %rdx
movl %r12d, 0x8(%rax,%rdx)
movq %rdi, (%rax,%rdx)
movq 0x20(%rsp), %rbx
addq %r12, 0x10(%rbx)
movq %r13, %r12
incq %rbp
movq %r14, %rax
movq 0x28(%rsp), %rcx
subq (%rcx), %rax
cmpq %rax, %rbp
jb 0x13d52f
jmp 0x13d75f
xorl %eax, %eax
movq 0x18(%r12), %rdx
imulq $0xc8, 0x28(%rbx), %rsi
movq 0x10(%rdx,%rsi), %rdi
testq %rdi, %rdi
je 0x13d984
testb %al, %al
setne %dl
testb %cl, %cl
sete %cl
andb %dl, %cl
subb %cl, %al
movzbl %al, %esi
leaq 0x18(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0x1544f4
movl 0x14(%rsp), %r15d
movq 0x18(%rsp), %r14
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, 0x10(%rcx)
jae 0x13d674
movq (%rcx), %rax
jmp 0x13d69a
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e69e(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
callq 0x104461
movq (%rbx), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x13d97f
movq 0x10(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx)
shlq $0x4, %rdx
movl %r15d, 0x8(%rax,%rdx)
movq %r14, (%rax,%rdx)
addq %r15, 0x10(%rbx)
cmpq $0x0, 0x30(%rbx)
je 0x13d6d1
cmpb $0x1, 0x38(%rbx)
jne 0x13d790
movq 0x8(%rsp), %r15
subq 0x98(%rbp), %r15
movq 0x18(%r12), %rax
imulq $0xc8, 0x28(%rbx), %rcx
movl 0xb0(%rax,%rcx), %r14d
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, 0x10(%rcx)
jae 0x13d704
movq (%rcx), %rax
jmp 0x13d72a
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e60e(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
callq 0x104461
movq (%rbx), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x13d970
movq 0x10(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx)
shlq $0x4, %rdx
movl %r14d, 0x8(%rax,%rdx)
movq %r15, (%rax,%rdx)
addq %r14, 0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0xa0(%rbp)
movq %r13, %r14
incq %r14
movq %r14, 0x20(%rbx)
movq 0x28(%rbx), %rax
incq %rax
movq %rax, 0x28(%rbx)
imulq $0xc8, %rax, %r15
addq 0x18(%r12), %r15
movq 0x30(%rsp), %r13
cmpq %r13, %r14
jbe 0x13d3b6
jmp 0x13d957
cmpb $0x1, 0xc0(%rbp)
jne 0x13d7a2
cmpb $0x0, 0xbc(%rbp)
jne 0x13d750
cmpb $0x1, 0xc1(%rbp)
movq %rbp, %rsi
jne 0x13d805
movq 0x8(%rsp), %rbp
movq 0xa0(%rsi), %rax
cmpq %rax, %rbp
setge %cl
andb 0xbe(%rsi), %cl
cmpb $0x1, %cl
je 0x13d9bb
cmpq %rax, %rbp
setle %cl
andb 0xbd(%rsi), %cl
cmpb $0x1, %cl
je 0x13d9b6
movq 0x80(%rsi), %rcx
movq 0x90(%rsi), %rdx
addq %rdx, %rax
subq %rax, %rbp
subq %rdx, %rcx
cmpq %rcx, %rbp
jbe 0x13d836
jmp 0x13d9b1
movq 0x8(%rsp), %rbp
movq 0x88(%rsi), %rax
cmpq %rax, %rbp
jg 0x13d99d
movq 0x98(%rsi), %rcx
subq %rcx, %rbp
jl 0x13d998
subq %rcx, %rax
cmpq %rax, %rbp
ja 0x13d993
movq 0x18(%r12), %rax
movq %rsi, (%rsp)
cmpb $0x1, 0xc2(%rsi)
jne 0x13d88f
imulq $0xc8, 0x28(%rbx), %rcx
movq 0x8(%rax,%rcx), %rdi
testq %rdi, %rdi
je 0x13d9ac
movq %rbp, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0x1544f4
movl 0x14(%rsp), %r15d
movq 0x18(%rsp), %r14
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, 0x10(%rcx)
jae 0x13d906
movq (%rcx), %rax
jmp 0x13d92c
imulq $0xc8, 0x28(%rbx), %rcx
movl 0xac(%rax,%rcx), %r14d
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
cmpq %rsi, 0x10(%rcx)
jae 0x13d8b1
movq (%rcx), %rax
jmp 0x13d8d7
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e461(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
callq 0x104461
movq (%rbx), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x13d9a2
movq 0x10(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx)
shlq $0x4, %rdx
movl %r14d, 0x8(%rax,%rdx)
movq %rbp, (%rax,%rdx)
addq %r14, 0x10(%rbx)
movq (%rsp), %rbp
jmp 0x13d750
addq $0x32, %rsi
movq %rsi, 0x8(%rcx)
movq (%rcx), %rdi
shlq $0x4, %rsi
leaq 0x23e40c(%rip), %rdx    # 0x37bd28
movl $0x3d, %ecx
callq 0x104461
movq (%rbx), %rcx
movq %rax, (%rcx)
movq (%rsp), %rbp
testq %rax, %rax
je 0x13d9a7
movq 0x10(%rcx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx)
shlq $0x4, %rdx
movl %r15d, 0x8(%rax,%rdx)
movq %r14, (%rax,%rdx)
addq %r15, 0x10(%rbx)
jmp 0x13d750
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x40d94
callq 0x40d5d
callq 0x41038
callq 0x40d26
callq 0x40c7f
callq 0x40dcd
callq 0x40e04
callq 0x40cef
callq 0x40cb8
callq 0x40e3d
callq 0x40e76
callq 0x40eaf
callq 0x40ee8
callq 0x40f1f
callq 0x40f56
callq 0x40f8d
callq 0x40fc6
callq 0x40fff