// File: /workspace/github_cpp_makefile_star2_O2/eatonphil[P]cpp-json/json.cpp
// Function: json::parse_object[abi:cxx11](std::vector<json::JSONToken, std::allocator<json::JSONToken>>, int)
std::tuple<std::map<std::string, JSONValue>, int, std::string>
parse_object(std::vector<JSONToken> tokens, int index) {
  std::map<std::string, JSONValue> values = {};
  while (index < tokens.size()) {
    auto t = tokens[index];
    if (t.type == JSONTokenType::Syntax) {
      if (t.value == "}") {
        return {values, index + 1, ""};
      }

      if (t.value == ",") {
        index++;
        t = tokens[index];
      } else if (values.size() > 0) {
        return {
            {},
            index,
            format_parse_error("Expected comma after element in object", t)};
      } else {
        return {{},
                index,
                format_parse_error(
                    "Expected key-value pair or closing brace in object", t)};
      }
    }

    auto [key, new_index, error] = parse(tokens, index);
    if (error.size()) {
      return {{}, index, error};
    }

    if (key.type != JSONValueType::String) {
      return {
          {}, index, format_parse_error("Expected string key in object", t)};
    }
    index = new_index;
    t = tokens[index];

    if (!(t.type == JSONTokenType::Syntax && t.value == ":")) {
      return {{},
              index,
              format_parse_error("Expected colon after key in object", t)};
    }
    index++;
    t = tokens[index];

    auto [value, new_index1, error1] = parse(tokens, index);
    if (error1.size()) {
      return {{}, index, error1};
    }

    values[key.string.value()] = value;
    index = new_index1;
  }

  return {values, index + 1, ""};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rsi, %r14
movq %rdi, -0x38(%rbp)
leaq -0xd8(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x2c(%rbp), %rax
movl %edx, (%rax)
leaq -0xb0(%rbp), %r12
leaq -0x330(%rbp), %r15
leaq -0x318(%rbp), %r13
movslq -0x2c(%rbp), %rcx
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
cqto
pushq $0x38
popq %rdi
idivq %rdi
cmpq %rcx, %rax
jbe 0x4c82
imulq $0x38, %rcx, %rax
addq %rax, %rsi
movq %r12, %rdi
callq 0x5956
cmpl $0x2, -0x90(%rbp)
jne 0x4a59
movq %r12, %rdi
leaq 0x4734(%rip), %rsi      # 0x9150
callq 0x5987
testb %al, %al
jne 0x4dc9
movq %r12, %rdi
leaq 0x46d2(%rip), %rsi      # 0x9105
callq 0x5987
testb %al, %al
je 0x4df0
movslq -0x2c(%rbp), %rax
incq %rax
movl %eax, -0x2c(%rbp)
imulq $0x38, %rax, %rsi
addq (%r14), %rsi
movq %r12, %rdi
callq 0x5998
movq %r15, %rdi
movq %r14, %rsi
callq 0x59f6
movl -0x2c(%rbp), %edx
leaq -0x300(%rbp), %rdi
movq %r15, %rsi
callq 0x44df
movq %r15, %rdi
callq 0x58ce
cmpq $0x0, -0x2f8(%rbp)
jne 0x4ca9
cmpl $0x0, -0x240(%rbp)
jne 0x4ce9
movslq -0x2e0(%rbp), %rax
movl %eax, -0x2c(%rbp)
imulq $0x38, %rax, %rsi
addq (%r14), %rsi
movq %r12, %rdi
callq 0x5998
cmpl $0x2, -0x90(%rbp)
jne 0x4be8
movq %r12, %rdi
leaq 0x4701(%rip), %rsi      # 0x91ca
callq 0x5987
testb %al, %al
je 0x4be8
movslq -0x2c(%rbp), %rax
incq %rax
movl %eax, -0x2c(%rbp)
imulq $0x38, %rax, %rsi
addq (%r14), %rsi
movq %r12, %rdi
callq 0x5998
movq %r13, %rdi
movq %r14, %rsi
callq 0x59f6
movl -0x2c(%rbp), %edx
leaq -0x1b0(%rbp), %rdi
movq %r13, %rsi
callq 0x44df
movq %r13, %rdi
callq 0x58ce
movq -0x1a8(%rbp), %rbx
testq %rbx, %rbx
je 0x4b82
movq %rbx, -0x78(%rbp)
movq %r13, %rbx
movq %r14, %r13
movq %r12, %r14
movq %r15, %r12
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
andq $0x0, -0x48(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x70(%rbp), %r15
movq %r15, %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x1b0(%rbp), %rcx
callq 0x6302
movq %r15, %rdi
callq 0x633e
movq %r12, %r15
movq %r14, %r12
movq %r13, %r14
movq %rbx, %r13
movq -0x78(%rbp), %rbx
jmp 0x4bba
cmpb $0x0, -0x2b8(%rbp)
je 0x4f55
leaq -0xe0(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x5aae
movq %rax, %rdi
leaq -0x188(%rbp), %rsi
callq 0x5b2c
movl -0x190(%rbp), %eax
movl %eax, -0x2c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x5a8e
leaq -0x300(%rbp), %rdi
callq 0x5a8e
movq %r12, %rdi
callq 0x5870
testq %rbx, %rbx
je 0x49db
jmp 0x4da7
leaq -0x1a8(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x45bd(%rip), %rsi      # 0x91cc
leaq -0x1d0(%rbp), %rdi
leaq -0x2d(%rbp), %rdx
callq 0x5820
leaq -0x368(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x5956
leaq -0x70(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
leaq -0x368(%rbp), %rdx
callq 0x3fb8
leaq -0x1b0(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movq -0x38(%rbp), %rdi
callq 0x6302
leaq -0x70(%rbp), %rdi
callq 0x585c
leaq -0x368(%rbp), %rdi
callq 0x5870
leaq -0x1d0(%rbp), %rdi
jmp 0x4d7e
incl %ecx
leaq -0x300(%rbp), %rdx
movl %ecx, (%rdx)
leaq 0x4573(%rip), %rcx      # 0x9207
leaq -0xe0(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x62c6
jmp 0x4da7
leaq -0x1a8(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x1b0(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x300(%rbp), %rcx
movq -0x38(%rbp), %rdi
callq 0x6302
jmp 0x4d83
leaq -0x1a8(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x449c(%rip), %rsi      # 0x91ac
leaq -0x1f0(%rbp), %rdi
leaq -0x2d(%rbp), %rdx
callq 0x5820
leaq -0x3a0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x5956
leaq -0x70(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x3a0(%rbp), %rdx
callq 0x3fb8
leaq -0x1b0(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movq -0x38(%rbp), %rdi
callq 0x6302
leaq -0x70(%rbp), %rdi
callq 0x585c
leaq -0x3a0(%rbp), %rdi
callq 0x5870
leaq -0x1f0(%rbp), %rdi
callq 0x585c
leaq -0x1b0(%rbp), %rdi
callq 0x633e
leaq -0x300(%rbp), %rdi
callq 0x5a8e
leaq -0xb0(%rbp), %rdi
callq 0x5870
leaq -0xe0(%rbp), %rdi
callq 0x633e
movq -0x38(%rbp), %rax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x2c(%rbp), %eax
incl %eax
leaq -0x300(%rbp), %rdx
movl %eax, (%rdx)
leaq 0x4429(%rip), %rcx      # 0x9207
leaq -0xe0(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x62c6
jmp 0x4d9b
cmpq $0x0, -0xb8(%rbp)
je 0x4ea1
leaq -0x2f8(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x432d(%rip), %rsi      # 0x9152
leaq -0x230(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x5820
leaq -0x410(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x5956
leaq -0x1b0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
leaq -0x410(%rbp), %rdx
callq 0x3fb8
leaq -0x300(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x1b0(%rbp), %rcx
movq -0x38(%rbp), %rdi
callq 0x6302
leaq -0x1b0(%rbp), %rdi
callq 0x585c
leaq -0x410(%rbp), %rdi
callq 0x5870
leaq -0x230(%rbp), %rdi
jmp 0x4f3f
leaq -0x2f8(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x42b1(%rip), %rsi      # 0x9179
leaq -0x210(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x5820
leaq -0x3d8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x5956
leaq -0x1b0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
leaq -0x3d8(%rbp), %rdx
callq 0x3fb8
leaq -0x300(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
leaq -0x1b0(%rbp), %rcx
movq -0x38(%rbp), %rdi
callq 0x6302
leaq -0x1b0(%rbp), %rdi
callq 0x585c
leaq -0x3d8(%rbp), %rdi
callq 0x5870
leaq -0x210(%rbp), %rdi
callq 0x585c
leaq -0x300(%rbp), %rdi
callq 0x633e
jmp 0x4d9b
callq 0x63dc
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x585c
jmp 0x4f6e
movq %rax, %rbx
leaq -0x3d8(%rbp), %rdi
callq 0x5870
jmp 0x4f7f
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
jmp 0x4fb6
jmp 0x4fbd
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x585c
jmp 0x4f9e
movq %rax, %rbx
leaq -0x410(%rbp), %rdi
callq 0x5870
jmp 0x4faf
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x585c
jmp 0x4fc0
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x633e
jmp 0x50ab
jmp 0x5092
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x585c
jmp 0x4fe7
movq %rax, %rbx
leaq -0x3a0(%rbp), %rdi
callq 0x5870
jmp 0x4ff8
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
jmp 0x5033
jmp 0x503a
jmp 0x503a
jmp 0x5097
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x585c
jmp 0x501b
movq %rax, %rbx
leaq -0x368(%rbp), %rdi
callq 0x5870
jmp 0x502c
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x585c
jmp 0x503d
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x633e
jmp 0x509f
jmp 0x505d
jmp 0x5092
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x633e
jmp 0x5060
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x5a8e
jmp 0x509f
jmp 0x509c
movq %rax, %rbx
leaq -0x318(%rbp), %rdi
callq 0x58ce
jmp 0x509f
movq %rax, %rbx
leaq -0x330(%rbp), %rdi
callq 0x58ce
jmp 0x50ab
movq %rax, %rbx
jmp 0x50ab
movq %rax, %rbx
jmp 0x50b7
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x5a8e
leaq -0xb0(%rbp), %rdi
callq 0x5870
leaq -0xe0(%rbp), %rdi
callq 0x633e
movq %rbx, %rdi
callq 0x3260