// File: /workspace/github_c_makefile_star2_O3/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 0xa3e79
movq %r12, %rdi
callq 0x34fea
testb %al, %al
jne 0xa43fd
callq 0xa3b90
movq %rax, %r14
movq %rax, %rdi
callq 0xa3cb2
cmpb $0x0, (%rax)
je 0xa3eb7
leaq 0x3f2c4(%rip), %rsi     # 0xe3159
leaq 0x563a2(%rip), %rdx     # 0xfa23e
leaq 0x56382(%rip), %rcx     # 0xfa225
leaq 0x562b5(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc3, %r9d
jmp 0xa3f17
cmpq (%r14), %rax
je 0xa3ee5
leaq 0x3f296(%rip), %rsi     # 0xe3159
leaq 0x56389(%rip), %rdx     # 0xfa253
leaq 0x56354(%rip), %rcx     # 0xfa225
leaq 0x56287(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc4, %r9d
jmp 0xa3f17
cmpq $0x0, 0x8(%r14)
je 0xa428a
leaq 0x3f262(%rip), %rsi     # 0xe3159
leaq 0x56363(%rip), %rdx     # 0xfa261
leaq 0x56320(%rip), %rcx     # 0xfa225
leaq 0x56253(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc5, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0xa3da7
xorl %r15d, %r15d
callq 0xa3b90
movq %rax, %r14
leaq 0x4dca9(%rip), %rbx     # 0xf1be1
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0xa3c20
incq %r15
cmpq $0x3, %r15
jne 0xa3f38
movq %r14, %rdi
callq 0xa3cd2
movq %r14, %rdi
callq 0xa3cb2
testb %bpl, %bpl
je 0xa3fa2
movq %rax, %r15
leaq 0x4dc74(%rip), %rsi     # 0xf1be1
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa3fa6
leaq 0x3f1d9(%rip), %rsi     # 0xe3159
leaq 0x562f8(%rip), %rdx     # 0xfa27f
leaq 0x56297(%rip), %rcx     # 0xfa225
leaq 0x561ca(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xce, %r9d
jmp 0xa4005
xorl %ebp, %ebp
jmp 0xa400c
cmpq (%r14), %r15
je 0xa3fd4
leaq 0x3f1a7(%rip), %rsi     # 0xe3159
leaq 0x5629a(%rip), %rdx     # 0xfa253
leaq 0x56265(%rip), %rcx     # 0xfa225
leaq 0x56198(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xcf, %r9d
jmp 0xa4005
movb $0x1, %bpl
cmpq $0x4, 0x8(%r14)
je 0xa400c
leaq 0x3f174(%rip), %rsi     # 0xe3159
leaq 0x562ad(%rip), %rdx     # 0xfa299
leaq 0x56232(%rip), %rcx     # 0xfa225
leaq 0x56165(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xd0, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r12, (%rsp)
movq %r14, %rdi
callq 0xa3da7
movb $0x1, %r13b
xorl %r15d, %r15d
callq 0xa3b90
movq %rax, %r14
leaq 0xabfe3(%rip), %r12     # 0x150010
movq (%r12,%r15,8), %r15
cmpb $0x0, (%r15)
je 0xa4056
xorl %ebx, %ebx
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0xa3c20
incq %rbx
movq %r15, %rdi
callq 0xb260
cmpq %rax, %rbx
jb 0xa4039
movq %r14, %rdi
callq 0xa3cd2
movl $0x1, %r15d
testb $0x1, %r13b
movl $0x0, %r13d
jne 0xa402d
movq %r14, %rdi
callq 0xa3cb2
testb %bpl, %bpl
je 0xa40f1
movq %rax, %r15
leaq 0x4db5a(%rip), %rsi     # 0xf1be1
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa40bb
leaq 0x3f0bf(%rip), %rsi     # 0xe3159
leaq 0x561de(%rip), %rdx     # 0xfa27f
leaq 0x5617d(%rip), %rcx     # 0xfa225
leaq 0x560b0(%rip), %r8      # 0xfa15f
movq (%rsp), %rdi
movl $0xdb, %r9d
jmp 0xa40ea
cmpq (%r14), %r15
je 0xa41fa
leaq 0x3f08e(%rip), %rsi     # 0xe3159
leaq 0x56181(%rip), %rdx     # 0xfa253
leaq 0x5614c(%rip), %rcx     # 0xfa225
leaq 0x5607f(%rip), %r8      # 0xfa15f
movq (%rsp), %rdi
movl $0xdc, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0xa3cb2
xorl %ebp, %ebp
movq %r14, %rdi
callq 0xa3da7
xorl %r13d, %r13d
callq 0xa3b90
movq %rax, %r14
movq (%r12,%r13,8), %r15
cmpb $0x0, (%r15)
je 0xa4137
xorl %ebx, %ebx
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0xa3c20
incq %rbx
movq %r15, %rdi
callq 0xb260
cmpq %rax, %rbx
jb 0xa411a
movq %r14, %rdi
callq 0xa3cd2
incq %r13
cmpq $0x3, %r13
jne 0xa410e
movq %r14, %rdi
callq 0xa3cb2
testb %bpl, %bpl
je 0xa41cc
movq %rax, %r15
leaq 0x4da82(%rip), %rsi     # 0xf1be1
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa4193
leaq 0x3efe7(%rip), %rsi     # 0xe3159
leaq 0x56106(%rip), %rdx     # 0xfa27f
leaq 0x560a5(%rip), %rcx     # 0xfa225
leaq 0x55fd8(%rip), %r8      # 0xfa15f
movq (%rsp), %rdi
movl $0xeb, %r9d
jmp 0xa41c5
cmpq (%r14), %r15
movq (%rsp), %rbx
je 0xa4245
leaq 0x3efb2(%rip), %rsi     # 0xe3159
leaq 0x560a5(%rip), %rdx     # 0xfa253
leaq 0x56070(%rip), %rcx     # 0xfa225
leaq 0x55fa3(%rip), %r8      # 0xfa15f
movq %rbx, %rdi
movl $0xec, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0xa3cb2
movq %r14, %rdi
callq 0xa3cb2
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0xa3da7
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0xa3cb2
movq %rax, %r15
leaq 0x4d06b(%rip), %rsi     # 0xf1277
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa4292
leaq 0x3ef3a(%rip), %rsi     # 0xe3159
leaq 0x56091(%rip), %rdx     # 0xfa2b7
leaq 0x55ff8(%rip), %rcx     # 0xfa225
leaq 0x55f2b(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq (%rsp), %rdi
movl $0xde, %r9d
jmp 0xa433b
movq %r14, %rdi
callq 0xa3cb2
movq %rax, %r15
leaq 0x4d020(%rip), %rsi     # 0xf1277
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa42c8
leaq 0x3eeef(%rip), %rsi     # 0xe3159
leaq 0x56046(%rip), %rdx     # 0xfa2b7
leaq 0x55fad(%rip), %rcx     # 0xfa225
leaq 0x55ee0(%rip), %r8      # 0xfa15f
movq %rbx, %rdi
movl $0xee, %r9d
jmp 0xa42f9
movb $0x1, %bpl
jmp 0xa3f1e
movq (%r14), %rax
addq $0x4, %rax
cmpq %rax, %r15
je 0xa4305
leaq 0x3eeb4(%rip), %rsi     # 0xe3159
leaq 0x56025(%rip), %rdx     # 0xfa2d1
leaq 0x55f72(%rip), %rcx     # 0xfa225
leaq 0x55ea5(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq (%rsp), %rdi
movl $0xdf, %r9d
jmp 0xa433b
movq (%r14), %rax
addq $0x4, %rax
cmpq %rax, %r15
je 0xa4347
leaq 0x3ee7e(%rip), %rsi     # 0xe3159
leaq 0x55fef(%rip), %rdx     # 0xfa2d1
leaq 0x55f3c(%rip), %rcx     # 0xfa225
leaq 0x55e6f(%rip), %r8      # 0xfa15f
movq %rbx, %rdi
movl $0xef, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa41d4
movb $0x1, %bpl
cmpq $0x8, 0x8(%r14)
je 0xa40fb
leaq 0x3ee3f(%rip), %rsi     # 0xe3159
leaq 0x55fc0(%rip), %rdx     # 0xfa2e1
leaq 0x55efd(%rip), %rcx     # 0xfa225
leaq 0x55e30(%rip), %r8      # 0xfa15f
xorl %ebp, %ebp
movq (%rsp), %rdi
movl $0xe0, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa40fb
movq %r14, %rdi
callq 0xa3cb2
movq %rax, %r15
leaq 0x4bee7(%rip), %rsi     # 0xf0240
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa438c
leaq 0x3eded(%rip), %rsi     # 0xe3159
leaq 0x55f8c(%rip), %rdx     # 0xfa2ff
leaq 0x55eab(%rip), %rcx     # 0xfa225
leaq 0x55dde(%rip), %r8      # 0xfa15f
movq %rbx, %rdi
movl $0xf1, %r9d
jmp 0xa43f1
movq (%r14), %rax
addq $0x8, %rax
cmpq %rax, %r15
je 0xa43bf
leaq 0x3edba(%rip), %rsi     # 0xe3159
leaq 0x55f73(%rip), %rdx     # 0xfa319
leaq 0x55e78(%rip), %rcx     # 0xfa225
leaq 0x55dab(%rip), %r8      # 0xfa15f
movq %rbx, %rdi
movl $0xf2, %r9d
jmp 0xa43f1
xorl %ebp, %ebp
cmpq $0xc, 0x8(%r14)
je 0xa41e1
leaq 0x3ed86(%rip), %rsi     # 0xe3159
leaq 0x55f4f(%rip), %rdx     # 0xfa329
leaq 0x55e44(%rip), %rcx     # 0xfa225
leaq 0x55d77(%rip), %r8      # 0xfa15f
movq %rbx, %rdi
movl $0xf3, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa41dc
callq 0x222c4
nop