// File: /workspace/github_c_makefile_star2_O1/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 0x37db
testq %rax, %rax
je 0x1828
movq %rax, %r13
leaq 0x4ba7(%rip), %r14      # 0x60aa
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x390e
testq %rax, %rax
je 0x159b
movq %rax, %r15
cmpl $0x0, 0x7c21(%rip)      # 0x9144
jle 0x153e
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r12d
cmpl 0x7c08(%rip), %r12d     # 0x9144
jl 0x1528
leaq 0x4afd(%rip), %rdi      # 0x6042
movq %r13, %rsi
xorl %eax, %eax
callq 0x10e0
incl 0x7bef(%rip)            # 0x9144
movq %r15, %rdi
callq 0x183c
movl 0x7be1(%rip), %eax      # 0x9144
leal -0x1(%rax), %ecx
movl %ecx, 0x7bd8(%rip)      # 0x9144
cmpl $0x2, %eax
jl 0x158a
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x7bbc(%rip), %r15d     # 0x9144
jl 0x1574
leaq 0x4b95(%rip), %rdi      # 0x6126
callq 0x1070
jmp 0x1768
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3955
testq %rax, %rax
je 0x165b
movq %rax, %r15
movslq 0x7b87(%rip), %rax      # 0x9140
leal 0x1(%rax), %ecx
shlq $0x4, %rax
leaq 0x7b89(%rip), %rdx      # 0x9150
movq %r13, (%rax,%rdx)
movq %r15, 0x8(%rax,%rdx)
movl %ecx, 0x7b6a(%rip)      # 0x9140
cmpl $0x0, 0x7b67(%rip)      # 0x9144
jle 0x15f8
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r12d
cmpl 0x7b4e(%rip), %r12d     # 0x9144
jl 0x15e2
leaq 0x4a4b(%rip), %rdi      # 0x604a
movq %r13, %rsi
xorl %eax, %eax
callq 0x10e0
incl 0x7b35(%rip)            # 0x9144
movq %r15, %rdi
callq 0x14db
movl 0x7b27(%rip), %eax      # 0x9144
leal -0x1(%rax), %ecx
movl %ecx, 0x7b1e(%rip)      # 0x9144
cmpl $0x2, %eax
jl 0x1644
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x7b02(%rip), %r15d     # 0x9144
jl 0x162e
leaq 0x4ad6(%rip), %rdi      # 0x6121
callq 0x1070
decl 0x7aea(%rip)            # 0x9140
jmp 0x1768
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4987
movq %rdx, (%rsp)
testl %eax, %eax
je 0x16c5
movq %rdx, %r15
cmpl $0x0, 0x7acc(%rip)      # 0x9144
jle 0x1693
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r12d
cmpl 0x7ab3(%rip), %r12d     # 0x9144
jl 0x167d
leaq 0x49b8(%rip), %rdi      # 0x6052
movq %r13, %rsi
xorl %eax, %eax
callq 0x10e0
movq %r15, %rdi
callq 0x1b26
leaq 0x4a74(%rip), %rdi      # 0x6127
callq 0x1070
movq %r15, %rdi
callq 0x1030
jmp 0x1768
movq %rbx, %rdi
movq %r13, %rsi
callq 0x49c5
movq %rdx, (%rsp)
testl %eax, %eax
je 0x171c
cmpl $0x0, 0x7a65(%rip)      # 0x9144
jle 0x16fa
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x7a4c(%rip), %r15d     # 0x9144
jl 0x16e4
cmpl $0x0, (%rsp)
leaq 0x495d(%rip), %rdx      # 0x6062
leaq 0x495b(%rip), %rax      # 0x6067
cmoveq %rax, %rdx
leaq 0x4941(%rip), %rdi      # 0x6058
movq %r13, %rsi
jmp 0x1761
movq %rbx, %rdi
movq %r13, %rsi
callq 0x49fb
movq %rdx, (%rsp)
testl %eax, %eax
je 0x1785
movq %rdx, %r15
cmpl $0x0, 0x7a0b(%rip)      # 0x9144
jle 0x1754
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r12d
cmpl 0x79f2(%rip), %r12d     # 0x9144
jl 0x173e
leaq 0x4912(%rip), %rdi      # 0x606d
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10e0
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x37db
movq %rax, %r13
testq %rax, %rax
jne 0x1505
jmp 0x1828
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4a31
movq %rdx, (%rsp)
testl %eax, %eax
je 0x17d2
cmpl $0x0, 0x79a5(%rip)      # 0x9144
jle 0x17ba
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x798c(%rip), %r15d     # 0x9144
jl 0x17a4
movsd (%rsp), %xmm0
leaq 0x48b2(%rip), %rdi      # 0x6078
movq %r13, %rsi
movb $0x1, %al
callq 0x10e0
jmp 0x1768
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4a77
movq %rdx, (%rsp)
testl %eax, %eax
je 0x1837
movq %rdx, %r15
cmpl $0x0, 0x7955(%rip)      # 0x9144
jle 0x180a
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r12d
cmpl 0x793c(%rip), %r12d     # 0x9144
jl 0x17f4
leaq 0x4841(%rip), %rdi      # 0x6052
movq %r13, %rsi
xorl %eax, %eax
callq 0x10e0
movq %r15, %rdi
callq 0x1ca2
jmp 0x16ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x125d