// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/desc_buffer.c
// Function: gt_desc_buffer_unit_test
int gt_desc_buffer_unit_test(GtError *err)
{
  GtDescBuffer *s;
  static char *strs[] = { "foo", "bar", "baz"};
  const char *ret;
  int had_err = 0;
  GtUword i, j;
  gt_error_check(err);

  s = gt_desc_buffer_new();
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, "") == 0);
  gt_ensure(ret == s->buf);
  gt_ensure(gt_desc_buffer_length(s) == 0);
  gt_desc_buffer_delete(s);

  s = gt_desc_buffer_new();
  for (i = 0; i < strlen(strs[0]); i++) {
    gt_desc_buffer_append_char(s, strs[0][i]);
  }
  gt_desc_buffer_finish(s);
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, strs[0]) == 0);
  gt_ensure(ret == s->buf);
  gt_ensure(gt_desc_buffer_length(s) == 4);
  gt_desc_buffer_delete(s);

  s = gt_desc_buffer_new();
  for (j = 0; j < 2; j++) {
    for (i = 0; i < strlen(strs[j]); i++) {
      gt_desc_buffer_append_char(s, strs[j][i]);
    }
    gt_desc_buffer_finish(s);
  }
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, strs[0]) == 0);
  gt_ensure(ret == s->buf);
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, strs[1]) == 0);
  gt_ensure(ret == s->buf+4);
  gt_ensure(gt_desc_buffer_length(s) == 8);
  gt_desc_buffer_delete(s);

  s = gt_desc_buffer_new();
  for (j = 0; j < 3; j++) {
    for (i = 0; i < strlen(strs[j]); i++) {
      gt_desc_buffer_append_char(s, strs[j][i]);
    }
    gt_desc_buffer_finish(s);
  }
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, strs[0]) == 0);
  gt_ensure(ret == s->buf);
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, strs[1]) == 0);
  gt_ensure(ret == s->buf+4);
  ret = gt_desc_buffer_get_next(s);
  gt_ensure(strcmp(ret, strs[2]) == 0);
  gt_ensure(ret == s->buf+8);
  gt_ensure(gt_desc_buffer_length(s) == 12);
  gt_desc_buffer_delete(s);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
