// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/luac.c
// Function: doargs
static int doargs(int argc, char* argv[])
{
 int i;
 int version=0;
 if (argv[0]!=NULL && *argv[0]!=0) progname=argv[0];
 for (i=1; i<argc; i++)
 {
  if (*argv[i]!='-')			/* end of options; keep it */
   break;
  else if (IS("--"))			/* end of options; skip it */
  {
   ++i;
   if (version) ++version;
   break;
  }
  else if (IS("-"))			/* end of options; use stdin */
   break;
  else if (IS("-l"))			/* list */
   ++listing;
  else if (IS("-o"))			/* output file */
  {
   output=argv[++i];
   if (output==NULL || *output==0 || (*output=='-' && output[1]!=0))
    usage(LUA_QL("-o") " needs argument");
   if (IS("-")) output=NULL;
  }
  else if (IS("-p"))			/* parse only */
   dumping=0;
  else if (IS("-s"))			/* strip debug information */
   stripping=1;
  else if (IS("-v"))			/* show version */
   ++version;
  else					/* unknown option */
   usage(argv[i]);
 }
 if (i==argc && (listing || !dumping))
 {
  dumping=0;
  argv[--i]=Output;
 }
 if (version)
 {
  printf("%s\n",LUA_COPYRIGHT);
  if (version==argc-1) exit(EXIT_SUCCESS);
 }
 return i;
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
movl $0x0, (%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x449e
movq 0x8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x449e
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x29ca2(%rip)     # 0x2e140
movl $0x1, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x46cb
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x44cf
jmp 0x46cb
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x21d74(%rip), %rsi     # 0x26258
callq 0x4130
cmpl $0x0, %eax
jne 0x450d
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, (%rsp)
je 0x4508
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x46cb
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x23bc3(%rip), %rsi     # 0x280e5
callq 0x4130
cmpl $0x0, %eax
jne 0x4531
jmp 0x46cb
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x21d15(%rip), %rsi     # 0x2625b
callq 0x4130
cmpl $0x0, %eax
jne 0x4564
movl 0x29c0e(%rip), %eax     # 0x2e164
addl $0x1, %eax
movl %eax, 0x29c05(%rip)     # 0x2e164
jmp 0x46b3
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x21ce5(%rip), %rsi     # 0x2625e
callq 0x4130
cmpl $0x0, %eax
jne 0x4618
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x29ba3(%rip)     # 0x2e148
cmpq $0x0, 0x29b9b(%rip)     # 0x2e148
je 0x45dd
movq 0x29b92(%rip), %rax     # 0x2e148
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x45dd
movq 0x29b83(%rip), %rax     # 0x2e148
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x45e9
movq 0x29b74(%rip), %rax     # 0x2e148
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x45e9
leaq 0x21c7d(%rip), %rdi     # 0x26261
callq 0x4750
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x23ae7(%rip), %rsi     # 0x280e5
callq 0x4130
cmpl $0x0, %eax
jne 0x4613
movq $0x0, 0x29b35(%rip) # 0x2e148
jmp 0x46b1
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x21c48(%rip), %rsi     # 0x26275
callq 0x4130
cmpl $0x0, %eax
jne 0x4643
movl $0x0, 0x29b0f(%rip)     # 0x2e150
jmp 0x46af
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x21c20(%rip), %rsi     # 0x26278
callq 0x4130
cmpl $0x0, %eax
jne 0x466e
movl $0x1, 0x29afc(%rip)     # 0x2e168
jmp 0x46ad
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x21bf8(%rip), %rsi     # 0x2627b
callq 0x4130
cmpl $0x0, %eax
jne 0x4698
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x46ab
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4750
jmp 0x46ad
jmp 0x46af
jmp 0x46b1
jmp 0x46b3
jmp 0x46b5
jmp 0x46b7
jmp 0x46b9
jmp 0x46bb
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x44a6
movl 0x4(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x470f
cmpl $0x0, 0x29a88(%rip)     # 0x2e164
jne 0x46e7
cmpl $0x0, 0x29a6b(%rip)     # 0x2e150
jne 0x470f
movl $0x0, 0x29a5f(%rip)     # 0x2e150
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
leaq 0x29a49(%rip), %rdx     # 0x2e154
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, (%rsp)
je 0x4741
leaq 0x21ebc(%rip), %rdi     # 0x265d8
leaq 0x21b5b(%rip), %rsi     # 0x2627e
movb $0x0, %al
callq 0x40f0
movl (%rsp), %eax
movl 0x14(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x473f
xorl %edi, %edi
callq 0x4200
jmp 0x4741
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)