// File: /workspace/github_cpp_makefile_star2_O2/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 $0x178, %rsp            # imm = 0x178
movq %rdi, %rbx
cmpb $0x1, (%rdi)
jne 0x81fc4
leaq 0x9fb0(%rip), %rsi      # 0x8be76
movq %rbx, %rdi
callq 0x56e34
cmpb $0x0, (%rax)
je 0x82074
leaq 0x9f98(%rip), %rsi      # 0x8be76
movq %rbx, %rdi
callq 0x56e34
cmpb $0x2, (%rax)
jne 0x820e9
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
xorl %r15d, %r15d
leaq 0x9f6c(%rip), %r12      # 0x8be76
leaq 0x48(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x56e34
movq %rax, %rdi
callq 0x6ec2e
cmpq %rax, %r15
jae 0x81f72
movq %rbx, %rdi
movq %r12, %rsi
callq 0x56e34
movq %rax, %rdi
movq %r15, %rsi
callq 0x7eefe
movq %r13, %rdi
movq %rax, %rsi
callq 0x56f56
movq %r13, %rdi
callq 0x801a8
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x82508
movq %r13, %rdi
callq 0x56fca
incq %r15
jmp 0x81f14
movl $0x98, %edi
callq 0x52470
movq %rax, %r14
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x822e2
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x817e6
leaq 0x30(%rsp), %rdi
callq 0x82400
leaq 0x10(%rsp), %rdi
callq 0x82400
movq %r14, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edi
callq 0x52220
movq %rax, %r14
leaq 0x1077b(%rip), %rsi     # 0x92753
leaq 0x158(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8067c
leaq 0x10(%rsp), %rdi
callq 0x6f406
leaq 0x138(%rsp), %rdi
leaq 0x6(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movq %rbx, %rdi
callq 0x6f406
leaq 0x118(%rsp), %rdi
leaq 0x5(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0x158(%rsp), %rsi
leaq 0x138(%rsp), %rdx
leaq 0x118(%rsp), %rcx
movq %r14, %rdi
callq 0x7f052
xorl %ebp, %ebp
leaq 0x2f458(%rip), %rsi     # 0xb14b8
leaq -0x2ec1(%rip), %rdx     # 0x7f1a6
movq %r14, %rdi
callq 0x52760
jmp 0x821b8
pushq $0x68
popq %rdi
callq 0x52220
movq %rax, %r14
leaq 0x106cd(%rip), %rsi     # 0x92753
leaq 0xf8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x56548
leaq 0x9dd7(%rip), %rsi      # 0x8be76
leaq 0xd8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
movb $0x1, %bpl
leaq 0xf8(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
movq %r14, %rdi
callq 0x80690
xorl %ebp, %ebp
leaq 0x2f533(%rip), %rsi     # 0xb1608
leaq -0x197c(%rip), %rdx     # 0x80760
movq %r14, %rdi
callq 0x52760
jmp 0x821b8
movl $0xa8, %edi
callq 0x52220
movq %rax, %r14
leaq 0x10656(%rip), %rsi     # 0x92753
leaq 0xb8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
leaq 0x9d60(%rip), %rsi      # 0x8be76
leaq 0x98(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x56548
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7eed0
leaq 0x10(%rsp), %rdi
callq 0x6f406
leaq 0x78(%rsp), %rdi
leaq 0x5(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
leaq 0x9d1d(%rip), %rsi      # 0x8be76
movq %rbx, %rdi
callq 0x56e34
movq %rax, %rdi
callq 0x6f406
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x78(%rsp), %rcx
leaq 0x58(%rsp), %r8
movq %r14, %rdi
callq 0x8079c
xorl %ebp, %ebp
leaq 0x2f477(%rip), %rsi     # 0xb1620
leaq -0x1822(%rip), %rdx     # 0x8098e
movq %r14, %rdi
callq 0x52760
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x52888
jmp 0x821cf
jmp 0x821c9
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x78(%rsp), %rdi
callq 0x52888
jmp 0x821e1
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x56fca
jmp 0x8221a
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x52888
jmp 0x82205
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x138(%rsp), %rdi
callq 0x52888
jmp 0x8222f
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x98(%rsp), %rdi
callq 0x52888
jmp 0x82241
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x56fca
jmp 0x82273
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xb8(%rsp), %rdi
jmp 0x8227b
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x52888
jmp 0x82263
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xf8(%rsp), %rdi
jmp 0x8227b
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x158(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x8228e
jmp 0x822d9
jmp 0x8228b
jmp 0x8228b
movq %rax, %rbx
movq %r14, %rdi
callq 0x52350
jmp 0x822d9
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x82400
jmp 0x822aa
movq %rax, %rbx
movl $0x98, %esi
movq %r14, %rdi
callq 0x52480
jmp 0x822cf
jmp 0x822cc
jmp 0x822cc
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x56fca
jmp 0x822cf
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x82400
movq %rbx, %rdi
callq 0x527a0
nop