// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq 0x8(%rsi), %rdi
callq 0x172d0
movq %rax, %r15
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq (%rbx), %rax
cmpq $0x0, 0x10(%rax)
jne 0xd41f3
cmpb $0x0, 0x6c(%r14)
je 0xd3e64
xorl %eax, %eax
jmp 0xd3e9f
movq 0x30(%rbx), %rsi
movq (%r14), %rax
movq (%rax,%rsi,8), %r12
cmpq 0x40(%r14), %r12
ja 0xd4221
jae 0xd3e8c
leaq 0x248a8f(%rip), %rdi    # 0x31c911
movq %r12, %rdx
xorl %eax, %eax
callq 0x92a82
movl 0x68(%r14), %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xd43d1
movq 0x28(%rbx), %rax
leaq 0x20(%rbx), %rcx
movq %rcx, 0x30(%rsp)
imulq $0xc8, %rax, %r13
addq 0x18(%r14), %r13
xorl %r12d, %r12d
cmpq %r15, %r12
ja 0xd41ac
movq 0x8(%rbx), %rax
movb (%rax,%r12), %cl
cmpb 0xb8(%r13), %cl
je 0xd3eda
cmpq %r12, %r15
je 0xd3eda
incq %r12
jmp 0xd3eb6
movb $0x0, (%rax,%r12)
cmpb $0x0, 0xbb(%r13)
jne 0xd3fd6
cmpb $0x1, 0xbf(%r13)
jne 0xd3ff8
andq $0x0, 0x8(%rsp)
movq 0x18(%r14), %r13
imulq $0xc8, 0x28(%rbx), %rbp
movq %r13, %rax
addq %rbp, %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0xd3bd8
cmpb $0x1, 0xba(%r13,%rbp)
movq 0x28(%rsp), %r13
jne 0xd3f92
cmpb $0x0, 0xb9(%r13)
jne 0xd3f92
movq 0x18(%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %rdi
addq 0x20(%rbx), %rdi
imulq $0xc8, 0x28(%rbx), %rbp
callq 0xd3bb4
movq 0x20(%rsp), %rcx
movq 0x10(%rcx,%rbp), %rdi
testq %rdi, %rdi
je 0xd424d
movl %eax, %esi
leaq 0x18(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0xf0b83
movl 0x14(%rsp), %esi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0xd43d1
cmpq $0x0, 0x30(%rbx)
je 0xd3fa3
cmpb $0x1, 0x38(%rbx)
jne 0xd40a4
movq 0x8(%rsp), %rdx
subq 0x98(%r13), %rdx
movq 0x18(%r14), %rax
imulq $0xc8, 0x28(%rbx), %rcx
movl 0xb0(%rax,%rcx), %esi
movq %rbx, %rdi
callq 0xd43d1
movq 0x8(%rsp), %rax
movq %rax, 0xa0(%r13)
incq %r12
movq %r12, 0x20(%rbx)
movq 0x28(%rbx), %rax
incq %rax
movq %rax, 0x28(%rbx)
imulq $0xc8, %rax, %r13
addq 0x18(%r14), %r13
jmp 0xd3eb6
cmpb $0x0, 0xb9(%r13)
jne 0xd402c
imulq $0xc8, 0x28(%rbx), %rax
movq 0x18(%r14), %rcx
movq 0x58(%rcx,%rax), %rsi
addq 0x20(%rbx), %rsi
movq %r12, %rdx
subq %rsi, %rdx
movl 0xa8(%rcx,%rax), %esi
movq %rbx, %rdi
callq 0xd43d1
xorl %ebp, %ebp
movq %r12, %rax
movq 0x30(%rsp), %rcx
subq (%rcx), %rax
cmpq %rax, %rbp
jae 0xd3fd6
cmpq 0x50(%r13), %rbp
jae 0xd4054
movq 0x18(%r13), %rdi
movq %rbp, %rsi
callq 0x5e839
testb %al, %al
jne 0xd409f
imulq $0xc8, 0x28(%rbx), %rax
movq 0x18(%r14), %rcx
movq (%rcx,%rax), %rax
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0xd41bb
movq 0x8(%rbx), %rax
addq 0x20(%rbx), %rax
movsbq (%rbp,%rax), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0xf0b83
movl 0x8(%rsp), %esi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0xd43d1
incq %rbp
jmp 0xd402e
cmpb $0x1, 0xc0(%r13)
jne 0xd40bc
cmpb $0x0, 0xbc(%r13)
jne 0xd3fca
cmpb $0x1, 0xc1(%r13)
jne 0xd411f
movq 0x8(%rsp), %rdx
movq 0xa0(%r13), %rax
cmpq %rax, %rdx
setge %cl
andb 0xbe(%r13), %cl
cmpb $0x1, %cl
je 0xd436f
cmpq %rax, %rdx
setle %cl
andb 0xbd(%r13), %cl
cmpb $0x1, %cl
je 0xd43a0
movq 0x80(%r13), %rcx
movq 0x90(%r13), %rsi
addq %rsi, %rax
subq %rax, %rdx
subq %rsi, %rcx
cmpq %rcx, %rdx
jbe 0xd4150
jmp 0xd4311
movq 0x8(%rsp), %rdx
movq 0x88(%r13), %rax
cmpq %rax, %rdx
jg 0xd427e
movq 0x98(%r13), %rcx
subq %rcx, %rdx
jl 0xd42af
subq %rcx, %rax
cmpq %rax, %rdx
ja 0xd42e0
cmpb $0x1, 0xc2(%r13)
jne 0xd4194
movq 0x18(%r14), %rax
imulq $0xc8, 0x28(%rbx), %rcx
movq 0x8(%rax,%rcx), %rdi
testq %rdi, %rdi
je 0xd4342
movq %rdx, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0xf0b83
movl 0x14(%rsp), %esi
movq 0x18(%rsp), %rdx
jmp 0xd3fc2
movq 0x18(%r14), %rax
imulq $0xc8, 0x28(%rbx), %rcx
movl 0xac(%rax,%rcx), %esi
jmp 0xd3fc2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x363da6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210e47(%rip), %rsi    # 0x2e5013
leaq 0x2488aa(%rip), %rdx    # 0x31ca7d
leaq 0x2488fa(%rip), %rcx    # 0x31cad4
leaq 0x247ee7(%rip), %r8     # 0x31c0c8
movl $0xca, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x363d6e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210e0f(%rip), %rsi    # 0x2e5013
leaq 0x248671(%rip), %rdx    # 0x31c87c
leaq 0x248690(%rip), %rcx    # 0x31c8a2
leaq 0x247eaf(%rip), %r8     # 0x31c0c8
movl $0xde, %r9d
jmp 0xd41e7
movq 0x363d40(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210de1(%rip), %rsi    # 0x2e5013
leaq 0x24868b(%rip), %rdx    # 0x31c8c4
leaq 0x2486b3(%rip), %rcx    # 0x31c8f3
leaq 0x247e81(%rip), %r8     # 0x31c0c8
pushq $0x4b
popq %r9
jmp 0xd41e7
movq 0x363d14(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210db5(%rip), %rsi    # 0x2e5013
leaq 0x248818(%rip), %rdx    # 0x31ca7d
leaq 0x248821(%rip), %rcx    # 0x31ca8d
leaq 0x247e55(%rip), %r8     # 0x31c0c8
movl $0x330, %r9d            # imm = 0x330
jmp 0xd41e7
movq 0x363ce3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210d84(%rip), %rsi    # 0x2e5013
leaq 0x248769(%rip), %rdx    # 0x31c9ff
leaq 0x2486ec(%rip), %rcx    # 0x31c989
leaq 0x247e24(%rip), %r8     # 0x31c0c8
movl $0xa7, %r9d
jmp 0xd41e7
movq 0x363cb2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210d53(%rip), %rsi    # 0x2e5013
leaq 0x248756(%rip), %rdx    # 0x31ca1d
leaq 0x2486bb(%rip), %rcx    # 0x31c989
leaq 0x247df3(%rip), %r8     # 0x31c0c8
movl $0xa8, %r9d
jmp 0xd41e7
movq 0x363c81(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210d22(%rip), %rsi    # 0x2e5013
leaq 0x248743(%rip), %rdx    # 0x31ca3b
leaq 0x24868a(%rip), %rcx    # 0x31c989
leaq 0x247dc2(%rip), %r8     # 0x31c0c8
movl $0xab, %r9d
jmp 0xd41e7
movq 0x363c50(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210cf1(%rip), %rsi    # 0x2e5013
leaq 0x248694(%rip), %rdx    # 0x31c9bd
leaq 0x248659(%rip), %rcx    # 0x31c989
leaq 0x247d91(%rip), %r8     # 0x31c0c8
movl $0xa4, %r9d
jmp 0xd41e7
movq 0x363c1f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210cc0(%rip), %rsi    # 0x2e5013
leaq 0x248723(%rip), %rdx    # 0x31ca7d
leaq 0x24874f(%rip), %rcx    # 0x31cab0
leaq 0x247d60(%rip), %r8     # 0x31c0c8
pushq $0x75
jmp 0xd4249
movq 0x363bf2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210c93(%rip), %rsi    # 0x2e5013
leaq 0x2485e4(%rip), %rdx    # 0x31c96b
leaq 0x2485fb(%rip), %rcx    # 0x31c989
leaq 0x247d33(%rip), %r8     # 0x31c0c8
movl $0x9e, %r9d
jmp 0xd41e7
movq 0x363bc1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210c62(%rip), %rsi    # 0x2e5013
leaq 0x2485e7(%rip), %rdx    # 0x31c99f
leaq 0x2485ca(%rip), %rcx    # 0x31c989
leaq 0x247d02(%rip), %r8     # 0x31c0c8
movl $0xa0, %r9d
jmp 0xd41e7