// File: gpertea[P]gclib/GArgs.cpp
// Function: GArgs::GArgs(int, char**, GArgsDef const*, bool)
GArgs::GArgs(int argc, char* argv[], const GArgsDef fmtrecs[], bool nodigitopts) {
 fmtcount=0;
 count=0;
 nonOptCount=0;
 nonOptPos=0;
 optPos=0;
 errarg=0;
 err_valmissing=false;
 args=NULL;
 fmt=NULL;
 _argc=argc;
 _argv=argv;
 if (fmtrecs==NULL) return;
 
 const GArgsDef* frec=fmtrecs;
 while ((frec->longopt || frec->opt) && fmtcount<255) {
     fmtcount++;
     frec=&(fmtrecs[fmtcount]);
     }
 GCALLOC(fmt, fmtcount*sizeof(fmtdef));
 for (int i=0;i<fmtcount;i++) {
   fmt[i].longopt=Gstrdup(fmtrecs[i].longopt); //do we need to use Gstrdup here?
   fmt[i].opt=fmtrecs[i].opt;
   fmt[i].req_value=fmtrecs[i].req_value;
   fmt[i].code=fmtrecs[i].code;
   }
 parseArgs(nodigitopts);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, (%rax)
movl $0x0, 0x28(%rax)
movl $0x0, 0x2c(%rax)
movl $0x0, 0x30(%rax)
movl $0x0, 0x34(%rax)
movl $0x0, 0x38(%rax)
movb $0x0, 0x3c(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x8(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x20(%rbp)
jne 0xc61e
jmp 0xc776
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xc63f
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, 0x8(%rcx)
movb %al, -0x41(%rbp)
je 0xc64f
movq -0x40(%rbp), %rax
cmpl $0xff, (%rax)
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xc658
jmp 0xc677
movq -0x40(%rbp), %rcx
movl (%rcx), %eax
addl $0x1, %eax
movl %eax, (%rcx)
movq -0x20(%rbp), %rax
movslq (%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0xc626
movq -0x40(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movslq (%rax), %rsi
shlq $0x4, %rsi
callq 0xcd90
testb $0x1, %al
jne 0xc6a0
leaq 0x798a(%rip), %rdi      # 0x14023
movb $0x0, %al
callq 0x2640
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl (%rcx), %eax
jge 0xc765
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x27b0
movq %rax, %rdx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movslq -0x34(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movq %rdx, (%rcx)
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movb 0x8(%rcx), %dl
movq 0x8(%rax), %rcx
movslq -0x34(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movb %dl, 0x8(%rcx)
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movb 0x9(%rcx), %dl
movq 0x8(%rax), %rcx
movslq -0x34(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
andb $0x1, %dl
movb %dl, 0x9(%rcx)
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
movq 0x8(%rax), %rax
movslq -0x34(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xc6a7
movq -0x40(%rbp), %rdi
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xba20
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)