// File: xelia-it[P]mustache/test/src/../../src/../third-party/json/single_include/nlohmann/json.hpp
// Function: nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::destroy(nlohmann::json_abi_v3_11_2::detail::value_t)
void destroy(value_t t)
        {
            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_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;
                }

                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
subq $0x120, %rsp            # imm = 0x120
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpb $0x2, -0x9(%rbp)
je 0x1249e0
cmpb $0x1, -0x9(%rbp)
jne 0x124ccd
leaq -0x28(%rbp), %rdi
callq 0x112720
cmpb $0x2, -0x9(%rbp)
jne 0x124a91
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
callq 0x11e150
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x124ee0
jmp 0x124a10
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
callq 0x11e000
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq (%rax), %rdi
callq 0x11de80
movq %rax, -0x48(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x125050
movq %rax, -0xe0(%rbp)
jmp 0x124a4b
movq -0xe0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x124fe0
movq %rax, -0xe8(%rbp)
jmp 0x124a70
movq -0xe8(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x124b18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x124cbf
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
callq 0x11ed60
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x124ee0
jmp 0x124aae
movq -0xd8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1232c0
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1238e0
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x123940
testb $0x1, %al
jne 0x124ae9
jmp 0x124b16
leaq -0x68(%rbp), %rdi
callq 0x125080
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
addq $0x20, %rsi
leaq -0x28(%rbp), %rdi
callq 0x1250a0
jmp 0x124b09
jmp 0x124b0b
leaq -0x68(%rbp), %rdi
callq 0x123fc0
jmp 0x124ad6
jmp 0x124b18
jmp 0x124b1a
leaq -0x28(%rbp), %rdi
callq 0x1250d0
xorb $-0x1, %al
testb $0x1, %al
jne 0x124b2e
jmp 0x124cb4
leaq -0x28(%rbp), %rdi
callq 0x11db80
movq %rax, %rsi
leaq -0x88(%rbp), %rdi
callq 0x11da20
leaq -0x28(%rbp), %rdi
callq 0x125110
leaq -0x88(%rbp), %rdi
callq 0x11dad0
testb $0x1, %al
jne 0x124b64
jmp 0x124c00
movq -0x80(%rbp), %rdi
callq 0x11e000
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rdi
callq 0x11de80
movq %rax, -0x98(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x125050
movq %rax, -0xf0(%rbp)
jmp 0x124b96
movq -0xf0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x124fe0
movq %rax, -0xf8(%rbp)
jmp 0x124bc7
movq -0xf8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x80(%rbp), %rdi
callq 0x125140
jmp 0x124ca3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x110640
jmp 0x124cbf
leaq -0x88(%rbp), %rdi
callq 0x11daf0
testb $0x1, %al
jne 0x124c15
jmp 0x124ca1
movq -0x80(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x1232c0
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x1238e0
movq %rax, -0xc0(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x123940
testb $0x1, %al
jne 0x124c5f
jmp 0x124c98
leaq -0xb8(%rbp), %rdi
callq 0x125080
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rsi
addq $0x20, %rsi
leaq -0x28(%rbp), %rdi
callq 0x1250a0
jmp 0x124c88
jmp 0x124c8a
leaq -0xb8(%rbp), %rdi
callq 0x123fc0
jmp 0x124c46
movq -0x80(%rbp), %rdi
callq 0x125160
jmp 0x124ca3
leaq -0x88(%rbp), %rdi
callq 0x110640
jmp 0x124b1a
leaq -0x28(%rbp), %rdi
callq 0x125180
jmp 0x124ccd
leaq -0x28(%rbp), %rdi
callq 0x125180
jmp 0x124ecd
movzbl -0x9(%rbp), %eax
movq %rax, -0x100(%rbp)
subq $0x9, %rax
ja 0x124ec2
movq -0x100(%rbp), %rax
leaq 0x1f8b4(%rip), %rcx     # 0x1445a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x111ba0
movq -0xd8(%rbp), %rax
movq -0x108(%rbp), %rdi
movq (%rax), %rsi
callq 0x1251e0
movq -0xd8(%rbp), %rax
movq -0x108(%rbp), %rdi
movq (%rax), %rsi
movl $0x1, %edx
callq 0x1122d0
jmp 0x124d3f
leaq -0xc9(%rbp), %rdi
callq 0x111d40
jmp 0x124ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x111d40
jmp 0x124ecd
leaq -0xca(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x112340
movq -0xd8(%rbp), %rax
movq -0x110(%rbp), %rdi
movq (%rax), %rsi
callq 0x125210
movq -0xd8(%rbp), %rax
movq -0x110(%rbp), %rdi
movq (%rax), %rsi
movl $0x1, %edx
callq 0x112a90
jmp 0x124db3
leaq -0xca(%rbp), %rdi
callq 0x1124e0
jmp 0x124ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xca(%rbp), %rdi
callq 0x1124e0
jmp 0x124ecd
leaq -0xcb(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x98250
movq -0xd8(%rbp), %rax
movq -0x118(%rbp), %rdi
movq (%rax), %rsi
callq 0x98b00
movq -0xd8(%rbp), %rax
movq -0x118(%rbp), %rdi
movq (%rax), %rsi
movl $0x1, %edx
callq 0xac5d0
jmp 0x124e27
leaq -0xcb(%rbp), %rdi
callq 0x98270
jmp 0x124ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xcb(%rbp), %rdi
callq 0x98270
jmp 0x124ecd
leaq -0xcc(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x113010
movq -0xd8(%rbp), %rax
movq -0x120(%rbp), %rdi
movq (%rax), %rsi
callq 0x123a30
movq -0xd8(%rbp), %rax
movq -0x120(%rbp), %rdi
movq (%rax), %rsi
movl $0x1, %edx
callq 0x113780
jmp 0x124e98
leaq -0xcc(%rbp), %rdi
callq 0x1131b0
jmp 0x124ec4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xcc(%rbp), %rdi
callq 0x1131b0
jmp 0x124ecd
jmp 0x124ec2
jmp 0x124ec4
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x52c90
nopw %cs:(%rax,%rax)