// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x40, %rsp
cmpq %rsi, (%rdx)
jne 0x13c4f
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
callq 0x14168
movb (%r14), %al
movzbl %al, %ecx
leal -0x3(%rcx), %edx
cmpl $0x5, %edx
jae 0x13c14
cmpq $0x0, 0x18(%r15)
jne 0x13cab
cmpb $0x3, %al
jne 0x13bf8
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq 0x10(%rdi), %rcx
cmpq %rcx, %rax
je 0x13be6
movq (%rcx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x53a0
movq 0x8(%r14), %rdi
movl $0x20, %esi
callq 0x53a0
movq $0x0, 0x8(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
callq 0xd118
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, %ecx
je 0x13c35
cmpl $0x2, %ecx
jne 0x13d07
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x141fa
movq %rax, 0x10(%rbx)
jmp 0x13c04
movq %rbx, %r12
addq $0x8, %r12
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
callq 0x141c0
movq %rax, (%r12)
jmp 0x13c04
movl $0x20, %edi
callq 0x5210
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2af2a(%rip), %rsi     # 0x3eb96
leaq 0x2af46(%rip), %rdx     # 0x3ebb9
movq %rsp, %rdi
callq 0xa960
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0xca, %esi
callq 0x13fd4
xorl %ebp, %ebp
leaq 0x3ec61(%rip), %rsi     # 0x528f8
leaq -0x240c(%rip), %rdx     # 0x11892
movq %rbx, %rdi
callq 0x56b0
jmp 0x13d93
movl $0x20, %edi
callq 0x5210
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2aef2(%rip), %rsi     # 0x3ebba
leaq 0x2af00(%rip), %rdx     # 0x3ebcf
movq %rsp, %rdi
callq 0xa960
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0xcd, %esi
callq 0x13fd4
xorl %ebp, %ebp
leaq 0x3ec05(%rip), %rsi     # 0x528f8
leaq -0x2468(%rip), %rdx     # 0x11892
movq %rbx, %rdi
callq 0x56b0
jmp 0x13d93
movl $0x20, %edi
callq 0x5210
movq %rax, %rbx
movzbl (%r14), %eax
cmpq $0x8, %rax
ja 0x13d2b
leaq 0x3ed93(%rip), %rcx     # 0x52ab8
movq (%rcx,%rax,8), %r14
jmp 0x13d32
leaq 0x297c3(%rip), %r14     # 0x3d4f5
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x51f0
leaq (%rax,%r14), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0xa960
leaq 0x2ae75(%rip), %rsi     # 0x3ebd0
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xbd1e
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x133, %esi            # imm = 0x133
callq 0xbb5e
xorl %ebp, %ebp
leaq 0x3eab4(%rip), %rsi     # 0x52838
leaq -0x24f9(%rip), %rdx     # 0x11892
movq %rbx, %rdi
callq 0x56b0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13db1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x13dfd
movq 0x30(%rsp), %rsi
jmp 0x13df5
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x13e07
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x13e07
jmp 0x13e04
jmp 0x13de4
jmp 0x13e04
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x13dfd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
testb %bpl, %bpl
jne 0x13e07
jmp 0x13e0f
movq %rax, %r14
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rdi
callq 0x56e0
nop