// File: /workspace/github_cpp_makefile_star2_O2/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 $0x3c8, %rsp            # imm = 0x3C8
movq %rdi, %r15
leaq 0x10883(%rip), %rsi     # 0x1524a
leaq 0xc8(%rsp), %rbx
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x6342
leaq 0xe8(%rsp), %r14
leaq 0x10a4c(%rip), %rsi     # 0x1543a
leaq 0x68(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x108(%rsp), %rdi
leaq 0x10840(%rip), %rsi     # 0x1524a
leaq 0x20(%rsp), %rdx
callq 0x6342
leaq 0x128(%rsp), %r14
leaq 0x1082c(%rip), %rsi     # 0x1524f
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x148(%rsp), %r12
leaq 0x109fb(%rip), %rsi     # 0x1543a
leaq 0x1f(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x168(%rsp), %rdi
leaq 0x107f6(%rip), %rsi     # 0x15251
leaq 0x1e(%rsp), %rdx
callq 0x6342
leaq 0x188(%rsp), %r14
leaq 0x107e3(%rip), %rsi     # 0x15257
leaq 0x1d(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x1a8(%rsp), %r12
leaq 0x109aa(%rip), %rsi     # 0x1543a
leaq 0x1c(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x1c8(%rsp), %rdi
leaq 0x107b1(%rip), %rsi     # 0x1525d
leaq 0x1b(%rsp), %rdx
callq 0x6342
leaq 0x1e8(%rsp), %r14
leaq 0x1079b(%rip), %rsi     # 0x15260
leaq 0x1a(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x208(%rsp), %r12
leaq 0x10959(%rip), %rsi     # 0x1543a
leaq 0x19(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x228(%rsp), %rdi
leaq 0x10777(%rip), %rsi     # 0x15274
leaq 0x18(%rsp), %rdx
callq 0x6342
leaq 0x248(%rsp), %r14
leaq 0x10924(%rip), %rsi     # 0x1543a
leaq 0x17(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x268(%rsp), %r12
leaq 0x10908(%rip), %rsi     # 0x1543a
leaq 0x16(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x288(%rsp), %rdi
leaq 0x10738(%rip), %rsi     # 0x15286
leaq 0x15(%rsp), %rdx
callq 0x6342
leaq 0x2a8(%rsp), %r14
leaq 0x10724(%rip), %rsi     # 0x1528b
leaq 0x14(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x2c8(%rsp), %r12
leaq 0x108b7(%rip), %rsi     # 0x1543a
leaq 0x13(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x2e8(%rsp), %rdi
leaq 0x10709(%rip), %rsi     # 0x152a8
leaq 0x12(%rsp), %rdx
callq 0x6342
leaq 0x308(%rsp), %r14
leaq 0x10705(%rip), %rsi     # 0x152bd
leaq 0x11(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x328(%rsp), %r12
leaq 0x10866(%rip), %rsi     # 0x1543a
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x348(%rsp), %rdi
leaq 0x10704(%rip), %rsi     # 0x152f4
leaq 0xf(%rsp), %rdx
callq 0x6342
leaq 0x368(%rsp), %r14
leaq 0x10720(%rip), %rsi     # 0x15329
leaq 0xe(%rsp), %rdx
movq %r14, %rdi
callq 0x6342
leaq 0x388(%rsp), %r12
leaq 0x10815(%rip), %rsi     # 0x1543a
leaq 0xd(%rsp), %rdx
movq %r12, %rdi
callq 0x6342
leaq 0x3a8(%rsp), %rdi
leaq 0x10717(%rip), %rsi     # 0x15358
leaq 0xc(%rsp), %rdx
callq 0x6342
movq %r15, 0x58(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
movl $0x300, %edi            # imm = 0x300
callq 0x42a0
movq %rax, %r15
movq %rax, 0x40(%rsp)
addq $0x300, %rax            # imm = 0x300
movq %rax, 0x50(%rsp)
xorl %ebp, %ebp
leaq (%r15,%rbp), %r12
cmpq $0x300, %rbp            # imm = 0x300
je 0x4cd6
leaq (%rsp,%rbp), %rsi
addq $0xc8, %rsi
movq %r12, %rdi
callq 0x43a0
leaq (%r15,%rbp), %r13
addq $0x20, %r13
leaq (%rsp,%rbp), %rsi
addq $0xe8, %rsi
movq %r13, %rdi
callq 0x43a0
leaq (%r15,%rbp), %rdi
addq $0x40, %rdi
leaq (%rsp,%rbp), %rsi
addq $0x108, %rsi            # imm = 0x108
callq 0x43a0
addq $0x60, %rbp
jmp 0x4c7d
movq %r12, 0x48(%rsp)
movl $0x2a0, %ebx            # imm = 0x2A0
leaq (%rsp,%rbx), %rdi
addq $0xc8, %rdi
callq 0x5096
addq $-0x60, %rbx
cmpq $-0x60, %rbx
jne 0x4ce0
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xa8(%rsp), %r14
leaq 0x68(%rsp), %r12
leaq 0x88(%rsp), %rbp
leaq 0xc8(%rsp), %r15
cmpq 0x60(%rsp), %rbx
je 0x4ef5
movl $0x6, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43a0
movq %r12, %rdi
movq %r14, %rsi
leaq 0x20(%rsp), %rdx
callq 0x50b5
movq %r14, %rdi
callq 0x4130
leaq 0x20(%rbx), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x6565
testb %al, %al
jne 0x4e03
movl $0x6, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x43a0
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
callq 0x50b5
movq %r15, %rdi
callq 0x4130
movq %rbp, %rdi
callq 0x4130
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x5918
leaq 0x40(%rbx), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x6565
testb %al, %al
jne 0x4e66
movq %r15, %rdi
callq 0x4130
leaq 0x30(%rsp), %rdi
callq 0x1095e
movq %r12, %rdi
callq 0x4130
leaq 0x20(%rsp), %rdi
callq 0x1095e
addq $0x60, %rbx
jmp 0x4d26
leaq 0x1057a(%rip), %rsi     # 0x15384
movq 0x58(%rsp), %rdi
callq 0x4290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x1056d(%rip), %rsi     # 0x15393
movq %rax, %rdi
callq 0x4290
leaq 0x68(%rsp), %rsi
movq %rax, %rdi
callq 0x4270
leaq 0x10567(%rip), %rsi     # 0x153a9
movq %rax, %rdi
callq 0x4290
movq %rax, %rdi
movq %r13, %rsi
callq 0x4270
leaq 0x105dd(%rip), %rsi     # 0x15439
movq %rax, %rdi
callq 0x4290
jmp 0x4ee1
leaq 0x10517(%rip), %rsi     # 0x15384
movq 0x58(%rsp), %rdi
callq 0x4290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4270
leaq 0x1052d(%rip), %rsi     # 0x153b6
movq %rax, %rdi
callq 0x4290
leaq 0xc8(%rsp), %rsi
movq %rax, %rdi
callq 0x4270
leaq 0x10501(%rip), %rsi     # 0x153a9
movq %rax, %rdi
callq 0x4290
movq %rax, %rdi
movq %r13, %rsi
callq 0x4270
leaq 0x10577(%rip), %rsi     # 0x15439
movq %rax, %rdi
callq 0x4290
leaq 0xc8(%rsp), %rdi
callq 0x4130
leaq 0x30(%rsp), %rdi
callq 0x1095e
leaq 0x68(%rsp), %rdi
callq 0x4130
leaq 0x20(%rsp), %rdi
callq 0x1095e
cmpq 0x60(%rsp), %rbx
sete %bl
leaq 0x40(%rsp), %rdi
callq 0x5dda
movl %ebx, %eax
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x503a
jmp 0x4f47
jmp 0x4f54
jmp 0x4f61
jmp 0x4f47
jmp 0x4f54
jmp 0x4f61
jmp 0x4f47
jmp 0x4f54
jmp 0x4f61
jmp 0x4f47
jmp 0x4f54
jmp 0x4f61
jmp 0x4f47
jmp 0x4f54
jmp 0x4f61
jmp 0x4f47
jmp 0x4f54
jmp 0x4f61
movq %rax, %r15
movq %r12, %rdi
callq 0x4130
jmp 0x4f57
movq %rax, %r15
movq %r14, %rdi
callq 0x4130
jmp 0x4f64
movq %rax, %r15
movb $0x1, %al
jmp 0x5066
movq %rax, %r15
movq %r14, %rdi
callq 0x4130
jmp 0x4f7b
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
callq 0x4130
jmp 0x5085
movq %rax, %r15
jmp 0x5085
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
jmp 0x4fb4
movq %rax, %r15
jmp 0x4fc8
jmp 0x4fbb
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x4130
jmp 0x4fbe
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x1095e
leaq 0x68(%rsp), %rdi
jmp 0x4fda
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0x4130
leaq 0x20(%rsp), %rdi
callq 0x1095e
leaq 0x40(%rsp), %rdi
callq 0x5dda
jmp 0x5085
movq %rax, %r15
jmp 0x4fdf
movq %rax, %rbp
jmp 0x501a
movq %rax, %rbp
jmp 0x5012
movq %rax, %rbp
movq %r13, %rdi
callq 0x4130
movq %r12, %rdi
callq 0x4130
movq %rbp, %rdi
callq 0x40f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x62de
callq 0x43e0
movq %rax, %r15
callq 0x4420
leaq 0x40(%rsp), %rdi
callq 0x62c6
movl $0x2a0, %r12d           # imm = 0x2A0
leaq (%rsp,%r12), %rdi
addq $0xc8, %rdi
callq 0x5096
addq $-0x60, %r12
cmpq $-0x60, %r12
jne 0x504a
xorl %eax, %eax
cmpq %r14, %rbx
setne %cl
testb %al, %al
je 0x5085
testb %cl, %cl
je 0x5085
addq $-0x60, %r14
movq %r14, %rdi
callq 0x5096
cmpq %rbx, %r14
jne 0x5074
movq %r15, %rdi
callq 0x4470
movq %rax, %rdi
callq 0x68b6
nop