// File: jimmiebergmann[P]fbx-file/fbx.cpp
// Function: Fbx::(anonymous namespace)::PropertyReader::readArray(unsigned char) const
size_t readArray(uint8_t code) const
            {
                uint32_t arrayLength;
                uint32_t encoding;
                uint32_t compressedLength;
                m_file.read(reinterpret_cast<char*>(&arrayLength), 4);
                m_file.read(reinterpret_cast<char*>(&encoding), 4);
                m_file.read(reinterpret_cast<char*>(&compressedLength), 4);

                if (encoding == 0)
                {
                    switch (code)
                    {
                    case 'i': return readUncompressedArray<int32_t>(arrayLength);
                    case 'f': return readUncompressedArray<float>(arrayLength);
                    case 'd': return readUncompressedArray<double>(arrayLength);
                    case 'l': return readUncompressedArray<int64_t>(arrayLength);
                    case 'b': return readUncompressedArray<bool>(arrayLength);
                    default: throw std::runtime_error("Unkown array property type:" + code); break;
                    }
                }
                else if (encoding == 1)
                {
                    switch (code)
                    {
                    case 'i': return readCompressedArray<int32_t>(arrayLength, compressedLength);
                    case 'f': return readCompressedArray<float>(arrayLength, compressedLength);
                    case 'd': return readCompressedArray<double>(arrayLength, compressedLength);
                    case 'l': return readCompressedArray<int64_t>(arrayLength, compressedLength);
                    case 'b': return readCompressedArray<bool>(arrayLength, compressedLength);
                    default: throw std::runtime_error("Unkown array property type:" + code); break;
                    }
                }
                else
                {
                    throw std::runtime_error("Unkown property encoding:" + std::to_string(encoding));
                }

                return 0;
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x33b0
movq -0x80(%rbp), %rax
movq (%rax), %rdi
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
callq 0x33b0
movq -0x80(%rbp), %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0x4, %edx
callq 0x33b0
cmpl $0x0, -0x1c(%rbp)
jne 0x2333e
movzbl -0x11(%rbp), %eax
addl $-0x62, %eax
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0xa, %eax
ja 0x232db
movq -0x88(%rbp), %rax
leaq 0x13a2f(%rip), %rcx     # 0x36c98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x267b0
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x268e0
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x26a10
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x26b40
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x26c70
movq %rax, -0x8(%rbp)
jmp 0x2350e
movl $0x10, %edi
callq 0x3160
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movzbl -0x11(%rbp), %eax
leaq 0x13cef(%rip), %rsi     # 0x36fec
addq %rax, %rsi
callq 0x3100
jmp 0x23307
movq -0x90(%rbp), %rdi
movq 0x21cdb(%rip), %rsi     # 0x44ff0
movq 0x21cac(%rip), %rdx     # 0x44fc8
callq 0x3520
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3230
jmp 0x2351b
cmpl $0x1, -0x1c(%rbp)
jne 0x23453
movzbl -0x11(%rbp), %eax
addl $-0x62, %eax
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0xa, %eax
ja 0x233f0
movq -0x98(%rbp), %rax
leaq 0x138fd(%rip), %rcx     # 0x36c6c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x26d80
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x27000
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x27280
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x27500
movq %rax, -0x8(%rbp)
jmp 0x2350e
movq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x27780
movq %rax, -0x8(%rbp)
jmp 0x2350e
movl $0x10, %edi
callq 0x3160
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movzbl -0x11(%rbp), %eax
leaq 0x13bda(%rip), %rsi     # 0x36fec
addq %rax, %rsi
callq 0x3100
jmp 0x2341c
movq -0xa0(%rbp), %rdi
movq 0x21bc6(%rip), %rsi     # 0x44ff0
movq 0x21b97(%rip), %rdx     # 0x44fc8
callq 0x3520
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3230
jmp 0x2351b
movb $0x1, -0x71(%rbp)
movl $0x10, %edi
callq 0x3160
movq %rax, -0xa8(%rbp)
movl -0x1c(%rbp), %esi
leaq -0x70(%rbp), %rdi
callq 0x2ab50
jmp 0x23476
leaq 0x13b8b(%rip), %rsi     # 0x37008
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x291c0
jmp 0x2348c
movq -0xa8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x34d0
jmp 0x2349e
movq -0xa8(%rbp), %rdi
movb $0x0, -0x71(%rbp)
movq 0x21b40(%rip), %rsi     # 0x44ff0
movq 0x21b11(%rip), %rdx     # 0x44fc8
callq 0x3520
jmp 0x23524
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x234f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x234ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x31c0
leaq -0x70(%rbp), %rdi
callq 0x31c0
testb $0x1, -0x71(%rbp)
jne 0x23500
jmp 0x2350c
movq -0xa8(%rbp), %rdi
callq 0x3230
jmp 0x2351b
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)