// File: 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:
subq $0x348, %rsp            # imm = 0x348
movq %rsi, 0xb0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rdi, 0x340(%rsp)
movq %rsi, 0x338(%rsp)
movq %rdx, 0x330(%rsp)
movq %rcx, 0x328(%rsp)
movq %r8, 0x320(%rsp)
movq %r9, 0x318(%rsp)
movq 0x340(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
movq 0x328(%rsp), %rax
movq %rax, 0x18(%rdi)
movq 0x320(%rsp), %rax
movq %rax, 0x20(%rdi)
movq 0x318(%rsp), %rax
movq %rax, 0x28(%rdi)
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rax
imulq %rax, %rsi
movq 0x28(%rdi), %rax
imulq %rax, %rsi
callq 0x1ef70
movq 0x2dd85(%rip), %rdi     # 0x33fc0
leaq 0x227f3(%rip), %rsi     # 0x28a35
callq 0x3290
movq %rax, %rdi
movq 0x328(%rsp), %rsi
movq 0x320(%rsp), %rax
imulq %rax, %rsi
movq 0x318(%rsp), %rax
imulq %rax, %rsi
callq 0x3090
movq %rax, %rdi
leaq 0x227b5(%rip), %rsi     # 0x28a2e
callq 0x3290
movq 0xa0(%rsp), %rdi
movq %rax, 0xa8(%rsp)
callq 0x1f010
movq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0x3090
movq %rax, %rdi
movq 0x2dcf3(%rip), %rsi     # 0x33fa0
callq 0x32c0
leaq 0x110(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x32e0
movq 0xb0(%rsp), %rdi
callq 0x3110
movq 0xb8(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x31c0
jmp 0x62eb
movq 0x110(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x110(%rsp,%rax), %rdi
callq 0x3030
movb %al, 0x97(%rsp)
jmp 0x630d
movb 0x97(%rsp), %al
testb $0x1, %al
jne 0x631d
jmp 0x63e9
movb $0x1, 0x102(%rsp)
movl $0x20, %edi
callq 0x3150
movq %rax, 0x80(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x103(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x34b0
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rdx
leaq 0x226d4(%rip), %rsi     # 0x28a3c
callq 0x3360
jmp 0x636f
movq 0x78(%rsp), %rdi
movb $0x0, 0x102(%rsp)
leaq 0x2d9f5(%rip), %rsi     # 0x33d78
movq 0x2dc1e(%rip), %rdx     # 0x33fa8
callq 0x3460
jmp 0x69b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x699b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0x103(%rsp), %rdi
callq 0x32d0
testb $0x1, 0x102(%rsp)
jne 0x63da
jmp 0x63e4
movq 0x78(%rsp), %rdi
callq 0x3210
jmp 0x699b
movq 0x98(%rsp), %rdi
leaq 0x22027(%rip), %rsi     # 0x2841f
callq 0x1f030
movb %al, 0x77(%rsp)
jmp 0x6403
movb 0x77(%rsp), %al
testb $0x1, %al
jne 0x6410
jmp 0x6535
movq $0x0, 0xf8(%rsp)
movq 0xa0(%rsp), %rdx
movq 0xf8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x6530
leaq 0x110(%rsp), %rdi
leaq 0xf7(%rsp), %rsi
movl $0x1, %edx
callq 0x3320
jmp 0x645f
movzbl 0xf7(%rsp), %eax
movl %eax, 0x70(%rsp)
callq 0x1f060
movw %ax, %cx
movl 0x70(%rsp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jle 0x64e1
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x68(%rsp)
leaq 0x225b7(%rip), %rsi     # 0x28a51
callq 0x30f0
jmp 0x64a1
movq 0x68(%rsp), %rdi
movq 0x2db43(%rip), %rsi     # 0x33ff0
movq 0x2db04(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x69b5
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
callq 0x3210
jmp 0x699b
movq 0xa0(%rsp), %rdi
movzbl 0xf7(%rsp), %eax
movw %ax, 0x5e(%rsp)
movq 0xf8(%rsp), %rsi
callq 0x1f070
movq %rax, 0x60(%rsp)
jmp 0x650a
movq 0x60(%rsp), %rax
movw 0x5e(%rsp), %cx
movw %cx, (%rax)
movq 0xf8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf8(%rsp)
jmp 0x641c
jmp 0x6977
movq 0x98(%rsp), %rdi
leaq 0x21cc0(%rip), %rsi     # 0x28204
callq 0x1f030
movb %al, 0x5d(%rsp)
jmp 0x654f
movb 0x5d(%rsp), %al
testb $0x1, %al
jne 0x655c
jmp 0x6681
movq $0x0, 0xe8(%rsp)
movq 0xa0(%rsp), %rdx
movq 0xe8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x667c
leaq 0x110(%rsp), %rdi
leaq 0xe6(%rsp), %rsi
movl $0x2, %edx
callq 0x3320
jmp 0x65ab
movzwl 0xe6(%rsp), %eax
movl %eax, 0x58(%rsp)
callq 0x1f060
movw %ax, %cx
movl 0x58(%rsp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jle 0x662d
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x50(%rsp)
leaq 0x2246b(%rip), %rsi     # 0x28a51
callq 0x30f0
jmp 0x65ed
movq 0x50(%rsp), %rdi
movq 0x2d9f7(%rip), %rsi     # 0x33ff0
movq 0x2d9b8(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x69b5
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
callq 0x3210
jmp 0x699b
movq 0xa0(%rsp), %rdi
movw 0xe6(%rsp), %ax
movw %ax, 0x46(%rsp)
movq 0xe8(%rsp), %rsi
callq 0x1f070
movq %rax, 0x48(%rsp)
jmp 0x6656
movq 0x48(%rsp), %rax
movw 0x46(%rsp), %cx
movw %cx, (%rax)
movq 0xe8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rsp)
jmp 0x6568
jmp 0x6975
movq 0x98(%rsp), %rdi
leaq 0x22474(%rip), %rsi     # 0x28b04
callq 0x1f030
movb %al, 0x45(%rsp)
jmp 0x669b
movb 0x45(%rsp), %al
testb $0x1, %al
jne 0x66a8
jmp 0x67cc
movq $0x0, 0xd8(%rsp)
movq 0xa0(%rsp), %rdx
movq 0xd8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x67c7
leaq 0x110(%rsp), %rdi
leaq 0xd4(%rsp), %rsi
movl $0x4, %edx
callq 0x3320
jmp 0x66f7
movl 0xd4(%rsp), %eax
movl %eax, 0x40(%rsp)
callq 0x1f060
movw %ax, %cx
movl 0x40(%rsp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jle 0x6778
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x38(%rsp)
leaq 0x22320(%rip), %rsi     # 0x28a51
callq 0x30f0
jmp 0x6738
movq 0x38(%rsp), %rdi
movq 0x2d8ac(%rip), %rsi     # 0x33ff0
movq 0x2d86d(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x69b5
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
callq 0x3210
jmp 0x699b
movq 0xa0(%rsp), %rdi
movw 0xd4(%rsp), %ax
movw %ax, 0x2e(%rsp)
movq 0xd8(%rsp), %rsi
callq 0x1f070
movq %rax, 0x30(%rsp)
jmp 0x67a1
movq 0x30(%rsp), %rax
movw 0x2e(%rsp), %cx
movw %cx, (%rax)
movq 0xd8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd8(%rsp)
jmp 0x66b4
jmp 0x6973
movq 0x98(%rsp), %rdi
leaq 0x222b2(%rip), %rsi     # 0x28a8d
callq 0x1f030
movb %al, 0x2d(%rsp)
jmp 0x67e6
movb 0x2d(%rsp), %al
testb $0x1, %al
jne 0x67f3
jmp 0x6914
movq $0x0, 0xc8(%rsp)
movq 0xa0(%rsp), %rdx
movq 0xc8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x6912
leaq 0x110(%rsp), %rdi
leaq 0xc4(%rsp), %rsi
movl $0x4, %edx
callq 0x3320
jmp 0x6842
movl 0xc4(%rsp), %eax
movl %eax, 0x28(%rsp)
callq 0x1f060
movw %ax, %cx
movl 0x28(%rsp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jle 0x68c3
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
leaq 0x221d5(%rip), %rsi     # 0x28a51
callq 0x30f0
jmp 0x6883
movq 0x20(%rsp), %rdi
movq 0x2d761(%rip), %rsi     # 0x33ff0
movq 0x2d722(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x69b5
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
callq 0x3210
jmp 0x699b
movq 0xa0(%rsp), %rdi
movw 0xc4(%rsp), %ax
movw %ax, 0x16(%rsp)
movq 0xc8(%rsp), %rsi
callq 0x1f070
movq %rax, 0x18(%rsp)
jmp 0x68ec
movq 0x18(%rsp), %rax
movw 0x16(%rsp), %cx
movw %cx, (%rax)
movq 0xc8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc8(%rsp)
jmp 0x67ff
jmp 0x6971
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0x22161(%rip), %rsi     # 0x28a91
callq 0x30f0
jmp 0x6937
movq 0x8(%rsp), %rdi
movq 0x2d6ad(%rip), %rsi     # 0x33ff0
movq 0x2d66e(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x69b5
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
callq 0x3210
jmp 0x699b
jmp 0x6973
jmp 0x6975
jmp 0x6977
leaq 0x110(%rsp), %rdi
callq 0x3080
jmp 0x6986
leaq 0x110(%rsp), %rdi
callq 0x30b0
addq $0x348, %rsp            # imm = 0x348
retq
leaq 0x110(%rsp), %rdi
callq 0x30b0
movq 0x108(%rsp), %rdi
callq 0x34a0
nopw %cs:(%rax,%rax)
nop