// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/luaserialize.c
// Function: parse_table
static int parse_table(lua_State *L, GtStr *out, int index, int level,
                       GtError *err)
{
  int GT_UNUSED rval, had_err = 0;
  gt_error_check(err);
  gt_assert(lua_istable(L, index));
  lua_pushnil(L);
  if (index < 0)
    index--;
  while (!had_err && (lua_next(L, index) != 0))
  {
    int i;
    for (i=0;i<level;i++)
      gt_str_append_cstr(out, "  ");
    rval = format_scalar(L, out, -2, true, NULL);
    gt_assert(!rval); /* cannot happen */
    gt_str_append_cstr(out, " = ");
    if (lua_istable(L, -1))
    {
      gt_str_append_cstr(out, "{\n");
      had_err = parse_table(L, out, -1, level+1, err);
      for (i=0;i<level;i++)
        gt_str_append_cstr(out, "  ");
      gt_str_append_cstr(out, "},\n");
    }
    else
    {
      had_err = format_scalar(L, out, -1, false, err);
      gt_str_append_cstr(out, ",\n");
    }
    lua_pop(L, 1);
  }
  return had_err;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movl $0x0, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0xa8153
movq 0x18(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0xa811b
jmp 0xa8153
movq 0x10beb6(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xb5f3a(%rip), %rsi     # 0x15e066
leaq 0xb6515(%rip), %rdx     # 0x15e648
leaq 0xcac43(%rip), %rcx     # 0x172d7d
leaq 0xcaab3(%rip), %r8      # 0x172bf4
movl $0x50, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xa8155
jmp 0xa8157
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x4f800
cmpl $0x5, %eax
je 0xa81a2
movq 0x10be67(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xb5eeb(%rip), %rsi     # 0x15e066
leaq 0xcaa9a(%rip), %rdx     # 0x172c1c
leaq 0xcabf4(%rip), %rcx     # 0x172d7d
leaq 0xcaa64(%rip), %r8      # 0x172bf4
movl $0x51, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xa81a4
movq 0x30(%rsp), %rdi
callq 0x506a0
cmpl $0x0, 0x24(%rsp)
jge 0xa81c0
movl 0x24(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xa81c2
xorl %eax, %eax
cmpl $0x0, 0x10(%rsp)
movb %al, 0xb(%rsp)
jne 0xa81e7
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x53230
cmpl $0x0, %eax
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0xa81f4
jmp 0xa8368
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0xa8224
movq 0x28(%rsp), %rdi
leaq 0xd49c9(%rip), %rsi     # 0x17cbdb
callq 0x18fb0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xa81fc
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xa8c50
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0xa8285
movq 0x10bd84(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xb5e08(%rip), %rsi     # 0x15e066
leaq 0xb6814(%rip), %rdx     # 0x15ea79
leaq 0xcab11(%rip), %rcx     # 0x172d7d
leaq 0xca981(%rip), %r8      # 0x172bf4
movl $0x5b, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xa8287
movq 0x28(%rsp), %rdi
leaq 0xcaaf6(%rip), %rsi     # 0x172d89
callq 0x18fb0
movq 0x30(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x5, %eax
jne 0xa8324
movq 0x28(%rsp), %rdi
leaq 0xc1143(%rip), %rsi     # 0x1693fb
callq 0x18fb0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x20(%rsp), %ecx
addl $0x1, %ecx
movq 0x18(%rsp), %r8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xa80e0
movl %eax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0xa8311
movq 0x28(%rsp), %rdi
leaq 0xd48dc(%rip), %rsi     # 0x17cbdb
callq 0x18fb0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xa82e9
movq 0x28(%rsp), %rdi
leaq 0xcaa70(%rip), %rsi     # 0x172d8d
callq 0x18fb0
jmp 0xa8354
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %r8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xa8c50
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0xcaa3f(%rip), %rsi     # 0x172d8e
callq 0x18fb0
movq 0x30(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
jmp 0xa81c2
movl 0x10(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)