// File: /workspace/github_c_makefile_star2_O1/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 0xa4690
movq %r12, %rdi
callq 0x3566a
testb %al, %al
jne 0xa4c30
callq 0xa43a4
movq %rax, %r14
movq %rax, %rdi
callq 0xa44c6
cmpb $0x0, (%rax)
je 0xa46ce
leaq 0x3eacd(%rip), %rsi     # 0xe3179
leaq 0x55c1b(%rip), %rdx     # 0xfa2ce
leaq 0x55bfb(%rip), %rcx     # 0xfa2b5
leaq 0x55b2e(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc3, %r9d
jmp 0xa472e
cmpq (%r14), %rax
je 0xa46fc
leaq 0x3ea9f(%rip), %rsi     # 0xe3179
leaq 0x55c02(%rip), %rdx     # 0xfa2e3
leaq 0x55bcd(%rip), %rcx     # 0xfa2b5
leaq 0x55b00(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc4, %r9d
jmp 0xa472e
cmpq $0x0, 0x8(%r14)
je 0xa4c28
leaq 0x3ea6b(%rip), %rsi     # 0xe3179
leaq 0x55bdc(%rip), %rdx     # 0xfa2f1
leaq 0x55b99(%rip), %rcx     # 0xfa2b5
leaq 0x55acc(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xc5, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0xa45be
xorl %r15d, %r15d
callq 0xa43a4
movq %rax, %r14
leaq 0x4d4e2(%rip), %rbx     # 0xf1c31
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0xa4434
incq %r15
cmpq $0x3, %r15
jne 0xa474f
movq %r14, %rdi
callq 0xa44e6
movq %r14, %rdi
callq 0xa44c6
testb %bpl, %bpl
je 0xa47b9
movq %rax, %r15
leaq 0x4d4ad(%rip), %rsi     # 0xf1c31
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa47bd
leaq 0x3e9e2(%rip), %rsi     # 0xe3179
leaq 0x55b71(%rip), %rdx     # 0xfa30f
leaq 0x55b10(%rip), %rcx     # 0xfa2b5
leaq 0x55a43(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xce, %r9d
jmp 0xa481c
xorl %ebp, %ebp
jmp 0xa4823
cmpq (%r14), %r15
je 0xa47eb
leaq 0x3e9b0(%rip), %rsi     # 0xe3179
leaq 0x55b13(%rip), %rdx     # 0xfa2e3
leaq 0x55ade(%rip), %rcx     # 0xfa2b5
leaq 0x55a11(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xcf, %r9d
jmp 0xa481c
movb $0x1, %bpl
cmpq $0x4, 0x8(%r14)
je 0xa4823
leaq 0x3e97d(%rip), %rsi     # 0xe3179
leaq 0x55b26(%rip), %rdx     # 0xfa329
leaq 0x55aab(%rip), %rcx     # 0xfa2b5
leaq 0x559de(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %r12, %rdi
movl $0xd0, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r12, (%rsp)
movq %r14, %rdi
callq 0xa45be
xorl %r13d, %r13d
callq 0xa43a4
movq %rax, %r14
leaq 0xab7cf(%rip), %r12     # 0x150010
movq (%r12,%r13,8), %r15
cmpb $0x0, (%r15)
je 0xa486a
xorl %ebx, %ebx
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0xa4434
incq %rbx
movq %r15, %rdi
callq 0xb260
cmpq %rax, %rbx
jb 0xa484d
movq %r14, %rdi
callq 0xa44e6
leaq 0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
je 0xa4841
movq %r14, %rdi
callq 0xa44c6
testb %bpl, %bpl
je 0xa48ce
movq %rax, %r15
leaq 0x4d39c(%rip), %rsi     # 0xf1c31
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
movq (%rsp), %rbx
je 0xa48d6
leaq 0x3e8cd(%rip), %rsi     # 0xe3179
leaq 0x55a5c(%rip), %rdx     # 0xfa30f
leaq 0x559fb(%rip), %rcx     # 0xfa2b5
leaq 0x5592e(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xdb, %r9d
jmp 0xa4906
xorl %ebp, %ebp
movq (%rsp), %rbx
jmp 0xa490d
cmpq (%r14), %r15
je 0xa4992
leaq 0x3e893(%rip), %rsi     # 0xe3179
leaq 0x559f6(%rip), %rdx     # 0xfa2e3
leaq 0x559c1(%rip), %rcx     # 0xfa2b5
leaq 0x558f4(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xdc, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0xa44c6
testb %bpl, %bpl
je 0xa4959
movq %rax, %r15
leaq 0x4c9a3(%rip), %rsi     # 0xf12c7
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa495d
leaq 0x3e842(%rip), %rsi     # 0xe3179
leaq 0x55a09(%rip), %rdx     # 0xfa347
leaq 0x55970(%rip), %rcx     # 0xfa2b5
leaq 0x558a3(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xde, %r9d
jmp 0xa49cb
xorl %ebp, %ebp
jmp 0xa49d2
movq (%r14), %rax
addq $0x4, %rax
cmpq %rax, %r15
je 0xa499a
leaq 0x3e809(%rip), %rsi     # 0xe3179
leaq 0x559ea(%rip), %rdx     # 0xfa361
leaq 0x55937(%rip), %rcx     # 0xfa2b5
leaq 0x5586a(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xdf, %r9d
jmp 0xa49cb
movb $0x1, %bpl
jmp 0xa490d
movb $0x1, %bpl
cmpq $0x8, 0x8(%r14)
je 0xa49d2
leaq 0x3e7ce(%rip), %rsi     # 0xe3179
leaq 0x559bf(%rip), %rdx     # 0xfa371
leaq 0x558fc(%rip), %rcx     # 0xfa2b5
leaq 0x5582f(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xe0, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0xa45be
xorl %r13d, %r13d
callq 0xa43a4
movq %rax, %r14
movq (%r12,%r13,8), %r15
cmpb $0x0, (%r15)
je 0xa4a0e
xorl %ebx, %ebx
movsbl (%r15,%rbx), %esi
movq %r14, %rdi
callq 0xa4434
incq %rbx
movq %r15, %rdi
callq 0xb260
cmpq %rax, %rbx
jb 0xa49f1
movq %r14, %rdi
callq 0xa44e6
incq %r13
cmpq $0x3, %r13
jne 0xa49e5
movq %r14, %rdi
callq 0xa44c6
testb %bpl, %bpl
je 0xa4a6f
movq %rax, %r15
leaq 0x4d1fb(%rip), %rsi     # 0xf1c31
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
movq (%rsp), %rbx
je 0xa4a77
leaq 0x3e72c(%rip), %rsi     # 0xe3179
leaq 0x558bb(%rip), %rdx     # 0xfa30f
leaq 0x5585a(%rip), %rcx     # 0xfa2b5
leaq 0x5578d(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xeb, %r9d
jmp 0xa4aa7
xorl %ebp, %ebp
movq (%rsp), %rbx
jmp 0xa4aae
cmpq (%r14), %r15
je 0xa4bc5
leaq 0x3e6f2(%rip), %rsi     # 0xe3179
leaq 0x55855(%rip), %rdx     # 0xfa2e3
leaq 0x55820(%rip), %rcx     # 0xfa2b5
leaq 0x55753(%rip), %r8      # 0xfa1ef
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0xec, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0xa44c6
testb %bpl, %bpl
je 0xa4afb
movq %rax, %r15
leaq 0x4c802(%rip), %rsi     # 0xf12c7
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa4b00
leaq 0x3e6a1(%rip), %rsi     # 0xe3179
leaq 0x55868(%rip), %rdx     # 0xfa347
leaq 0x557cf(%rip), %rcx     # 0xfa2b5
leaq 0x55702(%rip), %r8      # 0xfa1ef
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0xee, %r9d
jmp 0xa4b38
xorl %r12d, %r12d
jmp 0xa4b3f
movq (%r14), %rax
addq $0x4, %rax
cmpq %rax, %r15
je 0xa4bcd
leaq 0x3e662(%rip), %rsi     # 0xe3179
leaq 0x55843(%rip), %rdx     # 0xfa361
leaq 0x55790(%rip), %rcx     # 0xfa2b5
leaq 0x556c3(%rip), %r8      # 0xfa1ef
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0xef, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0xa44c6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %r12b, %r12b
je 0xa4c0f
movq %rax, %r15
leaq 0x4b731(%rip), %rsi     # 0xf0290
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa4b92
leaq 0x3e607(%rip), %rsi     # 0xe3179
leaq 0x55816(%rip), %rdx     # 0xfa38f
leaq 0x55735(%rip), %rcx     # 0xfa2b5
leaq 0x55668(%rip), %r8      # 0xfa1ef
movq %rbx, %rdi
movl $0xf1, %r9d
jmp 0xa4c03
movq (%r14), %rax
addq $0x8, %rax
cmpq %rax, %r15
je 0xa4bd5
leaq 0x3e5d4(%rip), %rsi     # 0xe3179
leaq 0x557fd(%rip), %rdx     # 0xfa3a9
leaq 0x55702(%rip), %rcx     # 0xfa2b5
leaq 0x55635(%rip), %r8      # 0xfa1ef
movq %rbx, %rdi
movl $0xf2, %r9d
jmp 0xa4c03
movb $0x1, %bpl
jmp 0xa4aae
movb $0x1, %r12b
jmp 0xa4b3f
xorl %ebp, %ebp
cmpq $0xc, 0x8(%r14)
je 0xa4c0f
leaq 0x3e594(%rip), %rsi     # 0xe3179
leaq 0x557cd(%rip), %rdx     # 0xfa3b9
leaq 0x556c2(%rip), %rcx     # 0xfa2b5
leaq 0x555f5(%rip), %r8      # 0xfa1ef
movq %rbx, %rdi
movl $0xf3, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0xa45be
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
jmp 0xa4735
callq 0x2239c
nopl (%rax)