// File: GAStudyGroup[P]GPX2/src/args/Arg.cpp
// Function: Arg::processInput()
void Arg::processInput(){
    vector<string> argVector;
    bool error{false};
    string errorMsg{""};

    for(int i=1;i<argc;i++){
        string arg = argv[i];
        if(arg[0] == '-'){
            arg.erase(0,1);
            argVector.push_back(arg);
        }else{
            argVector.back() += " ";
            argVector.back() += arg;
        }
    }
    
    for(string arg : argVector){
        vector<string> argSplited = split(arg);
        Argument *a = getArgument(argSplited[0]);
        if(a==nullptr){
            if(error){
                errorMsg += "\n";
            }
            error = true;
            errorMsg += "Unexpected argument: "+argSplited[0];
        }else{
            string option{""};
            for(unsigned i=1;i<argSplited.size();i++){
                option += argSplited[i];
                if((++i)<argSplited.size()){
                    option += " ";
                }
            }
            a->setOption(option);
            a->setArg(true);
        }
    }
    throwException(errorMsg);
}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x1f0(%rsp)
movq 0x1f0(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x1d8(%rsp), %rdi
callq 0x1e3e0
movb $0x0, 0x1d7(%rsp)
leaq 0x1af(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x6860
movq 0x48(%rsp), %rdx
leaq 0x2d6d5(%rip), %rsi     # 0x759f4
leaq 0x1b0(%rsp), %rdi
callq 0x92b0
jmp 0x4832e
leaq 0x1af(%rsp), %rdi
callq 0x6520
movl $0x1, 0x198(%rsp)
movq 0x40(%rsp), %rcx
movl 0x198(%rsp), %eax
cmpl 0x18(%rcx), %eax
jge 0x484de
movq 0x40(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x198(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
leaq 0x177(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x6860
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x178(%rsp), %rdi
callq 0x92b0
jmp 0x483a0
leaq 0x177(%rsp), %rdi
callq 0x6520
xorl %eax, %eax
movl %eax, %esi
leaq 0x178(%rsp), %rdi
callq 0x6950
movq %rax, 0x28(%rsp)
jmp 0x483c5
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x4847c
xorl %eax, %eax
movl %eax, %esi
leaq 0x178(%rsp), %rdi
movl $0x1, %edx
callq 0x60f0
jmp 0x483ee
leaq 0x1d8(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x37210
jmp 0x48405
jmp 0x484bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x1af(%rsp), %rdi
callq 0x6520
jmp 0x489c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x177(%rsp), %rdi
callq 0x6520
jmp 0x489b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x6988
jmp 0x489b9
leaq 0x1d8(%rsp), %rdi
callq 0x47710
movq %rax, %rdi
leaq 0x2bec1(%rip), %rsi     # 0x74354
callq 0x6490
jmp 0x4849a
leaq 0x1d8(%rsp), %rdi
callq 0x47710
movq %rax, %rdi
leaq 0x178(%rsp), %rsi
callq 0x6620
jmp 0x484b9
jmp 0x484bb
leaq 0x178(%rsp), %rdi
callq 0x6988
movl 0x198(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x198(%rsp)
jmp 0x48346
leaq 0x1d8(%rsp), %rax
movq %rax, 0x168(%rsp)
movq 0x168(%rsp), %rdi
callq 0x1e310
movq %rax, 0x160(%rsp)
movq 0x168(%rsp), %rdi
callq 0x1e340
movq %rax, 0x158(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x1e370
testb $0x1, %al
jne 0x48536
jmp 0x4894a
leaq 0x160(%rsp), %rdi
callq 0x1e3b0
movq %rax, %rsi
leaq 0x138(%rsp), %rdi
callq 0x6200
jmp 0x48555
leaq 0x100(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x6200
jmp 0x4856c
movq 0x40(%rsp), %rsi
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rdx
movl $0x20, %ecx
callq 0x47a70
jmp 0x4858d
leaq 0x100(%rsp), %rdi
callq 0x6988
xorl %eax, %eax
movl %eax, %esi
leaq 0x120(%rsp), %rdi
callq 0x49910
movq %rax, %rsi
leaq 0xd8(%rsp), %rdi
callq 0x6200
jmp 0x485bd
movq 0x40(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x49080
movq %rax, 0x20(%rsp)
jmp 0x485d6
leaq 0xd8(%rsp), %rdi
callq 0x6988
movq 0x20(%rsp), %rax
movq %rax, 0xf8(%rsp)
cmpq $0x0, 0xf8(%rsp)
jne 0x48740
testb $0x1, 0x1d7(%rsp)
je 0x486bf
leaq 0x2d23a(%rip), %rsi     # 0x7584e
leaq 0x1b0(%rsp), %rdi
callq 0x6490
jmp 0x48623
jmp 0x486bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x489b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x4893b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x6988
jmp 0x4893b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x4892e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x6988
jmp 0x4892e
movb $0x1, 0x1d7(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0x120(%rsp), %rdi
callq 0x49910
movq %rax, %rdx
leaq 0x2d128(%rip), %rsi     # 0x7580a
leaq 0xb8(%rsp), %rdi
callq 0x189f0
jmp 0x486f1
leaq 0x1b0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x6620
jmp 0x48708
leaq 0xb8(%rsp), %rdi
callq 0x6988
jmp 0x48902
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x6988
jmp 0x4892e
leaq 0x97(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x6860
movq 0x18(%rsp), %rdx
leaq 0x2d296(%rip), %rsi     # 0x759f4
leaq 0x98(%rsp), %rdi
callq 0x92b0
jmp 0x4876d
leaq 0x97(%rsp), %rdi
callq 0x6520
movl $0x1, 0x90(%rsp)
movl 0x90(%rsp), %eax
movq %rax, 0x10(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x30bb0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x48878
movl 0x90(%rsp), %eax
movl %eax, %esi
leaq 0x120(%rsp), %rdi
callq 0x49910
movq %rax, %rsi
leaq 0x98(%rsp), %rdi
callq 0x6620
jmp 0x487d7
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x90(%rsp)
movl %eax, %eax
movq %rax, 0x8(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x30bb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x48860
leaq 0x2bb44(%rip), %rsi     # 0x74354
leaq 0x98(%rsp), %rdi
callq 0x6490
jmp 0x4881f
jmp 0x48860
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x97(%rsp), %rdi
callq 0x6520
jmp 0x4892e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
jmp 0x488f3
jmp 0x48862
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x90(%rsp)
jmp 0x48785
movq 0xf8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x6200
jmp 0x48898
movq (%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x49950
jmp 0x488a8
leaq 0x70(%rsp), %rdi
callq 0x6988
movq 0xf8(%rsp), %rdi
movl $0x1, %esi
callq 0x49980
jmp 0x488c6
leaq 0x98(%rsp), %rdi
callq 0x6988
jmp 0x48902
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x6988
leaq 0x98(%rsp), %rdi
callq 0x6988
jmp 0x4892e
leaq 0x120(%rsp), %rdi
callq 0xa2c0
leaq 0x138(%rsp), %rdi
callq 0x6988
leaq 0x160(%rsp), %rdi
callq 0x1e3c0
jmp 0x48518
leaq 0x120(%rsp), %rdi
callq 0xa2c0
leaq 0x138(%rsp), %rdi
callq 0x6988
jmp 0x489b9
leaq 0x50(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x6200
jmp 0x4895e
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x48fc0
jmp 0x4896f
leaq 0x50(%rsp), %rdi
callq 0x6988
leaq 0x1b0(%rsp), %rdi
callq 0x6988
leaq 0x1d8(%rsp), %rdi
callq 0xa2c0
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a0(%rsp)
movl %eax, 0x19c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6988
leaq 0x1b0(%rsp), %rdi
callq 0x6988
leaq 0x1d8(%rsp), %rdi
callq 0xa2c0
movq 0x1a0(%rsp), %rdi
callq 0x6850