// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_cat.c
// Function: print_array
static void print_array(toml_array_t *curarr) {
  toml_datum_t d;
  toml_array_t *arr;
  toml_table_t *tab;
  const int n = toml_array_nelem(curarr);

  for (int i = 0; i < n; i++) {

    if (0 != (arr = toml_array_at(curarr, i))) {
      prindent();
      printf("[\n");
      indent++;
      print_array(arr);
      indent--;
      prindent();
      printf("],\n");
      continue;
    }

    if (0 != (tab = toml_table_at(curarr, i))) {
      prindent();
      printf("{\n");
      indent++;
      print_table(tab);
      indent--;
      prindent();
      printf("},\n");
      continue;
    }

    d = toml_string_at(curarr, i);
    if (d.ok) {
      prindent();
      print_string(d.u.s);
      printf(",\n");
      free(d.u.s);
      continue;
    }

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

    d = toml_int_at(curarr, i);
    if (d.ok) {
      prindent();
      printf("%" PRId64 ",\n", d.u.i);
      continue;
    }

    d = toml_double_at(curarr, i);
    if (d.ok) {
      prindent();
      printf("%f,\n", d.u.d);
      continue;
    }

    d = toml_timestamp_at(curarr, i);
    if (d.ok) {
      prindent();
      print_timestamp(d);
      printf(",\n");
      free(d.u.ts);
      continue;
    }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x32cc
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
leaq 0x3a66(%rip), %r13      # 0x5124
leaq 0x3a61(%rip), %r14      # 0x5126
xorl %r15d, %r15d
cmpl %r15d, %ebp
je 0x184b
movq %rbx, %rdi
movl %r15d, %esi
callq 0x32f4
testq %rax, %rax
je 0x170f
movq %rax, %r12
callq 0x1a83
movq %r13, %rdi
callq 0x1060
incl 0x6a3d(%rip)            # 0x8134
movq %r12, %rdi
callq 0x169b
decl 0x6a2f(%rip)            # 0x8134
callq 0x1a83
movq %r14, %rdi
jmp 0x1753
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3310
testq %rax, %rax
je 0x1760
movq %rax, %r12
callq 0x1a83
leaq 0x39f1(%rip), %rdi      # 0x511f
callq 0x1060
incl 0x69fb(%rip)            # 0x8134
movq %r12, %rdi
callq 0x1445
decl 0x69ed(%rip)            # 0x8134
callq 0x1a83
leaq 0x39ce(%rip), %rdi      # 0x5121
callq 0x1060
incl %r15d
jmp 0x16c8
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3e56
testl %eax, %eax
je 0x1795
movq %rdx, %r12
callq 0x1a83
movq %r12, %rdi
callq 0x188d
leaq 0x39a1(%rip), %rdi      # 0x5127
callq 0x1060
movq %r12, %rdi
callq 0x1030
jmp 0x1758
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3e9d
testl %eax, %eax
je 0x17ca
movq %rdx, %r12
callq 0x1a83
testl %r12d, %r12d
leaq 0x38ac(%rip), %rsi      # 0x5062
leaq 0x38aa(%rip), %rax      # 0x5067
cmoveq %rax, %rsi
leaq 0x3895(%rip), %rdi      # 0x505d
jmp 0x17eb
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3ee4
testl %eax, %eax
je 0x17f7
movq %rdx, %r12
callq 0x1a83
leaq 0x388a(%rip), %rdi      # 0x5072
movq %r12, %rsi
xorl %eax, %eax
callq 0x10d0
jmp 0x1758
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3f2b
testl %eax, %eax
je 0x1827
movq %rdx, (%rsp)
callq 0x1a83
leaq 0x3867(%rip), %rdi      # 0x507d
movsd (%rsp), %xmm0
movb $0x1, %al
callq 0x10d0
jmp 0x1758
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3f72
testl %eax, %eax
je 0x185a
movq %rdx, %r12
callq 0x1a83
movq %r12, %rdi
callq 0x19eb
jmp 0x177f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x676f(%rip), %rax      # 0x7fd0
movq (%rax), %rdi
callq 0x1190
movq 0x6788(%rip), %rax      # 0x7ff8
movq (%rax), %rcx
leaq 0x3833(%rip), %rdi      # 0x50ad
pushq $0x27
popq %rsi
pushq $0x1
popq %rdx
callq 0x11c0
pushq $0x1
popq %rdi
callq 0x11b0