// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/src/test-case/json.cpp
// Function: testJSONInput(std::ostream&)
bool testJSONInput(std::ostream &log) {
  struct sampleData {
    std::string input, remainder, output;
  };

  std::vector<sampleData> tests{
      {"true", "", "true"},
      {"  42.23", "", "42.23"},
      {"42.00", "", "42"},
      {"[false, true, null]", "", "[false,true,null]"},
      {"", "", "null"},
      {"{ \"a\" : true , \"b\" : false }", "", "{\"a\":true,\"b\":false}"},
      {"{\"a\":true,\"b\":false,\"q\":[false, true, false],\"c\":null}", "",
       "{\"a\":true,\"b\":false,\"c\":null,\"q\":[false,true,false]}"},
      {"{\"a\":true,\"b\":false,\"q\":[1,2 ,3 , 4],\"c\":null}", "",
       "{\"a\":true,\"b\":false,\"c\":null,\"q\":[1,2,3,4]}"},
  };

  for (const auto &tt : tests) {
    json::json va;
    const auto r = json::parse(tt.input, va);
    if (r != tt.remainder) {
      log << "JSON parsing (" << tt.input << ") had bad remainder: " << r
          << "; expected: " << tt.remainder << "\n";
      return false;
    }
    const auto rv = json::parse(tt.input);
    const std::string so = json::to_string(va);
    if (so != tt.output) {
      log << "JSON parsing (" << tt.input << ") had bad string output: " << so
          << "; expected: " << tt.output << "\n";
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
movq %rdi, %rbx
leaq 0xb8(%rsp), %r14
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1364d(%rip), %rsi     # 0x1824a
leaq 0x1364a(%rip), %rdx     # 0x1824e
movq %r14, %rdi
callq 0xc6f6
leaq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x13813(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
movq %rbx, 0x8(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x135fb(%rip), %rsi     # 0x1824a
leaq 0x135f8(%rip), %rdx     # 0x1824e
callq 0xc6f6
leaq 0x118(%rsp), %r15
leaq 0x128(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x135d8(%rip), %rsi     # 0x1824f
leaq 0x135d8(%rip), %rdx     # 0x18256
movq %r15, %rdi
callq 0xc6f6
leaq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x13799(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1358d(%rip), %rsi     # 0x18251
leaq 0x1358b(%rip), %rdx     # 0x18256
callq 0xc6f6
leaq 0x178(%rsp), %r15
leaq 0x188(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1356b(%rip), %rsi     # 0x18257
leaq 0x13569(%rip), %rdx     # 0x1825c
movq %r15, %rdi
callq 0xc6f6
leaq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x13724(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x13524(%rip), %rsi     # 0x1825d
leaq 0x1351f(%rip), %rdx     # 0x1825f
callq 0xc6f6
leaq 0x1d8(%rsp), %r15
leaq 0x1e8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x134ff(%rip), %rsi     # 0x18260
leaq 0x1350b(%rip), %rdx     # 0x18273
movq %r15, %rdi
callq 0xc6f6
leaq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x136af(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x218(%rsp), %rdi
leaq 0x228(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x134c6(%rip), %rsi     # 0x18274
leaq 0x134d0(%rip), %rdx     # 0x18285
callq 0xc6f6
leaq 0x238(%rsp), %r15
leaq 0x248(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x13664(%rip), %rdx     # 0x1843a
movq %r15, %rdi
movq %rdx, %rsi
callq 0xc6f6
leaq 0x258(%rsp), %rdi
leaq 0x268(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1363e(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x278(%rsp), %rdi
leaq 0x288(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x13467(%rip), %rsi     # 0x18286
leaq 0x13464(%rip), %rdx     # 0x1828a
callq 0xc6f6
leaq 0x298(%rsp), %r15
leaq 0x2a8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x13444(%rip), %rsi     # 0x1828b
leaq 0x13459(%rip), %rdx     # 0x182a7
movq %r15, %rdi
callq 0xc6f6
leaq 0x2b8(%rsp), %rdi
leaq 0x2c8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x135c9(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x2d8(%rsp), %rdi
leaq 0x2e8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x13414(%rip), %rsi     # 0x182a8
leaq 0x13421(%rip), %rdx     # 0x182bc
callq 0xc6f6
leaq 0x2f8(%rsp), %r15
leaq 0x308(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x13401(%rip), %rsi     # 0x182bd
leaq 0x13430(%rip), %rdx     # 0x182f3
movq %r15, %rdi
callq 0xc6f6
leaq 0x318(%rsp), %rdi
leaq 0x328(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x13554(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x338(%rsp), %rdi
leaq 0x348(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x133eb(%rip), %rsi     # 0x182f4
leaq 0x13418(%rip), %rdx     # 0x18328
callq 0xc6f6
leaq 0x358(%rsp), %r15
leaq 0x368(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x133f8(%rip), %rsi     # 0x18329
leaq 0x1341f(%rip), %rdx     # 0x18357
movq %r15, %rdi
callq 0xc6f6
leaq 0x378(%rsp), %rdi
leaq 0x388(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x134df(%rip), %rdx     # 0x1843a
movq %rdx, %rsi
callq 0xc6f6
leaq 0x398(%rsp), %rdi
leaq 0x3a8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x133da(%rip), %rsi     # 0x18358
leaq 0x133fe(%rip), %rdx     # 0x18383
callq 0xc6f6
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x300, %edi            # imm = 0x300
callq 0x4260
movq %rax, %r14
movq %rax, 0x40(%rsp)
addq $0x300, %rax            # imm = 0x300
movq %rax, 0x50(%rsp)
xorl %r12d, %r12d
leaq (%r14,%r12), %r15
leaq (%r14,%r12), %r13
addq $0x10, %r13
movq %r13, (%r14,%r12)
movq 0xb8(%rsp,%r12), %rsi
movq 0xc0(%rsp,%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xd538
leaq (%r14,%r12), %rdi
addq $0x20, %rdi
leaq 0x30(%r14,%r12), %rbp
movq %rbp, 0x20(%r14,%r12)
movq 0xd8(%rsp,%r12), %rsi
movq 0xe0(%rsp,%r12), %rdx
addq %rsi, %rdx
callq 0xd538
leaq (%r14,%r12), %rdi
addq $0x40, %rdi
leaq 0x50(%r14,%r12), %rax
movq %rax, 0x40(%r14,%r12)
movq 0xf8(%rsp,%r12), %rsi
movq 0x100(%rsp,%r12), %rdx
addq %rsi, %rdx
callq 0xd538
addq $0x60, %r12
cmpq $0x300, %r12            # imm = 0x300
jne 0x4fbb
leaq (%r14,%r12), %r15
movq %r15, 0x48(%rsp)
leaq (%r14,%r12), %rax
addq $-0x60, %rax
movq %rax, 0x70(%rsp)
movq $-0x300, %r14           # imm = 0xFD00
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x507c
movq (%rbx), %rsi
incq %rsi
callq 0x4270
movq -0x30(%rbx), %rdi
leaq -0x20(%rbx), %rax
cmpq %rdi, %rax
je 0x5094
movq (%rax), %rsi
incq %rsi
callq 0x4270
movq -0x50(%rbx), %rdi
leaq -0x40(%rbx), %rax
cmpq %rdi, %rax
je 0x50ac
movq (%rax), %rsi
incq %rsi
callq 0x4270
addq $-0x60, %rbx
addq $0x60, %r14
jne 0x5068
movq 0x40(%rsp), %rbp
cmpq %rbp, %r15
je 0x53e6
leaq 0x88(%rsp), %r14
leaq 0xa8(%rsp), %r15
leaq 0x78(%rsp), %r12
movl $0x6, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq %r14, 0x78(%rsp)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xd538
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
leaq 0x30(%rsp), %rdx
callq 0x5814
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
leaq 0x98(%rsp), %rbx
je 0x5136
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x18(%rsp), %rdx
cmpq 0x28(%rbp), %rdx
jne 0x532f
testq %rdx, %rdx
je 0x5160
movq 0x20(%rbp), %rsi
movq 0x10(%rsp), %rdi
callq 0x4290
testl %eax, %eax
jne 0x532f
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
movl $0x6, 0x60(%rsp)
movq $0x0, 0x68(%rsp)
movq %r15, 0x98(%rsp)
movq %rbx, %rdi
callq 0xd538
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
leaq 0x60(%rsp), %rdx
callq 0x5814
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x51c6
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x4270
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x51e3
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0xb8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x640e
movq 0xc0(%rsp), %rdx
cmpq 0x48(%rbp), %rdx
jne 0x522a
movb $0x1, %bl
movq 0xb8(%rsp), %r13
testq %rdx, %rdx
je 0x52c6
movq 0x40(%rbp), %rsi
movq %r13, %rdi
callq 0x4290
testl %eax, %eax
je 0x52c6
movl $0xe, %edx
movq 0x8(%rsp), %rdi
leaq 0x13149(%rip), %rsi     # 0x18384
callq 0x42f0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq 0x8(%rsp), %rdi
callq 0x42f0
movq %rax, %rbx
movl $0x19, %edx
movq %rax, %rdi
leaq 0x13152(%rip), %rsi     # 0x183b6
callq 0x42f0
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rbx
movl $0xc, %edx
movq %rax, %rdi
leaq 0x13116(%rip), %rsi     # 0x183a9
callq 0x42f0
movq 0x40(%rbp), %rsi
movq 0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x42f0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x13182(%rip), %rsi     # 0x18439
callq 0x42f0
movq 0xb8(%rsp), %r13
xorl %ebx, %ebx
leaq 0xc8(%rsp), %rax
cmpq %rax, %r13
je 0x52e6
movq 0xc8(%rsp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x4270
leaq 0x60(%rsp), %rdi
callq 0x13602
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x530c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x30(%rsp), %rdi
callq 0x13602
cmpq %rbp, 0x70(%rsp)
leaq 0x60(%rbp), %rbp
setne %al
testb %bl, %al
jne 0x50d9
jmp 0x53e8
leaq 0x1304e(%rip), %rsi     # 0x18384
movl $0xe, %edx
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x42f0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rbx
leaq 0x13031(%rip), %rsi     # 0x18393
movl $0x15, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rbx
leaq 0x1301e(%rip), %rsi     # 0x183a9
movl $0xc, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0x42f0
leaq 0x1308a(%rip), %rsi     # 0x18439
movl $0x1, %edx
movq %rax, %rdi
callq 0x42f0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x53d8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x30(%rsp), %rdi
callq 0x13602
xorl %ebx, %ebx
jmp 0x53e8
movb $0x1, %bl
leaq 0x40(%rsp), %rdi
callq 0x6dba
movl %ebx, %eax
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5795
movq %rax, %rbx
movq 0x378(%rsp), %rdi
cmpq %r13, %rdi
je 0x5433
movq 0x388(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x5433
movq %rax, %rbx
movq 0x358(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x368(%rsp), %rsi
jmp 0x55eb
jmp 0x55f5
movq %rax, %rbx
movq 0x318(%rsp), %rdi
cmpq %r13, %rdi
je 0x547b
movq 0x328(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x547b
movq %rax, %rbx
movq 0x2f8(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x308(%rsp), %rsi
jmp 0x55eb
jmp 0x55f5
movq %rax, %rbx
movq 0x2b8(%rsp), %rdi
cmpq %r13, %rdi
je 0x54c3
movq 0x2c8(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x54c3
movq %rax, %rbx
movq 0x298(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x2a8(%rsp), %rsi
jmp 0x55eb
jmp 0x55f5
movq %rax, %rbx
movq 0x258(%rsp), %rdi
cmpq %r13, %rdi
je 0x550b
movq 0x268(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x550b
movq %rax, %rbx
movq 0x238(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x248(%rsp), %rsi
jmp 0x55eb
jmp 0x55f5
movq %rax, %rbx
movq 0x1f8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5553
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x5553
movq %rax, %rbx
movq 0x1d8(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x1e8(%rsp), %rsi
jmp 0x55eb
jmp 0x55f5
movq %rax, %rbx
movq 0x198(%rsp), %rdi
cmpq %r13, %rdi
je 0x5598
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x5598
movq %rax, %rbx
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x188(%rsp), %rsi
jmp 0x55eb
jmp 0x55f5
movq %rax, %rbx
movq 0x138(%rsp), %rdi
cmpq %r13, %rdi
je 0x55d6
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x55d6
movq %rax, %rbx
movq 0x118(%rsp), %rdi
cmpq %r12, %rdi
je 0x55f8
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x55f8
movq %rax, %rbx
addq $-0x60, %r15
movq %r15, %rdi
callq 0x57c6
cmpq %r14, %r15
jne 0x55f8
jmp 0x57b5
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5633
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x5633
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x57b5
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x57b5
movq %rax, %rbx
jmp 0x57b5
movq %rax, %rbx
jmp 0x5744
jmp 0x5694
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x573a
movq 0xa8(%rsp), %rsi
jmp 0x5732
movq %rax, %rbx
jmp 0x573a
movq %rax, %rbx
jmp 0x5760
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x5760
movq 0x88(%rsp), %rsi
jmp 0x5758
movq %rax, %rbx
jmp 0x56fa
movq %rax, %rbx
jmp 0x56e5
movq %rax, %rbx
movq 0x20(%r14,%r12), %rdi
cmpq %rdi, %rbp
je 0x56e5
movq (%rbp), %rsi
incq %rsi
callq 0x4270
movq (%r14,%r12), %rdi
cmpq %rdi, %r13
je 0x56fa
movq (%r13), %rsi
incq %rsi
callq 0x4270
movq %rbx, %rdi
callq 0x40f0
movq %r14, %rdi
movq %r15, %rsi
callq 0x744a
callq 0x43b0
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x573a
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x60(%rsp), %rdi
callq 0x13602
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5760
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x30(%rsp), %rdi
callq 0x13602
leaq 0x40(%rsp), %rdi
callq 0x6dba
jmp 0x57b5
movq %rax, %rbx
callq 0x43f0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5795
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4270
movl $0x2a0, %r14d           # imm = 0x2A0
leaq (%rsp,%r14), %rdi
addq $0xb8, %rdi
callq 0x57c6
addq $-0x60, %r14
cmpq $-0x60, %r14
jne 0x579b
movq %rbx, %rdi
callq 0x4440
movq %rax, %rdi
callq 0x7b8b
nop