// File: spatialfruitsalad[P]volume2position/./tomogram.hpp
// Function: tomogram3d<unsigned short>::write_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>>) const
void write_raw (std::string outfilename, std::string type) const
    {
        std::cout << "write " << outfilename << " ... " << std::flush;
        std::ofstream outfile;
        outfile.open(outfilename.c_str());

        if (type == "uint8_t")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                uint8_t number;
                if (data.at(i) < 0 || data.at(i) > std::numeric_limits<uint8_t>::max())
                    throw std::runtime_error ("Cant't write file: Numbers are to big for selected class type");
                number = uint8_t(data.at(i));
                outfile.write ((char *)&number,sizeof (number));
            }
        }

        else if (type == "uint16_t")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                uint16_t number;
                if (data.at(i) < 0 || data.at(i) > std::numeric_limits<uint16_t>::max())
                    throw std::runtime_error ("Cant't write file: Numbers are to big for selected class type");
                number = uint16_t(data.at(i));
                outfile.write ((char *)&number,sizeof (number));
            }
        }

        else if (type == "uint32_t")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                uint32_t number;
                if (data.at(i) < 0 || data.at(i) > static_cast<uint32_t>(std::numeric_limits<uint32_t>::max()))
                    throw std::runtime_error ("Cant't write file: Numbers are to big for selected class type");
                number = uint32_t(data.at(i));
                outfile.write ((char *)&number,sizeof (number));
            }
        }

        else if (type == "int")
        {
            for (unsigned long i = 0; i<sx*sy*sz; i++)
            {
                int number;
                if (data.at(i) > std::numeric_limits<int>::max())
                    throw std::runtime_error ("Cant't write file: Numbers are to big for selected class type");
                number = int(data.at(i));
                outfile.write ((char *)&number,sizeof (number));
            }
        }
        else
        {
            throw std::runtime_error ("can't write raw type");
        }

        outfile.close();
        std::cout << " done" << std::endl;
    }

