// File: /workspace/github_cpp_makefile_star2_O3/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
cmpl $0x2, %edi
jl 0x30da
movq %rsi, %rbx
movl %edi, %r15d
movl $0x1, %r12d
movq (%rbx,%r12,8), %rax
cmpb $0x2d, (%rax)
jne 0x2995
cmpb $0x66, 0x1(%rax)
jne 0x2995
cmpb $0x0, 0x2(%rax)
jne 0x2995
leaq 0x1(%r12), %rax
cmpq %r15, %rax
jne 0x296a
movl $0x1f, %edx
movq 0x7681(%rip), %rdi      # 0x9fd8
leaq 0x4877(%rip), %rsi      # 0x71d5
callq 0x2270
callq 0x282c
jmp 0x2995
movq 0x8(%rbx,%r12,8), %r13
movq 0x7962(%rip), %r14      # 0xa2d8
movq %r13, %rdi
callq 0x2110
leaq 0x794b(%rip), %rdi      # 0xa2d0
xorl %esi, %esi
movq %r14, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x2310
movq (%rbx,%r12,8), %rax
cmpb $0x2d, (%rax)
jne 0x29f9
cmpb $0x70, 0x1(%rax)
jne 0x29f9
cmpb $0x0, 0x2(%rax)
jne 0x29f9
leaq 0x1(%r12), %rax
cmpq %r15, %rax
jne 0x29ce
movl $0x1b, %edx
movq 0x7618(%rip), %rdi      # 0x9fd8
leaq 0x482e(%rip), %rsi      # 0x71f5
callq 0x2270
jmp 0x29f9
movq 0x8(%rbx,%r12,8), %r14
movq 0x791e(%rip), %r13      # 0xa2f8
movq %r14, %rdi
callq 0x2110
leaq 0x7907(%rip), %rdi      # 0xa2f0
xorl %esi, %esi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2310
movq (%rbx,%r12,8), %r13
cmpb $0x2d, (%r13)
jne 0x2a67
cmpb $0x62, 0x1(%r13)
jne 0x2a16
cmpb $0x0, 0x2(%r13)
je 0x2b20
movb $0x1, %r14b
cmpb $0x72, 0x1(%r13)
jne 0x2a2b
cmpb $0x0, 0x2(%r13)
je 0x2b5d
movq %r13, %rdi
leaq 0x48fc(%rip), %rsi      # 0x7331
callq 0x22b0
testl %eax, %eax
je 0x2ab4
testb %r14b, %r14b
je 0x2a7a
cmpb $0x63, 0x1(%r13)
jne 0x2a55
cmpb $0x0, 0x2(%r13)
je 0x2c23
cmpb $0x68, 0x1(%r13)
jne 0x2a7a
cmpb $0x0, 0x2(%r13)
sete %r14b
jmp 0x2a7d
movq %r13, %rdi
leaq 0x48c0(%rip), %rsi      # 0x7331
callq 0x22b0
testl %eax, %eax
je 0x2ab4
xorl %r14d, %r14d
movq %r13, %rdi
leaq 0x4928(%rip), %rsi      # 0x73af
callq 0x22b0
testb %r14b, %r14b
jne 0x31fa
testl %eax, %eax
je 0x31fa
incq %r12
movq %r12, %r14
movq %r14, %r12
cmpq %r15, %r14
jne 0x292c
jmp 0x30da
leaq 0x1(%r12), %r14
cmpq %r15, %r14
je 0x311e
movq 0x8(%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x4864(%rip), %rsi      # 0x7335
callq 0x22b0
testl %eax, %eax
je 0x2b14
movq %r13, %rdi
leaq 0x4821(%rip), %rsi      # 0x7305
callq 0x22b0
testl %eax, %eax
je 0x2bc4
movq %r13, %rdi
leaq 0x480e(%rip), %rsi      # 0x7309
callq 0x22b0
testl %eax, %eax
jne 0x3133
movl $0x2, 0x77fe(%rip)      # 0xa310
jmp 0x2aa3
movl $0x0, 0x77f2(%rip)      # 0xa310
jmp 0x2aa3
leaq 0x1(%r12), %r14
cmpq %r15, %r14
jne 0x2bd3
movl $0x1f, %edx
movq 0x749e(%rip), %rdi      # 0x9fd8
leaq 0x46d0(%rip), %rsi      # 0x7211
callq 0x2270
movq (%rbx,%r12,8), %r13
cmpb $0x2d, (%r13)
je 0x2a16
xorl %r14d, %r14d
jmp 0x2a2b
leaq 0x1(%r12), %r14
cmpq %r15, %r14
je 0x311e
movq 0x8(%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x478b(%rip), %rsi      # 0x7305
callq 0x22b0
testl %eax, %eax
je 0x2c14
movq %r13, %rdi
leaq 0x4778(%rip), %rsi      # 0x7309
callq 0x22b0
testl %eax, %eax
je 0x2c73
movq %r13, %rdi
leaq 0x4765(%rip), %rsi      # 0x730d
callq 0x22b0
testl %eax, %eax
jne 0x31b5
movl $0x3, 0x763d(%rip)      # 0xa1fc
jmp 0x2aa3
movl $0x1, 0x7742(%rip)      # 0xa310
jmp 0x2aa3
movq 0x8(%rbx,%r12,8), %r13
movzbl (%r13), %eax
cmpl $0x37, %eax
je 0x2c82
cmpl $0x35, %eax
jne 0x2c94
cmpb $0x30, 0x1(%r13)
jne 0x2c94
cmpb $0x0, 0x2(%r13)
jne 0x2c94
movl $0x1, 0x75e9(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x1, 0x75de(%rip)      # 0xa1fc
jmp 0x2aa3
leaq 0x1(%r12), %r14
cmpq %r15, %r14
je 0x31cd
movq 0x8(%rbx,%r12,8), %r13
movq %r13, %rdi
leaq 0x4741(%rip), %rsi      # 0x7381
callq 0x22b0
testl %eax, %eax
je 0x2f45
movq %r13, %rdi
leaq 0x4730(%rip), %rsi      # 0x7387
callq 0x22b0
testl %eax, %eax
jne 0x31e2
movl $0x1, 0x76a6(%rip)      # 0xa314
jmp 0x2aa3
movl $0x2, 0x757f(%rip)      # 0xa1fc
jmp 0x2aa3
cmpb $0x35, 0x1(%r13)
jne 0x2c94
cmpb $0x0, 0x2(%r13)
je 0x2f72
movq %r13, %rdi
leaq 0x4593(%rip), %rsi      # 0x7231
callq 0x22b0
testl %eax, %eax
je 0x2f27
movq %r13, %rdi
leaq 0x4580(%rip), %rsi      # 0x7235
callq 0x22b0
testl %eax, %eax
je 0x2f36
movq %r13, %rdi
leaq 0x456d(%rip), %rsi      # 0x7239
callq 0x22b0
testl %eax, %eax
je 0x2f54
movq %r13, %rdi
leaq 0x455f(%rip), %rsi      # 0x7242
callq 0x22b0
testl %eax, %eax
je 0x2f63
movq %r13, %rdi
leaq 0x4543(%rip), %rsi      # 0x723d
callq 0x22b0
testl %eax, %eax
je 0x2f81
movq %r13, %rdi
leaq 0x457a(%rip), %rsi      # 0x728b
callq 0x22b0
testl %eax, %eax
je 0x2f90
movq %r13, %rdi
leaq 0x4519(%rip), %rsi      # 0x7241
callq 0x22b0
testl %eax, %eax
je 0x2f9f
movq %r13, %rdi
leaq 0x4507(%rip), %rsi      # 0x7246
callq 0x22b0
testl %eax, %eax
je 0x2fae
movq %r13, %rdi
leaq 0x44f5(%rip), %rsi      # 0x724b
callq 0x22b0
testl %eax, %eax
je 0x2fbd
movq %r13, %rdi
leaq 0x44e3(%rip), %rsi      # 0x7250
callq 0x22b0
testl %eax, %eax
je 0x2fcc
movq %r13, %rdi
leaq 0x44d1(%rip), %rsi      # 0x7255
callq 0x22b0
testl %eax, %eax
je 0x2fdb
movq %r13, %rdi
leaq 0x44bf(%rip), %rsi      # 0x725a
callq 0x22b0
testl %eax, %eax
je 0x2fea
movq %r13, %rdi
leaq 0x44ae(%rip), %rsi      # 0x7260
callq 0x22b0
testl %eax, %eax
je 0x2ff9
movq %r13, %rdi
leaq 0x449d(%rip), %rsi      # 0x7266
callq 0x22b0
testl %eax, %eax
je 0x3008
movq %r13, %rdi
leaq 0x448c(%rip), %rsi      # 0x726c
callq 0x22b0
testl %eax, %eax
je 0x3017
movq %r13, %rdi
leaq 0x447c(%rip), %rsi      # 0x7273
callq 0x22b0
testl %eax, %eax
je 0x3026
movq %r13, %rdi
leaq 0x446c(%rip), %rsi      # 0x727a
callq 0x22b0
testl %eax, %eax
je 0x3035
movq %r13, %rdi
leaq 0x447b(%rip), %rsi      # 0x72a0
callq 0x22b0
testl %eax, %eax
je 0x3044
movq %r13, %rdi
leaq 0x4445(%rip), %rsi      # 0x7281
callq 0x22b0
testl %eax, %eax
je 0x3053
movq %r13, %rdi
leaq 0x4435(%rip), %rsi      # 0x7288
callq 0x22b0
testl %eax, %eax
je 0x3062
movq %r13, %rdi
leaq 0x4425(%rip), %rsi      # 0x728f
callq 0x22b0
testl %eax, %eax
je 0x3071
movq %r13, %rdi
leaq 0x4416(%rip), %rsi      # 0x7297
callq 0x22b0
testl %eax, %eax
je 0x3080
movq %r13, %rdi
leaq 0x4407(%rip), %rsi      # 0x729f
callq 0x22b0
testl %eax, %eax
je 0x308f
movq %r13, %rdi
leaq 0x43f8(%rip), %rsi      # 0x72a7
callq 0x22b0
testl %eax, %eax
je 0x309e
movq %r13, %rdi
leaq 0x43e9(%rip), %rsi      # 0x72af
callq 0x22b0
testl %eax, %eax
je 0x30ad
movq %r13, %rdi
leaq 0x43da(%rip), %rsi      # 0x72b7
callq 0x22b0
testl %eax, %eax
je 0x30bc
movq %r13, %rdi
leaq 0x43cb(%rip), %rsi      # 0x72bf
callq 0x22b0
testl %eax, %eax
je 0x30cb
movq %r13, %rdi
leaq 0x43bc(%rip), %rsi      # 0x72c7
callq 0x22b0
testl %eax, %eax
jne 0x3206
movl $0x100f, 0x72d6(%rip)   # imm = 0x100F
jmp 0x2aa3
movl $0x3, 0x72c7(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x4, 0x72b8(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x0, 0x73c5(%rip)      # 0xa314
jmp 0x2aa3
movl $0x5, 0x729a(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x6, 0x728b(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x2, 0x727c(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x7, 0x726d(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x8, 0x725e(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x9, 0x724f(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0xa, 0x7240(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0xb, 0x7231(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0xc, 0x7222(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0xd, 0x7213(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0xe, 0x7204(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0xf, 0x71f5(%rip)      # 0xa1f8
jmp 0x2aa3
movl $0x1001, 0x71e6(%rip)   # imm = 0x1001
jmp 0x2aa3
movl $0x1002, 0x71d7(%rip)   # imm = 0x1002
jmp 0x2aa3
movl $0x1003, 0x71c8(%rip)   # imm = 0x1003
jmp 0x2aa3
movl $0x1004, 0x71b9(%rip)   # imm = 0x1004
jmp 0x2aa3
movl $0x1005, 0x71aa(%rip)   # imm = 0x1005
jmp 0x2aa3
movl $0x1006, 0x719b(%rip)   # imm = 0x1006
jmp 0x2aa3
movl $0x1007, 0x718c(%rip)   # imm = 0x1007
jmp 0x2aa3
movl $0x1008, 0x717d(%rip)   # imm = 0x1008
jmp 0x2aa3
movl $0x1009, 0x716e(%rip)   # imm = 0x1009
jmp 0x2aa3
movl $0x100a, 0x715f(%rip)   # imm = 0x100A
jmp 0x2aa3
movl $0x100b, 0x7150(%rip)   # imm = 0x100B
jmp 0x2aa3
movl $0x100c, 0x7141(%rip)   # imm = 0x100C
jmp 0x2aa3
movl $0x100d, 0x7132(%rip)   # imm = 0x100D
jmp 0x2aa3
movl $0x100e, 0x7123(%rip)   # imm = 0x100E
jmp 0x2aa3
leaq 0x71ef(%rip), %rdi      # 0xa2d0
leaq 0x4969(%rip), %rsi      # 0x7a51
callq 0x20a0
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x31a6
cmpl $0x1, 0x7214(%rip)      # 0xa314
jne 0x31a6
movq 0x6ecb(%rip), %rdi      # 0x9fd8
leaq 0x42a2(%rip), %rsi      # 0x73b6
movl $0x1d, %edx
jmp 0x319f
movq 0x6eb3(%rip), %rdi      # 0x9fd8
leaq 0x41bc(%rip), %rsi      # 0x72e8
movl $0x1c, %edx
jmp 0x319f
movq 0x6e9e(%rip), %r14      # 0x9fd8
leaq 0x41fd(%rip), %rsi      # 0x733e
movl $0x23, %edx
movq %r14, %rdi
callq 0x2270
movq 0x8(%rbx,%r12,8), %rbx
testq %rbx, %rbx
je 0x3174
movq %rbx, %rdi
callq 0x2110
movq 0x6e71(%rip), %rdi      # 0x9fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x318c
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2350
movq 0x6e45(%rip), %rdi      # 0x9fd8
leaq 0x48b6(%rip), %rsi      # 0x7a50
movl $0x1, %edx
callq 0x2270
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6e1c(%rip), %r14      # 0x9fd8
leaq 0x414e(%rip), %rsi      # 0x7311
movl $0x1f, %edx
jmp 0x3146
movq 0x6e04(%rip), %rdi      # 0x9fd8
leaq 0x4187(%rip), %rsi      # 0x7362
movl $0x1e, %edx
jmp 0x319f
movq 0x6def(%rip), %r14      # 0x9fd8
leaq 0x419d(%rip), %rsi      # 0x738d
movl $0x21, %edx
jmp 0x3146
callq 0x282c
xorl %edi, %edi
callq 0x2280
movq 0x6dcb(%rip), %r14      # 0x9fd8
leaq 0x40bb(%rip), %rsi      # 0x72cf
movl $0x18, %edx
movq %r14, %rdi
callq 0x2270
movq 0x8(%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x2200
leaq 0x481b(%rip), %rsi      # 0x7a50
movl $0x1, %edx
movq %rax, %rdi
jmp 0x319f