// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x159bc(%rip), %r12     # 0x1cfc8
leaq 0x10332(%rip), %rsi     # 0x17945
movl $0x6, %edx
movq %r12, %rdi
callq 0x3300
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x3300
movq %rax, %r12
leaq 0x102de(%rip), %rsi     # 0x17917
movl $0x5, %edx
movq %rax, %rdi
callq 0x3300
movq %r12, %rdi
callq 0x31e0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x3410
movq (%r15), %rsi
movq %r12, %rdi
movl $0x10, %edx
callq 0x3050
leaq 0xfe30(%rip), %rsi      # 0x174a2
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x7735
leaq 0xfbfe(%rip), %rsi      # 0x17287
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x77ae
leaq 0x10510(%rip), %rsi     # 0x17bb0
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x781a
leaq 0x10483(%rip), %rsi     # 0x17b3a
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x7988
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x787f
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x7955
movzwl (%rax,%r14,2), %eax
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x76eb
jmp 0x787f
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x787f
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x7944
movzwl (%rax,%r14,2), %eax
cmpl $0x100, %eax            # imm = 0x100
jae 0x7910
movb %al, 0x4(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x7759
jmp 0x787f
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x787f
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x7966
movzwl (%rax,%r14,2), %eax
movw %ax, 0x4(%rsp)
movl $0x2, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x77d2
jmp 0x787f
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x787f
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq %rdx
cmpq %r14, %rdx
jbe 0x7977
movzwl (%rax,%r14,2), %eax
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x783a
leaq 0x8(%rsp), %rdi
callq 0x3370
movq 0x15738(%rip), %rbx     # 0x1cfc8
leaq 0x10036(%rip), %rsi     # 0x178cd
movl $0x5, %edx
movq %rbx, %rdi
callq 0x3300
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq 0x15706(%rip), %rdi     # 0x1cfc8
callq 0x3040
movq %rax, %rdi
callq 0x31e0
movq 0x156e2(%rip), %rax     # 0x1cfb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x3260
leaq 0x100(%rsp), %rdi
callq 0x30c0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x1024e(%rip), %rsi     # 0x17b72
movq %rax, %rdi
callq 0x30e0
movq 0x156bd(%rip), %rsi     # 0x1cff0
movq 0x15686(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3420
jmp 0x79ba
leaq 0xfe1e(%rip), %rdi      # 0x17769
movq %r14, %rsi
xorl %eax, %eax
callq 0x33a0
leaq 0xfe0d(%rip), %rdi      # 0x17769
movq %r14, %rsi
xorl %eax, %eax
callq 0x33a0
leaq 0xfdfc(%rip), %rdi      # 0x17769
movq %r14, %rsi
xorl %eax, %eax
callq 0x33a0
leaq 0xfdeb(%rip), %rdi      # 0x17769
movq %r14, %rsi
xorl %eax, %eax
callq 0x33a0
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x1021d(%rip), %rsi     # 0x17bb9
movq %rax, %rdi
callq 0x30e0
movq 0x15645(%rip), %rsi     # 0x1cff0
movq 0x1560e(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3420
jmp 0x79c0
jmp 0x79d9
jmp 0x79d9
movq %rax, %rbx
movq %r14, %rdi
callq 0x3210
jmp 0x79dc
jmp 0x79d9
jmp 0x79d9
jmp 0x79d9
jmp 0x79d9
jmp 0x79d9
jmp 0x79d9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3390
movq %rbx, %rdi
callq 0x3440