// File: /workspace/github_cpp_makefile_star2_O2/xelia-it[P]mustache/test/src/../../src/../third-party/json/single_include/nlohmann/json.hpp
// Function: nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>)
IteratorType erase(IteratorType pos)
    {
        // make sure iterator fits the current value
        if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
        {
            JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
        }

        IteratorType result = end();

        switch (m_type)
        {
            case value_t::boolean:
            case value_t::number_float:
            case value_t::number_integer:
            case value_t::number_unsigned:
            case value_t::string:
            case value_t::binary:
            {
                if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
                {
                    JSON_THROW(invalid_iterator::create(205, "iterator out of range", this));
                }

                if (is_string())
                {
                    AllocatorType<string_t> alloc;
                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);
                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);
                    m_value.string = nullptr;
                }
                else if (is_binary())
                {
                    AllocatorType<binary_t> alloc;
                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.binary);
                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.binary, 1);
                    m_value.binary = nullptr;
                }

                m_type = value_t::null;
                assert_invariant();
                break;
            }

            case value_t::object:
            {
                result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);
                break;
            }

            case value_t::array:
            {
                result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);
                break;
            }

            case value_t::null:
            case value_t::discarded:
            default:
                JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
        }

        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
cmpq %rsi, (%rdx)
jne 0x65e3f
movq %rdx, %r15
movq %rdi, %rbx
movq %r14, %rsi
callq 0x65c18
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x65dd5
cmpq $0x0, 0x18(%r15)
jne 0x65e93
cmpl $0x8, %eax
je 0x65df6
cmpl $0x3, %eax
jne 0x65e0f
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
callq 0x24ad8
jmp 0x65e03
cmpl $0x1, %eax
je 0x65e2c
cmpl $0x2, %eax
jne 0x65ee4
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x66a54
movq %rax, 0x10(%rbx)
jmp 0x65e1e
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
callq 0x666fa
movq (%r15), %rdi
callq 0x24540
andq $0x0, (%r15)
movb $0x0, (%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x61454
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
callq 0x66bea
movq %rax, 0x8(%rbx)
jmp 0x65e1e
pushq $0x20
popq %rdi
callq 0x242b0
movq %rax, %rbx
leaq 0x1515c(%rip), %rsi     # 0x7afad
leaq -0x40(%rbp), %rdi
leaq -0x20(%rbp), %rdx
callq 0x24210
movb $0x1, %r15b
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x668ba
xorl %r15d, %r15d
leaq 0x47bc9(%rip), %rsi     # 0xada48
leaq -0x250a(%rip), %rdx     # 0x6397c
movq %rbx, %rdi
callq 0x248f0
jmp 0x65f3e
pushq $0x20
popq %rdi
callq 0x242b0
movq %rax, %rbx
leaq 0x1512c(%rip), %rsi     # 0x7afd1
leaq -0x40(%rbp), %rdi
leaq -0x20(%rbp), %rdx
callq 0x24210
movb $0x1, %r15b
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
movq %r14, %rcx
callq 0x668ba
xorl %r15d, %r15d
leaq 0x47b75(%rip), %rsi     # 0xada48
leaq -0x255e(%rip), %rdx     # 0x6397c
movq %rbx, %rdi
callq 0x248f0
jmp 0x65f3e
pushq $0x20
popq %rdi
callq 0x242b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x66bc4
leaq -0x20(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x150e2(%rip), %rsi     # 0x7afe7
leaq -0x40(%rbp), %rdi
callq 0x66b5c
movb $0x1, %r15b
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movl $0x133, %esi            # imm = 0x133
movq %r14, %rcx
callq 0x66a5e
xorl %r15d, %r15d
leaq 0x47b59(%rip), %rsi     # 0xada88
leaq -0x25ba(%rip), %rdx     # 0x6397c
movq %rbx, %rdi
callq 0x248f0
jmp 0x65f46
jmp 0x65f59
jmp 0x65f46
jmp 0x65f59
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x24ad8
testb %r15b, %r15b
jne 0x65f5c
jmp 0x65f64
movq %rax, %r14
movq %rbx, %rdi
callq 0x24430
movq %r14, %rdi
callq 0x24950