// File: /workspace/github_cpp_makefile_star2_O1/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 0x78321
leaq 0xcca6(%rip), %rsi      # 0x84e76
movq %rbx, %rdi
callq 0x416d6
cmpb $0x0, (%rax)
je 0x78388
leaq 0xcc8e(%rip), %rsi      # 0x84e76
movq %rbx, %rdi
callq 0x416d6
cmpb $0x2, (%rax)
jne 0x7841c
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
xorl %r12d, %r12d
leaq 0xcc61(%rip), %r13      # 0x84e76
leaq 0x30(%rsp), %rbp
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x416d6
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x7825b
cmpl $0x1, %ecx
je 0x7824c
cmpl $0x2, %ecx
jne 0x78256
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
jmp 0x7825b
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
jmp 0x7825b
movl $0x1, %ecx
cmpq %rcx, %r12
jae 0x782b8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x416d6
movq %rax, %rdi
movq %r12, %rsi
callq 0x738fa
movq %rbp, %rdi
movq %rax, %rsi
callq 0x41894
movq %rbp, %rdi
callq 0x7570a
movq %rax, 0x40(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x78912
movq %rbp, %rdi
callq 0x48a06
movzbl 0x30(%rsp), %esi
leaq 0x38(%rsp), %rdi
callq 0x48aa8
incq %r12
jmp 0x7821f
movl $0x98, %edi
callq 0x3a460
movq %rax, %r14
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x787dc
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x77878
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x782f6
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a470
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7830c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a470
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 0x158(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x130f4(%rip), %rsi     # 0x8b436
leaq 0x13103(%rip), %rdx     # 0x8b44c
leaq 0x148(%rsp), %rdi
callq 0x44728
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x747bc
movzbl (%rsp), %eax
cmpq $0x8, %rax
ja 0x784aa
leaq 0x2c139(%rip), %rcx     # 0xa44b8
movq (%rcx,%rax,8), %r15
jmp 0x784b1
movl $0x68, %edi
callq 0x3a210
movq %rax, %r14
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1308e(%rip), %rsi     # 0x8b436
leaq 0x1309d(%rip), %rdx     # 0x8b44c
leaq 0xe8(%rsp), %rdi
callq 0x44728
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xcaa6(%rip), %rsi      # 0x84e76
leaq 0xcaa6(%rip), %rdx      # 0x84e7d
leaq 0xc8(%rsp), %rdi
callq 0x44728
movb $0x1, %bpl
leaq 0xe8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
movq %r14, %rdi
callq 0x75d5a
xorl %ebp, %ebp
leaq 0x2be98(%rip), %rsi     # 0xa42a0
leaq -0x2521(%rip), %rdx     # 0x75eee
movq %r14, %rdi
callq 0x3a750
jmp 0x78612
movl $0xa8, %edi
callq 0x3a210
movq %rax, %r14
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12ff9(%rip), %rsi     # 0x8b436
leaq 0x13008(%rip), %rdx     # 0x8b44c
leaq 0xa8(%rsp), %rdi
callq 0x44728
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xca12(%rip), %rsi      # 0x84e76
leaq 0xca12(%rip), %rdx      # 0x84e7d
leaq 0x88(%rsp), %rdi
callq 0x44728
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x747bc
movzbl (%rsp), %eax
cmpq $0x8, %rax
ja 0x7855e
leaq 0x2c017(%rip), %rcx     # 0xa44b8
movq (%rcx,%rax,8), %r15
jmp 0x78565
leaq 0xed4d(%rip), %r15      # 0x871fe
leaq 0x138(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x3a1f0
leaq (%rax,%r15), %rdx
leaq 0x128(%rsp), %rdi
movq %r15, %rsi
callq 0x44728
movzbl (%rbx), %eax
cmpq $0x8, %rax
ja 0x784ef
leaq 0x2bfcf(%rip), %rcx     # 0xa44b8
movq (%rcx,%rax,8), %rbx
jmp 0x784f6
leaq 0xed08(%rip), %rbx      # 0x871fe
leaq 0x118(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x108(%rsp), %rdi
movq %rbx, %rsi
callq 0x44728
movb $0x1, %bpl
leaq 0x148(%rsp), %rsi
leaq 0x128(%rsp), %rdx
leaq 0x108(%rsp), %rcx
movq %r14, %rdi
callq 0x73acc
xorl %ebp, %ebp
leaq 0x2bbbe(%rip), %rsi     # 0xa4108
leaq -0x47b1(%rip), %rdx     # 0x73da0
movq %r14, %rdi
callq 0x3a750
jmp 0x78612
leaq 0xec99(%rip), %r15      # 0x871fe
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r15, %rdi
callq 0x3a1f0
leaq (%rax,%r15), %rdx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x44728
leaq 0xc8e8(%rip), %rsi      # 0x84e76
movq %rbx, %rdi
callq 0x416d6
movzbl (%rax), %eax
cmpq $0x8, %rax
ja 0x785ac
leaq 0x2bf12(%rip), %rcx     # 0xa44b8
movq (%rcx,%rax,8), %rbx
jmp 0x785b3
leaq 0xec4b(%rip), %rbx      # 0x871fe
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x44728
movb $0x1, %bpl
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x48(%rsp), %rcx
leaq 0x68(%rsp), %r8
movq %r14, %rdi
callq 0x75f58
xorl %ebp, %ebp
leaq 0x2bcb5(%rip), %rsi     # 0xa42b8
leaq -0x2242(%rip), %rdx     # 0x763c8
movq %r14, %rdi
callq 0x3a750
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x78636
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x78636
jmp 0x78630
movq %rax, %rbx
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x7865a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7865a
movq %rax, %rbx
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x4191c
jmp 0x786b1
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x7868c
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7868c
movq %rax, %rbx
movb $0x1, %bpl
movq 0x128(%rsp), %rdi
cmpq %r13, %rdi
je 0x786d6
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x786d6
movq %rax, %rbx
movb $0x1, %bpl
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x786e6
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x786e6
movq %rax, %rbx
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x4191c
jmp 0x78742
movq %rax, %rbx
movb $0x1, %bpl
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x7876b
movq 0xb8(%rsp), %rsi
jmp 0x78757
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x78725
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x78725
movq %rax, %rbx
movb $0x1, %bpl
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7876b
movq 0xf8(%rsp), %rsi
jmp 0x78757
movq %rax, %rbx
movb $0x1, %bpl
movq 0x148(%rsp), %rdi
cmpq %r12, %rdi
je 0x7876b
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7876b
jmp 0x78765
jmp 0x78765
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x787d4
movq %r14, %rdi
callq 0x3a330
jmp 0x787d4
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x78799
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a470
jmp 0x78799
movq %rax, %rbx
movl $0x98, %esi
movq %r14, %rdi
callq 0x3a470
jmp 0x787be
jmp 0x787bb
jmp 0x787bb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4191c
jmp 0x787be
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x787d4
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a470
movq %rbx, %rdi
callq 0x3a780