// File: /workspace/github_cpp_makefile_star2_O2/spatialfruitsalad[P]volume2position/./tomogram.hpp
// Function: tomogram3d<unsigned short>::read_raw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long, unsigned long, unsigned long)
void read_raw (std::string infilename, std::string type, unsigned long a, unsigned long b, unsigned long c)
    {
        sx = a;
        sy = b;
        sz = c;
        data.resize(sx*sy*sz);
        std::cout << "size: " << a*b*c << "; arraysize: " << data.size() << std::endl;
        std::ifstream infile;
        infile.open(infilename.c_str());
        if(infile.fail())
        {
            throw std::string("cannot open raw file");
        }
        if (type == "uint8_t")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                uint8_t number;
                infile.read ((char *)&number,sizeof (number));
                if (number > std::numeric_limits<VALUE>::max())
                    throw std::runtime_error ("Can't read file: Numbers are to big for selected class type");
                data.at(i) = VALUE(number);
            }
        }
        else if (type == "uint16_t")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                uint16_t number;
                infile.read ((char *)&number,sizeof (number));
                if (number > std::numeric_limits<VALUE>::max())
                    throw std::runtime_error ("Can't read file: Numbers are to big for selected class type");
                data.at(i) = VALUE(number);
            }
        }
        else if (type == "int32_t")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                int32_t number;
                infile.read ((char *)&number,sizeof (number));
                if (number > std::numeric_limits<VALUE>::max())
                    throw std::runtime_error ("Can't read file: Numbers are to big for selected class type");
                data.at(i) = VALUE(number);
            }
        }
        else if (type == "int")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                int number;
                infile.read ((char *)&number,sizeof (number));
                if (number > std::numeric_limits<VALUE>::max())
                    throw std::runtime_error ("Can't read file: Numbers are to big for selected class type");
                data.at(i) = VALUE(number);
            }
        }
        else
        {
            throw std::runtime_error ("can't read raw type");
        }

        infile.close();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %r8, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
imulq %rcx, %r12
imulq %r9, %r12
movq %r12, %rsi
callq 0xe914
movq 0x1301c(%rip), %rdi     # 0x17fc8
leaq 0xcaba(%rip), %rsi      # 0x11a6d
callq 0x3260
movq %rax, %rdi
movq %r12, %rsi
callq 0x31a0
leaq 0xca9c(%rip), %rsi      # 0x11a66
movq %rax, %rdi
callq 0x3260
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq %rsi
movq %rax, %rdi
callq 0x31a0
movq %rax, %rdi
callq 0x3110
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x3290
movq (%r15), %rsi
pushq $0x8
popq %rdx
movq %r12, %rdi
callq 0x3180
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0x523e
leaq 0xc435(%rip), %rsi      # 0x11457
movq %r14, %rdi
callq 0xe944
testb %al, %al
je 0x507c
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
pushq $0x1
popq %r13
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jae 0x51b1
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x32e0
movzbl 0xc(%rsp), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe952
movw %bp, (%rax)
incq %r14
jmp 0x503f
leaq 0xc1b9(%rip), %rsi      # 0x1123c
movq %r14, %rdi
callq 0xe944
testb %al, %al
je 0x50dd
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
pushq $0x2
popq %r13
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jae 0x51b1
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x32e0
movzwl 0xc(%rsp), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe952
movw %bp, (%rax)
incq %r14
jmp 0x50a0
leaq 0xca58(%rip), %rsi      # 0x11b3c
movq %r14, %rdi
callq 0xe944
testb %al, %al
je 0x5149
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
pushq $0x4
popq %r13
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jae 0x51b1
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x32e0
movl 0xc(%rsp), %ebp
cmpl $0x10000, %ebp          # imm = 0x10000
jge 0x51d7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe952
movw %bp, (%rax)
incq %r14
jmp 0x5101
leaq 0xc975(%rip), %rsi      # 0x11ac5
movq %r14, %rdi
callq 0xe944
testb %al, %al
je 0x5275
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
pushq $0x4
popq %r13
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jae 0x51b1
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x32e0
movl 0xc(%rsp), %ebp
cmpl $0x10000, %ebp          # imm = 0x10000
jge 0x520c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe952
movw %bp, (%rax)
incq %r14
jmp 0x5171
leaq 0x10(%rsp), %rdi
callq 0x3060
leaq 0x10(%rsp), %rdi
callq 0x3080
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x3120
movq %rax, %r14
leaq 0xc8a0(%rip), %rsi      # 0x11a89
movq %rax, %rdi
callq 0x30c0
movq 0x12df8(%rip), %rsi     # 0x17ff0
movq 0x12dc1(%rip), %rdx     # 0x17fc0
movq %r14, %rdi
callq 0x3400
jmp 0x52a5
pushq $0x10
popq %rdi
callq 0x3120
movq %rax, %r14
leaq 0xc86b(%rip), %rsi      # 0x11a89
movq %rax, %rdi
callq 0x30c0
movq 0x12dc3(%rip), %rsi     # 0x17ff0
movq 0x12d8c(%rip), %rdx     # 0x17fc0
movq %r14, %rdi
callq 0x3400
jmp 0x52a5
pushq $0x20
popq %rdi
callq 0x3120
movq %rax, %r14
leaq 0xc824(%rip), %rsi      # 0x11a74
leaq 0xc(%rsp), %rdx
movq %rax, %rdi
callq 0x30d0
leaq 0x12b24(%rip), %rsi     # 0x17d88
movq 0x12d45(%rip), %rdx     # 0x17fb0
movq %r14, %rdi
callq 0x3400
jmp 0x52a5
pushq $0x10
popq %rdi
callq 0x3120
movq %rax, %r14
leaq 0xc842(%rip), %rsi      # 0x11ac9
movq %rax, %rdi
callq 0x30c0
movq 0x12d5a(%rip), %rsi     # 0x17ff0
movq 0x12d23(%rip), %rdx     # 0x17fc0
movq %r14, %rdi
callq 0x3400
jmp 0x52b1
jmp 0x52c6
jmp 0x52b1
jmp 0x52c6
jmp 0x52b1
jmp 0x52c6
movq %rax, %rbx
movq %r14, %rdi
callq 0x31d0
jmp 0x52c9
jmp 0x52c6
jmp 0x52c6
jmp 0x52c6
jmp 0x52c6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3420