// File: /workspace/github_cpp_makefile_star2_O1/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 0x3066
movq %rsi, %rbx
movl %edi, %eax
leaq -0x2(%rax), %r13
decq %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq 0x8(%rbx,%r12,8), %rdi
leaq 0x5896(%rip), %rsi      # 0x81d5
callq 0x22b0
testl %eax, %eax
jne 0x2997
cmpq %r12, %r13
jne 0x296c
movl $0x1f, %edx
movq 0x867f(%rip), %rdi      # 0xafd8
leaq 0x5878(%rip), %rsi      # 0x81d8
callq 0x2270
callq 0x282c
jmp 0x2997
movq 0x10(%rbx,%r12,8), %r15
movq 0x8960(%rip), %r14      # 0xb2d8
movq %r15, %rdi
callq 0x2110
leaq 0x8949(%rip), %rdi      # 0xb2d0
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x2310
movq 0x8(%rbx,%r12,8), %rdi
leaq 0x5855(%rip), %rsi      # 0x81f8
callq 0x22b0
testl %eax, %eax
jne 0x29f6
cmpq %r12, %r13
jne 0x29cb
movl $0x1b, %edx
movq 0x861b(%rip), %rdi      # 0xafd8
leaq 0x5837(%rip), %rsi      # 0x81fb
callq 0x2270
jmp 0x29f6
movq 0x10(%rbx,%r12,8), %r14
movq 0x8921(%rip), %r15      # 0xb2f8
movq %r14, %rdi
callq 0x2110
leaq 0x890a(%rip), %rdi      # 0xb2f0
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2310
movq 0x8(%rbx,%r12,8), %rdi
leaq 0x5815(%rip), %rsi      # 0x8217
callq 0x22b0
testl %eax, %eax
jne 0x2a2c
cmpq %r12, %r13
jne 0x2b6d
movl $0x1f, %edx
movq 0x85b8(%rip), %rdi      # 0xafd8
leaq 0x57f3(%rip), %rsi      # 0x821a
callq 0x2270
movq 0x8(%rbx,%r12,8), %r15
movq %r15, %rdi
leaq 0x58b9(%rip), %rsi      # 0x82f4
callq 0x22b0
testl %eax, %eax
je 0x2aa9
movq %r15, %rdi
leaq 0x58f2(%rip), %rsi      # 0x8340
callq 0x22b0
testl %eax, %eax
je 0x2b0b
movq %r15, %rdi
leaq 0x590c(%rip), %rsi      # 0x8371
callq 0x22b0
testl %eax, %eax
je 0x2e33
movq %r15, %rdi
leaq 0x5945(%rip), %rsi      # 0x83c1
callq 0x22b0
movl %eax, %r14d
movq %r15, %rdi
leaq 0x5936(%rip), %rsi      # 0x83c4
callq 0x22b0
testl %r14d, %r14d
je 0x3186
testl %eax, %eax
jne 0x3059
jmp 0x3186
cmpq %r12, %r13
je 0x30aa
movq 0x10(%rbx,%r12,8), %r15
movq %r15, %rdi
leaq 0x5853(%rip), %rsi      # 0x8314
callq 0x22b0
testl %eax, %eax
je 0x2e7e
movq %r15, %rdi
leaq 0x5840(%rip), %rsi      # 0x8318
callq 0x22b0
testl %eax, %eax
je 0x2e9c
movq %r15, %rdi
leaq 0x582d(%rip), %rsi      # 0x831c
callq 0x22b0
testl %eax, %eax
jne 0x30da
movl $0x3, 0x86f6(%rip)      # 0xb1fc
jmp 0x3059
cmpq %r12, %r13
je 0x30aa
movq 0x10(%rbx,%r12,8), %r15
movq %r15, %rdi
leaq 0x5821(%rip), %rsi      # 0x8344
callq 0x22b0
testl %eax, %eax
je 0x2eab
movq %r15, %rdi
leaq 0x57da(%rip), %rsi      # 0x8314
callq 0x22b0
testl %eax, %eax
je 0x2ec9
movq %r15, %rdi
leaq 0x57c7(%rip), %rsi      # 0x8318
callq 0x22b0
testl %eax, %eax
jne 0x3104
movl $0x2, 0x87a8(%rip)      # 0xb310
jmp 0x3059
movq 0x10(%rbx,%r12,8), %r15
movq %r15, %rdi
leaq 0x56ca(%rip), %rsi      # 0x8246
callq 0x22b0
testl %eax, %eax
je 0x2e8d
movq %r15, %rdi
leaq 0x56a7(%rip), %rsi      # 0x823a
callq 0x22b0
testl %eax, %eax
je 0x2eba
movq %r15, %rdi
leaq 0x5693(%rip), %rsi      # 0x823d
callq 0x22b0
testl %eax, %eax
je 0x2ee7
movq %r15, %rdi
leaq 0x5680(%rip), %rsi      # 0x8241
callq 0x22b0
testl %eax, %eax
je 0x2ef6
movq %r15, %rdi
leaq 0x566d(%rip), %rsi      # 0x8245
callq 0x22b0
testl %eax, %eax
je 0x2f05
movq %r15, %rdi
leaq 0x565f(%rip), %rsi      # 0x824e
callq 0x22b0
testl %eax, %eax
je 0x2f14
movq %r15, %rdi
leaq 0x5643(%rip), %rsi      # 0x8249
callq 0x22b0
testl %eax, %eax
je 0x2f23
movq %r15, %rdi
leaq 0x567a(%rip), %rsi      # 0x8297
callq 0x22b0
testl %eax, %eax
je 0x2f32
movq %r15, %rdi
leaq 0x5619(%rip), %rsi      # 0x824d
callq 0x22b0
testl %eax, %eax
je 0x2f41
movq %r15, %rdi
leaq 0x5607(%rip), %rsi      # 0x8252
callq 0x22b0
testl %eax, %eax
je 0x2f50
movq %r15, %rdi
leaq 0x55f5(%rip), %rsi      # 0x8257
callq 0x22b0
testl %eax, %eax
je 0x2f5f
movq %r15, %rdi
leaq 0x55e3(%rip), %rsi      # 0x825c
callq 0x22b0
testl %eax, %eax
je 0x2f6e
movq %r15, %rdi
leaq 0x55d1(%rip), %rsi      # 0x8261
callq 0x22b0
testl %eax, %eax
je 0x2f7d
movq %r15, %rdi
leaq 0x55bf(%rip), %rsi      # 0x8266
callq 0x22b0
testl %eax, %eax
je 0x2f8c
movq %r15, %rdi
leaq 0x55ae(%rip), %rsi      # 0x826c
callq 0x22b0
testl %eax, %eax
je 0x2f9b
movq %r15, %rdi
leaq 0x559d(%rip), %rsi      # 0x8272
callq 0x22b0
testl %eax, %eax
je 0x2faa
movq %r15, %rdi
leaq 0x558c(%rip), %rsi      # 0x8278
callq 0x22b0
testl %eax, %eax
je 0x2fb9
movq %r15, %rdi
leaq 0x557c(%rip), %rsi      # 0x827f
callq 0x22b0
testl %eax, %eax
je 0x2fc8
movq %r15, %rdi
leaq 0x556c(%rip), %rsi      # 0x8286
callq 0x22b0
testl %eax, %eax
je 0x2fd7
movq %r15, %rdi
leaq 0x557b(%rip), %rsi      # 0x82ac
callq 0x22b0
testl %eax, %eax
je 0x2fe3
movq %r15, %rdi
leaq 0x5545(%rip), %rsi      # 0x828d
callq 0x22b0
testl %eax, %eax
je 0x2fef
movq %r15, %rdi
leaq 0x5535(%rip), %rsi      # 0x8294
callq 0x22b0
testl %eax, %eax
je 0x2ffb
movq %r15, %rdi
leaq 0x5525(%rip), %rsi      # 0x829b
callq 0x22b0
testl %eax, %eax
je 0x3007
movq %r15, %rdi
leaq 0x5516(%rip), %rsi      # 0x82a3
callq 0x22b0
testl %eax, %eax
je 0x3013
movq %r15, %rdi
leaq 0x5507(%rip), %rsi      # 0x82ab
callq 0x22b0
testl %eax, %eax
je 0x301f
movq %r15, %rdi
leaq 0x54f8(%rip), %rsi      # 0x82b3
callq 0x22b0
testl %eax, %eax
je 0x302b
movq %r15, %rdi
leaq 0x54e9(%rip), %rsi      # 0x82bb
callq 0x22b0
testl %eax, %eax
je 0x3037
movq %r15, %rdi
leaq 0x54da(%rip), %rsi      # 0x82c3
callq 0x22b0
testl %eax, %eax
je 0x3043
movq %r15, %rdi
leaq 0x54cb(%rip), %rsi      # 0x82cb
callq 0x22b0
testl %eax, %eax
je 0x304f
movq %r15, %rdi
leaq 0x54bc(%rip), %rsi      # 0x82d3
callq 0x22b0
testl %eax, %eax
jne 0x3192
movl $0x100f, 0x83ca(%rip)   # imm = 0x100F
jmp 0x3059
cmpq %r12, %r13
je 0x30c2
movq 0x10(%rbx,%r12,8), %r15
movq %r15, %rdi
leaq 0x5548(%rip), %rsi      # 0x8393
callq 0x22b0
testl %eax, %eax
je 0x2ed8
movq %r15, %rdi
leaq 0x5537(%rip), %rsi      # 0x8399
callq 0x22b0
testl %eax, %eax
jne 0x30ef
movl $0x1, 0x849b(%rip)      # 0xb314
jmp 0x3059
movl $0x1, 0x8374(%rip)      # 0xb1fc
jmp 0x3059
movl $0x1, 0x8361(%rip)      # 0xb1f8
jmp 0x3059
movl $0x2, 0x8356(%rip)      # 0xb1fc
jmp 0x3059
movl $0x0, 0x845b(%rip)      # 0xb310
jmp 0x3059
movl $0x2, 0x8334(%rip)      # 0xb1f8
jmp 0x3059
movl $0x1, 0x843d(%rip)      # 0xb310
jmp 0x3059
movl $0x0, 0x8432(%rip)      # 0xb314
jmp 0x3059
movl $0x3, 0x8307(%rip)      # 0xb1f8
jmp 0x3059
movl $0x4, 0x82f8(%rip)      # 0xb1f8
jmp 0x3059
movl $0x5, 0x82e9(%rip)      # 0xb1f8
jmp 0x3059
movl $0x6, 0x82da(%rip)      # 0xb1f8
jmp 0x3059
movl $0x7, 0x82cb(%rip)      # 0xb1f8
jmp 0x3059
movl $0x8, 0x82bc(%rip)      # 0xb1f8
jmp 0x3059
movl $0x9, 0x82ad(%rip)      # 0xb1f8
jmp 0x3059
movl $0xa, 0x829e(%rip)      # 0xb1f8
jmp 0x3059
movl $0xb, 0x828f(%rip)      # 0xb1f8
jmp 0x3059
movl $0xc, 0x8280(%rip)      # 0xb1f8
jmp 0x3059
movl $0xd, 0x8271(%rip)      # 0xb1f8
jmp 0x3059
movl $0xe, 0x8262(%rip)      # 0xb1f8
jmp 0x3059
movl $0xf, 0x8253(%rip)      # 0xb1f8
jmp 0x3059
movl $0x1001, 0x8244(%rip)   # imm = 0x1001
jmp 0x3059
movl $0x1002, 0x8235(%rip)   # imm = 0x1002
jmp 0x3059
movl $0x1003, 0x8226(%rip)   # imm = 0x1003
jmp 0x3059
movl $0x1004, 0x8217(%rip)   # imm = 0x1004
jmp 0x3059
movl $0x1005, 0x820b(%rip)   # imm = 0x1005
jmp 0x3059
movl $0x1006, 0x81ff(%rip)   # imm = 0x1006
jmp 0x3059
movl $0x1007, 0x81f3(%rip)   # imm = 0x1007
jmp 0x3059
movl $0x1008, 0x81e7(%rip)   # imm = 0x1008
jmp 0x3059
movl $0x1009, 0x81db(%rip)   # imm = 0x1009
jmp 0x3059
movl $0x100a, 0x81cf(%rip)   # imm = 0x100A
jmp 0x3059
movl $0x100b, 0x81c3(%rip)   # imm = 0x100B
jmp 0x3059
movl $0x100c, 0x81b7(%rip)   # imm = 0x100C
jmp 0x3059
movl $0x100d, 0x81ab(%rip)   # imm = 0x100D
jmp 0x3059
movl $0x100e, 0x819f(%rip)   # imm = 0x100E
incq %r12
cmpq %r12, -0x30(%rbp)
jne 0x2933
leaq 0x8263(%rip), %rdi      # 0xb2d0
leaq 0x59f2(%rip), %rsi      # 0x8a66
callq 0x20a0
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x3177
cmpl $0x1, 0x8288(%rip)      # 0xb314
jne 0x3177
movq 0x7f3f(%rip), %rdi      # 0xafd8
leaq 0x532b(%rip), %rsi      # 0x83cb
movl $0x1d, %edx
jmp 0x3170
movq 0x7f27(%rip), %rdi      # 0xafd8
leaq 0x523f(%rip), %rsi      # 0x82f7
movl $0x1c, %edx
jmp 0x3170
movq 0x7f0f(%rip), %rdi      # 0xafd8
leaq 0x52a4(%rip), %rsi      # 0x8374
movl $0x1e, %edx
jmp 0x3170
movq 0x7ef7(%rip), %r14      # 0xafd8
leaq 0x5238(%rip), %rsi      # 0x8320
movl $0x1f, %edx
jmp 0x3117
movq 0x7ee2(%rip), %r14      # 0xafd8
leaq 0x52a2(%rip), %rsi      # 0x839f
movl $0x21, %edx
jmp 0x3117
movq 0x7ecd(%rip), %r14      # 0xafd8
leaq 0x523b(%rip), %rsi      # 0x834d
movl $0x23, %edx
movq %r14, %rdi
callq 0x2270
movq 0x10(%rbx,%r12,8), %rbx
testq %rbx, %rbx
je 0x3145
movq %rbx, %rdi
callq 0x2110
movq 0x7ea0(%rip), %rdi      # 0xafd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x315d
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2350
movq 0x7e74(%rip), %rdi      # 0xafd8
leaq 0x58fa(%rip), %rsi      # 0x8a65
movl $0x1, %edx
callq 0x2270
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x282c
xorl %edi, %edi
callq 0x2280
movq 0x7e3f(%rip), %r14      # 0xafd8
leaq 0x513b(%rip), %rsi      # 0x82db
movl $0x18, %edx
movq %r14, %rdi
callq 0x2270
movq 0x10(%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x2200
leaq 0x58a4(%rip), %rsi      # 0x8a65
movl $0x1, %edx
movq %rax, %rdi
jmp 0x3170