testq %rdi, %rdi
je 0x83cb3
movq %r12, %rdi
callq 0xc103
testb %al, %al
jne 0x84248
callq 0x838b8
movq %rax, %r14
movq %rax, %rdi
callq 0x83a2e
cmpb $0x0, (%rax)
je 0x83cf1
leaq 0x4848a(%rip), %rsi     # 0xcc159
leaq 0x5f878(%rip), %rdx     # 0xe354e
leaq 0x5f858(%rip), %rcx     # 0xe3535
leaq 0x5f78b(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc3, %r9d
jmp 0x83d51
cmpq (%r14), %rax
je 0x83d1f
leaq 0x4845c(%rip), %rsi     # 0xcc159
leaq 0x5f85f(%rip), %rdx     # 0xe3563
leaq 0x5f82a(%rip), %rcx     # 0xe3535
leaq 0x5f75d(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc4, %r9d
jmp 0x83d51
cmpq $0x0, 0x8(%r14)
je 0x84240
leaq 0x48428(%rip), %rsi     # 0xcc159
leaq 0x5f839(%rip), %rdx     # 0xe3571
leaq 0x5f7f6(%rip), %rcx     # 0xe3535
leaq 0x5f729(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc5, %r9d
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x83be3
xorl %r15d, %r15d
callq 0x838b8
movq %rax, %r14
leaq 0x5718f(%rip), %rbx     # 0xdaf01
cmpq $0x3, %r15
je 0x83d8a
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0x8396b
incq %r15
jmp 0x83d72
movq %r14, %rdi
callq 0x83a7f
movq %r14, %rdi
callq 0x83a2e
testb %bpl, %bpl
je 0x83dde
movq %rax, %r15
leaq 0x57158(%rip), %rsi     # 0xdaf01
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x83de2
leaq 0x4839d(%rip), %rsi     # 0xcc159
leaq 0x5f7cc(%rip), %rdx     # 0xe358f
leaq 0x5f76b(%rip), %rcx     # 0xe3535
leaq 0x5f69e(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xce, %r9d
jmp 0x83e41
xorl %ebp, %ebp
jmp 0x83e48
cmpq (%r14), %r15
je 0x83e10
leaq 0x4836b(%rip), %rsi     # 0xcc159
leaq 0x5f76e(%rip), %rdx     # 0xe3563
leaq 0x5f739(%rip), %rcx     # 0xe3535
leaq 0x5f66c(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xcf, %r9d
jmp 0x83e41
movb $0x1, %bpl
cmpq $0x4, 0x8(%r14)
je 0x83e48
leaq 0x48338(%rip), %rsi     # 0xcc159
leaq 0x5f781(%rip), %rdx     # 0xe35a9
leaq 0x5f706(%rip), %rcx     # 0xe3535
leaq 0x5f639(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xd0, %r9d
xorl %eax, %eax
callq 0xc007
movq %r12, (%rsp)
movq %r14, %rdi
callq 0x83be3
xorl %r13d, %r13d
callq 0x838b8
movq %rax, %r14
leaq 0xa918a(%rip), %r12     # 0x12cff0
cmpq $0x2, %r13
je 0x83e9e
movq (%r12,%r13,8), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xb260
cmpq %rax, %rbx
jae 0x83e91
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0x8396b
incq %rbx
jmp 0x83e72
movq %r14, %rdi
callq 0x83a7f
incq %r13
jmp 0x83e66
movq %r14, %rdi
callq 0x83a2e
testb %bpl, %bpl
je 0x83eee
movq %rax, %r15
leaq 0x5704c(%rip), %rsi     # 0xdaf01
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
movq (%rsp), %rbx
je 0x83ef6
leaq 0x4828d(%rip), %rsi     # 0xcc159
leaq 0x5f6bc(%rip), %rdx     # 0xe358f
leaq 0x5f65b(%rip), %rcx     # 0xe3535
leaq 0x5f58e(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xdb, %r9d
jmp 0x83f26
xorl %ebp, %ebp
movq (%rsp), %rbx
jmp 0x83f2d
cmpq (%r14), %r15
je 0x83fb2
leaq 0x48253(%rip), %rsi     # 0xcc159
leaq 0x5f656(%rip), %rdx     # 0xe3563
leaq 0x5f621(%rip), %rcx     # 0xe3535
leaq 0x5f554(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xdc, %r9d
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x83a2e
testb %bpl, %bpl
je 0x83f79
movq %rax, %r15
leaq 0x562e3(%rip), %rsi     # 0xda227
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x83f7d
leaq 0x48202(%rip), %rsi     # 0xcc159
leaq 0x5f669(%rip), %rdx     # 0xe35c7
leaq 0x5f5d0(%rip), %rcx     # 0xe3535
leaq 0x5f503(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xde, %r9d
jmp 0x83feb
xorl %ebp, %ebp
jmp 0x83ff2
movq (%r14), %rax
addq $0x4, %rax
cmpq %rax, %r15
je 0x83fba
leaq 0x481c9(%rip), %rsi     # 0xcc159
leaq 0x5f64a(%rip), %rdx     # 0xe35e1
leaq 0x5f597(%rip), %rcx     # 0xe3535
leaq 0x5f4ca(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xdf, %r9d
jmp 0x83feb
movb $0x1, %bpl
jmp 0x83f2d
movb $0x1, %bpl
cmpq $0x8, 0x8(%r14)
je 0x83ff2
leaq 0x4818e(%rip), %rsi     # 0xcc159
leaq 0x5f61f(%rip), %rdx     # 0xe35f1
leaq 0x5f55c(%rip), %rcx     # 0xe3535
leaq 0x5f48f(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xe0, %r9d
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x83be3
xorl %r13d, %r13d
callq 0x838b8
movq %rax, %r14
cmpq $0x3, %r13
je 0x8403d
movq (%r12,%r13,8), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xb260
cmpq %rax, %rbx
jae 0x84030
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0x8396b
incq %rbx
jmp 0x84011
movq %r14, %rdi
callq 0x83a7f
incq %r13
jmp 0x84005
movq %r14, %rdi
callq 0x83a2e
testb %bpl, %bpl
je 0x8408d
movq %rax, %r15
leaq 0x56ead(%rip), %rsi     # 0xdaf01
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
movq (%rsp), %rbx
je 0x84095
leaq 0x480ee(%rip), %rsi     # 0xcc159
leaq 0x5f51d(%rip), %rdx     # 0xe358f
leaq 0x5f4bc(%rip), %rcx     # 0xe3535
leaq 0x5f3ef(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xeb, %r9d
jmp 0x840c5
xorl %ebp, %ebp
movq (%rsp), %rbx
jmp 0x840cc
cmpq (%r14), %r15
je 0x841df
leaq 0x480b4(%rip), %rsi     # 0xcc159
leaq 0x5f4b7(%rip), %rdx     # 0xe3563
leaq 0x5f482(%rip), %rcx     # 0xe3535
leaq 0x5f3b5(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xec, %r9d
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x83a2e
testb %bpl, %bpl
je 0x84118
movq %rax, %r15
leaq 0x56144(%rip), %rsi     # 0xda227
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x8411c
leaq 0x48063(%rip), %rsi     # 0xcc159
leaq 0x5f4ca(%rip), %rdx     # 0xe35c7
leaq 0x5f431(%rip), %rcx     # 0xe3535
leaq 0x5f364(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xee, %r9d
jmp 0x84153
xorl %ebp, %ebp
jmp 0x8415a
movq (%r14), %rax
addq $0x4, %rax
cmpq %rax, %r15
je 0x841e7
leaq 0x48026(%rip), %rsi     # 0xcc159
leaq 0x5f4a7(%rip), %rdx     # 0xe35e1
leaq 0x5f3f4(%rip), %rcx     # 0xe3535
leaq 0x5f327(%rip), %r8      # 0xe346f
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xef, %r9d
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x83a2e
pushq $-0x1
popq %r12
testb %bpl, %bpl
je 0x84224
movq %rax, %r15
leaq 0x55077(%rip), %rsi     # 0xd91f0
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x841ac
leaq 0x47fcd(%rip), %rsi     # 0xcc159
leaq 0x5f47c(%rip), %rdx     # 0xe360f
leaq 0x5f39b(%rip), %rcx     # 0xe3535
leaq 0x5f2ce(%rip), %r8      # 0xe346f
movq %rbx, %rdi
movl $0xf1, %r9d
jmp 0x8421d
movq (%r14), %rax
addq $0x8, %rax
cmpq %rax, %r15
je 0x841ef
leaq 0x47f9a(%rip), %rsi     # 0xcc159
leaq 0x5f463(%rip), %rdx     # 0xe3629
leaq 0x5f368(%rip), %rcx     # 0xe3535
leaq 0x5f29b(%rip), %r8      # 0xe346f
movq %rbx, %rdi
movl $0xf2, %r9d
jmp 0x8421d
movb $0x1, %bpl
jmp 0x840cc
movb $0x1, %bpl
jmp 0x8415a
xorl %ebp, %ebp
cmpq $0xc, 0x8(%r14)
je 0x84227
leaq 0x47f5a(%rip), %rsi     # 0xcc159
leaq 0x5f433(%rip), %rdx     # 0xe3639
leaq 0x5f328(%rip), %rcx     # 0xe3535
leaq 0x5f25b(%rip), %r8      # 0xe346f
movq %rbx, %rdi
movl $0xf3, %r9d
xorl %eax, %eax
callq 0xc007
movl %r12d, %ebp
movq %r14, %rdi
callq 0x83be3
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
jmp 0x83d58
movq 0xa9d69(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x45e0d(%rip), %rsi     # 0xca066
leaq 0x463f9(%rip), %rdx     # 0xca659
leaq 0x5f2ce(%rip), %rcx     # 0xe3535
leaq 0x5f201(%rip), %r8      # 0xe346f
movl $0xbf, %r9d
xorl %eax, %eax
callq 0xb8c0
callq 0xb300