// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_json.c
// Function: print_raw
static void print_raw(const char *s) {
  char *sval;
  int64_t ival;
  int bval;
  double dval;
  toml_timestamp_t ts;
  char dbuf[100];

  if (0 == toml_rtos(s, &sval)) {
    printf("{\"type\":\"string\",\"value\":\"");
    print_escape_string(sval);
    printf("\"}");
    free(sval);
  } else if (0 == toml_rtoi(s, &ival)) {
    printf("{\"type\":\"integer\",\"value\":\"%" PRId64 "\"}", ival);
  } else if (0 == toml_rtob(s, &bval)) {
    printf("{\"type\":\"bool\",\"value\":\"%s\"}", bval ? "true" : "false");
  } else if (0 == toml_rtod_ex(s, &dval, dbuf, sizeof(dbuf))) {
    printf("{\"type\":\"float\",\"value\":\"%s\"}", dbuf);
  } else if (0 == toml_rtots(s, &ts)) {
    char millisec[10];
    if (ts.millisec)
      sprintf(millisec, ".%03d", *ts.millisec);
    else
      millisec[0] = 0;
    if (ts.year && ts.hour) {
      printf("{\"type\":\"%s\",\"value\":\"%04d-%02d-%02dT%02d:%02d:%02d%"
             "s%s\"}",
             (ts.z ? "datetime" : "datetime-local"),
             *ts.year, *ts.month, *ts.day, *ts.hour, *ts.minute, *ts.second,
             millisec, (ts.z ? ts.z : ""));
    } else if (ts.year) {
      printf("{\"type\":\"date-local\",\"value\":\"%04d-%02d-%02d\"}", *ts.year,
             *ts.month, *ts.day);
    } else if (ts.hour) {
      printf("{\"type\":\"time-local\",\"value\":\"%02d:%02d:%02d%s\"}", *ts.hour,
             *ts.minute, *ts.second, millisec);
    }
  } else {
    fprintf(stderr, "unknown type\n");
    exit(1);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
callq 0x3793
testl %eax, %eax
je 0x1631
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x3515
testl %eax, %eax
je 0x1663
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x34b5
testl %eax, %eax
je 0x1671
leaq 0x88(%rsp), %rsi
leaq 0x90(%rsp), %rdx
pushq $0x64
popq %rcx
movq %rbx, %rdi
callq 0x3631
testl %eax, %eax
je 0x1690
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x3190
testl %eax, %eax
jne 0x179e
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x16b1
movl (%rax), %edx
leaq 0x3ae2(%rip), %rsi      # 0x5102
leaq 0x6(%rsp), %rdi
xorl %eax, %eax
callq 0x11b0
jmp 0x16b6
leaq 0x3a48(%rip), %rdi      # 0x5080
xorl %eax, %eax
callq 0x10d0
movq 0x10(%rsp), %rdi
callq 0x14eb
leaq 0x3b36(%rip), %rdi      # 0x5186
xorl %eax, %eax
callq 0x10d0
movq 0x10(%rsp), %rdi
callq 0x1030
jmp 0x16a6
movq 0x18(%rsp), %rsi
leaq 0x3a2c(%rip), %rdi      # 0x509b
jmp 0x169f
cmpl $0x0, (%rsp)
leaq 0x3a62(%rip), %rax      # 0x50de
leaq 0x3a56(%rip), %rsi      # 0x50d9
cmoveq %rax, %rsi
leaq 0x3a2e(%rip), %rdi      # 0x50bc
jmp 0x169f
leaq 0x3a4d(%rip), %rdi      # 0x50e4
leaq 0x90(%rsp), %rsi
xorl %eax, %eax
callq 0x10d0
addq $0xf8, %rsp
popq %rbx
popq %r14
retq
movb $0x0, 0x6(%rsp)
movq 0x48(%rsp), %rcx
movq 0x60(%rsp), %rax
testq %rcx, %rcx
setne %dl
testq %rax, %rax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1745
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
leaq 0x3a63(%rip), %rdx      # 0x514b
leaq 0x3a53(%rip), %rsi      # 0x5142
cmoveq %rdx, %rsi
movl (%rcx), %edx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movl (%rcx), %ecx
movl (%r8), %r8d
movl (%rax), %r9d
movq 0x68(%rsp), %rax
movl (%rax), %r10d
movq 0x70(%rsp), %rax
movl (%rax), %r11d
leaq 0x404c(%rip), %rbx      # 0x576a
cmovneq %rdi, %rbx
leaq 0x6(%rsp), %r14
leaq 0x39da(%rip), %rdi      # 0x5108
xorl %eax, %eax
pushq %rbx
pushq %r14
pushq %r11
pushq %r10
callq 0x10d0
addq $0x20, %rsp
jmp 0x16a6
testq %rcx, %rcx
je 0x176d
movl (%rcx), %esi
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movl (%rax), %edx
movl (%rcx), %ecx
leaq 0x39f9(%rip), %rdi      # 0x515a
xorl %eax, %eax
callq 0x10d0
jmp 0x16a6
testq %rax, %rax
je 0x16a6
movl (%rax), %esi
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
movl (%rax), %edx
movl (%rcx), %ecx
leaq 0x39fc(%rip), %rdi      # 0x5189
leaq 0x6(%rsp), %r8
xorl %eax, %eax
callq 0x10d0
jmp 0x16a6
movq 0x6853(%rip), %rax      # 0x7ff8
movq (%rax), %rcx
leaq 0x3a0b(%rip), %rdi      # 0x51ba
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
pushq $0x1
popq %rdi
callq 0x11c0