// File: /workspace/github_cpp_makefile_star2_O3/Konano[P]UselessDatabase/./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>::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())
                {
                    stack.reserve(stack.size() + current_item.m_value.array->size());

                    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())
                {
                    stack.reserve(stack.size() + current_item.m_value.object->size());

                    for (auto&& it : *current_item.m_value.object)
                    {
                        stack.push_back(std::move(it.second));
                    }
                }

                // current_item is destroyed here
            }

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

                default:
                {
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movq %rdi, %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpl $0x1, %esi
je 0xd239
cmpl $0x2, %ebp
jne 0xd279
movq (%r13), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x4, %rsi
movq %rsp, %rdi
callq 0xd470
movq (%r13), %rax
movq (%rax), %r14
movq 0x8(%rax), %r12
subq %r14, %r12
sarq $0x4, %r12
testq %r12, %r12
jle 0xd279
incq %r12
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd5e8
addq $0x10, %r14
decq %r12
cmpq $0x1, %r12
jg 0xd21f
jmp 0xd279
movq (%r13), %rax
movq 0x28(%rax), %rsi
movq %rsp, %rdi
callq 0xd470
movq (%r13), %rbx
movq 0x18(%rbx), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0xd279
movq %rsp, %r15
leaq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0xd5e8
movq %r14, %rdi
callq 0x52b0
movq %rax, %r14
cmpq %rbx, %rax
jne 0xd25d
movq %r13, 0x30(%rsp)
movq 0x8(%rsp), %rbx
cmpq %rbx, (%rsp)
je 0xd3db
leaq 0x28(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %rsp, %r12
leaq -0x10(%rbx), %rdi
movb -0x10(%rbx), %al
movb %al, 0x20(%rsp)
movq -0x8(%rbx), %rax
movq %rax, 0x28(%rsp)
callq 0xd118
movb $0x0, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movq %r15, %rdi
callq 0xd118
movq 0x8(%rsp), %r13
leaq -0x10(%r13), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd118
movzbl -0x10(%r13), %esi
addq $-0x8, %r13
movq %r13, %rdi
callq 0xd1ba
movzbl 0x20(%rsp), %eax
cmpl $0x1, %eax
je 0xd36b
cmpl $0x2, %eax
jne 0xd3b7
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x4, %rax
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x4, %rsi
addq %rax, %rsi
movq %r12, %rdi
callq 0xd470
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq 0x8(%rdi), %rbx
subq %r13, %rbx
sarq $0x4, %rbx
testq %rbx, %rbx
jle 0xd361
incq %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0xd5e8
addq $0x10, %r13
decq %rbx
cmpq $0x1, %rbx
jg 0xd341
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq %r13, %rsi
callq 0xd790
jmp 0xd3b7
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x4, %rsi
movq 0x28(%rsp), %rax
addq 0x28(%rax), %rsi
movq %r12, %rdi
callq 0xd470
movq 0x28(%rsp), %rbx
movq 0x18(%rbx), %r13
addq $0x8, %rbx
cmpq %rbx, %r13
je 0xd3b7
leaq 0x40(%r13), %rsi
movq %r12, %rdi
callq 0xd5e8
movq %r13, %rdi
callq 0x52b0
movq %rax, %r13
cmpq %rbx, %rax
jne 0xd39b
movq %r15, %rdi
callq 0xd118
movzbl 0x20(%rsp), %esi
movq %r14, %rdi
callq 0xd1ba
movq 0x8(%rsp), %rbx
cmpq %rbx, (%rsp)
jne 0xd29a
cmpb $0x3, %bpl
je 0xd418
movzbl %bpl, %eax
cmpl $0x2, %eax
movq 0x30(%rsp), %rbx
je 0xd406
cmpl $0x1, %eax
jne 0xd447
movq (%rbx), %rdi
callq 0xd842
movq (%rbx), %rdi
movl $0x30, %esi
jmp 0xd442
movq (%rbx), %rdi
callq 0xd504
movq (%rbx), %rdi
movl $0x18, %esi
jmp 0xd442
movq 0x30(%rsp), %rbx
movq (%rbx), %rdi
movq (%rdi), %rax
leaq 0x10(%rdi), %rcx
cmpq %rcx, %rax
je 0xd43d
movq (%rcx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x53a0
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x53a0
movq %rsp, %rdi
callq 0xd504
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd468
jmp 0xd468
jmp 0xd468
jmp 0xd468
jmp 0xd468
movq %rax, %rdi
callq 0x6925