// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/luaserialize.c
// Function: gt_lua_serializer_unit_test
int gt_lua_serializer_unit_test(GtError *err)
{
  int had_err = 0;
  lua_State *L;
  GtStr *outstr  = gt_str_new();
  const char testtable[] = "config =\n"
  "{\n"
  "  gene = {\n"
  "    -- Color definitions\n"
  "    stroke             = {red=0.0, green=0.0, blue=0.0},\n"
  "    stroke_marked      = {red=1.0, green=0.0, blue=0.0},\n"
  "    fill               = {red=0.9, green=0.9, blue=1.0},\n"
  "    style              = \"box\",\n"
  "    -- Collapsing options\n"
  "    collapse_to_parent = false,\n"
  "    split_lines        = true,\n"
  "    -- Caption options\n"
  "    max_capt_show_width= nil,\n"
  "    -- Display this track only if the viewport is not wider than this\n"
  "    -- number of nucleotides. Set to 0 to disable type track.\n"
  "    max_show_width     = nil,\n"
  "    -- Limit the number of tracks\n"
  "    --    max_num_lines      = 10,\n"
  "  },\n"
  "}\n"
  "";
  gt_error_check(err);

  L = luaL_newstate();
  gt_ensure(L);
  luaL_openlibs(L);
  had_err = luaL_loadbuffer(L, testtable, sizeof (testtable)-1, "t") ||
              lua_pcall(L, 0, 0, 0);
  if (!had_err)
  {
    lua_getglobal(L, "config");
    gt_str_append_cstr(outstr, "config = {\n");
    gt_lua_table_to_str(L, outstr, -1, err);
    gt_str_append_cstr(outstr, "}");
    had_err = luaL_loadbuffer(L, gt_str_get(outstr),
                              gt_str_length(outstr), "t2") ||
              lua_pcall(L, 0, 0, 0);
    if (!had_err)
    {
      gt_ensure(gt_str_length(outstr) > 0);
      lua_getglobal(L, "config");
      gt_ensure(lua_istable(L, -1));
      lua_getfield(L, -1, "gene");
      gt_ensure(lua_istable(L, -1));
      lua_getfield(L, -1, "stroke_marked");
      gt_ensure(lua_istable(L, -1));
      lua_getfield(L, -1, "red");
      gt_ensure(lua_isnumber(L, -1));
      gt_ensure(1.0 == lua_tonumber(L, -1));
      lua_pop(L, 1);
      lua_getfield(L, -1, "blue");
      gt_ensure(lua_isnumber(L, -1));
      gt_ensure(0.0 == lua_tonumber(L, -1));
      lua_pop(L, 2);
      lua_getfield(L, -1, "style");
      gt_ensure(lua_isstring(L, -1));
      gt_ensure(strcmp("box",lua_tostring(L, -1)) == 0);
      lua_pop(L, 1);
      lua_getfield(L, -1, "collapse_to_parent");
      gt_ensure(lua_isboolean(L, -1));
      gt_ensure(lua_toboolean(L, -1) == false);
      lua_pop(L, 1);
      lua_getfield(L, -1, "max_show_width");
      gt_ensure(lua_isnil(L, -1));
      lua_pop(L, 3);
    }
  }
  gt_str_delete(outstr);
  lua_close(L);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %r15
callq 0x13d5c
movq %rax, %rbx
leaq 0x78309(%rip), %rsi     # 0xddf90
movq %rsp, %rdi
movl $0x277, %edx            # imm = 0x277
callq 0xb520
testq %r15, %r15
je 0x65ca9
movq %r15, %rdi
callq 0xc103
testb %al, %al
jne 0x662e2
callq 0x3ba0a
movq %rax, %r14
testq %rax, %rax
jne 0x65ce2
leaq 0x6649c(%rip), %rsi     # 0xcc159
leaq 0x70d32(%rip), %rdx     # 0xd69f6
leaq 0x7812c(%rip), %rcx     # 0xdddf7
leaq 0x780cb(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0x99, %r9d
xorl %eax, %eax
callq 0xc007
movq %r14, %rdi
callq 0x3be09
leaq 0x6df5d(%rip), %rcx     # 0xd3c4e
movq %rsp, %rsi
movl $0x276, %edx            # imm = 0x276
movq %r14, %rdi
callq 0x3b9a4
pushq $0x1
popq %r12
testl %eax, %eax
jne 0x6607d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x39305
testl %eax, %eax
jne 0x6607d
leaq 0x70fa7(%rip), %rdx     # 0xd6cd1
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x38a63
leaq 0x780d5(%rip), %rsi     # 0xdde13
movq %rbx, %rdi
callq 0x13dd3
pushq $-0x1
popq %rbp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r15, %rcx
callq 0x65958
leaq 0x6fd2d(%rip), %rsi     # 0xd5a8d
movq %rbx, %rdi
callq 0x13dd3
movq %rbx, %rdi
callq 0x143d2
movq %rax, %r13
movq %rbx, %rdi
callq 0x14461
leaq 0x7809d(%rip), %rcx     # 0xdde1f
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3b9a4
testl %eax, %eax
jne 0x6607d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x39305
testl %eax, %eax
jne 0x6607d
movq %rbx, %rdi
callq 0x14461
testq %rax, %rax
je 0x65f58
leaq 0x70f0b(%rip), %rdx     # 0xd6cd1
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x38a63
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x37b59
cmpl $0x5, %eax
jne 0x65f9a
leaq 0x8fb62(%rip), %rdx     # 0xf5950
pushq $-0x1
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x38a63
movq %r14, %rdi
movl %r12d, %esi
callq 0x37b59
cmpl $0x5, %eax
jne 0x660a2
leaq 0x78037(%rip), %rdx     # 0xdde4f
pushq $-0x1
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x38a63
movq %r14, %rdi
movl %r12d, %esi
callq 0x37b59
cmpl $0x5, %eax
jne 0x660d3
leaq 0x73a77(%rip), %rdx     # 0xd98b9
pushq $-0x1
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x38a63
movq %r14, %rdi
movl %r12d, %esi
callq 0x37bad
testl %eax, %eax
je 0x66104
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x37f19
ucomisd 0x64a79(%rip), %xmm0    # 0xca8f0
jne 0x6612b
jp 0x6612b
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x6f1f8(%rip), %rdx     # 0xd508d
pushq $-0x1
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x38a63
movq %r14, %rdi
movl %r12d, %esi
callq 0x37bad
testl %eax, %eax
je 0x6615c
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x37f19
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x66183
jp 0x66183
pushq $-0x3
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x81a20(%rip), %rdx     # 0xe7908
pushq $-0x1
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x38a63
movq %r14, %rdi
movl %r12d, %esi
callq 0x37c2b
testl %eax, %eax
je 0x661b4
pushq $-0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x37f9b
leaq 0x6e5fc(%rip), %rdi     # 0xd451a
movq %rax, %rsi
callq 0xb880
testl %eax, %eax
je 0x661e5
leaq 0x66224(%rip), %rsi     # 0xcc159
leaq 0x77f7f(%rip), %rdx     # 0xddebb
leaq 0x77eb4(%rip), %rcx     # 0xdddf7
leaq 0x77e53(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xb9, %r9d
jmp 0x661d9
leaq 0x661fa(%rip), %rsi     # 0xcc159
leaq 0x77ebc(%rip), %rdx     # 0xdde22
leaq 0x77e8a(%rip), %rcx     # 0xdddf7
leaq 0x77e29(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xa8, %r9d
xorl %eax, %eax
callq 0xc007
leaq 0x70d46(%rip), %rdx     # 0xd6cd1
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x38a63
jmp 0x65fc6
leaq 0x661b8(%rip), %rsi     # 0xcc159
leaq 0x77e94(%rip), %rdx     # 0xdde3c
leaq 0x77e48(%rip), %rcx     # 0xdddf7
leaq 0x77de7(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xaa, %r9d
xorl %eax, %eax
callq 0xc007
leaq 0x8f983(%rip), %rdx     # 0xf5950
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x38a63
leaq 0x77e70(%rip), %rdx     # 0xdde4f
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x38a63
leaq 0x738c8(%rip), %rdx     # 0xd98b9
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x38a63
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x6f07f(%rip), %rdx     # 0xd508d
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x38a63
pushq $-0x3
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x818dd(%rip), %rdx     # 0xe7908
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x38a63
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x6d909(%rip), %rdx     # 0xd3951
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x38a63
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x6d8dd(%rip), %rdx     # 0xd3942
movq %r14, %rdi
movl %ebp, %esi
callq 0x38a63
pushq $-0x4
popq %rsi
movq %r14, %rdi
callq 0x377fa
movl %ebp, %r12d
movq %rbx, %rdi
callq 0x152db
movq %r14, %rdi
callq 0x3a8f3
movl %r12d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x660b0(%rip), %rsi     # 0xcc159
leaq 0x77d8c(%rip), %rdx     # 0xdde3c
leaq 0x77d40(%rip), %rcx     # 0xdddf7
leaq 0x77cdf(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xac, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x65fd8
leaq 0x6607f(%rip), %rsi     # 0xcc159
leaq 0x77d5b(%rip), %rdx     # 0xdde3c
leaq 0x77d0f(%rip), %rcx     # 0xdddf7
leaq 0x77cae(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xae, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x65fea
leaq 0x6604e(%rip), %rsi     # 0xcc159
leaq 0x77d4b(%rip), %rdx     # 0xdde5d
leaq 0x77cde(%rip), %rcx     # 0xdddf7
leaq 0x77c7d(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xb0, %r9d
jmp 0x66150
leaq 0x66027(%rip), %rsi     # 0xcc159
leaq 0x77d38(%rip), %rdx     # 0xdde71
leaq 0x77cb7(%rip), %rcx     # 0xdddf7
leaq 0x77c56(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xb1, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x65ffc
leaq 0x65ff6(%rip), %rsi     # 0xcc159
leaq 0x77cf3(%rip), %rdx     # 0xdde5d
leaq 0x77c86(%rip), %rcx     # 0xdddf7
leaq 0x77c25(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xb4, %r9d
jmp 0x661a8
leaq 0x65fcf(%rip), %rsi     # 0xcc159
leaq 0x77cfb(%rip), %rdx     # 0xdde8c
leaq 0x77c5f(%rip), %rcx     # 0xdddf7
leaq 0x77bfe(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xb5, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x66019
leaq 0x65f9e(%rip), %rsi     # 0xcc159
leaq 0x77ce5(%rip), %rdx     # 0xddea7
leaq 0x77c2e(%rip), %rcx     # 0xdddf7
leaq 0x77bcd(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xb8, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x66036
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x6d75a(%rip), %rdx     # 0xd3951
pushq $-0x1
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x38a63
movq %r14, %rdi
movl %r12d, %esi
callq 0x37b59
cmpl $0x1, %eax
jne 0x6624c
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x37f77
testl %eax, %eax
je 0x6627d
leaq 0x65f2d(%rip), %rsi     # 0xcc159
leaq 0x77cc4(%rip), %rdx     # 0xddef7
leaq 0x77bbd(%rip), %rcx     # 0xdddf7
leaq 0x77b5c(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xbd, %r9d
jmp 0x66271
leaq 0x65f06(%rip), %rsi     # 0xcc159
leaq 0x77c88(%rip), %rdx     # 0xddee2
leaq 0x77b96(%rip), %rcx     # 0xdddf7
leaq 0x77b35(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xbc, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x66053
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x377fa
leaq 0x6d6b3(%rip), %rdx     # 0xd3942
pushq $-0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x38a63
movq %r14, %rdi
movl %ebp, %esi
callq 0x37b59
testl %eax, %eax
je 0x662db
leaq 0x65ea8(%rip), %rsi     # 0xcc159
leaq 0x77c5d(%rip), %rdx     # 0xddf15
leaq 0x77b38(%rip), %rcx     # 0xdddf7
leaq 0x77ad7(%rip), %r8      # 0xddd9d
movq %r15, %rdi
movl $0xc0, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x6606f
xorl %ebp, %ebp
jmp 0x6606f
movq 0xc7ccf(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x63d73(%rip), %rsi     # 0xca066
leaq 0x6435f(%rip), %rdx     # 0xca659
leaq 0x77af6(%rip), %rcx     # 0xdddf7
leaq 0x77a95(%rip), %r8      # 0xddd9d
movl $0x96, %r9d
xorl %eax, %eax
callq 0xb8c0
callq 0xb300