// File: /workspace/github_c_makefile_star2_O1/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 0x3c880
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0x3d1e6
callq 0x3bfe0
movq %rax, %r14
testq %rax, %rax
je 0x3c898
cmpq $0x0, 0x8(%r14)
sete %bpl
jmp 0x3c89b
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x3c8cc
leaq 0xa68d2(%rip), %rsi     # 0xe3179
leaq 0xa6e4c(%rip), %rdx     # 0xe36fa
leaq 0xa6e34(%rip), %rcx     # 0xe36e9
leaq 0xa6c54(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x183, %r9d            # imm = 0x183
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
leaq 0x114df2(%rip), %rsi    # 0x1516d5
movq %rax, %rdi
callq 0x3c0cc
testb %bpl, %bpl
je 0x3c944
testq %r14, %r14
je 0x3c948
cmpq $0xb, 0x8(%r14)
jne 0x3c948
movq %r14, %rdi
callq 0x3c40b
leaq 0x114dca(%rip), %rsi    # 0x1516d5
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x3d06d
leaq 0xa6857(%rip), %rsi     # 0xe3179
leaq 0xa6e00(%rip), %rdx     # 0xe3729
leaq 0xa6db9(%rip), %rcx     # 0xe36e9
leaq 0xa6bd9(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x18a, %r9d            # imm = 0x18A
jmp 0x3c96f
xorl %ebp, %ebp
jmp 0x3c976
leaq 0xa682a(%rip), %rsi     # 0xe3179
leaq 0xa6dbb(%rip), %rdx     # 0xe3711
leaq 0xa6d8c(%rip), %rcx     # 0xe36e9
leaq 0xa6bac(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x189, %r9d            # imm = 0x189
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
leaq 0x114d48(%rip), %rsi    # 0x1516d5
movq %rax, %rdi
callq 0x3c067
testb %bpl, %bpl
je 0x3c9d9
testq %r14, %r14
je 0x3c9a9
movb $0x1, %bpl
cmpq $0xb, 0x8(%r14)
je 0x3c9db
leaq 0xa67c9(%rip), %rsi     # 0xe3179
leaq 0xa6d5a(%rip), %rdx     # 0xe3711
leaq 0xa6d2b(%rip), %rcx     # 0xe36e9
leaq 0xa6b4b(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x18e, %r9d            # imm = 0x18E
xorl %eax, %eax
callq 0x3559f
jmp 0x3c9db
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
callq 0x3bfe0
movq %rax, %r15
leaq 0xb5237(%rip), %rsi     # 0xf1c31
movq %rax, %rdi
callq 0x3c067
testb %bpl, %bpl
je 0x3cb11
testq %r15, %r15
je 0x3cae5
cmpq $0x3, 0x8(%r15)
jne 0x3cae5
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c12b
testq %r14, %r14
je 0x3cf9e
cmpq $0x3, 0x8(%r14)
jne 0x3cf9e
leaq 0xb4882(%rip), %rsi     # 0xf12c7
movq %r14, %rdi
callq 0x3c067
testq %r14, %r14
je 0x3d07c
cmpq $0x6, 0x8(%r14)
jne 0x3d07c
movq %r14, %rdi
movl $0x62, %esi
callq 0x3c28d
movq %r14, %rdi
movl $0x61, %esi
callq 0x3c28d
movq %r14, %rdi
movl $0x7a, %esi
callq 0x3c28d
testq %r14, %r14
je 0x3d108
cmpq $0x9, 0x8(%r14)
jne 0x3d108
movq %r14, %rdi
callq 0x3c40b
leaq 0xa6d01(%rip), %rdi     # 0xe37ac
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3d141
leaq 0xa66b7(%rip), %rsi     # 0xe3179
leaq 0xa6ced(%rip), %rdx     # 0xe37b6
leaq 0xa6c19(%rip), %rcx     # 0xe36e9
leaq 0xa6a39(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x19c, %r9d            # imm = 0x19C
jmp 0x3d12d
leaq 0xa668d(%rip), %rsi     # 0xe3179
leaq 0xa6c5d(%rip), %rdx     # 0xe3750
leaq 0xa6bef(%rip), %rcx     # 0xe36e9
leaq 0xa6a0f(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x193, %r9d            # imm = 0x193
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c12b
leaq 0xb47a4(%rip), %rsi     # 0xf12c7
movq %r14, %rdi
callq 0x3c067
movq %r14, %rdi
movl $0x62, %esi
callq 0x3c28d
movq %r14, %rdi
movl $0x61, %esi
callq 0x3c28d
movq %r14, %rdi
movl $0x7a, %esi
callq 0x3c28d
movl $0x7c0, %esi            # imm = 0x7C0
movq %r14, %rdi
callq 0x3c1dc
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x3c1dc
testb %bpl, %bpl
je 0x3cbd3
movq %r14, %rdi
callq 0x3c40b
leaq 0xb5795(%rip), %rdi     # 0xf232c
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3cc96
leaq 0xa65cb(%rip), %rsi     # 0xe3179
leaq 0xa6c88(%rip), %rdx     # 0xe383d
leaq 0xa6b2d(%rip), %rcx     # 0xe36e9
leaq 0xa694d(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x1a6, %r9d            # imm = 0x1A6
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x3c49c
movl $0x6, %esi
movq %r14, %rdi
callq 0x3c1dc
movl $0x10, %esi
movq %r14, %rdi
callq 0x3c1dc
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
testb %bpl, %bpl
je 0x3cc55
movq %r14, %rdi
callq 0x3c40b
testq %rax, %rax
je 0x3cce0
testq %r14, %r14
je 0x3cc5c
cmpq $0x0, 0x8(%r14)
je 0x3cc5c
leaq 0xa6549(%rip), %rsi     # 0xe3179
leaq 0xa6c99(%rip), %rdx     # 0xe38d0
leaq 0xa6aab(%rip), %rcx     # 0xe36e9
leaq 0xa68cb(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b2, %r9d            # imm = 0x1B2
jmp 0x3cd07
xorl %ebp, %ebp
jmp 0x3cd0e
movq %r14, %rdi
callq 0x3c40b
cmpb $0x0, (%rax)
je 0x3cfcf
leaq 0xa6505(%rip), %rsi     # 0xe3179
leaq 0xa6c6b(%rip), %rdx     # 0xe38e6
leaq 0xa6a67(%rip), %rcx     # 0xe36e9
leaq 0xa6887(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b3, %r9d            # imm = 0x1B3
jmp 0x3cd07
movq %r14, %rdi
callq 0x3c49c
movq %r14, %rdi
callq 0x3c40b
cmpb $0x0, (%rax)
je 0x3cfdf
leaq 0xa64c3(%rip), %rsi     # 0xe3179
leaq 0xa6ba0(%rip), %rdx     # 0xe385d
leaq 0xa6a25(%rip), %rcx     # 0xe36e9
leaq 0xa6845(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x1a8, %r9d            # imm = 0x1A8
xorl %eax, %eax
callq 0x3559f
jmp 0x3cbdb
leaq 0xa6492(%rip), %rsi     # 0xe3179
leaq 0xa6bd4(%rip), %rdx     # 0xe38c2
leaq 0xa69f4(%rip), %rcx     # 0xe36e9
leaq 0xa6814(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b1, %r9d            # imm = 0x1B1
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
testb %bpl, %bpl
je 0x3cd65
movq %r14, %rdi
callq 0x3c40b
testq %rax, %rax
je 0x3cda3
testq %r14, %r14
je 0x3cd69
cmpq $0x0, 0x8(%r14)
je 0x3cd69
leaq 0xa6436(%rip), %rsi     # 0xe3179
leaq 0xa6b86(%rip), %rdx     # 0xe38d0
leaq 0xa6998(%rip), %rcx     # 0xe36e9
leaq 0xa67b8(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b8, %r9d            # imm = 0x1B8
jmp 0x3cdca
xorl %ebp, %ebp
jmp 0x3cdd1
movq %r14, %rdi
callq 0x3c40b
cmpb $0x0, (%rax)
je 0x3cfd7
leaq 0xa63f8(%rip), %rsi     # 0xe3179
leaq 0xa6b5e(%rip), %rdx     # 0xe38e6
leaq 0xa695a(%rip), %rcx     # 0xe36e9
leaq 0xa677a(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b9, %r9d            # imm = 0x1B9
jmp 0x3cdca
leaq 0xa63cf(%rip), %rsi     # 0xe3179
leaq 0xa6b11(%rip), %rdx     # 0xe38c2
leaq 0xa6931(%rip), %rcx     # 0xe36e9
leaq 0xa6751(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1b7, %r9d            # imm = 0x1B7
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
leaq 0xb4e49(%rip), %rsi     # 0xf1c31
movl $0x3, %edx
movq %rax, %rdi
callq 0x3c185
testb %bpl, %bpl
je 0x3ce3e
movq %r14, %rdi
callq 0x3c40b
leaq 0xb4e28(%rip), %rdi     # 0xf1c31
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3ce42
leaq 0xa635d(%rip), %rsi     # 0xe3179
leaq 0xa6ade(%rip), %rdx     # 0xe3901
leaq 0xa68bf(%rip), %rcx     # 0xe36e9
leaq 0xa66df(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1bf, %r9d            # imm = 0x1BF
jmp 0x3ce78
xorl %ebp, %ebp
jmp 0x3ce7f
testq %r14, %r14
je 0x3ce51
movb $0x1, %bpl
cmpq $0x3, 0x8(%r14)
je 0x3ce7f
leaq 0xa6321(%rip), %rsi     # 0xe3179
leaq 0xa6ac4(%rip), %rdx     # 0xe3923
leaq 0xa6883(%rip), %rcx     # 0xe36e9
leaq 0xa66a3(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1c0, %r9d            # imm = 0x1C0
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x3d1eb
callq 0x3bfe0
movq %rax, %r14
leaq 0xa6916(%rip), %rsi     # 0xe37ac
movq %rax, %rdi
callq 0x3c067
movq %r14, %rdi
callq 0x3c4fb
movq %rax, %r15
testb %bpl, %bpl
je 0x3cee9
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c4b0
testl %eax, %eax
je 0x3cf29
leaq 0xa62b5(%rip), %rsi     # 0xe3179
leaq 0xa6a6e(%rip), %rdx     # 0xe3939
leaq 0xa6817(%rip), %rcx     # 0xe36e9
leaq 0xa6637(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x1c6, %r9d            # imm = 0x1C6
xorl %eax, %eax
callq 0x3559f
leaq 0xa6a60(%rip), %rsi     # 0xe3950
movq %r15, %rdi
callq 0x3c067
leaq 0xa6a51(%rip), %rsi     # 0xe3950
movq %r14, %rdi
callq 0x3c067
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0x3d1eb
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa6a20(%rip), %rsi     # 0xe3950
movq %r15, %rdi
callq 0x3c067
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c4b0
testl %eax, %eax
je 0x3d03c
leaq 0xa69fe(%rip), %rsi     # 0xe3950
movq %r14, %rdi
callq 0x3c067
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c4b0
testl %eax, %eax
je 0x3d075
leaq 0xa6205(%rip), %rsi     # 0xe3179
leaq 0xa69be(%rip), %rdx     # 0xe3939
leaq 0xa6767(%rip), %rcx     # 0xe36e9
leaq 0xa6587(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x1ca, %r9d            # imm = 0x1CA
xorl %eax, %eax
callq 0x3559f
jmp 0x3cf07
leaq 0xa61d4(%rip), %rsi     # 0xe3179
leaq 0xa67bb(%rip), %rdx     # 0xe3767
leaq 0xa6736(%rip), %rcx     # 0xe36e9
leaq 0xa6556(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x195, %r9d            # imm = 0x195
xorl %eax, %eax
callq 0x3559f
jmp 0x3cb1c
movb $0x1, %bpl
jmp 0x3cd0e
movb $0x1, %bpl
jmp 0x3cdd1
movl $0x6, %esi
movq %r14, %rdi
callq 0x3c1dc
movq %r14, %rdi
callq 0x3c40b
leaq 0xa6798(%rip), %rdi     # 0xe3793
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3d0ad
leaq 0xa6167(%rip), %rsi     # 0xe3179
leaq 0xa6863(%rip), %rdx     # 0xe387c
leaq 0xa66c9(%rip), %rcx     # 0xe36e9
leaq 0xa64e9(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x1aa, %r9d            # imm = 0x1AA
xorl %eax, %eax
callq 0x3559f
jmp 0x3cbe8
leaq 0xa6136(%rip), %rsi     # 0xe3179
leaq 0xa690a(%rip), %rdx     # 0xe3954
leaq 0xa6698(%rip), %rcx     # 0xe36e9
leaq 0xa64b8(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x1c8, %r9d            # imm = 0x1C8
xorl %eax, %eax
callq 0x3559f
jmp 0x3cef8
movb $0x1, %bpl
jmp 0x3c976
xorl %ebx, %ebx
jmp 0x3cf0c
leaq 0xa60f6(%rip), %rsi     # 0xe3179
leaq 0xa66f4(%rip), %rdx     # 0xe377e
leaq 0xa6658(%rip), %rcx     # 0xe36e9
leaq 0xa6478(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x197, %r9d            # imm = 0x197
xorl %eax, %eax
callq 0x3559f
jmp 0x3cb2b
movl $0x10, %esi
movq %r14, %rdi
callq 0x3c1dc
movq %r14, %rdi
callq 0x3c40b
leaq 0xa67d3(%rip), %rdi     # 0xe389c
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3d139
leaq 0xa609d(%rip), %rsi     # 0xe3179
leaq 0xa67bd(%rip), %rdx     # 0xe38a0
leaq 0xa65ff(%rip), %rcx     # 0xe36e9
leaq 0xa641f(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1ac, %r9d            # imm = 0x1AC
xorl %eax, %eax
callq 0x3559f
jmp 0x3cbf7
leaq 0xa606a(%rip), %rsi     # 0xe3179
leaq 0xa667f(%rip), %rdx     # 0xe3795
leaq 0xa65cc(%rip), %rcx     # 0xe36e9
leaq 0xa63ec(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x19b, %r9d            # imm = 0x19B
xorl %eax, %eax
callq 0x3559f
jmp 0x3cb52
movb $0x1, %bpl
jmp 0x3cbf7
movq %r15, %rdi
callq 0x3c40b
leaq 0xb4ae1(%rip), %rdi     # 0xf1c31
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3d183
leaq 0xa6016(%rip), %rsi     # 0xe3179
leaq 0xa6675(%rip), %rdx     # 0xe37df
leaq 0xa6578(%rip), %rcx     # 0xe36e9
leaq 0xa6398(%rip), %r8      # 0xe3510
movq %rbx, %rdi
movl $0x19d, %r9d            # imm = 0x19D
jmp 0x3d12d
movl $0x7c0, %esi            # imm = 0x7C0
movq %r14, %rdi
callq 0x3c1dc
movq %r14, %rdi
callq 0x3c40b
leaq 0xa6663(%rip), %rdi     # 0xe3802
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x3d1de
leaq 0xa5fc7(%rip), %rsi     # 0xe3179
leaq 0xa6657(%rip), %rdx     # 0xe3810
leaq 0xa6529(%rip), %rcx     # 0xe36e9
leaq 0xa6349(%rip), %r8      # 0xe3510
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x19f, %r9d            # imm = 0x19F
xorl %eax, %eax
callq 0x3559f
jmp 0x3cb61
movb $0x1, %bpl
jmp 0x3cb61
callq 0xe2a6