// File: /workspace/github_cpp_makefile_star2_O2/spatialfruitsalad[P]volume2position/label2color.cpp
// Function: main
int main( int argc, char *argv[] )
{

///////////////////////////////
// Parse command line arguments
///////////////////////////////
    if (argc != 5)
    {
        std::cerr << "wrong number of Command line arguments" << std::endl;
        std::cerr << "label2color [inFileName] [nx] [ny] [nz]";
        return 0;
    }

    std::string inFileName = argv[1];

    // the size of the tomogram
    unsigned long  nx = atoi(argv[2]);
    unsigned long  ny = atoi(argv[3]);
    unsigned long  nz = atoi(argv[4]);

///////////////////////////////
// Load Tomogram
///////////////////////////////
    std::cout << "loading tomogram from " << inFileName << std::endl;

    tomogram3d<uint16_t> original;
    original.read_raw(inFileName, "uint16_t", nx, ny, nz);

    std::cout << "tomogram successfully loaded" << std::endl;
    
    original.write_ppm(inFileName + "_51.ppm", 51);    
    original.write_ppm(inFileName + "_100.ppm", 100);    
    original.write_ppm(inFileName + "_255.ppm", 255);    
    original.write_ppm(inFileName + "_400.ppm", 400);    

    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
cmpl $0x5, %edi
jne 0x263e
movq %rsi, %r14
movq 0x8(%rsi), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x20b0
movq 0x10(%r14), %rdi
callq 0x2260
movl %eax, %ebx
movq 0x18(%r14), %rdi
callq 0x2260
movl %eax, %ebp
movq 0x20(%r14), %rdi
callq 0x2260
movl %eax, %r14d
movq 0x3b39(%rip), %rdi      # 0x5fc8
leaq 0x1c59(%rip), %rsi      # 0x40ef
callq 0x21a0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2200
leaq 0x1c2f(%rip), %rsi      # 0x4106
leaq 0xe0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20b0
movslq %ebx, %rcx
movslq %ebp, %r8
movslq %r14d, %r9
leaq 0x30(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x26f2
leaq 0xe0(%rsp), %rdi
callq 0x2318
leaq 0x100(%rsp), %rdi
callq 0x2318
movq 0x3a9b(%rip), %rdi      # 0x5fc8
leaq 0x1bdb(%rip), %rsi      # 0x410f
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
leaq 0x1be4(%rip), %rdx      # 0x412c
leaq 0xc0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2ecc
leaq 0x30(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
pushq $0x33
popq %rdx
callq 0x2a62
leaq 0xc0(%rsp), %rdi
callq 0x2318
leaq 0x1bb1(%rip), %rdx      # 0x4134
leaq 0xa0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2ecc
leaq 0x30(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
pushq $0x64
popq %rdx
callq 0x2a62
leaq 0xa0(%rsp), %rdi
callq 0x2318
leaq 0x1b7f(%rip), %rdx      # 0x413d
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2ecc
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0xff, %edx
callq 0x2a62
leaq 0x80(%rsp), %rdi
callq 0x2318
leaq 0x1b4b(%rip), %rdx      # 0x4146
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2ecc
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movl $0x190, %edx            # imm = 0x190
callq 0x2a62
leaq 0x60(%rsp), %rdi
callq 0x2318
leaq 0x30(%rsp), %rdi
callq 0x2f10
leaq 0x10(%rsp), %rdi
callq 0x2318
jmp 0x266b
movq 0x39a3(%rip), %rbx      # 0x5fe8
leaq 0x1a54(%rip), %rsi      # 0x40a0
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
leaq 0x1a64(%rip), %rsi      # 0x40c7
movq %rbx, %rdi
callq 0x21a0
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x26c7
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x26c7
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
jmp 0x26c7
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x26c7
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x2318
jmp 0x26bf
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x2318
jmp 0x26d6
movq %rax, %rbx
jmp 0x26e0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2f10
leaq 0x10(%rsp), %rdi
callq 0x2318
movq %rbx, %rdi
callq 0x22e0