// File: /workspace/github_cpp_makefile_star2_O1/alfanick[P]rest-cpp/src/rest/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::basic_json(std::initializer_list<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>>, bool, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, double, std::allocator>::value_t)
basic_json(std::initializer_list<basic_json> init,
               bool type_deduction = true,
               value_t manual_type = value_t::array)
    {
        // the initializer list could describe an object
        bool is_an_object = true;

        // check if each element is an array with two elements whose first
        // element is a string
        for (const auto& element : init)
        {
            if (not element.is_array() or element.size() != 2
                    or not element[0].is_string())
            {
                // we found an element that makes it impossible to use the
                // initializer list as object
                is_an_object = false;
                break;
            }
        }

        // adjust type if type deduction is not wanted
        if (not type_deduction)
        {
            // if array is wanted, do not create an object though possible
            if (manual_type == value_t::array)
            {
                is_an_object = false;
            }

            // if object is wanted but impossible, throw an exception
            if (manual_type == value_t::object and not is_an_object)
            {
                throw std::domain_error("cannot create object from initializer list");
            }
        }

        if (is_an_object)
        {
            // the initializer list is a list of pairs -> create object
            m_type = value_t::object;
            m_value = value_t::object;

            assert(m_value.object != nullptr);

            for (auto& element : init)
            {
                m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1]));
            }
        }
        else
        {
            // the initializer list describes an array -> create array
            m_type = value_t::array;
            m_value.array = create<array_t>(std::move(init));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movl %ecx, %r14d
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
testq %rdx, %rdx
je 0x3afd0
movq %rdx, %r15
movq %rsi, %r12
shlq $0x4, %r15
addq $-0x10, %r15
movb $0x1, %r13b
xorl %ebp, %ebp
cmpb $0x2, (%r12)
jne 0x3afb5
movq %r12, %rdi
callq 0x216b0
cmpq $0x2, %rax
jne 0x3afb5
movq %r12, %rdi
xorl %esi, %esi
callq 0x21590
cmpb $0x3, (%rax)
setne %al
movzbl %r13b, %r13d
cmovnel %ebp, %r13d
jmp 0x3afba
xorl %r13d, %r13d
movb $0x1, %al
testb %al, %al
jne 0x3afd3
addq $0x10, %r12
leaq -0x10(%r15), %rax
testq %r15, %r15
movq %rax, %r15
jne 0x3af86
jmp 0x3afd3
movb $0x1, %r13b
testb %r14b, %r14b
jne 0x3aff8
xorl %eax, %eax
movl 0x4(%rsp), %ecx
cmpb $0x2, %cl
movzbl %r13b, %r13d
cmovel %eax, %r13d
cmpb $0x1, %cl
jne 0x3aff8
testb $0x1, %r13b
je 0x3b0a6
testb $0x1, %r13b
je 0x3b083
movb $0x1, (%rbx)
movl $0x30, %edi
callq 0x22250
leaq 0x8(%rax), %rcx
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, (%rax)
vmovups %ymm0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0x8(%rbx)
movq 0x10(%rsp), %r13
testq %r13, %r13
je 0x3b094
movq 0x8(%rsp), %r14
shlq $0x4, %r13
movq 0x8(%rbx), %r15
movq %r14, %rdi
xorl %esi, %esi
vzeroupper
callq 0x21590
movq 0x8(%rax), %r12
movl $0x1, %esi
movq %r14, %rdi
callq 0x21590
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x21ab0
addq $0x10, %r14
addq $-0x10, %r13
jne 0x3b047
jmp 0x3b094
movb $0x2, (%rbx)
leaq 0x8(%rsp), %rdi
callq 0x22f00
movq %rax, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movl $0x10, %edi
callq 0x217b0
movq %rax, %rbx
leaq 0x5ad1(%rip), %rsi      # 0x40b8b
movq %rax, %rdi
callq 0x21b00
movq 0x12bff(%rip), %rsi     # 0x4dcc8
movq 0x12cd8(%rip), %rdx     # 0x4dda8
movq %rbx, %rdi
callq 0x230a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x21c50
movq %r14, %rdi
callq 0x23170
nop