// File: /workspace/github_cpp_makefile_star2_O2/Falldog[P]dcinja/src/include/nlohmann/json.hpp
// Function: 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>>>::json_value::destroy(nlohmann::detail::value_t)
void destroy(value_t t) noexcept
        {
            // flatten the current json_value to a heap-allocated stack
            std::vector<basic_json> stack;

            // move the top-level items to stack
            if (t == value_t::array)
            {
                stack.reserve(array->size());
                std::move(array->begin(), array->end(), std::back_inserter(stack));
            }
            else if (t == value_t::object)
            {
                stack.reserve(object->size());
                for (auto&& it : *object)
                {
                    stack.push_back(std::move(it.second));
                }
            }

            while (!stack.empty())
            {
                // move the last item to local variable to be processed
                basic_json current_item(std::move(stack.back()));
                stack.pop_back();

                // if current_item is array/object, move
                // its children to the stack to be processed later
                if (current_item.is_array())
                {
                    std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(),
                              std::back_inserter(stack));

                    current_item.m_value.array->clear();
                }
                else if (current_item.is_object())
                {
                    for (auto&& it : *current_item.m_value.object)
                    {
                        stack.push_back(std::move(it.second));
                    }

                    current_item.m_value.object->clear();
                }

                // it's now safe that current_item get destructed
                // since it doesn't have any children
            }

            switch (t)
            {
                case value_t::object:
                {
                    AllocatorType<object_t> alloc;
                    std::allocator_traits<decltype(alloc)>::destroy(alloc, object);
                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1);
                    break;
                }

                case value_t::array:
                {
                    AllocatorType<array_t> alloc;
                    std::allocator_traits<decltype(alloc)>::destroy(alloc, array);
                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1);
                    break;
                }

                case value_t::string:
                {
                    AllocatorType<string_t> alloc;
                    std::allocator_traits<decltype(alloc)>::destroy(alloc, string);
                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1);
                    break;
                }

                case value_t::binary:
                {
                    AllocatorType<binary_t> alloc;
                    std::allocator_traits<decltype(alloc)>::destroy(alloc, binary);
                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1);
                    break;
                }

                default:
                {
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
cmpl $0x1, %esi
je 0x30365
cmpl $0x2, %ebp
jne 0x30292
movq (%rbx), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x4, %rsi
movq %rsp, %rdi
callq 0x303f4
movq (%rbx), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %rsp, %rdx
callq 0x30488
leaq 0x18(%rsp), %r14
movq %rsp, %r15
movq 0x8(%rsp), %rsi
cmpq %rsi, (%rsp)
je 0x3033a
addq $-0x10, %rsi
movq %r14, %rdi
callq 0x1f176
movq 0x8(%rsp), %rdi
addq $-0x10, %rdi
movq %rdi, 0x8(%rsp)
callq 0xccf0
movzbl 0x18(%rsp), %eax
cmpl $0x1, %eax
je 0x302f7
cmpl $0x2, %eax
jne 0x3032d
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
callq 0x30488
movq 0x20(%rsp), %rdi
callq 0x2ffe4
jmp 0x3032d
movq 0x20(%rsp), %r13
movq 0x18(%r13), %r12
addq $0x8, %r13
cmpq %r13, %r12
je 0x30323
leaq 0x40(%r12), %rsi
movq %r15, %rdi
callq 0x1f1ac
movq %r12, %rdi
callq 0x9300
movq %rax, %r12
jmp 0x30304
movq 0x20(%rsp), %rdi
callq 0x3001c
movq %r14, %rdi
callq 0xccf0
jmp 0x3029a
movzbl %bpl, %eax
decl %eax
cmpl $0x7, %eax
ja 0x303ce
leaq 0x15604(%rip), %rcx     # 0x45954
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
callq 0x304c0
pushq $0x30
jmp 0x303c5
movq (%rbx), %rax
movq 0x28(%rax), %rsi
movq %rsp, %rdi
callq 0x303f4
movq (%rbx), %r12
movq 0x18(%r12), %r15
addq $0x8, %r12
movq %rsp, %r14
cmpq %r12, %r15
je 0x30292
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x1f1ac
movq %r15, %rdi
callq 0x9300
movq %rax, %r15
jmp 0x30383
movq (%rbx), %rdi
callq 0x9898
jmp 0x303c3
movq (%rbx), %rdi
callq 0x2b950
pushq $0x18
jmp 0x303c5
movq (%rbx), %rdi
callq 0x1fff2
pushq $0x20
popq %rsi
movq (%rbx), %rdi
callq 0x93e0
movq %rsp, %rdi
callq 0x2b950
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x303eb
jmp 0x303eb
jmp 0x303eb
movq %rax, %rdi
callq 0xc99e
nop