// File: /workspace/github_c_makefile_star2_O1/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 0x39cf
testl %eax, %eax
jle 0x1b12
movl %eax, %ebp
leaq 0x484a(%rip), %r14      # 0x60aa
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x39f7
testq %rax, %rax
je 0x18eb
movq %rax, %r15
cmpl $0x0, 0x78c7(%rip)      # 0x9144
jle 0x1898
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r13d
cmpl 0x78ae(%rip), %r13d     # 0x9144
jl 0x1882
leaq 0x4885(%rip), %rdi      # 0x6124
callq 0x1070
incl 0x789a(%rip)            # 0x9144
movq %r15, %rdi
callq 0x183c
movl 0x788c(%rip), %eax      # 0x9144
leal -0x1(%rax), %ecx
movl %ecx, 0x7883(%rip)      # 0x9144
cmpl $0x2, %eax
jl 0x18df
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x7867(%rip), %r15d     # 0x9144
jl 0x18c9
leaq 0x4840(%rip), %rdi      # 0x6126
jmp 0x1972
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3a13
testq %rax, %rax
je 0x1988
movq %rax, %r15
cmpl $0x0, 0x783b(%rip)      # 0x9144
jle 0x1924
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r13d
cmpl 0x7822(%rip), %r13d     # 0x9144
jl 0x190e
leaq 0x47f4(%rip), %rdi      # 0x611f
callq 0x1070
incl 0x780e(%rip)            # 0x9144
movq %r15, %rdi
callq 0x14db
movl 0x7800(%rip), %eax      # 0x9144
leal -0x1(%rax), %ecx
movl %ecx, 0x77f7(%rip)      # 0x9144
cmpl $0x2, %eax
jl 0x196b
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x77db(%rip), %r15d     # 0x9144
jl 0x1955
leaq 0x47af(%rip), %rdi      # 0x6121
callq 0x1070
incl %r12d
cmpl %ebp, %r12d
jne 0x1863
jmp 0x1b12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4770
movq %rdx, (%rsp)
testl %eax, %eax
je 0x19de
movq %rdx, %r15
cmpl $0x0, 0x779f(%rip)      # 0x9144
jle 0x19c0
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r13d
cmpl 0x7786(%rip), %r13d     # 0x9144
jl 0x19aa
movq %r15, %rdi
callq 0x1b26
leaq 0x4758(%rip), %rdi      # 0x6127
callq 0x1070
movq %r15, %rdi
callq 0x1030
jmp 0x1977
movq %rbx, %rdi
movl %r12d, %esi
callq 0x47ba
movq %rdx, (%rsp)
testl %eax, %eax
je 0x1a32
cmpl $0x0, 0x774c(%rip)      # 0x9144
jle 0x1a13
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x7733(%rip), %r15d     # 0x9144
jl 0x19fd
cmpl $0x0, (%rsp)
leaq 0x4644(%rip), %rsi      # 0x6062
leaq 0x4642(%rip), %rax      # 0x6067
cmoveq %rax, %rsi
leaq 0x462d(%rip), %rdi      # 0x605d
jmp 0x1a74
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4804
movq %rdx, (%rsp)
testl %eax, %eax
je 0x1a80
movq %rdx, %r15
cmpl $0x0, 0x76f5(%rip)      # 0x9144
jle 0x1a6a
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r13d
cmpl 0x76dc(%rip), %r13d     # 0x9144
jl 0x1a54
leaq 0x4601(%rip), %rdi      # 0x6072
movq %r15, %rsi
xorl %eax, %eax
callq 0x10e0
jmp 0x1977
movq %rbx, %rdi
movl %r12d, %esi
callq 0x484e
movq %rdx, (%rsp)
testl %eax, %eax
je 0x1acd
cmpl $0x0, 0x76aa(%rip)      # 0x9144
jle 0x1ab5
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl 0x7691(%rip), %r15d     # 0x9144
jl 0x1a9f
movsd (%rsp), %xmm0
leaq 0x45bc(%rip), %rdi      # 0x607d
movb $0x1, %al
callq 0x10e0
jmp 0x1977
movq %rbx, %rdi
movl %r12d, %esi
callq 0x48a8
movq %rdx, (%rsp)
testl %eax, %eax
je 0x1b21
movq %rdx, %r15
cmpl $0x0, 0x765a(%rip)      # 0x9144
jle 0x1b05
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10e0
incl %r13d
cmpl 0x7641(%rip), %r13d     # 0x9144
jl 0x1aef
movq %r15, %rdi
callq 0x1ca2
jmp 0x19c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1291