// File: fffrankkk[P]XmlCode/src/Option.cpp
// Function: COption::Parse(int const&, char**, std::vector<std::pair<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void COption::Parse(const int& iArgc, char* pszArgv[], RST_C& CRst)
{
	char szShortOpt[OPT_MAXNUM << 1] = {0};
	for (unsigned int uiCount = 0; uiCount < m_uiOptNum; ++uiCount) {
		szShortOpt[strlen(szShortOpt)] = m_stLongOpt[uiCount].val;
		if(m_stLongOpt[uiCount].has_arg != no_argument) {
			szShortOpt[strlen(szShortOpt)] = ':';
		}	
	}
	int iChar = -1;
	while ((iChar = getopt_long(iArgc, pszArgv, szShortOpt, m_stLongOpt, NULL)) != -1) {
		if (iChar == '?') {
			continue;
		}
		CRst.push_back(std::make_pair(iChar, std::string(optarg != NULL ? optarg : "")));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x5200
movl $0x0, -0x64(%rbp)
movq -0xd0(%rbp), %rcx
movl -0x64(%rbp), %eax
cmpl 0x408(%rcx), %eax
jae 0xfdb9
movq -0xd0(%rbp), %rax
addq $0x8, %rax
movl -0x64(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movb %al, -0xd1(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x51a0
movb -0xd1(%rbp), %dl
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movb %dl, -0x60(%rbp,%rcx)
addq $0x8, %rax
movl -0x64(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0xfdac
leaq -0x60(%rbp), %rdi
callq 0x51a0
movb $0x3a, -0x60(%rbp,%rax)
jmp 0xfdae
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xfd3d
movl $0xffffffff, -0x68(%rbp) # imm = 0xFFFFFFFF
movq -0xd0(%rbp), %rcx
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdx
addq $0x8, %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x56b0
movl %eax, -0x68(%rbp)
cmpl $-0x1, %eax
je 0xff26
cmpl $0x3f, -0x68(%rbp)
jne 0xfdf7
jmp 0xfdc0
movq -0x20(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq 0x3b1af(%rip), %rax     # 0x4afb8
cmpq $0x0, (%rax)
je 0xfe22
movq 0x3b1a2(%rip), %rax     # 0x4afb8
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
jmp 0xfe32
leaq 0x276e1(%rip), %rax     # 0x3750a
movq %rax, -0xe8(%rbp)
jmp 0xfe32
movq -0xe8(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x5750
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
callq 0x7a40
jmp 0xfe6f
leaq -0x90(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xff70
jmp 0xfe88
movq -0xe0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xff40
jmp 0xfe9d
leaq -0x90(%rbp), %rdi
callq 0x6200
leaq -0xb0(%rbp), %rdi
callq 0x5240
leaq -0xb1(%rbp), %rdi
callq 0x5460
jmp 0xfdc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0xff18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
jmp 0xff0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x6200
leaq -0xb0(%rbp), %rdi
callq 0x5240
leaq -0xb1(%rbp), %rdi
callq 0x5460
jmp 0xff2f
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xc0(%rbp), %rdi
callq 0x5740
nopl (%rax,%rax)