// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/str.c
// Function: gt_str_unit_test
int gt_str_unit_test(GtError *err)
{
  GtStr *s, *s1, *s2;
  static char cstring_1[] = "test_string"; /* l=11 */
  int had_err = 0;
  gt_error_check(err);

  /* the empty string */
  s1 = gt_str_new();
  gt_ensure(gt_str_length(s1) == 0);
  gt_str_delete(s1);

  /* string testing */
  s1 = gt_str_new();
  gt_str_set(s1, cstring_1);
  gt_ensure(gt_str_length(s1) == 11);
  gt_ensure(strcmp(gt_str_get(s1), cstring_1) == 0);
  gt_str_delete(s1);

  s1 = gt_str_new_cstr(cstring_1);
  gt_ensure(gt_str_length(s1) == 11);
  gt_str_delete(s1);

  s1 = gt_str_new();
  s2 = gt_str_new_cstr("foo");
  gt_ensure(gt_str_length(s2) == 3);
  gt_str_append_str(s1, s2);
  gt_ensure(gt_str_length(s1) == 3);
  gt_str_append_cstr(s1, "bar");
  gt_ensure(gt_str_length(s1) == 6);
  gt_str_append_char(s1, 'b');
  gt_str_append_char(s1, 'a');
  gt_str_append_char(s1, 'z');
  gt_ensure(gt_str_length(s1) == 9);
  gt_ensure(strcmp("foobarbaz", gt_str_get(s1)) == 0);
  gt_ensure(strcmp("foo", gt_str_get(s2)) == 0);
  gt_str_append_uword(s1, 1984);
  gt_ensure(strcmp("foobarbaz1984", gt_str_get(s1)) == 0);
  gt_str_delete(s1);
  gt_str_delete(s2);

  /* testing gt_str_append_uword() and gt_str_set_length() */
  s = gt_str_new();
  gt_str_append_uword(s, 0);
  gt_ensure(strcmp("0", gt_str_get(s)) == 0);
  gt_str_reset(s);
  gt_ensure(strcmp("", gt_str_get(s)) == 0);
  gt_str_append_uword(s, 6);
  gt_ensure(strcmp("6", gt_str_get(s)) == 0);
  gt_str_append_uword(s, 16);
  gt_ensure(strcmp("616", gt_str_get(s)) == 0);
  gt_str_delete(s);

  /* make sure that gt_str_get never returns NULL */
  s = gt_str_new();
  gt_ensure(gt_str_get(s));
  gt_ensure(gt_str_length(s) == 0);
  gt_ensure(strlen(gt_str_get(s)) == 0);
  gt_str_delete(s);

  s = gt_str_new_cstr(NULL);
  gt_ensure(gt_str_get(s));
  gt_ensure(gt_str_length(s) == 0);
  gt_ensure(strlen(gt_str_get(s)) == 0);
  gt_str_delete(s);

  /* test gt_str_new() followed by gt_str_append_cstr_nt() */
  s = gt_str_new();
  gt_str_append_cstr_nt(s, "foo", 3);
  gt_ensure(strcmp("foo", gt_str_get(s)) == 0);
  gt_ensure(gt_str_length(s) == 3);
  gt_str_delete(s);

  /* test gt_str_clone() */
  s  = gt_str_new_cstr("foobarbaz");
  s1 = gt_str_clone(s);
  gt_ensure(gt_str_cmp(s, s1) == 0);
  gt_str_append_cstr(s1, "boo");
  gt_ensure(gt_str_cmp(s, s1) != 0);
  gt_str_append_cstr(s, "boo");
  gt_ensure(gt_str_cmp(s, s1) == 0);
  gt_str_delete(s);
  gt_str_delete(s1);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x14988
movq %rbx, %rdi
callq 0xc103
testb %al, %al
jne 0x152a3
callq 0x13d5c
movq %rax, %r14
movb $0x1, %bpl
testq %rax, %rax
je 0x149cd
cmpq $0x0, 0x8(%r14)
je 0x149cd
leaq 0xb77b3(%rip), %rsi     # 0xcc159
leaq 0xb7d2a(%rip), %rdx     # 0xcc6d7
leaq 0xb7d12(%rip), %rcx     # 0xcc6c6
leaq 0xb7b32(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x183, %r9d            # imm = 0x183
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x152db
callq 0x13d5c
movq %rax, %r14
leaq 0x119ce1(%rip), %rsi    # 0x12e6c5
movq %rax, %rdi
callq 0x13e63
testb %bpl, %bpl
je 0x14a45
testq %r14, %r14
je 0x14a49
cmpq $0xb, 0x8(%r14)
jne 0x14a49
movq %r14, %rdi
callq 0x143d2
leaq 0x119cb9(%rip), %rsi    # 0x12e6c5
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x15128
leaq 0xb7736(%rip), %rsi     # 0xcc159
leaq 0xb7cdc(%rip), %rdx     # 0xcc706
leaq 0xb7c95(%rip), %rcx     # 0xcc6c6
leaq 0xb7ab5(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x18a, %r9d            # imm = 0x18A
jmp 0x14a70
xorl %ebp, %ebp
jmp 0x14a77
leaq 0xb7709(%rip), %rsi     # 0xcc159
leaq 0xb7c97(%rip), %rdx     # 0xcc6ee
leaq 0xb7c68(%rip), %rcx     # 0xcc6c6
leaq 0xb7a88(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x189, %r9d            # imm = 0x189
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x152db
leaq 0x119c3f(%rip), %rdi    # 0x12e6c5
callq 0x13da9
movq %rax, %r14
testb %bpl, %bpl
je 0x14ad2
testq %r14, %r14
je 0x14aa2
movb $0x1, %bpl
cmpq $0xb, 0x8(%r14)
je 0x14ad4
leaq 0xb76b0(%rip), %rsi     # 0xcc159
leaq 0xb7c3e(%rip), %rdx     # 0xcc6ee
leaq 0xb7c0f(%rip), %rcx     # 0xcc6c6
leaq 0xb7a2f(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x18e, %r9d            # imm = 0x18E
xorl %eax, %eax
callq 0xc007
jmp 0x14ad4
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x152db
callq 0x13d5c
movq %rax, %r14
leaq 0xc6416(%rip), %rdi     # 0xdaf01
callq 0x13da9
movq %rax, %r15
testb %bpl, %bpl
je 0x14bea
testq %r15, %r15
je 0x14bbe
cmpq $0x3, 0x8(%r15)
jne 0x14bbe
movq %r14, %rdi
movq %r15, %rsi
callq 0x13eeb
testq %r14, %r14
je 0x15060
cmpq $0x3, 0x8(%r14)
jne 0x15060
leaq 0xc56f1(%rip), %rsi     # 0xda227
movq %r14, %rdi
callq 0x13dd3
cmpq $0x6, 0x8(%r14)
jne 0x15194
pushq $0x62
popq %rsi
movq %r14, %rdi
callq 0x140b1
pushq $0x61
popq %rsi
movq %r14, %rdi
callq 0x140b1
pushq $0x7a
popq %rsi
movq %r14, %rdi
callq 0x140b1
cmpq $0x9, 0x8(%r14)
jne 0x151c5
movq %r14, %rdi
callq 0x143d2
leaq 0xb7c05(%rip), %rdi     # 0xcc789
movq %rax, %rsi
callq 0xb880
testl %eax, %eax
je 0x151fe
leaq 0xb75be(%rip), %rsi     # 0xcc159
leaq 0xb7bf1(%rip), %rdx     # 0xcc793
leaq 0xb7b1d(%rip), %rcx     # 0xcc6c6
leaq 0xb793d(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x19c, %r9d            # imm = 0x19C
jmp 0x151ea
leaq 0xb7594(%rip), %rsi     # 0xcc159
leaq 0xb7b61(%rip), %rdx     # 0xcc72d
leaq 0xb7af3(%rip), %rcx     # 0xcc6c6
leaq 0xb7913(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x193, %r9d            # imm = 0x193
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
movq %r15, %rsi
callq 0x13eeb
leaq 0xc562b(%rip), %rsi     # 0xda227
movq %r14, %rdi
callq 0x13dd3
pushq $0x62
popq %rsi
movq %r14, %rdi
callq 0x140b1
pushq $0x61
popq %rsi
movq %r14, %rdi
callq 0x140b1
pushq $0x7a
popq %rsi
movq %r14, %rdi
callq 0x140b1
movl $0x7c0, %esi            # imm = 0x7C0
movq %r14, %rdi
callq 0x13ffe
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x152db
callq 0x13d5c
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x13ffe
testb %bpl, %bpl
je 0x14ca5
movq %r14, %rdi
callq 0x143d2
movzbl (%rax), %ecx
subl $0x30, %ecx
jne 0x14c6f
movzbl 0x1(%rax), %ecx
negl %ecx
testl %ecx, %ecx
je 0x14d64
leaq 0xb74d9(%rip), %rsi     # 0xcc159
leaq 0xb7b93(%rip), %rdx     # 0xcc81a
leaq 0xb7a38(%rip), %rcx     # 0xcc6c6
leaq 0xb7858(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x1a6, %r9d            # imm = 0x1A6
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x1452f
pushq $0x6
popq %rsi
movq %r14, %rdi
callq 0x13ffe
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x13ffe
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x152db
callq 0x13d5c
movq %rax, %r14
testb %bpl, %bpl
je 0x14d23
movq %r14, %rdi
callq 0x143d2
testq %rax, %rax
je 0x14dae
testq %r14, %r14
je 0x14d2a
cmpq $0x0, 0x8(%r14)
je 0x14d2a
leaq 0xb745b(%rip), %rsi     # 0xcc159
leaq 0xb7ba8(%rip), %rdx     # 0xcc8ad
leaq 0xb79ba(%rip), %rcx     # 0xcc6c6
leaq 0xb77da(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b2, %r9d            # imm = 0x1B2
jmp 0x14dd5
xorl %ebp, %ebp
jmp 0x14ddc
movq %r14, %rdi
callq 0x143d2
cmpb $0x0, (%rax)
je 0x15091
leaq 0xb7417(%rip), %rsi     # 0xcc159
leaq 0xb7b7a(%rip), %rdx     # 0xcc8c3
leaq 0xb7976(%rip), %rcx     # 0xcc6c6
leaq 0xb7796(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b3, %r9d            # imm = 0x1B3
jmp 0x14dd5
movq %r14, %rdi
callq 0x1452f
movq %r14, %rdi
callq 0x143d2
cmpb $0x0, (%rax)
je 0x150a1
leaq 0xb73d5(%rip), %rsi     # 0xcc159
leaq 0xb7aaf(%rip), %rdx     # 0xcc83a
leaq 0xb7934(%rip), %rcx     # 0xcc6c6
leaq 0xb7754(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x1a8, %r9d            # imm = 0x1A8
xorl %eax, %eax
callq 0xc007
jmp 0x14cad
leaq 0xb73a4(%rip), %rsi     # 0xcc159
leaq 0xb7ae3(%rip), %rdx     # 0xcc89f
leaq 0xb7903(%rip), %rcx     # 0xcc6c6
leaq 0xb7723(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b1, %r9d            # imm = 0x1B1
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x152db
callq 0x13d5c
movq %rax, %r14
testb %bpl, %bpl
je 0x14e33
movq %r14, %rdi
callq 0x143d2
testq %rax, %rax
je 0x14e71
testq %r14, %r14
je 0x14e37
cmpq $0x0, 0x8(%r14)
je 0x14e37
leaq 0xb7348(%rip), %rsi     # 0xcc159
leaq 0xb7a95(%rip), %rdx     # 0xcc8ad
leaq 0xb78a7(%rip), %rcx     # 0xcc6c6
leaq 0xb76c7(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b8, %r9d            # imm = 0x1B8
jmp 0x14e98
xorl %ebp, %ebp
jmp 0x14e9f
movq %r14, %rdi
callq 0x143d2
cmpb $0x0, (%rax)
je 0x15099
leaq 0xb730a(%rip), %rsi     # 0xcc159
leaq 0xb7a6d(%rip), %rdx     # 0xcc8c3
leaq 0xb7869(%rip), %rcx     # 0xcc6c6
leaq 0xb7689(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b9, %r9d            # imm = 0x1B9
jmp 0x14e98
leaq 0xb72e1(%rip), %rsi     # 0xcc159
leaq 0xb7a20(%rip), %rdx     # 0xcc89f
leaq 0xb7840(%rip), %rcx     # 0xcc6c6
leaq 0xb7660(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b7, %r9d            # imm = 0x1B7
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x152db
callq 0x13d5c
movq %rax, %r14
leaq 0xc604b(%rip), %rsi     # 0xdaf01
pushq $0x3
popq %rdx
movq %rax, %rdi
callq 0x13f76
testb %bpl, %bpl
je 0x14f0a
movq %r14, %rdi
callq 0x143d2
leaq 0xc602c(%rip), %rdi     # 0xdaf01
movq %rax, %rsi
callq 0xb880
testl %eax, %eax
je 0x14f0e
leaq 0xb7271(%rip), %rsi     # 0xcc159
leaq 0xb79ef(%rip), %rdx     # 0xcc8de
leaq 0xb77d0(%rip), %rcx     # 0xcc6c6
leaq 0xb75f0(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1bf, %r9d            # imm = 0x1BF
jmp 0x14f44
xorl %ebp, %ebp
jmp 0x14f4b
testq %r14, %r14
je 0x14f1d
movb $0x1, %bpl
cmpq $0x3, 0x8(%r14)
je 0x14f4b
leaq 0xb7235(%rip), %rsi     # 0xcc159
leaq 0xb79d5(%rip), %rdx     # 0xcc900
leaq 0xb7794(%rip), %rcx     # 0xcc6c6
leaq 0xb75b4(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1c0, %r9d            # imm = 0x1C0
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x152db
leaq 0xb782f(%rip), %rdi     # 0xcc789
callq 0x13da9
movq %rax, %r14
movq %rax, %rdi
callq 0x1461a
movq %rax, %r15
testb %bpl, %bpl
je 0x14fad
movq %r14, %rdi
movq %r15, %rsi
callq 0x14573
testl %eax, %eax
je 0x14feb
leaq 0xb71d1(%rip), %rsi     # 0xcc159
leaq 0xb7987(%rip), %rdx     # 0xcc916
leaq 0xb7730(%rip), %rcx     # 0xcc6c6
leaq 0xb7550(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x1c6, %r9d            # imm = 0x1C6
xorl %eax, %eax
callq 0xc007
leaq 0xb7979(%rip), %rsi     # 0xcc92d
movq %r15, %rdi
callq 0x13dd3
leaq 0xb796a(%rip), %rsi     # 0xcc92d
movq %r14, %rdi
callq 0x13dd3
pushq $-0x1
popq %rbx
movq %r14, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x152db
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb793b(%rip), %rsi     # 0xcc92d
movq %r15, %rdi
callq 0x13dd3
movq %r14, %rdi
movq %r15, %rsi
callq 0x14573
testl %eax, %eax
je 0x150f7
leaq 0xb7919(%rip), %rsi     # 0xcc92d
movq %r14, %rdi
callq 0x13dd3
movq %r14, %rdi
movq %r15, %rsi
callq 0x14573
testl %eax, %eax
je 0x15130
leaq 0xb7123(%rip), %rsi     # 0xcc159
leaq 0xb78d9(%rip), %rdx     # 0xcc916
leaq 0xb7682(%rip), %rcx     # 0xcc6c6
leaq 0xb74a2(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x1ca, %r9d            # imm = 0x1CA
xorl %eax, %eax
callq 0xc007
jmp 0x14fcb
leaq 0xb70f2(%rip), %rsi     # 0xcc159
leaq 0xb76d6(%rip), %rdx     # 0xcc744
leaq 0xb7651(%rip), %rcx     # 0xcc6c6
leaq 0xb7471(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x195, %r9d            # imm = 0x195
xorl %eax, %eax
callq 0xc007
jmp 0x14bf5
movb $0x1, %bpl
jmp 0x14ddc
movb $0x1, %bpl
jmp 0x14e9f
pushq $0x6
popq %rsi
movq %r14, %rdi
callq 0x13ffe
movq %r14, %rdi
callq 0x143d2
movzbl (%rax), %ecx
subl $0x36, %ecx
jne 0x150c0
movzbl 0x1(%rax), %ecx
negl %ecx
testl %ecx, %ecx
je 0x15137
leaq 0xb708c(%rip), %rsi     # 0xcc159
leaq 0xb7785(%rip), %rdx     # 0xcc859
leaq 0xb75eb(%rip), %rcx     # 0xcc6c6
leaq 0xb740b(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x1aa, %r9d            # imm = 0x1AA
xorl %eax, %eax
callq 0xc007
jmp 0x14cb8
leaq 0xb705b(%rip), %rsi     # 0xcc159
leaq 0xb782c(%rip), %rdx     # 0xcc931
leaq 0xb75ba(%rip), %rcx     # 0xcc6c6
leaq 0xb73da(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x1c8, %r9d            # imm = 0x1C8
xorl %eax, %eax
callq 0xc007
jmp 0x14fbc
movb $0x1, %bpl
jmp 0x14a77
xorl %ebx, %ebx
jmp 0x14fce
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x13ffe
movq %r14, %rdi
callq 0x143d2
leaq 0xb7728(%rip), %rdi     # 0xcc879
movq %rax, %rsi
callq 0xb880
testl %eax, %eax
je 0x151f6
leaq 0xb6ff1(%rip), %rsi     # 0xcc159
leaq 0xb770e(%rip), %rdx     # 0xcc87d
leaq 0xb7550(%rip), %rcx     # 0xcc6c6
leaq 0xb7370(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1ac, %r9d            # imm = 0x1AC
xorl %eax, %eax
callq 0xc007
jmp 0x14cc5
leaq 0xb6fbe(%rip), %rsi     # 0xcc159
leaq 0xb75b9(%rip), %rdx     # 0xcc75b
leaq 0xb751d(%rip), %rcx     # 0xcc6c6
leaq 0xb733d(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x197, %r9d            # imm = 0x197
xorl %eax, %eax
callq 0xc007
jmp 0x14c04
leaq 0xb6f8d(%rip), %rsi     # 0xcc159
leaq 0xb759f(%rip), %rdx     # 0xcc772
leaq 0xb74ec(%rip), %rcx     # 0xcc6c6
leaq 0xb730c(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x19b, %r9d            # imm = 0x19B
xorl %eax, %eax
callq 0xc007
jmp 0x14c25
movb $0x1, %bpl
jmp 0x14cc5
movq %r15, %rdi
callq 0x143d2
leaq 0xc5cf4(%rip), %rdi     # 0xdaf01
movq %rax, %rsi
callq 0xb880
testl %eax, %eax
je 0x15240
leaq 0xb6f39(%rip), %rsi     # 0xcc159
leaq 0xb7595(%rip), %rdx     # 0xcc7bc
leaq 0xb7498(%rip), %rcx     # 0xcc6c6
leaq 0xb72b8(%rip), %r8      # 0xcc4ed
movq %rbx, %rdi
movl $0x19d, %r9d            # imm = 0x19D
jmp 0x151ea
movl $0x7c0, %esi            # imm = 0x7C0
movq %r14, %rdi
callq 0x13ffe
movq %r14, %rdi
callq 0x143d2
leaq 0xb7583(%rip), %rdi     # 0xcc7df
movq %rax, %rsi
callq 0xb880
testl %eax, %eax
je 0x1529b
leaq 0xb6eea(%rip), %rsi     # 0xcc159
leaq 0xb7577(%rip), %rdx     # 0xcc7ed
leaq 0xb7449(%rip), %rcx     # 0xcc6c6
leaq 0xb7269(%rip), %r8      # 0xcc4ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x19f, %r9d            # imm = 0x19F
xorl %eax, %eax
callq 0xc007
jmp 0x14c34
movb $0x1, %bpl
jmp 0x14c34
movq 0x118d0e(%rip), %rax    # 0x12dfb8
movq (%rax), %rdi
leaq 0xb4db2(%rip), %rsi     # 0xca066
leaq 0xb539e(%rip), %rdx     # 0xca659
leaq 0xb7404(%rip), %rcx     # 0xcc6c6
leaq 0xb7224(%rip), %r8      # 0xcc4ed
movl $0x17f, %r9d            # imm = 0x17F
xorl %eax, %eax
callq 0xb8c0
callq 0xb300