// File: /workspace/github_c_makefile_star2_O3/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 0x3bf2b
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0x3c876
callq 0x3b728
movq %rax, %r14
movb $0x1, %bpl
testq %rax, %rax
je 0x3bf70
cmpq $0x0, 0x8(%r14)
je 0x3bf70
leaq 0xa7210(%rip), %rsi     # 0xe3159
leaq 0xa7787(%rip), %rdx     # 0xe36d7
leaq 0xa776f(%rip), %rcx     # 0xe36c6
leaq 0xa758f(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x183, %r9d            # imm = 0x183
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
leaq 0x11574e(%rip), %rsi    # 0x1516d5
movq %rax, %rdi
callq 0x3b81e
testb %bpl, %bpl
je 0x3bfe8
testq %r14, %r14
je 0x3bfec
cmpq $0xb, 0x8(%r14)
jne 0x3bfec
movq %r14, %rdi
callq 0x3bb5d
leaq 0x115726(%rip), %rsi    # 0x1516d5
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x3c6f9
leaq 0xa7193(%rip), %rsi     # 0xe3159
leaq 0xa7739(%rip), %rdx     # 0xe3706
leaq 0xa76f2(%rip), %rcx     # 0xe36c6
leaq 0xa7512(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x18a, %r9d            # imm = 0x18A
jmp 0x3c013
xorl %ebp, %ebp
jmp 0x3c01a
leaq 0xa7166(%rip), %rsi     # 0xe3159
leaq 0xa76f4(%rip), %rdx     # 0xe36ee
leaq 0xa76c5(%rip), %rcx     # 0xe36c6
leaq 0xa74e5(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x189, %r9d            # imm = 0x189
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
leaq 0x1156a4(%rip), %rsi    # 0x1516d5
movq %rax, %rdi
callq 0x3b7af
testb %bpl, %bpl
je 0x3c07d
testq %r14, %r14
je 0x3c04d
movb $0x1, %bpl
cmpq $0xb, 0x8(%r14)
je 0x3c07f
leaq 0xa7105(%rip), %rsi     # 0xe3159
leaq 0xa7693(%rip), %rdx     # 0xe36ee
leaq 0xa7664(%rip), %rcx     # 0xe36c6
leaq 0xa7484(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x18e, %r9d            # imm = 0x18E
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c07f
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
callq 0x3b728
movq %rax, %r15
leaq 0xb5b43(%rip), %rsi     # 0xf1be1
movq %rax, %rdi
callq 0x3b7af
testb %bpl, %bpl
je 0x3c1a3
testq %r15, %r15
je 0x3c177
cmpq $0x3, 0x8(%r15)
jne 0x3c177
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b87d
testq %r14, %r14
je 0x3c62f
cmpq $0x3, 0x8(%r14)
jne 0x3c62f
leaq 0xb518e(%rip), %rsi     # 0xf1277
movq %r14, %rdi
callq 0x3b7af
cmpq $0x6, 0x8(%r14)
jne 0x3c767
movq %r14, %rdi
movl $0x62, %esi
callq 0x3b9df
movq %r14, %rdi
movl $0x61, %esi
callq 0x3b9df
movq %r14, %rdi
movl $0x7a, %esi
callq 0x3b9df
cmpq $0x9, 0x8(%r14)
jne 0x3c798
movq %r14, %rdi
callq 0x3bb5d
leaq 0xa764c(%rip), %rdi     # 0xe3789
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3c7d1
leaq 0xa7005(%rip), %rsi     # 0xe3159
leaq 0xa7638(%rip), %rdx     # 0xe3793
leaq 0xa7564(%rip), %rcx     # 0xe36c6
leaq 0xa7384(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x19c, %r9d            # imm = 0x19C
jmp 0x3c7bd
leaq 0xa6fdb(%rip), %rsi     # 0xe3159
leaq 0xa75a8(%rip), %rdx     # 0xe372d
leaq 0xa753a(%rip), %rcx     # 0xe36c6
leaq 0xa735a(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x193, %r9d            # imm = 0x193
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b87d
leaq 0xb50c2(%rip), %rsi     # 0xf1277
movq %r14, %rdi
callq 0x3b7af
movq %r14, %rdi
movl $0x62, %esi
callq 0x3b9df
movq %r14, %rdi
movl $0x61, %esi
callq 0x3b9df
movq %r14, %rdi
movl $0x7a, %esi
callq 0x3b9df
movl $0x7c0, %esi            # imm = 0x7C0
movq %r14, %rdi
callq 0x3b92e
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x3b92e
testb %bpl, %bpl
je 0x3c264
movq %r14, %rdi
callq 0x3bb5d
movzbl (%rax), %ecx
subl $0x30, %ecx
jne 0x3c22e
movzbl 0x1(%rax), %ecx
negl %ecx
testl %ecx, %ecx
je 0x3c327
leaq 0xa6f1a(%rip), %rsi     # 0xe3159
leaq 0xa75d4(%rip), %rdx     # 0xe381a
leaq 0xa7479(%rip), %rcx     # 0xe36c6
leaq 0xa7299(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x1a6, %r9d            # imm = 0x1A6
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x3bbee
movl $0x6, %esi
movq %r14, %rdi
callq 0x3b92e
movl $0x10, %esi
movq %r14, %rdi
callq 0x3b92e
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
testb %bpl, %bpl
je 0x3c2e6
movq %r14, %rdi
callq 0x3bb5d
testq %rax, %rax
je 0x3c371
testq %r14, %r14
je 0x3c2ed
cmpq $0x0, 0x8(%r14)
je 0x3c2ed
leaq 0xa6e98(%rip), %rsi     # 0xe3159
leaq 0xa75e5(%rip), %rdx     # 0xe38ad
leaq 0xa73f7(%rip), %rcx     # 0xe36c6
leaq 0xa7217(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b2, %r9d            # imm = 0x1B2
jmp 0x3c398
xorl %ebp, %ebp
jmp 0x3c39f
movq %r14, %rdi
callq 0x3bb5d
cmpb $0x0, (%rax)
je 0x3c660
leaq 0xa6e54(%rip), %rsi     # 0xe3159
leaq 0xa75b7(%rip), %rdx     # 0xe38c3
leaq 0xa73b3(%rip), %rcx     # 0xe36c6
leaq 0xa71d3(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b3, %r9d            # imm = 0x1B3
jmp 0x3c398
movq %r14, %rdi
callq 0x3bbee
movq %r14, %rdi
callq 0x3bb5d
cmpb $0x0, (%rax)
je 0x3c670
leaq 0xa6e12(%rip), %rsi     # 0xe3159
leaq 0xa74ec(%rip), %rdx     # 0xe383a
leaq 0xa7371(%rip), %rcx     # 0xe36c6
leaq 0xa7191(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x1a8, %r9d            # imm = 0x1A8
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c26c
leaq 0xa6de1(%rip), %rsi     # 0xe3159
leaq 0xa7520(%rip), %rdx     # 0xe389f
leaq 0xa7340(%rip), %rcx     # 0xe36c6
leaq 0xa7160(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b1, %r9d            # imm = 0x1B1
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
testb %bpl, %bpl
je 0x3c3f6
movq %r14, %rdi
callq 0x3bb5d
testq %rax, %rax
je 0x3c434
testq %r14, %r14
je 0x3c3fa
cmpq $0x0, 0x8(%r14)
je 0x3c3fa
leaq 0xa6d85(%rip), %rsi     # 0xe3159
leaq 0xa74d2(%rip), %rdx     # 0xe38ad
leaq 0xa72e4(%rip), %rcx     # 0xe36c6
leaq 0xa7104(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b8, %r9d            # imm = 0x1B8
jmp 0x3c45b
xorl %ebp, %ebp
jmp 0x3c462
movq %r14, %rdi
callq 0x3bb5d
cmpb $0x0, (%rax)
je 0x3c668
leaq 0xa6d47(%rip), %rsi     # 0xe3159
leaq 0xa74aa(%rip), %rdx     # 0xe38c3
leaq 0xa72a6(%rip), %rcx     # 0xe36c6
leaq 0xa70c6(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b9, %r9d            # imm = 0x1B9
jmp 0x3c45b
leaq 0xa6d1e(%rip), %rsi     # 0xe3159
leaq 0xa745d(%rip), %rdx     # 0xe389f
leaq 0xa727d(%rip), %rcx     # 0xe36c6
leaq 0xa709d(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b7, %r9d            # imm = 0x1B7
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
leaq 0xb5768(%rip), %rsi     # 0xf1be1
movl $0x3, %edx
movq %rax, %rdi
callq 0x3b8d7
testb %bpl, %bpl
je 0x3c4cf
movq %r14, %rdi
callq 0x3bb5d
leaq 0xb5747(%rip), %rdi     # 0xf1be1
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3c4d3
leaq 0xa6cac(%rip), %rsi     # 0xe3159
leaq 0xa742a(%rip), %rdx     # 0xe38de
leaq 0xa720b(%rip), %rcx     # 0xe36c6
leaq 0xa702b(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1bf, %r9d            # imm = 0x1BF
jmp 0x3c509
xorl %ebp, %ebp
jmp 0x3c510
testq %r14, %r14
je 0x3c4e2
movb $0x1, %bpl
cmpq $0x3, 0x8(%r14)
je 0x3c510
leaq 0xa6c70(%rip), %rsi     # 0xe3159
leaq 0xa7410(%rip), %rdx     # 0xe3900
leaq 0xa71cf(%rip), %rcx     # 0xe36c6
leaq 0xa6fef(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1c0, %r9d            # imm = 0x1C0
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x3c87b
callq 0x3b728
movq %rax, %r14
leaq 0xa7262(%rip), %rsi     # 0xe3789
movq %rax, %rdi
callq 0x3b7af
movq %r14, %rdi
callq 0x3bc4d
movq %rax, %r15
testb %bpl, %bpl
je 0x3c57a
movq %r14, %rdi
movq %r15, %rsi
callq 0x3bc02
testl %eax, %eax
je 0x3c5ba
leaq 0xa6c04(%rip), %rsi     # 0xe3159
leaq 0xa73ba(%rip), %rdx     # 0xe3916
leaq 0xa7163(%rip), %rcx     # 0xe36c6
leaq 0xa6f83(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x1c6, %r9d            # imm = 0x1C6
xorl %eax, %eax
callq 0x34f1f
leaq 0xa73ac(%rip), %rsi     # 0xe392d
movq %r15, %rdi
callq 0x3b7af
leaq 0xa739d(%rip), %rsi     # 0xe392d
movq %r14, %rdi
callq 0x3b7af
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0x3c87b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa736c(%rip), %rsi     # 0xe392d
movq %r15, %rdi
callq 0x3b7af
movq %r14, %rdi
movq %r15, %rsi
callq 0x3bc02
testl %eax, %eax
je 0x3c6c8
leaq 0xa734a(%rip), %rsi     # 0xe392d
movq %r14, %rdi
callq 0x3b7af
movq %r14, %rdi
movq %r15, %rsi
callq 0x3bc02
testl %eax, %eax
je 0x3c701
leaq 0xa6b54(%rip), %rsi     # 0xe3159
leaq 0xa730a(%rip), %rdx     # 0xe3916
leaq 0xa70b3(%rip), %rcx     # 0xe36c6
leaq 0xa6ed3(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x1ca, %r9d            # imm = 0x1CA
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c598
leaq 0xa6b23(%rip), %rsi     # 0xe3159
leaq 0xa7107(%rip), %rdx     # 0xe3744
leaq 0xa7082(%rip), %rcx     # 0xe36c6
leaq 0xa6ea2(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x195, %r9d            # imm = 0x195
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c1ae
movb $0x1, %bpl
jmp 0x3c39f
movb $0x1, %bpl
jmp 0x3c462
movl $0x6, %esi
movq %r14, %rdi
callq 0x3b92e
movq %r14, %rdi
callq 0x3bb5d
movzbl (%rax), %ecx
subl $0x36, %ecx
jne 0x3c691
movzbl 0x1(%rax), %ecx
negl %ecx
testl %ecx, %ecx
je 0x3c708
leaq 0xa6abb(%rip), %rsi     # 0xe3159
leaq 0xa71b4(%rip), %rdx     # 0xe3859
leaq 0xa701a(%rip), %rcx     # 0xe36c6
leaq 0xa6e3a(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x1aa, %r9d            # imm = 0x1AA
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c279
leaq 0xa6a8a(%rip), %rsi     # 0xe3159
leaq 0xa725b(%rip), %rdx     # 0xe3931
leaq 0xa6fe9(%rip), %rcx     # 0xe36c6
leaq 0xa6e09(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x1c8, %r9d            # imm = 0x1C8
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c589
movb $0x1, %bpl
jmp 0x3c01a
xorl %ebx, %ebx
jmp 0x3c59d
movl $0x10, %esi
movq %r14, %rdi
callq 0x3b92e
movq %r14, %rdi
callq 0x3bb5d
leaq 0xa7155(%rip), %rdi     # 0xe3879
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3c7c9
leaq 0xa6a1e(%rip), %rsi     # 0xe3159
leaq 0xa713b(%rip), %rdx     # 0xe387d
leaq 0xa6f7d(%rip), %rcx     # 0xe36c6
leaq 0xa6d9d(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1ac, %r9d            # imm = 0x1AC
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c288
leaq 0xa69eb(%rip), %rsi     # 0xe3159
leaq 0xa6fe6(%rip), %rdx     # 0xe375b
leaq 0xa6f4a(%rip), %rcx     # 0xe36c6
leaq 0xa6d6a(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x197, %r9d            # imm = 0x197
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c1bd
leaq 0xa69ba(%rip), %rsi     # 0xe3159
leaq 0xa6fcc(%rip), %rdx     # 0xe3772
leaq 0xa6f19(%rip), %rcx     # 0xe36c6
leaq 0xa6d39(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x19b, %r9d            # imm = 0x19B
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c1e4
movb $0x1, %bpl
jmp 0x3c288
movq %r15, %rdi
callq 0x3bb5d
leaq 0xb5401(%rip), %rdi     # 0xf1be1
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3c813
leaq 0xa6966(%rip), %rsi     # 0xe3159
leaq 0xa6fc2(%rip), %rdx     # 0xe37bc
leaq 0xa6ec5(%rip), %rcx     # 0xe36c6
leaq 0xa6ce5(%rip), %r8      # 0xe34ed
movq %rbx, %rdi
movl $0x19d, %r9d            # imm = 0x19D
jmp 0x3c7bd
movl $0x7c0, %esi            # imm = 0x7C0
movq %r14, %rdi
callq 0x3b92e
movq %r14, %rdi
callq 0x3bb5d
leaq 0xa6fb0(%rip), %rdi     # 0xe37df
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3c86e
leaq 0xa6917(%rip), %rsi     # 0xe3159
leaq 0xa6fa4(%rip), %rdx     # 0xe37ed
leaq 0xa6e76(%rip), %rcx     # 0xe36c6
leaq 0xa6c96(%rip), %r8      # 0xe34ed
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x19f, %r9d            # imm = 0x19F
xorl %eax, %eax
callq 0x34f1f
jmp 0x3c1f3
movb $0x1, %bpl
jmp 0x3c1f3
callq 0xe26d