// File: /workspace/github_cpp_makefile_star2_O3/Lut99[P]RayTracer/src/lib/objects/RenderObjectCollection.cpp
// Function: RayTracer::RenderObjectCollection::from_json(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>)
RenderObjectCollection* RenderObjectCollection::from_json(json json_obj) {
    // Check if the object has an object type
    if (!json_obj.is_object()) {
        throw InvalidObjectFormat("RenderObjectCollection", json::object().type_name(), json_obj.type_name());
    }

    // Check if the required field exists and is an array
    if (json_obj["objects"].is_null()) {
        throw MissingFieldException("RenderObjectCollection", "objects");
    }
    if (!json_obj["objects"].is_array()) {
        throw InvalidFieldFormat("RenderObjectCollection", "objects", json::array().type_name(), json_obj["objects"].type_name());
    }

    // Parse all the items in this array
    vector<RenderObject*> objects;
    for (std::size_t i = 0; i < json_obj["objects"].size(); i++) {
        objects.push_back(RenderObject::from_json(json_obj["objects"][i]));
    }

    return new RenderObjectCollection(objects);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
cmpb $0x1, (%rdi)
jne 0x778eb
leaq 0xc6dc(%rip), %rsi      # 0x83e76
movq %rbx, %rdi
callq 0x41392
cmpb $0x0, (%rax)
je 0x77952
leaq 0xc6c4(%rip), %rsi      # 0x83e76
movq %rbx, %rdi
callq 0x41392
cmpb $0x2, (%rax)
jne 0x779dd
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
xorl %r12d, %r12d
leaq 0xc697(%rip), %r13      # 0x83e76
leaq 0x30(%rsp), %rbp
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x41392
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x77825
cmpl $0x1, %ecx
je 0x77816
cmpl $0x2, %ecx
jne 0x77820
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
jmp 0x77825
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
jmp 0x77825
movl $0x1, %ecx
cmpq %rcx, %r12
jae 0x77882
movq %rbx, %rdi
movq %r13, %rsi
callq 0x41392
movq %rax, %rdi
movq %r12, %rsi
callq 0x72dc4
movq %rbp, %rdi
movq %rax, %rsi
callq 0x4155c
movq %rbp, %rdi
callq 0x74c12
movq %rax, 0x40(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x77f2a
movq %rbp, %rdi
callq 0x4861e
movzbl 0x30(%rsp), %esi
leaq 0x38(%rsp), %rdi
callq 0x486c0
incq %r12
jmp 0x777e9
movl $0x98, %edi
callq 0x3a470
movq %rax, %r14
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x77df4
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x76e14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x778c0
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a480
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x778d6
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a480
movq %r14, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12b4a(%rip), %rsi     # 0x8a456
leaq 0x12b59(%rip), %rdx     # 0x8a46c
leaq 0x88(%rsp), %rdi
callq 0x44390
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x73c9e
movzbl (%rsp), %eax
cmpq $0x8, %rax
ja 0x77a65
leaq 0x2bb9f(%rip), %rcx     # 0xa34e8
movq (%rcx,%rax,8), %r15
jmp 0x77a6c
movl $0x68, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12ae7(%rip), %rsi     # 0x8a456
leaq 0x12af6(%rip), %rdx     # 0x8a46c
leaq 0x68(%rsp), %rdi
callq 0x44390
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc4e2(%rip), %rsi      # 0x83e76
leaq 0xc4e2(%rip), %rdx      # 0x83e7d
leaq 0x108(%rsp), %rdi
callq 0x44390
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
leaq 0x108(%rsp), %rdx
movq %r14, %rdi
callq 0x75298
xorl %ebp, %ebp
leaq 0x2b907(%rip), %rsi     # 0xa32d0
leaq -0x25a4(%rip), %rdx     # 0x7542c
movq %r14, %rdi
callq 0x3a760
jmp 0x77bdd
movl $0xa8, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12a5b(%rip), %rsi     # 0x8a456
leaq 0x12a6a(%rip), %rdx     # 0x8a46c
leaq 0x48(%rsp), %rdi
callq 0x44390
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc457(%rip), %rsi      # 0x83e76
leaq 0xc457(%rip), %rdx      # 0x83e7d
leaq 0xe8(%rsp), %rdi
callq 0x44390
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x73c9e
movzbl (%rsp), %eax
cmpq $0x8, %rax
ja 0x77b19
leaq 0x2ba8c(%rip), %rcx     # 0xa34e8
movq (%rcx,%rax,8), %r15
jmp 0x77b20
leaq 0xe78f(%rip), %r15      # 0x861fb
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x3a1f0
leaq (%rax,%r15), %rdx
leaq 0x148(%rsp), %rdi
movq %r15, %rsi
callq 0x44390
movzbl (%rbx), %eax
cmpq $0x8, %rax
ja 0x77aaa
leaq 0x2ba44(%rip), %rcx     # 0xa34e8
movq (%rcx,%rax,8), %rbx
jmp 0x77ab1
leaq 0xe74a(%rip), %rbx      # 0x861fb
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0x44390
movb $0x1, %bpl
leaq 0x88(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x128(%rsp), %rcx
movq %r14, %rdi
callq 0x72fb0
xorl %ebp, %ebp
leaq 0x2b633(%rip), %rsi     # 0xa3138
leaq -0x4888(%rip), %rdx     # 0x73284
movq %r14, %rdi
callq 0x3a760
jmp 0x77bdd
leaq 0xe6db(%rip), %r15      # 0x861fb
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %r15, %rdi
callq 0x3a1f0
leaq (%rax,%r15), %rdx
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x44390
leaq 0xc327(%rip), %rsi      # 0x83e76
movq %rbx, %rdi
callq 0x41392
movzbl (%rax), %eax
cmpq $0x8, %rax
ja 0x77b6d
leaq 0x2b981(%rip), %rcx     # 0xa34e8
movq (%rcx,%rax,8), %rbx
jmp 0x77b74
leaq 0xe687(%rip), %rbx      # 0x861fb
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0xa8(%rsp), %rdi
movq %rbx, %rsi
callq 0x44390
movb $0x1, %r15b
leaq 0x48(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0xa8(%rsp), %r8
movq %r14, %rdi
callq 0x75496
xorl %r15d, %r15d
leaq 0x2b71a(%rip), %rsi     # 0xa32e8
leaq -0x22cf(%rip), %rdx     # 0x75906
movq %r14, %rdi
callq 0x3a760
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x77c0f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x77c0f
jmp 0x77c09
movq %rax, %rbx
movb $0x1, %r15b
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77c34
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x77c34
movq %rax, %rbx
movb $0x1, %r15b
movq %rsp, %rdi
callq 0x415d4
jmp 0x77c8b
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x77c66
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x77c66
movq %rax, %rbx
movb $0x1, %bpl
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x77cd3
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x77cd3
movq %rax, %rbx
movb $0x1, %r15b
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x77ca8
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3a480
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x77cbf
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %r15b, %r15b
jne 0x77d88
jmp 0x77dec
movq %rax, %rbx
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x415d4
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x77d41
movq 0x98(%rsp), %rsi
jmp 0x77d39
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x77d88
movq 0x58(%rsp), %rsi
jmp 0x77d77
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x77d2a
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3a480
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x77d41
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %bpl, %bpl
jne 0x77d88
jmp 0x77dec
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x77d88
movq 0x78(%rsp), %rsi
jmp 0x77d77
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x77d88
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x77d88
jmp 0x77d85
jmp 0x77d85
movq %rax, %rbx
movq %r14, %rdi
callq 0x3a340
jmp 0x77dec
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x77db1
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a480
jmp 0x77db1
movq %rax, %rbx
movl $0x98, %esi
movq %r14, %rdi
callq 0x3a480
jmp 0x77dd6
jmp 0x77dd3
jmp 0x77dd3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x415d4
jmp 0x77dd6
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x77dec
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a480
movq %rbx, %rdi
callq 0x3a790