// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
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 0x13b22
movq 0x17211(%rip), %r13     # 0x1cfc8
leaq 0x11d14(%rip), %rsi     # 0x17ad2
movl $0x6, %edx
movq %r13, %rdi
callq 0x32f0
movq %r13, %rdi
movq %r12, %rsi
callq 0x31d0
movq %rax, %r12
leaq 0x11ceb(%rip), %rsi     # 0x17acb
movl $0xd, %edx
movq %rax, %rdi
callq 0x32f0
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq %rsi
movq %r12, %rdi
callq 0x31d0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31e0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x32e0
movq (%r15), %rsi
movq %r12, %rdi
movl $0x8, %edx
callq 0x31b0
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x6151
leaq 0x11631(%rip), %rsi     # 0x17492
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x5f2f
leaq 0x113ff(%rip), %rsi     # 0x17277
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x5f9e
leaq 0x11d12(%rip), %rsi     # 0x17ba1
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x600a
leaq 0x11c84(%rip), %rsi     # 0x17b2a
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x6193
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x607a
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movl 0x4(%rsp), %eax
cmpl $0x10000, %eax          # imm = 0x10000
jge 0x60b0
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x60e7
movw %ax, (%rcx,%r14,2)
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x5eda
jmp 0x607a
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x607a
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x609f
movzbl 0x4(%rsp), %ecx
movw %cx, (%rax,%r14,2)
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x5f53
jmp 0x607a
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x607a
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl $0x2, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x60f8
movzwl 0x4(%rsp), %ecx
movw %cx, (%rax,%r14,2)
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x5fc2
jmp 0x607a
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x607a
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movl 0x4(%rsp), %eax
cmpl $0x10000, %eax          # imm = 0x10000
jge 0x6109
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x6140
movw %ax, (%rcx,%r14,2)
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x602a
leaq 0x8(%rsp), %rdi
callq 0x3070
leaq 0x8(%rsp), %rdi
callq 0x3080
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x116b3(%rip), %rdi     # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x11a2a(%rip), %rsi     # 0x17aee
movq %rax, %rdi
callq 0x30e0
movq 0x16f1d(%rip), %rsi     # 0x1cff0
movq 0x16ee6(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3410
jmp 0x61c5
leaq 0x1166b(%rip), %rdi     # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
leaq 0x1165a(%rip), %rdi     # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x119d1(%rip), %rsi     # 0x17aee
movq %rax, %rdi
callq 0x30e0
movq 0x16ec4(%rip), %rsi     # 0x1cff0
movq 0x16e8d(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3410
jmp 0x61c5
leaq 0x11612(%rip), %rdi     # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
movl $0x20, %edi
callq 0x3150
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x1196d(%rip), %rsi     # 0x17ad9
leaq 0x1197a(%rip), %rdx     # 0x17aed
movq %r14, %rdi
callq 0x13074
leaq 0x16bfe(%rip), %rsi     # 0x1cd80
movq 0x16e1f(%rip), %rdx     # 0x1cfa8
movq %r14, %rdi
callq 0x3410
jmp 0x61c5
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x11987(%rip), %rsi     # 0x17b2e
movq %rax, %rdi
callq 0x30e0
movq 0x16e3a(%rip), %rsi     # 0x1cff0
movq 0x16e03(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3410
jmp 0x61cf
jmp 0x61ea
jmp 0x61cf
jmp 0x61cf
jmp 0x61ea
movq %rax, %rbx
movq %r14, %rdi
callq 0x3210
jmp 0x61ed
jmp 0x61ea
jmp 0x61ea
jmp 0x61ea
jmp 0x61ea
jmp 0x61ea
jmp 0x61ea
jmp 0x61ea
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3430