// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %rdi, %r15
callq 0x3b728
movq %rax, %rbx
leaq 0x6eed5(%rip), %rsi     # 0xf4c30
movq %rsp, %rdi
movl $0x277, %edx            # imm = 0x277
callq 0xb520
testq %r15, %r15
je 0x85d7d
movq %r15, %rdi
callq 0x34fea
testb %al, %al
jne 0x863e9
callq 0x5b65a
movq %rax, %r14
testq %rax, %rax
jne 0x85db6
leaq 0x5d3c8(%rip), %rsi     # 0xe3159
leaq 0x67cb6(%rip), %rdx     # 0xeda4e
leaq 0x6ecf8(%rip), %rcx     # 0xf4a97
leaq 0x6ec97(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0x99, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x5ba88
leaq 0x64e99(%rip), %rcx     # 0xeac5e
movq %rsp, %rsi
movl $0x276, %edx            # imm = 0x276
movq %r14, %rdi
callq 0x5b5e0
movl $0x1, %ebp
testl %eax, %eax
jne 0x86179
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x588cb
testl %eax, %eax
jne 0x86179
leaq 0x67f2a(%rip), %rdx     # 0xedd29
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x57f56
leaq 0x6eca0(%rip), %rsi     # 0xf4ab3
movq %rbx, %rdi
callq 0x3b7af
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rcx
callq 0x85b20
leaq 0x66c68(%rip), %rsi     # 0xeca9d
movq %rbx, %rdi
callq 0x3b7af
movq %rbx, %rdi
callq 0x3bb5d
movq %rax, %r12
movq %rbx, %rdi
callq 0x3bb86
leaq 0x6ec68(%rip), %rcx     # 0xf4abf
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x5b5e0
testl %eax, %eax
jne 0x86179
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x588cb
testl %eax, %eax
jne 0x86179
movq %rbx, %rdi
callq 0x3bb86
testq %rax, %rax
je 0x86039
leaq 0x67e8e(%rip), %rdx     # 0xedd29
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f9b
cmpl $0x5, %eax
jne 0x8607b
leaq 0x867fb(%rip), %rdx     # 0x10c6c0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f9b
cmpl $0x5, %eax
jne 0x8619b
leaq 0x6ec00(%rip), %rdx     # 0xf4aef
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f9b
cmpl $0x5, %eax
jne 0x861cc
leaq 0x6a9f0(%rip), %rdx     # 0xf0909
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56ff1
testl %eax, %eax
je 0x861fd
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57374
ucomisd 0x5b9a0(%rip), %xmm0    # 0xe18f0
jne 0x86224
jp 0x86224
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x6612d(%rip), %rdx     # 0xec09d
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56ff1
testl %eax, %eax
je 0x86255
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57374
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8627c
jp 0x8627c
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x56b09
leaq 0x78641(%rip), %rdx     # 0xfe608
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5706f
testl %eax, %eax
je 0x862ad
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x573f8
leaq 0x6552b(%rip), %rdi     # 0xeb52a
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
je 0x862de
leaq 0x5d143(%rip), %rsi     # 0xe3159
leaq 0x6eb3e(%rip), %rdx     # 0xf4b5b
leaq 0x6ea73(%rip), %rcx     # 0xf4a97
leaq 0x6ea12(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xb9, %r9d
jmp 0x862d2
leaq 0x5d119(%rip), %rsi     # 0xe3159
leaq 0x6ea7b(%rip), %rdx     # 0xf4ac2
leaq 0x6ea49(%rip), %rcx     # 0xf4a97
leaq 0x6e9e8(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xa8, %r9d
xorl %eax, %eax
callq 0x34f1f
leaq 0x67cbd(%rip), %rdx     # 0xedd29
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x57f56
jmp 0x860a7
leaq 0x5d0d7(%rip), %rsi     # 0xe3159
leaq 0x6ea53(%rip), %rdx     # 0xf4adc
leaq 0x6ea07(%rip), %rcx     # 0xf4a97
leaq 0x6e9a6(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xaa, %r9d
xorl %eax, %eax
callq 0x34f1f
leaq 0x86612(%rip), %rdx     # 0x10c6c0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
leaq 0x6ea2d(%rip), %rdx     # 0xf4aef
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
leaq 0x6a833(%rip), %rdx     # 0xf0909
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x65fa6(%rip), %rdx     # 0xec09d
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x56b09
leaq 0x784f0(%rip), %rdx     # 0xfe608
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x64828(%rip), %rdx     # 0xea961
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x647f8(%rip), %rdx     # 0xea952
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0x56b09
movq %rbx, %rdi
callq 0x3c87b
movq %r14, %rdi
callq 0x5a089
movl %ebp, %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5cfb7(%rip), %rsi     # 0xe3159
leaq 0x6e933(%rip), %rdx     # 0xf4adc
leaq 0x6e8e7(%rip), %rcx     # 0xf4a97
leaq 0x6e886(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xac, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x860bb
leaq 0x5cf86(%rip), %rsi     # 0xe3159
leaq 0x6e902(%rip), %rdx     # 0xf4adc
leaq 0x6e8b6(%rip), %rcx     # 0xf4a97
leaq 0x6e855(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xae, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x860cf
leaq 0x5cf55(%rip), %rsi     # 0xe3159
leaq 0x6e8f2(%rip), %rdx     # 0xf4afd
leaq 0x6e885(%rip), %rcx     # 0xf4a97
leaq 0x6e824(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xb0, %r9d
jmp 0x86249
leaq 0x5cf2e(%rip), %rsi     # 0xe3159
leaq 0x6e8df(%rip), %rdx     # 0xf4b11
leaq 0x6e85e(%rip), %rcx     # 0xf4a97
leaq 0x6e7fd(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xb1, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x860e3
leaq 0x5cefd(%rip), %rsi     # 0xe3159
leaq 0x6e89a(%rip), %rdx     # 0xf4afd
leaq 0x6e82d(%rip), %rcx     # 0xf4a97
leaq 0x6e7cc(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xb4, %r9d
jmp 0x862a1
leaq 0x5ced6(%rip), %rsi     # 0xe3159
leaq 0x6e8a2(%rip), %rdx     # 0xf4b2c
leaq 0x6e806(%rip), %rcx     # 0xf4a97
leaq 0x6e7a5(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xb5, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x86104
leaq 0x5cea5(%rip), %rsi     # 0xe3159
leaq 0x6e88c(%rip), %rdx     # 0xf4b47
leaq 0x6e7d5(%rip), %rcx     # 0xf4a97
leaq 0x6e774(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xb8, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x86125
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x6466f(%rip), %rdx     # 0xea961
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f9b
cmpl $0x1, %eax
jne 0x86349
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x573d2
testl %eax, %eax
je 0x8637a
leaq 0x5ce30(%rip), %rsi     # 0xe3159
leaq 0x6e867(%rip), %rdx     # 0xf4b97
leaq 0x6e760(%rip), %rcx     # 0xf4a97
leaq 0x6e6ff(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xbd, %r9d
jmp 0x8636e
leaq 0x5ce09(%rip), %rsi     # 0xe3159
leaq 0x6e82b(%rip), %rdx     # 0xf4b82
leaq 0x6e739(%rip), %rcx     # 0xf4a97
leaq 0x6e6d8(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xbc, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x86146
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x56b09
leaq 0x645c4(%rip), %rdx     # 0xea952
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x57f56
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x56f9b
testl %eax, %eax
je 0x863e2
leaq 0x5cda1(%rip), %rsi     # 0xe3159
leaq 0x6e7f6(%rip), %rdx     # 0xf4bb5
leaq 0x6e6d1(%rip), %rcx     # 0xf4a97
leaq 0x6e670(%rip), %r8      # 0xf4a3d
movq %r15, %rdi
movl $0xc0, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0x8616c
xorl %ebp, %ebp
jmp 0x8616c
callq 0x1fb80