// File: /workspace/github_cpp_makefile_star2_O2/Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::iter_impl<nlohmann::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::adl_serializer>> nlohmann::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::adl_serializer>::erase<nlohmann::detail::iter_impl<nlohmann::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::adl_serializer>>, 0>(nlohmann::detail::iter_impl<nlohmann::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::adl_serializer>>)
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"));
        }

        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:
            {
                if (JSON_HEDLEY_UNLIKELY(not pos.m_it.primitive_iterator.is_begin()))
                {
                    JSON_THROW(invalid_iterator::create(205, "iterator out of range"));
                }

                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;
                }

                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;
            }

            default:
                JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name())));
        }

        return result;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpq %rsi, (%rdx)
jne 0x11744
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1154c
movb (%r14), %al
movzbl %al, %ecx
leal -0x3(%rcx), %edx
cmpl $0x5, %edx
jae 0x11710
cmpq $0x0, 0x18(%r15)
jne 0x11797
cmpb $0x3, %al
jne 0x116f6
movq 0x8(%r14), %rdi
callq 0x5200
movq 0x8(%r14), %rdi
pushq $0x20
popq %rsi
callq 0x53f0
andq $0x0, 0x8(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
callq 0xbd38
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, %ecx
je 0x11731
cmpl $0x2, %ecx
jne 0x117e7
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x11b6c
movq %rax, 0x10(%rbx)
jmp 0x11702
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
callq 0x11b72
movq %rax, 0x8(%rbx)
jmp 0x11702
pushq $0x20
popq %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x24805(%rip), %rsi     # 0x35f5b
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x84b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
callq 0x11a32
xorl %ebp, %ebp
leaq 0x3e2d5(%rip), %rsi     # 0x4fa58
leaq -0x1e22(%rip), %rdx     # 0xf968
movq %rbx, %rdi
callq 0x56c0
jmp 0x1184f
pushq $0x20
popq %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x247d6(%rip), %rsi     # 0x35f7f
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x84b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
callq 0x11a32
xorl %ebp, %ebp
leaq 0x3e282(%rip), %rsi     # 0x4fa58
leaq -0x1e75(%rip), %rdx     # 0xf968
movq %rbx, %rdi
callq 0x56c0
jmp 0x1184f
pushq $0x20
popq %rdi
callq 0x5240
movq %rax, %rbx
movq %r14, %rdi
callq 0xc6cc
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x84b8
leaq 0x24782(%rip), %rsi     # 0x35f95
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0xaa7f
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x133, %esi            # imm = 0x133
callq 0xa98c
xorl %ebp, %ebp
leaq 0x3e158(%rip), %rsi     # 0x4f998
leaq -0x1edf(%rip), %rdx     # 0xf968
movq %rbx, %rdi
callq 0x56c0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5200
jmp 0x11864
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x11879
jmp 0x11885
jmp 0x11871
jmp 0x11885
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x5200
testb %bpl, %bpl
jne 0x11888
jmp 0x11890
movq %rax, %r14
movq %rbx, %rdi
callq 0x5300
movq %r14, %rdi
callq 0x56f0