// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x38c0
movq %rax, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1855
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3b00
movq %rax, %rcx
movq %rcx, -0x30(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1585
callq 0x1e50
movq -0x28(%rbp), %rsi
leaq 0x6aee(%rip), %rdi      # 0x802d
movb $0x0, %al
callq 0x10d0
movl 0x9bd8(%rip), %eax      # 0xb124
addl $0x1, %eax
movl %eax, 0x9bcf(%rip)      # 0xb124
movq -0x30(%rbp), %rdi
callq 0x1860
movl 0x9bc0(%rip), %eax      # 0xb124
addl $-0x1, %eax
movl %eax, 0x9bb7(%rip)      # 0xb124
callq 0x1e50
leaq 0x6abc(%rip), %rdi      # 0x8035
movb $0x0, %al
callq 0x10d0
jmp 0x1847
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3b80
movq %rax, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1651
movq -0x28(%rbp), %rcx
movslq 0x9b71(%rip), %rdx      # 0xb120
leaq 0x9b7a(%rip), %rax      # 0xb130
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movslq 0x9b55(%rip), %rdx      # 0xb120
leaq 0x9b5e(%rip), %rax      # 0xb130
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl 0x9b3d(%rip), %eax      # 0xb120
addl $0x1, %eax
movl %eax, 0x9b34(%rip)      # 0xb120
callq 0x1e50
movq -0x28(%rbp), %rsi
leaq 0x6a3d(%rip), %rdi      # 0x8039
movb $0x0, %al
callq 0x10d0
movl 0x9b1b(%rip), %eax      # 0xb124
addl $0x1, %eax
movl %eax, 0x9b12(%rip)      # 0xb124
movq -0x38(%rbp), %rdi
callq 0x14e0
movl 0x9b03(%rip), %eax      # 0xb124
addl $-0x1, %eax
movl %eax, 0x9afa(%rip)      # 0xb124
callq 0x1e50
leaq 0x6a0b(%rip), %rdi      # 0x8041
movb $0x0, %al
callq 0x10d0
movl 0x9add(%rip), %eax      # 0xb120
addl $-0x1, %eax
movl %eax, 0x9ad4(%rip)      # 0xb120
jmp 0x1847
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5680
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x16b7
callq 0x1e50
movq -0x28(%rbp), %rsi
leaq 0x69ba(%rip), %rdi      # 0x8045
movb $0x0, %al
callq 0x10d0
movq -0x10(%rbp), %rdi
callq 0x1b40
leaq 0x6994(%rip), %rdi      # 0x8036
movb $0x0, %al
callq 0x10d0
movq -0x10(%rbp), %rdi
callq 0x1030
jmp 0x1847
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x56f0
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x1715
callq 0x1e50
movq -0x28(%rbp), %rsi
movl -0x10(%rbp), %ecx
leaq 0x6966(%rip), %rdx      # 0x805a
leaq 0x695a(%rip), %rax      # 0x8055
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x6942(%rip), %rdi      # 0x804b
movb $0x0, %al
callq 0x10d0
jmp 0x1847
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5740
movl %eax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x175f
callq 0x1e50
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x690d(%rip), %rdi      # 0x8060
movb $0x0, %al
callq 0x10d0
jmp 0x1847
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5790
movl %eax, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x17aa
callq 0x1e50
movq -0x28(%rbp), %rsi
movsd -0x10(%rbp), %xmm0
leaq 0x68cd(%rip), %rdi      # 0x806b
movb $0x1, %al
callq 0x10d0
jmp 0x1847
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x57e0
movl %eax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x1816
callq 0x1e50
movq -0x28(%rbp), %rsi
leaq 0x685b(%rip), %rdi      # 0x8045
movb $0x0, %al
callq 0x10d0
movl -0x18(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x1d60
leaq 0x6832(%rip), %rdi      # 0x8036
movb $0x0, %al
callq 0x10d0
movq -0x10(%rbp), %rdi
callq 0x1030
jmp 0x1847
movq 0x97b3(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x1180
movq 0x97cc(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x683f(%rip), %rsi      # 0x8075
movb $0x0, %al
callq 0x1150
movl $0x1, %edi
callq 0x11a0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x14f6
addq $0x90, %rsp
popq %rbp
retq
nop