// File: /workspace/github_cpp_makefile_star2_O3/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 0x15aa6(%rip), %r12     # 0x1cfc8
leaq 0x1040c(%rip), %rsi     # 0x17935
movl $0x6, %edx
movq %r12, %rdi
callq 0x32f0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x32f0
movq %rax, %r12
leaq 0x103b8(%rip), %rsi     # 0x17907
movl $0x5, %edx
movq %rax, %rdi
callq 0x32f0
movq %r12, %rdi
callq 0x31e0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x3400
movq (%r15), %rsi
movq %r12, %rdi
movl $0x10, %edx
callq 0x3050
leaq 0xff0a(%rip), %rsi      # 0x17492
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x764b
leaq 0xfcd8(%rip), %rsi      # 0x17277
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x76c4
leaq 0x105ea(%rip), %rsi     # 0x17ba0
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
je 0x7730
leaq 0x1055d(%rip), %rsi     # 0x17b2a
movq %r14, %rdi
callq 0x30a0
testl %eax, %eax
jne 0x789e
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x7795
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 0x786b
movzwl (%rax,%r14,2), %eax
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3350
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x7601
jmp 0x7795
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x7795
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 0x785a
movzwl (%rax,%r14,2), %eax
cmpl $0x100, %eax            # imm = 0x100
jae 0x7826
movb %al, 0x4(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3350
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x766f
jmp 0x7795
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x7795
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 0x787c
movzwl (%rax,%r14,2), %eax
movw %ax, 0x4(%rsp)
movl $0x2, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3350
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x76e8
jmp 0x7795
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
je 0x7795
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 0x788d
movzwl (%rax,%r14,2), %eax
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3350
movq 0x20(%rbx), %rax
imulq 0x18(%rbx), %rax
incq %r14
imulq 0x28(%rbx), %rax
cmpq %rax, %r14
jb 0x7750
leaq 0x8(%rsp), %rdi
callq 0x3360
movq 0x15822(%rip), %rbx     # 0x1cfc8
leaq 0x10110(%rip), %rsi     # 0x178bd
movl $0x5, %edx
movq %rbx, %rdi
callq 0x32f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x32a0
movsbl %al, %esi
movq 0x157f0(%rip), %rdi     # 0x1cfc8
callq 0x3040
movq %rax, %rdi
callq 0x31e0
movq 0x157cc(%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 0x3250
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 0x10328(%rip), %rsi     # 0x17b62
movq %rax, %rdi
callq 0x30e0
movq 0x157a7(%rip), %rsi     # 0x1cff0
movq 0x15770(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3410
jmp 0x78d0
leaq 0xfef8(%rip), %rdi      # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
leaq 0xfee7(%rip), %rdi      # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
leaq 0xfed6(%rip), %rdi      # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
leaq 0xfec5(%rip), %rdi      # 0x17759
movq %r14, %rsi
xorl %eax, %eax
callq 0x3390
movl $0x10, %edi
callq 0x3150
movq %rax, %r14
leaq 0x102f7(%rip), %rsi     # 0x17ba9
movq %rax, %rdi
callq 0x30e0
movq 0x1572f(%rip), %rsi     # 0x1cff0
movq 0x156f8(%rip), %rdx     # 0x1cfc0
movq %r14, %rdi
callq 0x3410
jmp 0x78d6
jmp 0x78ef
jmp 0x78ef
movq %rax, %rbx
movq %r14, %rdi
callq 0x3210
jmp 0x78f2
jmp 0x78ef
jmp 0x78ef
jmp 0x78ef
jmp 0x78ef
jmp 0x78ef
jmp 0x78ef
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3380
movq %rbx, %rdi
callq 0x3430