// File: /workspace/github_cpp_makefile_star2_O1/Falldog[P]dcinja/src/include/nlohmann/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, std::vector<unsigned char, std::allocator<unsigned char>>>> 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, std::vector<unsigned char, std::allocator<unsigned char>>>::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, std::vector<unsigned char, std::allocator<unsigned char>>>>, 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, std::vector<unsigned char, std::allocator<unsigned char>>>>)
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:
            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"));
                }

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

            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 %r12
pushq %rbx
subq $0x40, %rsp
cmpq %rsi, (%rdx)
jne 0x27761
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0xefe8
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x276d0
cmpq $0x0, 0x18(%r15)
jne 0x277bd
cmpl $0x8, %eax
je 0x276f1
cmpl $0x3, %eax
jne 0x27721
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rax
movq (%rax), %rdi
addq $0x10, %rax
cmpq %rax, %rdi
je 0x2770d
movq (%rax), %rsi
incq %rsi
jmp 0x27708
cmpl $0x1, %eax
je 0x2773d
cmpl $0x2, %eax
jne 0x27816
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x285e8
movq %rax, 0x10(%rbx)
jmp 0x2772d
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2770d
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x93c0
movq (%r15), %rdi
movl $0x20, %esi
callq 0x93c0
movq $0x0, (%r15)
movb $0x0, (%r14)
movq %r14, %rdi
callq 0x2450a
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %r14
movq 0x8(%r15), %r15
movq %r15, %rdi
callq 0x92c0
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x285aa
movq %r12, 0x8(%rbx)
jmp 0x2772d
movl $0x20, %edi
callq 0x91f0
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x30e7a(%rip), %rsi     # 0x585f8
leaq 0x30e96(%rip), %rdx     # 0x5861b
movq %rsp, %rdi
callq 0x12646
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0xca, %esi
callq 0x27eb0
xorl %ebp, %ebp
leaq 0x507df(%rip), %rsi     # 0x77f88
leaq 0x2eaa(%rip), %rdx      # 0x2a65a
movq %rbx, %rdi
callq 0x9750
jmp 0x2788f
movl $0x20, %edi
callq 0x91f0
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x30e42(%rip), %rsi     # 0x5861c
leaq 0x30e50(%rip), %rdx     # 0x58631
movq %rsp, %rdi
callq 0x12646
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0xcd, %esi
callq 0x27eb0
xorl %ebp, %ebp
leaq 0x50783(%rip), %rsi     # 0x77f88
leaq 0x2e4e(%rip), %rdx      # 0x2a65a
movq %rbx, %rdi
callq 0x9750
jmp 0x2788f
movl $0x20, %edi
callq 0x91f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2858a
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rax, %rdi
callq 0x91b0
leaq (%rax,%r14), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x12646
leaq 0x30ddb(%rip), %rsi     # 0x58632
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x1dc69
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x133, %esi            # imm = 0x133
callq 0x28424
xorl %ebp, %ebp
leaq 0x50770(%rip), %rsi     # 0x77ff0
leaq 0x2dd3(%rip), %rdx      # 0x2a65a
movq %rbx, %rdi
callq 0x9750
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x278b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x93c0
jmp 0x278b5
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x278ed
movq 0x30(%rsp), %rsi
jmp 0x278dd
jmp 0x278e7
jmp 0x278cc
jmp 0x278e7
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x278ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x93c0
jmp 0x278ed
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x278fa
movq %rbx, %rdi
callq 0x92e0
movq %r14, %rdi
callq 0x9790