// Assembly:
subq $0x338, %rsp            # imm = 0x338
movq %rsi, 0xc0(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rdi, 0x330(%rsp)
movq %rsi, 0x328(%rsp)
movq %rdx, 0x320(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x2c1ea(%rip), %rdi     # 0x33fc0
leaq 0x20ae5(%rip), %rsi     # 0x288c2
callq 0x3290
movq 0xc0(%rsp), %rsi
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
leaq 0x20a98(%rip), %rsi     # 0x28894
callq 0x3290
movq %rax, %rdi
movq 0x2c1bd(%rip), %rsi     # 0x33fc8
callq 0x32c0
leaq 0x120(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x3450
movq 0xc0(%rsp), %rdi
callq 0x3110
movq 0xc8(%rsp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0x3060
jmp 0x7e49
movq 0xb0(%rsp), %rdi
leaq 0x205c7(%rip), %rsi     # 0x2841f
callq 0x1f030
testb $0x1, %al
jne 0x7e66
jmp 0x8003
movq $0x0, 0x108(%rsp)
movq 0xb8(%rsp), %rdx
movq 0x108(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x7ffe
movq 0xb8(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x21220
movq %rax, 0xa8(%rsp)
jmp 0x7eb8
movq 0xa8(%rsp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
jl 0x7f12
movq 0xb8(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x21220
movq %rax, 0xa0(%rsp)
jmp 0x7ee7
movq 0xa0(%rsp), %rax
movzwl (%rax), %eax
movl %eax, 0x9c(%rsp)
callq 0x21260
movb %al, %cl
movl 0x9c(%rsp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
jle 0x7f97
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x90(%rsp)
leaq 0x20b94(%rip), %rsi     # 0x28ac5
callq 0x30f0
jmp 0x7f38
movq 0x90(%rsp), %rdi
movq 0x2c0a9(%rip), %rsi     # 0x33ff0
movq 0x2c06a(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x8521
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x8507
movq 0x90(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x3210
jmp 0x8507
movq 0xb8(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x21220
movq %rax, 0x88(%rsp)
jmp 0x7fb6
movq 0x88(%rsp), %rax
movb (%rax), %al
movb %al, 0x107(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x107(%rsp), %rsi
movl $0x1, %edx
callq 0x3340
jmp 0x7fe3
jmp 0x7fe5
movq 0x108(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x108(%rsp)
jmp 0x7e72
jmp 0x84b6
movq 0xb0(%rsp), %rdi
leaq 0x201f2(%rip), %rsi     # 0x28204
callq 0x1f030
testb $0x1, %al
jne 0x8020
jmp 0x8188
movq $0x0, 0xf8(%rsp)
movq 0xb8(%rsp), %rdx
movq 0xf8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x8183
movq 0xb8(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x21220
movq %rax, 0x80(%rsp)
jmp 0x8072
movq 0x80(%rsp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
jl 0x80bd
movq 0xb8(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x21220
movq %rax, 0x78(%rsp)
jmp 0x809e
movq 0x78(%rsp), %rax
movzwl (%rax), %eax
movl %eax, 0x74(%rsp)
callq 0x1f060
movw %ax, %cx
movl 0x74(%rsp), %eax
movzwl %cx, %ecx
cmpl %ecx, %eax
jle 0x8120
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x68(%rsp)
leaq 0x209ec(%rip), %rsi     # 0x28ac5
callq 0x30f0
jmp 0x80e0
movq 0x68(%rsp), %rdi
movq 0x2bf04(%rip), %rsi     # 0x33ff0
movq 0x2bec5(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x8521
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x3210
jmp 0x8507
movq 0xb8(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x21220
movq %rax, 0x60(%rsp)
jmp 0x813c
movq 0x60(%rsp), %rax
movw (%rax), %ax
movw %ax, 0xf6(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0xf6(%rsp), %rsi
movl $0x2, %edx
callq 0x3340
jmp 0x8168
jmp 0x816a
movq 0xf8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf8(%rsp)
jmp 0x802c
jmp 0x84b4
movq 0xb0(%rsp), %rdi
leaq 0x2096c(%rip), %rsi     # 0x28b03
callq 0x1f030
testb $0x1, %al
jne 0x81a5
jmp 0x8302
movq $0x0, 0xe8(%rsp)
movq 0xb8(%rsp), %rdx
movq 0xe8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x82fd
movq 0xb8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x21220
movq %rax, 0x58(%rsp)
jmp 0x81f4
movq 0x58(%rsp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
jl 0x8238
movq 0xb8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x21220
movq %rax, 0x50(%rsp)
jmp 0x821d
movq 0x50(%rsp), %rax
movzwl (%rax), %eax
movl %eax, 0x4c(%rsp)
callq 0x21270
movl %eax, %ecx
movl 0x4c(%rsp), %eax
cmpl %ecx, %eax
jbe 0x829b
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x40(%rsp)
leaq 0x20871(%rip), %rsi     # 0x28ac5
callq 0x30f0
jmp 0x825b
movq 0x40(%rsp), %rdi
movq 0x2bd89(%rip), %rsi     # 0x33ff0
movq 0x2bd4a(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x8521
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x3210
jmp 0x8507
movq 0xb8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x21220
movq %rax, 0x38(%rsp)
jmp 0x82b7
movq 0x38(%rsp), %rax
movzwl (%rax), %eax
movl %eax, 0xe4(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0xe4(%rsp), %rsi
movl $0x4, %edx
callq 0x3340
jmp 0x82e2
jmp 0x82e4
movq 0xe8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rsp)
jmp 0x81b1
jmp 0x84b2
movq 0xb0(%rsp), %rdi
leaq 0x2077c(%rip), %rsi     # 0x28a8d
callq 0x1f030
testb $0x1, %al
jne 0x831f
jmp 0x8450
movq $0x0, 0xd8(%rsp)
movq 0xb8(%rsp), %rdx
movq 0xd8(%rsp), %rax
movq 0x18(%rdx), %rcx
imulq 0x20(%rdx), %rcx
imulq 0x28(%rdx), %rcx
cmpq %rcx, %rax
jae 0x844e
movq 0xb8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x21220
movq %rax, 0x30(%rsp)
jmp 0x836e
movq 0x30(%rsp), %rax
movzwl (%rax), %eax
movl %eax, 0x2c(%rsp)
callq 0x21280
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jle 0x83ec
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
leaq 0x20720(%rip), %rsi     # 0x28ac5
callq 0x30f0
jmp 0x83ac
movq 0x20(%rsp), %rdi
movq 0x2bc38(%rip), %rsi     # 0x33ff0
movq 0x2bbf9(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x8521
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x3210
jmp 0x8507
movq 0xb8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x21220
movq %rax, 0x18(%rsp)
jmp 0x8408
movq 0x18(%rsp), %rax
movzwl (%rax), %eax
movl %eax, 0xd4(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0xd4(%rsp), %rsi
movl $0x4, %edx
callq 0x3340
jmp 0x8433
jmp 0x8435
movq 0xd8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd8(%rsp)
jmp 0x832b
jmp 0x84b0
movl $0x10, %edi
callq 0x3150
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0x206a0(%rip), %rsi     # 0x28b0c
callq 0x30f0
jmp 0x8473
movq 0x10(%rsp), %rdi
movq 0x2bb71(%rip), %rsi     # 0x33ff0
movq 0x2bb32(%rip), %rdx     # 0x33fb8
callq 0x3460
jmp 0x8521
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x3210
jmp 0x8507
jmp 0x84b2
jmp 0x84b4
jmp 0x84b6
leaq 0x120(%rsp), %rdi
callq 0x3370
jmp 0x84c5
movq 0x2baf4(%rip), %rdi     # 0x33fc0
leaq 0x20377(%rip), %rsi     # 0x2884a
callq 0x3290
movq %rax, 0x8(%rsp)
jmp 0x84df
movq 0x8(%rsp), %rdi
movq 0x2bab5(%rip), %rsi     # 0x33fa0
callq 0x32c0
jmp 0x84f2
leaq 0x120(%rsp), %rdi
callq 0x3390
addq $0x338, %rsp            # imm = 0x338
retq
leaq 0x120(%rsp), %rdi
callq 0x3390
movq 0x118(%rsp), %rdi
callq 0x34a0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)