// File: /workspace/github_cpp_makefile_star2_O2/gulamf[P]NRF24LE1Flash/main.cpp
// Function: processCommandLine(int, char**)
bool processCommandLine(int argc, char **argv) {
    int i;
    for(i=1;i<argc;i++) {
        if(strcmp(argv[i],"-f")==0) {
            if( i + 1 == argc ) {
                cout << "Error: hex file not specified.\n";
                usage();
            } else {
                hexfile = argv[i+1];
            }
        }
        if(strcmp(argv[i],"-p")==0) {
            if( i + 1 == argc ) {
                cout << "Error: port not specified.\n";
            } else {
                port = argv[i+1];
            }
        }
        if(strcmp(argv[i],"-b")==0) {
            if( i + 1 == argc ) {
                cout << "Error: baudrate not specified.\n";
            } else {
                if(strcmp(argv[i+1],"50")==0) { baudrate = B50; continue;};
                if(strcmp(argv[i+1],"75")==0) { baudrate = B75; continue;};
                if(strcmp(argv[i+1],"110")==0) { baudrate = B110; continue;};
                if(strcmp(argv[i+1],"134")==0) { baudrate = B134; continue;};
                if(strcmp(argv[i+1],"150")==0) { baudrate = B150; continue;};
                if(strcmp(argv[i+1],"200")==0) { baudrate = B200; continue;};
                if(strcmp(argv[i+1],"300")==0) { baudrate = B300; continue;};
                if(strcmp(argv[i+1],"600")==0) { baudrate = B600; continue;};
                if(strcmp(argv[i+1],"1200")==0) { baudrate = B1200; continue;};
                if(strcmp(argv[i+1],"1800")==0) { baudrate = B1800; continue;};
                if(strcmp(argv[i+1],"2400")==0) { baudrate = B2400; continue;};
                if(strcmp(argv[i+1],"4800")==0) { baudrate = B4800; continue;};
                if(strcmp(argv[i+1],"9600")==0) { baudrate = B9600; continue;};
                if(strcmp(argv[i+1],"19200")==0) { baudrate = B19200; continue;};
                if(strcmp(argv[i+1],"38400")==0) { baudrate = B38400; continue;};
                if(strcmp(argv[i+1],"57600")==0) { baudrate = B57600; continue;};
                if(strcmp(argv[i+1],"115200")==0) { baudrate = B115200; continue;};
                if(strcmp(argv[i+1],"230400")==0) { baudrate = B230400; continue;};
                if(strcmp(argv[i+1],"460800")==0) { baudrate = B460800; continue;};
                if(strcmp(argv[i+1],"500000")==0) { baudrate = B500000; continue;};
                if(strcmp(argv[i+1],"576000")==0) { baudrate = B576000; continue;};
                if(strcmp(argv[i+1],"921600")==0) { baudrate = B921600; continue;};
                if(strcmp(argv[i+1],"1000000")==0) { baudrate = B1000000; continue;};
                if(strcmp(argv[i+1],"1152000")==0) { baudrate = B1152000; continue;};
                if(strcmp(argv[i+1],"1500000")==0) { baudrate = B1500000; continue;};
                if(strcmp(argv[i+1],"2000000")==0) { baudrate = B2000000; continue;};
                if(strcmp(argv[i+1],"2500000")==0) { baudrate = B2500000; continue;};
                if(strcmp(argv[i+1],"3000000")==0) { baudrate = B3000000; continue;};
                if(strcmp(argv[i+1],"3500000")==0) { baudrate = B3500000; continue;};
                if(strcmp(argv[i+1],"4000000")==0) { baudrate = B4000000; continue;};
                cout << "Error: invalid baudrate " << argv[i+1] << "\n";
                return false;
            }
        }
        if(strcmp(argv[i],"-r")==0) {
            if( i + 1 == argc ) {
                cout << "Error: reset not specified.\n";
                return false;
            } else {
                if(strcmp(argv[i+1],"DTR")==0) { resetpin = DTR; continue; };
                if(strcmp(argv[i+1],"RTS")==0) { resetpin = RTS; continue; };
                if(strcmp(argv[i+1],"CTS")==0) { resetpin = CTS; continue; };
                cout << "Error: invalid reset specified " << argv[i+1] << "\n";
                return false;
            }
        }
        if(strcmp(argv[i],"-bl")==0) {
            if( i + 1 == argc ) {
                cout << "Error: reset not specified.\n";
                return false;
            } else {

                if(strcmp(argv[i+1],"DISABLED")==0) { blenabled = DISABLED; continue; };
                if(strcmp(argv[i+1],"DTR")==0) { blenabled = DTR; continue; };
                if(strcmp(argv[i+1],"RTS")==0) { blenabled = RTS; continue; };
                cout << "Error: invalid blenabled specified " << argv[i+1] << "\n";
                return false;
            }
        }
        if(strcmp(argv[i],"-c")==0) {
            if( i + 1 == argc ) {
                cout << "Error: command not specified.\n";
                return false;
            } else {

                if(strcmp(argv[i+1],"CHECK")==0) { command = C_CHECK; continue; };
                if(strcmp(argv[i+1],"FLASH")==0) { command = C_FLASH; continue; };
                cout << "Error: invalid command specified " << argv[i+1] << "\n";
                return false;
            }
        }
        if(strcmp(argv[i],"-h")==0 | strcmp(argv[i],"--help")==0 ) {
            usage();
            exit(0);
        }
    }
    if(hexfile.compare("")==0 && command == C_FLASH) {
        cout<< "Error: hexfile not specified\n";
        return 0;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movslq %edi, %r14
movl %r14d, %eax
movq %rax, -0x30(%rbp)
pushq $0x1
popq %r12
cmpq %r14, %r12
jge 0x2f19
movq (%rbx,%r12,8), %rax
cmpb $0x2d, (%rax)
jne 0x27b8
cmpb $0x66, 0x1(%rax)
jne 0x27b8
cmpb $0x0, 0x2(%rax)
jne 0x27b8
leaq 0x1(%r12), %rax
cmpq -0x30(%rbp), %rax
jne 0x27a7
movq 0x6844(%rip), %rdi      # 0x8fd8
leaq 0x3a3a(%rip), %rsi      # 0x61d5
callq 0x2200
callq 0x269c
jmp 0x27b8
movq 0x8(%rbx,%r12,8), %rsi
leaq 0x6b1d(%rip), %rdi      # 0x92d0
callq 0x23b0
movq (%rbx,%r12,8), %rax
cmpb $0x2d, (%rax)
jne 0x27fe
cmpb $0x70, 0x1(%rax)
jne 0x27fe
cmpb $0x0, 0x2(%rax)
jne 0x27fe
leaq 0x1(%r12), %rax
cmpq -0x30(%rbp), %rax
jne 0x27ed
movq 0x67f9(%rip), %rdi      # 0x8fd8
leaq 0x3a0f(%rip), %rsi      # 0x61f5
callq 0x2200
jmp 0x27fe
movq 0x8(%rbx,%r12,8), %rsi
leaq 0x6af7(%rip), %rdi      # 0x92f0
callq 0x23b0
movq (%rbx,%r12,8), %r13
cmpb $0x2d, (%r13)
jne 0x28d4
cmpb $0x62, 0x1(%r13)
jne 0x281f
cmpb $0x0, 0x2(%r13)
je 0x28a3
movb $0x1, %r15b
cmpb $0x72, 0x1(%r13)
jne 0x28d7
cmpb $0x0, 0x2(%r13)
jne 0x28d7
leaq 0x1(%r12), %r15
cmpq -0x30(%rbp), %r15
je 0x2f4d
movq 0x8(%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x3aaf(%rip), %rsi      # 0x6305
callq 0x22b0
testl %eax, %eax
je 0x2a46
movq %r13, %rdi
leaq 0x3a9c(%rip), %rsi      # 0x6309
callq 0x22b0
testl %eax, %eax
je 0x2a67
movq %r13, %rdi
leaq 0x3a89(%rip), %rsi      # 0x630d
callq 0x22b0
testl %eax, %eax
jne 0x2fbd
movl $0x3, 0x6969(%rip)      # 0x9204
movq %r15, %r12
jmp 0x2764
leaq 0x1(%r12), %r15
cmpq -0x30(%rbp), %r15
jne 0x2a12
movq 0x671f(%rip), %rdi      # 0x8fd8
leaq 0x3951(%rip), %rsi      # 0x6211
callq 0x2200
movq (%rbx,%r12,8), %r13
cmpb $0x2d, (%r13)
je 0x281f
xorl %r15d, %r15d
movq %r13, %rdi
leaq 0x3a50(%rip), %rsi      # 0x6331
callq 0x22b0
testl %eax, %eax
je 0x293e
testb %r15b, %r15b
je 0x2913
cmpb $0x63, 0x1(%r13)
jne 0x2901
cmpb $0x0, 0x2(%r13)
je 0x29c2
cmpb $0x68, 0x1(%r13)
jne 0x2913
cmpb $0x0, 0x2(%r13)
sete %r15b
jmp 0x2916
xorl %r15d, %r15d
movq %r13, %rdi
leaq 0x3a8f(%rip), %rsi      # 0x63af
callq 0x22b0
testb %r15b, %r15b
jne 0x2fcd
testl %eax, %eax
je 0x2fcd
incq %r12
jmp 0x2764
leaq 0x1(%r12), %r15
cmpq -0x30(%rbp), %r15
je 0x2f4d
movq 0x8(%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x39d9(%rip), %rsi      # 0x6335
callq 0x22b0
testl %eax, %eax
je 0x29a1
movq %r13, %rdi
leaq 0x3996(%rip), %rsi      # 0x6305
callq 0x22b0
testl %eax, %eax
je 0x29b0
movq %r13, %rdi
leaq 0x3987(%rip), %rsi      # 0x6309
callq 0x22b0
testl %eax, %eax
jne 0x2f5d
movl $0x2, 0x6977(%rip)      # 0x9310
movq %r15, %r12
jmp 0x2764
andl $0x0, 0x6968(%rip)      # 0x9310
movq %r15, %r12
jmp 0x2764
movl $0x1, 0x6956(%rip)      # 0x9310
movq %r15, %r12
jmp 0x2764
leaq 0x1(%r12), %r15
cmpq -0x30(%rbp), %r15
je 0x2f89
movq 0x8(%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x39a1(%rip), %rsi      # 0x6381
callq 0x22b0
testl %eax, %eax
je 0x2a58
movq %r13, %rdi
leaq 0x3994(%rip), %rsi      # 0x6387
callq 0x22b0
testl %eax, %eax
jne 0x2fad
movl $0x1, 0x690a(%rip)      # 0x9314
movq %r15, %r12
jmp 0x2764
movq 0x8(%rbx,%r12,8), %r13
movzbl (%r13), %eax
cmpl $0x37, %eax
je 0x2a79
cmpl $0x35, %eax
jne 0x2a8b
cmpb $0x30, 0x1(%r13)
jne 0x2a8b
cmpb $0x0, 0x2(%r13)
jne 0x2a8b
movl $0x1, 0x67c2(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x1, 0x67b4(%rip)      # 0x9204
movq %r15, %r12
jmp 0x2764
andl $0x0, 0x68b5(%rip)      # 0x9314
movq %r15, %r12
jmp 0x2764
movl $0x2, 0x6793(%rip)      # 0x9204
movq %r15, %r12
jmp 0x2764
cmpb $0x35, 0x1(%r13)
jne 0x2a8b
cmpb $0x0, 0x2(%r13)
je 0x2d69
movq %r13, %rdi
leaq 0x379c(%rip), %rsi      # 0x6231
callq 0x22b0
testl %eax, %eax
je 0x2d21
movq %r13, %rdi
leaq 0x3789(%rip), %rsi      # 0x6235
callq 0x22b0
testl %eax, %eax
je 0x2d33
movq %r13, %rdi
leaq 0x3776(%rip), %rsi      # 0x6239
callq 0x22b0
testl %eax, %eax
je 0x2d45
movq %r13, %rdi
leaq 0x3768(%rip), %rsi      # 0x6242
callq 0x22b0
testl %eax, %eax
je 0x2d57
movq %r13, %rdi
leaq 0x374c(%rip), %rsi      # 0x623d
callq 0x22b0
testl %eax, %eax
je 0x2d7b
movq %r13, %rdi
leaq 0x3783(%rip), %rsi      # 0x628b
callq 0x22b0
testl %eax, %eax
je 0x2d8d
movq %r13, %rdi
leaq 0x3722(%rip), %rsi      # 0x6241
callq 0x22b0
testl %eax, %eax
je 0x2d9f
movq %r13, %rdi
leaq 0x3710(%rip), %rsi      # 0x6246
callq 0x22b0
testl %eax, %eax
je 0x2db1
movq %r13, %rdi
leaq 0x36fe(%rip), %rsi      # 0x624b
callq 0x22b0
testl %eax, %eax
je 0x2dc3
movq %r13, %rdi
leaq 0x36ec(%rip), %rsi      # 0x6250
callq 0x22b0
testl %eax, %eax
je 0x2dd5
movq %r13, %rdi
leaq 0x36da(%rip), %rsi      # 0x6255
callq 0x22b0
testl %eax, %eax
je 0x2de7
movq %r13, %rdi
leaq 0x36c8(%rip), %rsi      # 0x625a
callq 0x22b0
testl %eax, %eax
je 0x2df9
movq %r13, %rdi
leaq 0x36b7(%rip), %rsi      # 0x6260
callq 0x22b0
testl %eax, %eax
je 0x2e0b
movq %r13, %rdi
leaq 0x36a6(%rip), %rsi      # 0x6266
callq 0x22b0
testl %eax, %eax
je 0x2e1d
movq %r13, %rdi
leaq 0x3695(%rip), %rsi      # 0x626c
callq 0x22b0
testl %eax, %eax
je 0x2e2f
movq %r13, %rdi
leaq 0x3685(%rip), %rsi      # 0x6273
callq 0x22b0
testl %eax, %eax
je 0x2e41
movq %r13, %rdi
leaq 0x3675(%rip), %rsi      # 0x627a
callq 0x22b0
testl %eax, %eax
je 0x2e53
movq %r13, %rdi
leaq 0x3684(%rip), %rsi      # 0x62a0
callq 0x22b0
testl %eax, %eax
je 0x2e65
movq %r13, %rdi
leaq 0x364e(%rip), %rsi      # 0x6281
callq 0x22b0
testl %eax, %eax
je 0x2e77
movq %r13, %rdi
leaq 0x363e(%rip), %rsi      # 0x6288
callq 0x22b0
testl %eax, %eax
je 0x2e89
movq %r13, %rdi
leaq 0x362e(%rip), %rsi      # 0x628f
callq 0x22b0
testl %eax, %eax
je 0x2e9b
movq %r13, %rdi
leaq 0x361f(%rip), %rsi      # 0x6297
callq 0x22b0
testl %eax, %eax
je 0x2ead
movq %r13, %rdi
leaq 0x3610(%rip), %rsi      # 0x629f
callq 0x22b0
testl %eax, %eax
je 0x2ebf
movq %r13, %rdi
leaq 0x3601(%rip), %rsi      # 0x62a7
callq 0x22b0
testl %eax, %eax
je 0x2ed1
movq %r13, %rdi
leaq 0x35f2(%rip), %rsi      # 0x62af
callq 0x22b0
testl %eax, %eax
je 0x2ee3
movq %r13, %rdi
leaq 0x35e3(%rip), %rsi      # 0x62b7
callq 0x22b0
testl %eax, %eax
je 0x2ef5
movq %r13, %rdi
leaq 0x35d4(%rip), %rsi      # 0x62bf
callq 0x22b0
testl %eax, %eax
je 0x2f07
movq %r13, %rdi
leaq 0x35c5(%rip), %rsi      # 0x62c7
callq 0x22b0
testl %eax, %eax
jne 0x2fd9
movl $0x100f, 0x64e7(%rip)   # imm = 0x100F
movq %r15, %r12
jmp 0x2764
movl $0x3, 0x64d5(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x4, 0x64c3(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x5, 0x64b1(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x6, 0x649f(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x2, 0x648d(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x7, 0x647b(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x8, 0x6469(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x9, 0x6457(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0xa, 0x6445(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0xb, 0x6433(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0xc, 0x6421(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0xd, 0x640f(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0xe, 0x63fd(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0xf, 0x63eb(%rip)      # 0x9200
movq %r15, %r12
jmp 0x2764
movl $0x1001, 0x63d9(%rip)   # imm = 0x1001
movq %r15, %r12
jmp 0x2764
movl $0x1002, 0x63c7(%rip)   # imm = 0x1002
movq %r15, %r12
jmp 0x2764
movl $0x1003, 0x63b5(%rip)   # imm = 0x1003
movq %r15, %r12
jmp 0x2764
movl $0x1004, 0x63a3(%rip)   # imm = 0x1004
movq %r15, %r12
jmp 0x2764
movl $0x1005, 0x6391(%rip)   # imm = 0x1005
movq %r15, %r12
jmp 0x2764
movl $0x1006, 0x637f(%rip)   # imm = 0x1006
movq %r15, %r12
jmp 0x2764
movl $0x1007, 0x636d(%rip)   # imm = 0x1007
movq %r15, %r12
jmp 0x2764
movl $0x1008, 0x635b(%rip)   # imm = 0x1008
movq %r15, %r12
jmp 0x2764
movl $0x1009, 0x6349(%rip)   # imm = 0x1009
movq %r15, %r12
jmp 0x2764
movl $0x100a, 0x6337(%rip)   # imm = 0x100A
movq %r15, %r12
jmp 0x2764
movl $0x100b, 0x6325(%rip)   # imm = 0x100B
movq %r15, %r12
jmp 0x2764
movl $0x100c, 0x6313(%rip)   # imm = 0x100C
movq %r15, %r12
jmp 0x2764
movl $0x100d, 0x6301(%rip)   # imm = 0x100D
movq %r15, %r12
jmp 0x2764
movl $0x100e, 0x62ef(%rip)   # imm = 0x100E
movq %r15, %r12
jmp 0x2764
leaq 0x63b0(%rip), %rdi      # 0x92d0
leaq 0x3b2a(%rip), %rsi      # 0x6a51
callq 0x20c0
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x2f9e
cmpl $0x1, 0x63d9(%rip)      # 0x9314
jne 0x2f9e
movq 0x6094(%rip), %rdi      # 0x8fd8
leaq 0x346b(%rip), %rsi      # 0x63b6
jmp 0x2f97
movq 0x6084(%rip), %rdi      # 0x8fd8
leaq 0x338d(%rip), %rsi      # 0x62e8
jmp 0x2f97
movq 0x6074(%rip), %rdi      # 0x8fd8
leaq 0x33d3(%rip), %rsi      # 0x633e
callq 0x2200
movq 0x8(%rbx,%r12,8), %rsi
movq %rax, %rdi
callq 0x2200
leaq 0x3acc(%rip), %rsi      # 0x6a50
movq %rax, %rdi
jmp 0x2f97
movq 0x6048(%rip), %rdi      # 0x8fd8
leaq 0x33cb(%rip), %rsi      # 0x6362
callq 0x2200
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6024(%rip), %rdi      # 0x8fd8
leaq 0x33d2(%rip), %rsi      # 0x638d
jmp 0x2f6b
movq 0x6014(%rip), %rdi      # 0x8fd8
leaq 0x3346(%rip), %rsi      # 0x6311
jmp 0x2f6b
callq 0x269c
xorl %edi, %edi
callq 0x2260
movq 0x5ff8(%rip), %rdi      # 0x8fd8
leaq 0x32e8(%rip), %rsi      # 0x62cf
jmp 0x2f6b