// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/./include/nlohmann/json.hpp
// Function: nlohmann::json_abi_v3_11_3::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::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
void destroy(value_t t)
        {
            if (
                (t == value_t::object && object == nullptr) ||
                (t == value_t::array && array == nullptr) ||
                (t == value_t::string && string == nullptr) ||
                (t == value_t::binary && binary == nullptr)
            )
            {
                //not initialized (e.g. due to exception in the ctor)
                return;
            }
            if (t == value_t::array || t == value_t::object)
            {
                // 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
                {
                    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_data.m_value.array->begin(), current_item.m_data.m_value.array->end(), std::back_inserter(stack));

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

                        current_item.m_data.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;
                }

                case value_t::null:
                case value_t::boolean:
                case value_t::number_integer:
                case value_t::number_unsigned:
                case value_t::number_float:
                case value_t::discarded:
                default:
                {
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x1, %esi
sete %cl
movq (%rdi), %rax
testq %rax, %rax
sete %dl
testb %dl, %cl
jne 0x4cfc
movl %esi, %r14d
testq %rax, %rax
sete %cl
movl %r14d, %edx
andb $-0x2, %dl
cmpb $0x2, %dl
sete %dl
cmpb $0x8, %r14b
sete %sil
orb %dl, %sil
testb %cl, %sil
jne 0x4cfc
movq %rdi, %rbx
leal -0x1(%r14), %ecx
cmpb $0x1, %cl
ja 0x4c6c
movq %rbx, -0x48(%rbp)
andq $0x0, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
cmpb $0x2, %r14b
jne 0x4c95
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x4, %rsi
leaq -0x40(%rbp), %rdi
callq 0x4d32
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq -0x40(%rbp), %rdx
callq 0x4f0a
leaq -0x58(%rbp), %r15
leaq -0x40(%rbp), %r12
movq -0x38(%rbp), %rsi
cmpq %rsi, -0x40(%rbp)
je 0x4c5f
addq $-0x10, %rsi
movq %r15, %rdi
callq 0x4ddc
movq -0x38(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x38(%rbp)
callq 0x497e
movzbl -0x58(%rbp), %eax
cmpl $0x1, %eax
je 0x4c1f
cmpl $0x2, %eax
jne 0x4c52
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r12, %rdx
callq 0x4f0a
movq -0x50(%rbp), %rdi
callq 0x4e2a
jmp 0x4c52
movq -0x50(%rbp), %rbx
movq 0x18(%rbx), %r13
addq $0x8, %rbx
cmpq %rbx, %r13
je 0x4c49
leaq 0x40(%r13), %rsi
movq %r12, %rdi
callq 0x4f4c
movq %r13, %rdi
callq 0x3220
movq %rax, %r13
jmp 0x4c2b
movq -0x50(%rbp), %rdi
callq 0x50da
movq %r15, %rdi
callq 0x497e
jmp 0x4bc8
leaq -0x40(%rbp), %rdi
callq 0x4e38
movq -0x48(%rbp), %rbx
movzbl %r14b, %eax
decl %eax
cmpl $0x7, %eax
ja 0x4cfc
leaq 0xa396(%rip), %rcx      # 0xf018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
callq 0x51a6
jmp 0x4cf4
movq 0x28(%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x4d32
movq -0x48(%rbp), %rax
movq (%rax), %r13
movq 0x18(%r13), %r12
addq $0x8, %r13
leaq -0x40(%rbp), %r15
cmpq %r13, %r12
je 0x4bc0
leaq 0x40(%r12), %rsi
movq %r15, %rdi
callq 0x4f4c
movq %r12, %rdi
callq 0x3220
movq %rax, %r12
jmp 0x4cb5
movq (%rbx), %rdi
callq 0x3598
jmp 0x4cf4
movq (%rbx), %rdi
callq 0x4e38
jmp 0x4cf4
movq (%rbx), %rdi
callq 0x51be
movq (%rbx), %rdi
callq 0x32e0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4d0f
jmp 0x4d14
movq %rax, %rbx
jmp 0x4d20
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x497e
leaq -0x40(%rbp), %rdi
callq 0x4e38
movq %rbx, %rdi
callq 0x3520
nop