// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %r15
callq 0x3bfe0
movq %rax, %rbx
leaq 0x6e9fe(%rip), %rsi     # 0xf4c90
movq %rsp, %rdi
movl $0x277, %edx            # imm = 0x277
callq 0xb520
testq %r15, %r15
je 0x862b4
movq %r15, %rdi
callq 0x3566a
testb %al, %al
jne 0x868b4
callq 0x5bfe8
movq %rax, %r14
testq %rax, %rax
jne 0x862ed
leaq 0x5ceb1(%rip), %rsi     # 0xe3179
leaq 0x677c7(%rip), %rdx     # 0xeda96
leaq 0x6e821(%rip), %rcx     # 0xf4af7
leaq 0x6e7c0(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0x99, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
callq 0x5c416
leaq 0x649b2(%rip), %rcx     # 0xeacae
movq %rsp, %rsi
movl $0x276, %edx            # imm = 0x276
movq %r14, %rdi
callq 0x5bf6e
movb $0x1, %cl
testl %eax, %eax
jne 0x86325
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x59536
testl %eax, %eax
setne %cl
testb %cl, %cl
je 0x86332
movzbl %cl, %r12d
jmp 0x86892
leaq 0x67a38(%rip), %rdx     # 0xedd71
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x58b98
leaq 0x6e7c6(%rip), %rsi     # 0xf4b13
movq %rbx, %rdi
callq 0x3c067
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rcx
callq 0x8604c
leaq 0x6677e(%rip), %rsi     # 0xecaed
movq %rbx, %rdi
callq 0x3c067
movq %rbx, %rdi
callq 0x3c40b
movq %rax, %r12
movq %rbx, %rdi
callq 0x3c434
leaq 0x6e78e(%rip), %rcx     # 0xf4b1f
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x5bf6e
movb $0x1, %cl
testl %eax, %eax
jne 0x863b8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x59536
testl %eax, %eax
setne %cl
movzbl %cl, %r12d
testb %r12b, %r12b
jne 0x86892
movq %rbx, %rdi
callq 0x3c434
testq %rax, %rax
jne 0x86404
leaq 0x5cda0(%rip), %rsi     # 0xe3179
leaq 0x6e742(%rip), %rdx     # 0xf4b22
leaq 0x6e710(%rip), %rcx     # 0xf4af7
leaq 0x6e6af(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xa8, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x67966(%rip), %rdx     # 0xedd71
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x58b98
testl %r12d, %r12d
jne 0x86464
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c5c
xorl %r12d, %r12d
cmpl $0x5, %eax
je 0x86464
leaq 0x5cd40(%rip), %rsi     # 0xe3179
leaq 0x6e6fc(%rip), %rdx     # 0xf4b3c
leaq 0x6e6b0(%rip), %rcx     # 0xf4af7
leaq 0x6e64f(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xaa, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x86435(%rip), %rdx     # 0x10c8a0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x864c4
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c5c
xorl %r12d, %r12d
cmpl $0x5, %eax
je 0x864c4
leaq 0x5cce0(%rip), %rsi     # 0xe3179
leaq 0x6e69c(%rip), %rdx     # 0xf4b3c
leaq 0x6e650(%rip), %rcx     # 0xf4af7
leaq 0x6e5ef(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xac, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x6e684(%rip), %rdx     # 0xf4b4f
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x86524
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c5c
xorl %r12d, %r12d
cmpl $0x5, %eax
je 0x86524
leaq 0x5cc80(%rip), %rsi     # 0xe3179
leaq 0x6e63c(%rip), %rdx     # 0xf4b3c
leaq 0x6e5f0(%rip), %rcx     # 0xf4af7
leaq 0x6e58f(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xae, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x6a42e(%rip), %rdx     # 0xf0959
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x86583
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57cb2
xorl %r12d, %r12d
testl %eax, %eax
jne 0x86583
leaq 0x5cc21(%rip), %rsi     # 0xe3179
leaq 0x6e5fe(%rip), %rdx     # 0xf4b5d
leaq 0x6e591(%rip), %rcx     # 0xf4af7
leaq 0x6e530(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xb0, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %r12d, %r12d
jne 0x865d6
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57fbe
xorl %r12d, %r12d
ucomisd 0x5b350(%rip), %xmm0    # 0xe18f0
jne 0x865a4
jnp 0x865d6
leaq 0x5cbce(%rip), %rsi     # 0xe3179
leaq 0x6e5bf(%rip), %rdx     # 0xf4b71
leaq 0x6e53e(%rip), %rcx     # 0xf4af7
leaq 0x6e4dd(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xb1, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x578d2
leaq 0x65b03(%rip), %rdx     # 0xec0ed
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x86642
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57cb2
xorl %r12d, %r12d
testl %eax, %eax
jne 0x86642
leaq 0x5cb62(%rip), %rsi     # 0xe3179
leaq 0x6e53f(%rip), %rdx     # 0xf4b5d
leaq 0x6e4d2(%rip), %rcx     # 0xf4af7
leaq 0x6e471(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xb4, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %r12d, %r12d
jne 0x86695
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57fbe
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x86663
jnp 0x86695
leaq 0x5cb0f(%rip), %rsi     # 0xe3179
leaq 0x6e51b(%rip), %rdx     # 0xf4b8c
leaq 0x6e47f(%rip), %rcx     # 0xf4af7
leaq 0x6e41e(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xb5, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x578d2
leaq 0x77fbf(%rip), %rdx     # 0xfe668
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x86701
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57d30
xorl %r12d, %r12d
testl %eax, %eax
jne 0x86701
leaq 0x5caa3(%rip), %rsi     # 0xe3179
leaq 0x6e4ca(%rip), %rdx     # 0xf4ba7
leaq 0x6e413(%rip), %rcx     # 0xf4af7
leaq 0x6e3b2(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xb8, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %r12d, %r12d
jne 0x8675d
xorl %r12d, %r12d
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x58042
leaq 0x64e5b(%rip), %rdi     # 0xeb57a
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x8675d
leaq 0x5ca47(%rip), %rsi     # 0xe3179
leaq 0x6e482(%rip), %rdx     # 0xf4bbb
leaq 0x6e3b7(%rip), %rcx     # 0xf4af7
leaq 0x6e356(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xb9, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x578d2
leaq 0x64240(%rip), %rdx     # 0xea9b1
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x867ca
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c5c
xorl %r12d, %r12d
cmpl $0x1, %eax
je 0x867ca
leaq 0x5c9da(%rip), %rsi     # 0xe3179
leaq 0x6e43c(%rip), %rdx     # 0xf4be2
leaq 0x6e34a(%rip), %rcx     # 0xf4af7
leaq 0x6e2e9(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xbc, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %r12d, %r12d
jne 0x86817
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5801c
testl %eax, %eax
je 0x86814
leaq 0x5c98c(%rip), %rsi     # 0xe3179
leaq 0x6e403(%rip), %rdx     # 0xf4bf7
leaq 0x6e2fc(%rip), %rcx     # 0xf4af7
leaq 0x6e29b(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xbd, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0x86817
xorl %r12d, %r12d
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x578d2
leaq 0x64177(%rip), %rdx     # 0xea9a2
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
testl %r12d, %r12d
jne 0x86885
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57c5c
testl %eax, %eax
je 0x86882
leaq 0x5c91e(%rip), %rsi     # 0xe3179
leaq 0x6e3b3(%rip), %rdx     # 0xf4c15
leaq 0x6e28e(%rip), %rcx     # 0xf4af7
leaq 0x6e22d(%rip), %r8      # 0xf4a9d
movq %r15, %rdi
movl $0xc0, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0x86885
xorl %r12d, %r12d
movq %r14, %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0x578d2
movq %rbx, %rdi
callq 0x3d1eb
movq %r14, %rdi
callq 0x5ac59
movl %r12d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1fbe6