// File: /workspace/github_c_makefile_star2_O3/cktan[P]tomlc99/toml_cat.c
// Function: print_table
static void print_table(toml_table_t *curtab) {
  toml_datum_t d;
  int i;
  const char *key;
  toml_array_t *arr;
  toml_table_t *tab;

  for (i = 0; 0 != (key = toml_key_in(curtab, i)); i++) {

    if (0 != (arr = toml_array_in(curtab, key))) {
      prindent();
      printf("%s = [\n", key);
      indent++;
      print_array(arr);
      indent--;
      prindent();
      printf("],\n");
      continue;
    }

    if (0 != (tab = toml_table_in(curtab, key))) {
      stack[stacktop].key = key;
      stack[stacktop].tab = tab;
      stacktop++;
      prindent();
      printf("%s = {\n", key);
      indent++;
      print_table(tab);
      indent--;
      prindent();
      printf("},\n");
      stacktop--;
      continue;
    }

    d = toml_string_in(curtab, key);
    if (d.ok) {
      prindent();
      printf("%s = ", key);
      print_string(d.u.s);
      printf(",\n");
      free(d.u.s);
      continue;
    }

    d = toml_bool_in(curtab, key);
    if (d.ok) {
      prindent();
      printf("%s = %s,\n", key, d.u.b ? "true" : "false");
      continue;
    }

    d = toml_int_in(curtab, key);
    if (d.ok) {
      prindent();
      printf("%s = %" PRId64 ",\n", key, d.u.i);
      continue;
    }

    d = toml_double_in(curtab, key);
    if (d.ok) {
      prindent();
      printf("%s = %f,\n", key, d.u.d);
      continue;
    }

    d = toml_timestamp_in(curtab, key);
    if (d.ok) {
      prindent();
      printf("%s = ", key);
      print_timestamp(d);
      printf(",\n");
      free(d.u.ts);
      continue;
    }

    fflush(stdout);
    fprintf(stderr, "ERROR: unable to decode value in table\n");
    exit(1);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x35f5
testq %rax, %rax
je 0x1809
movq %rax, %r13
leaq 0x4bb7(%rip), %r14      # 0x60aa
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3728
testq %rax, %rax
je 0x158b
movq %rax, %r15
cmpl $0x0, 0x7c21(%rip)      # 0x9134
jle 0x152e
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x7c08(%rip), %r12d     # 0x9134
jl 0x1518
leaq 0x4b0d(%rip), %rdi      # 0x6042
movq %r13, %rsi
xorl %eax, %eax
callq 0x10d0
incl 0x7bef(%rip)            # 0x9134
movq %r15, %rdi
callq 0x181d
movl 0x7be1(%rip), %eax      # 0x9134
leal -0x1(%rax), %ecx
movl %ecx, 0x7bd8(%rip)      # 0x9134
cmpl $0x2, %eax
jl 0x157a
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r15d
cmpl 0x7bbc(%rip), %r15d     # 0x9134
jl 0x1564
leaq 0x4ba5(%rip), %rdi      # 0x6126
callq 0x1060
jmp 0x174e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x376f
testq %rax, %rax
je 0x164b
movq %rax, %r15
movslq 0x7b87(%rip), %rax      # 0x9130
leal 0x1(%rax), %ecx
shlq $0x4, %rax
leaq 0x7b89(%rip), %rdx      # 0x9140
movq %r13, (%rax,%rdx)
movq %r15, 0x8(%rax,%rdx)
movl %ecx, 0x7b6a(%rip)      # 0x9130
cmpl $0x0, 0x7b67(%rip)      # 0x9134
jle 0x15e8
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x7b4e(%rip), %r12d     # 0x9134
jl 0x15d2
leaq 0x4a5b(%rip), %rdi      # 0x604a
movq %r13, %rsi
xorl %eax, %eax
callq 0x10d0
incl 0x7b35(%rip)            # 0x9134
movq %r15, %rdi
callq 0x14cb
movl 0x7b27(%rip), %eax      # 0x9134
leal -0x1(%rax), %ecx
movl %ecx, 0x7b1e(%rip)      # 0x9134
cmpl $0x2, %eax
jl 0x1634
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r15d
cmpl 0x7b02(%rip), %r15d     # 0x9134
jl 0x161e
leaq 0x4ae6(%rip), %rdi      # 0x6121
callq 0x1060
decl 0x7aea(%rip)            # 0x9130
jmp 0x174e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x46ce
testl %eax, %eax
je 0x16b1
movq %rdx, %r15
cmpl $0x0, 0x7ad0(%rip)      # 0x9134
jle 0x167f
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x7ab7(%rip), %r12d     # 0x9134
jl 0x1669
leaq 0x49cc(%rip), %rdi      # 0x6052
movq %r13, %rsi
xorl %eax, %eax
callq 0x10d0
movq %r15, %rdi
callq 0x1af8
leaq 0x4a88(%rip), %rdi      # 0x6127
callq 0x1060
movq %r15, %rdi
callq 0x1030
jmp 0x174e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x470c
testl %eax, %eax
je 0x1706
movq %rdx, %r15
cmpl $0x0, 0x7a6a(%rip)      # 0x9134
jle 0x16e5
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x7a51(%rip), %r12d     # 0x9134
jl 0x16cf
testl %r15d, %r15d
leaq 0x4973(%rip), %rdx      # 0x6062
leaq 0x4971(%rip), %rax      # 0x6067
cmoveq %rax, %rdx
leaq 0x4957(%rip), %rdi      # 0x6058
movq %r13, %rsi
jmp 0x1747
movq %rbx, %rdi
movq %r13, %rsi
callq 0x473f
testl %eax, %eax
je 0x176b
movq %rdx, %r15
cmpl $0x0, 0x7a15(%rip)      # 0x9134
jle 0x173a
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x79fc(%rip), %r12d     # 0x9134
jl 0x1724
leaq 0x492c(%rip), %rdi      # 0x606d
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x35f5
movq %rax, %r13
testq %rax, %rax
jne 0x14f5
jmp 0x1809
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4772
testl %eax, %eax
je 0x17b7
movq %rdx, %r15
cmpl $0x0, 0x79b0(%rip)      # 0x9134
jle 0x179f
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x7997(%rip), %r12d     # 0x9134
jl 0x1789
movq %r15, %xmm0
leaq 0x48cd(%rip), %rdi      # 0x6078
movq %r13, %rsi
movb $0x1, %al
callq 0x10d0
jmp 0x174e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x47b5
testl %eax, %eax
je 0x1818
movq %rdx, %r15
cmpl $0x0, 0x7964(%rip)      # 0x9134
jle 0x17eb
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
incl %r12d
cmpl 0x794b(%rip), %r12d     # 0x9134
jl 0x17d5
leaq 0x4860(%rip), %rdi      # 0x6052
movq %r13, %rsi
xorl %eax, %eax
callq 0x10d0
movq %r15, %rdi
callq 0x1c6f
jmp 0x1698
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x124d